Subversion Repositories wpShopGermany4

Rev

Rev 5385 | Rev 5451 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

<?php
        
        /**
         * Templatedatei für die Modulseite des Backend
         * Sollte nicht angepasst werden
         */

?>
<div class="wpsg_admin_submenu">
        
        <div class="wpsg_modul_search_wrap">
                <input id="wpsg_modul_search" type="text" class="wpsg_modul_search" value="<?php echo wpsg_getStr($_COOKIE['wpsg-modulfilter-search']); ?>" />  
                <label title="<?php echo __('Wenn aktiviert, werden nur aktive Module angezeigt'); ?>">
                        <input type="checkbox" <?php echo ((wpsg_isSizedString($_COOKIE['wpsg-modulfilter-check'], 'true'))?'checked="checked"':''); ?> id="wpsg_modul_onlyactive" class="wpsg_modul_onlyactive" />
                        <span class="glyphicon glyphicon-ok wpsg_modul_onlyactive_glyphicon" aria-hidden="true"></span>
                </label>
        </div>
        
        <?php foreach ($this->view['groups'] as $group_name => $g) { ?>
        <div class="list-group list-modul-group" style="display:none;" >
                <span class="list-group-item list-group-head"><?php echo $group_name; ?></span>         
                <?php foreach ($g as $mod_key => $m) { ?>
                <a class="<?php echo (($this->get_option($mod_key, $this->view['global']) > 0)?'modul_akt':''); ?> list-group-modul list-group-item <?php echo (($mod_key == $_REQUEST['modul'])?'active':''); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module&amp;modul=<?php echo $mod_key; ?>">
                        <span class="wpsg_modul_name"><?php echo $m->name; ?></span>
                        <?php if (($this->get_option($mod_key, $this->view['global']) > 0)?'modul_akt':'') { ?>
                        <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
                        <?php } ?>
                </a>
                <?php } ?>
        </div>
        <?php } ?>
         
</div>

<?php if (isset($_REQUEST['modul'])) { ?>
<div class="wpsg_admin_content form-horizontal">                
        <form name="form1" action="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;action=module&amp;modul=<?php echo $_REQUEST['modul']; ?>&amp;noheader=1" method="post" enctype="multipart/form-data">
                
                <h3>
                        <?php echo $this->arAllModule[$_REQUEST['modul']]->name; ?>
                        <?php if (isset($this->arAllModule[$_REQUEST['modul']]->hilfeURL) && $this->arAllModule[$_REQUEST['modul']]->hilfeURL != '') { ?>
                        <a target="_blank" href="<?php echo $this->arAllModule[$_REQUEST['modul']]->hilfeURL; ?>" class="wpsg_form_help_notip"></a>     
                        <?php } ?>
                </h3>
                
                <p><?php echo $this->arAllModule[$_REQUEST['modul']]->desc; ?></p>
                
                <?php $modul_install = $this->get_option($_REQUEST['modul'], $this->view['global']); ?>
                <?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)); ?>           
                <div class="wpsg_form_field">
                        <div class="wpsg_form_left">
                                <?php echo __("Lizenz", "wpsg"); ?>:
                        </div>
                        <div class="wpsg_form_right">
                                <p>
                                        <?php if (isset($this->arAllModule[$_REQUEST['modul']]->free) && $this->arAllModule[$_REQUEST['modul']]->free === true) { ?>
                                        <?php echo __('Kostenfrei', 'wpsg'); ?>
                                        <?php } else { ?>
                                        <?php if (is_array($this->arLizenz) && in_array($_REQUEST['modul'], (array)$this->arLizenz['mods'])) { ?>
                                        <?php echo __('Aktiviert', 'wpsg'); ?>
                                        <?php } else { ?>
                                        <?php if ($this->arAllModule[$_REQUEST['modul']]->getDemoDays() > 0) { ?>
                                        <?php echo wpsg_translate(__('Demo Modus noch #1# Tage verbleibend.', 'wpsg'), $this->arAllModule[$_REQUEST['modul']]->getDemoDays()); ?>
                                        <?php } else { ?>
                                        <?php echo __('Demo Modus abgelaufen.', 'wpsg'); ?>
                                        <?php } ?>
                                        <?php } ?>
                                        <?php } ?>
                                </p>
                        </div>
                        <div class="wpsg_clear"></div>
                </div>          
                <?php } ?>
                
                <?php if (!isset($this->arAllModule[$_REQUEST['modul']]->version) || (($this->arAllModule[$_REQUEST['modul']]->free === true || (is_array($this->arLizenz) && in_array($_REQUEST['modul'], (array)$this->arLizenz['mods'])) || $this->arAllModule[$_REQUEST['modul']]->getDemoDays() > 0))) { ?>
                        <?php if ($this->arAllModule[$_REQUEST['modul']]->inline === true) { ?>
                        <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
                        <?php } ?> 
                        
                        <input type="hidden" name="subaction" value="module" />
                                        
                        <?php if ($this->arAllModule[$_REQUEST['modul']]->inline == true) { ?>
                        </form>
                        <?php } ?>
                                        
                        <?php if ($this->get_option($_REQUEST['modul'], $this->view['global']) > 0) { ?>
                        <?php echo $this->arModule[$_REQUEST['modul']]->settings_edit(); ?>
                        <?php } ?>
                        
                        <?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
                        <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>                       
                        <?php } ?>
                <?php } else { ?>
                <p class="submit"><input type="submit" value="<?php echo __('Einstellungen speichern', 'wpsg'); ?>" class="button-primary" id="submit" name="submit"></p>
                <?php } ?>
                                                
        <?php if ($this->arAllModule[$_REQUEST['modul']]->inline !== true) { ?>
        </form>
        <?php } ?>
</div>
<?php } else { ?>

        <?php if ($this->hasMod('wpsg_mod_core')) { ?>
        <?php echo $this->callMod('wpsg_mod_core', 'module_index'); ?>
        <?php } else { ?>
        
                <div class="wpsg_admin_content">
        
                        <h3><?php echo __('Modulverwaltung', 'wpsg'); ?></h3>
                        <p><?php echo __('wpShopGermany ist Modular aufgebaut, wählen Sie links das Modul aus, welches Sie konfigurieren möchten. ', 'wpsg'); ?></p>
                        
                        <p><?php echo wpsg_translate(
                                __('<span style="color:red; font-weight:bold;">wpShopGermany Vollversion erwerben und weitere Funktionen freischalten.</span> [ <a target="_blank" href="#1#">Vollversion kaufen</a> ] [ <a target="_blank" href="#2#">Weitere Infos</a> ]', 'wpsg'),
                                'http://shop.maennchen1.de/produkte/wpshopgermany-lizenzkey/',
                                'http://wpshopgermany.de/'
                        ); ?></p>
        
                </div>
        
        <?php } ?>      
        
<?php } ?>

<script type="text/javascript">/* <![CDATA[ */

        function wpsg_ssh_module()
        {

                jQuery('.list-modul-group').show();
                jQuery('.wpsg_admin_submenu .list-group-item').show();

                var check = jQuery('#wpsg_modul_onlyactive').prop('checked');
                var search = jQuery('#wpsg_modul_search').val();

                jQuery.cookie('wpsg-modulfilter-check', check);
                jQuery.cookie('wpsg-modulfilter-search', search);
                
                jQuery('.wpsg_modul_name').each(function() {

                        if (!jQuery(this).parent().hasClass('active'))
                        {
                        
                                if (check && !jQuery(this).parent().hasClass('modul_akt')) jQuery(this).parent().hide();
                                else if (search != '')
                                {
        
                                        var re = new RegExp(search, 'i');
        
                                        if (!jQuery(this).html().match(re)) jQuery(this).parent().hide();
                                        else jQuery(this).parent().show();
                                                
                                }

                        }
                                
                } ); 

                jQuery('.list-modul-group').each(function() {

                        if (jQuery(this).find('.list-group-modul:visible').length <= 0) jQuery(this).hide();
                        else jQuery(this).show();                               
                        
                } );
                
        }

        jQuery(document).ready(function() {

                jQuery('#wpsg_modul_onlyactive').bind('change', function(event) {

                        wpsg_ssh_module();                      
                        jQuery(this).blur();
                        
                } );

                jQuery('#wpsg_modul_search').focus().bind('blur', wpsg_ssh_module);
                jQuery('#wpsg_modul_search').focus().bind('keyup', wpsg_ssh_module);
                
                wpsg_ssh_module();
                
        } );

/* ]]> */</script>