diff options
Diffstat (limited to 'views/admin/module.phtml')
| -rw-r--r-- | views/admin/module.phtml | 109 |
1 files changed, 89 insertions, 20 deletions
diff --git a/views/admin/module.phtml b/views/admin/module.phtml index 514918b..394ee7a 100644 --- a/views/admin/module.phtml +++ b/views/admin/module.phtml @@ -5,6 +5,12 @@ * Sollte nicht angepasst werden
*/
+ $wpsg_update_data = wpsg_get_update_data();
+ if (wpsg_isSizedArray($wpsg_update_data['modulinfo'])) $modul_info = $wpsg_update_data['modulinfo'];
+ else $modul_info = array();
+
+ //wpsg_debug($modul_info);
+
?>
<div class="wpsg_admin_submenu">
@@ -50,23 +56,79 @@ <?php echo wpsg_drawForm_Select('aktiv', __('Modul aktiviert', 'wpsg'), array('0' => __('Nein', 'wpsg'), '1' => __('Ja', 'wpsg')), ((wpsg_isSizedInt($modul_install))?'1':'0')); ?>
<?php if (isset($this->arAllModule[$_REQUEST['modul']]->version)) { ?>
- <?php echo wpsg_drawForm_Input('', __('Version', 'wpsg'), $this->arAllModule[$_REQUEST['modul']]->version, array('text' => true)); ?>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
- <?php if (isset($this->arAllModule[$_REQUEST['modul']]->free) && $this->arAllModule[$_REQUEST['modul']]->free === true) { ?>
- <?php $strLizenz = __('Kostenfrei', 'wpsg'); ?>
- <?php } else { ?>
- <?php if (is_array($this->arLizenz) && in_array($_REQUEST['modul'], (array)$this->arLizenz['mods'])) { ?>
- <?php $strLizenz = __('Aktiviert', 'wpsg'); ?>
- <?php } else { ?>
- <?php if ($this->arAllModule[$_REQUEST['modul']]->getDemoDays() > 0) { ?>
- <?php $strLizenz = wpsg_translate(__('Demo Modus noch #1# Tage verbleibend.', 'wpsg'), $this->arAllModule[$_REQUEST['modul']]->getDemoDays()); ?>
- <?php } else { ?>
- <?php $strLizenz = __('Demo Modus abgelaufen.', 'wpsg'); ?>
- <?php } ?>
- <?php } ?>
- <?php } ?>
- <?php echo wpsg_drawForm_Text(__('Lizenz'), $strLizenz); ?>
+ <?php
+
+ echo $this->arAllModule[$_REQUEST['modul']]->version;
+
+ if (wpsg_isSizedArray($modul_info[$_REQUEST['modul']]))
+ {
+
+ $modul_info_modul = $modul_info[$_REQUEST['modul']];
+
+ if ($modul_info_modul['version'] === $this->shop->arAllModule[$_REQUEST['modul']]->version)
+ {
+
+ echo ' - <strong class="wpsg_message_ok">'.__('aktuell', 'wpsg').'</strong>';
+
+ }
+ else if (version_compare($modul_info_modul['version'], WPSG_VERSION) > 0)
+ {
+
+ echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong><br />'.wpsg_translate(__('<a href="#1#">wpShopGermany Update</a> notwendig', 'wpsg'), WPSG_URL_WP.'wp-admin/plugins.php');
+
+ }
+ else if (version_compare($modul_info_modul['version'], $this->shop->arAllModule[$_REQUEST['modul']]->versio) > 0)
+ {
+
+ echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong>';
+
+ if ($modul_info_modul['active'] === true)
+ {
+
+ echo '<br />';
+ echo wpsg_translate(__('<a href="#1#">Version installieren</a>.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$_REQUEST['modul']);
+
+ }
+
+ }
+
+ }
+
+ ?>
+
+ <?php echo wpsg_drawForm_TextEnd(__('Version', 'wpsg')); ?>
+
+ <?php echo wpsg_drawForm_TextStart(); ?>
+
+ <?php if (array_key_exists($_REQUEST['modul'], $modul_info)) { ?>
+
+ <?php if (wpsg_isTrue($modul_info[$_REQUEST['modul']]['free'])) { ?>
+ <span class="wpsg_message_ok"><?php echo __('Kostenfrei', 'wpsg'); ?></span>
+ <?php } else if (wpsg_isTrue($modul_info[$_REQUEST['modul']]['active'])) { ?>
+ <span class="wpsg_message_ok"><?php echo __('Aktiv', 'wpsg'); ?></span>
+ <?php } else { ?>
+ <span class="wpsg_error"><?php echo __('Nicht aktiv', 'wpsg'); ?></span>
+
+ <?php if (wpsg_isSizedString($modul_info[$_REQUEST['modul']]['shop_url'])) { ?>
+ [ <a href="<?php echo $modul_info[$_REQUEST['modul']]['shop_url']; ?>"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a> ]
+ <?php } else { ?>
+ [ <a href="https://shop.maennchen1.de/"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a> ]
+ <?php } ?>
+ [ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=modulactivation"><?php echo __('Modulcode eingeben', 'wpsg'); ?></a> ]
+
+ <?php } ?>
+
+ <?php } else { ?>
+ <span class="wpsg_error"><?php echo __('Unbekannt', 'wpsg'); ?></span>
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_TextEnd(__('Lizenz')); ?>
+ <hr />
+
<?php } ?>
<?php if (!isset($this->arAllModule[$_REQUEST['modul']]->version) || ((wpsg_isTrue($this->arAllModule[$_REQUEST['modul']]->free) || (is_array($this->arLizenz) && in_array($_REQUEST['modul'], (array)$this->arLizenz['mods'])) || $this->arAllModule[$_REQUEST['modul']]->getDemoDays() > 0))) { ?>
@@ -140,7 +202,7 @@ <thead>
<tr>
<th><?php echo __('Modulname', 'wpsg'); ?></th>
- <th><?php echo __('installierte Version', 'wpsg'); ?></th>
+ <th><?php echo __('Version', 'wpsg'); ?></th>
<th><?php echo __('Lizenz', 'wpsg'); ?></th>
<th><?php echo __('verfügbare Version', 'wpsg'); ?></th>
</tr>
@@ -175,9 +237,9 @@ <?php } else { ?>
<?php if (wpsg_isSizedString($modul_info['url_shop'])) { ?>
- <a href="<?php echo $modul_info['url_shop']; ?>" target="_blank"><?php echo __('Modulcode hier erwerben', 'wpsg'); ?></a>
+ <a href="<?php echo $modul_info['url_shop']; ?>" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
<?php } else { ?>
- <a href="https://shop.maennchen1.de" target="_blank"><?php echo __('Modulcode hier erwerben', 'wpsg'); ?></a>
+ <a href="https://shop.maennchen1.de" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
<?php } ?>
<?php } ?>
@@ -202,8 +264,15 @@ else if (version_compare($modul_info['version'], $this->arAllModule[$modul_key]->versio) > 0)
{
- echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong><br />';
- echo wpsg_translate(__('Version <a href="#1#">installieren</a>.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$modul_key);
+ echo ' - <strong class="wpsg_error">'.__('neue Version verfügbar', 'wpsg').'</strong>';
+
+ if ($modul_info['active'] === true)
+ {
+
+ echo '<br />';
+ echo wpsg_translate(__('<a href="#1#">Version installieren</a>.', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$modul_key);
+
+ }
}
|
