Index: /controller/wpsg_AdminController.class.php
===================================================================
--- /controller/wpsg_AdminController.class.php	(revision 6521)
+++ /controller/wpsg_AdminController.class.php	(revision 6522)
@@ -571,4 +571,15 @@
 				
 			}
+			else if (wpsg_isSizedString($_REQUEST['do'], 'installModul')) 
+			{
+			
+				$bOK = $this->installModul($_REQUEST['modul']);
+						
+				if ($bOK === true) $this->addBackendMessage(__('Modul erfolgreich installiert.', 'wpsg'));
+				
+				if (wpsg_isSizedString($_REQUEST['source'], 'licence')) $this->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=modulactivation');
+				else $this->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module');
+				
+			}
 			
 			$this->view['actionName'] = 'licence';
@@ -2812,5 +2823,5 @@
 			$wpsg_update_data = wpsg_get_update_data();
 			$url = $wpsg_update_data['modulinfo'][$modul_key]['download_url'];
-			mail("daniel@maenchen1.de", "URLTEST", $url);
+			
 			if (!wpsg_isSizedString($url)) throw new \Exception("UngÃŒltige Download URL.");
 						
Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 6521)
+++ /controller/wpsg_ShopController.class.php	(revision 6522)
@@ -109,6 +109,6 @@
 
 			$this->basketController = new wpsg_BasketController();
-
-			if ($this->get_option('wpsg_key') !== false) $this->bLicence = true;
+ 
+			if ($this->get_option('wpsg_key') !== false && $this->get_option('wpsg_key') != '') $this->bLicence = true;
 
 			$this->arStatus = array(
Index: /lib/filter_functions.inc.php
===================================================================
--- /lib/filter_functions.inc.php	(revision 6521)
+++ /lib/filter_functions.inc.php	(revision 6522)
@@ -39,5 +39,5 @@
         $wpsg_update_data = wpsg_get_update_data();
 
-        if (is_object($wpsg_update_data['updateData']) && !preg_match('/wpsg/', $_REQUEST['page']))
+        if (is_object($wpsg_update_data['updateData']))
         {
 
@@ -75,4 +75,6 @@
 			if ($GLOBALS['wpsg_sc']->bLicence === true)
 			{
+				
+				// LizenzschlÃŒssel wurde eingegeben
 			
 				echo '<tr class="plugin-update-trr '.((is_plugin_active(WPSG_FOLDERNAME.'/wpshopgermany.php'))?'active':'').'" id="wpsg-licence"><td colspan="4">';			
@@ -621,7 +623,7 @@
 		 
 		global $wp_filesystem;
-		
+				
 		$wpsg_update_data = wpsg_get_update_data();
-		      
+				      
 		if ($_REQUEST['plugin'] != WPSG_FOLDERNAME.'/wpshopgermany.php') return;
 		
@@ -667,23 +669,9 @@
 						
 		}
-		
-		//wpsg_chmod($path.'/lib/translation.phtml', 0777);
-		//wpsg_chmod($path.'/lang', 0777);
-		
-		/*
+		 
 		$AC = new wpsg_AdminController();
-		
-		// Module nachinstallieren
-		foreach ((array)$GLOBALS['wpsg_arZusatzModuleInstalled'] as $m_key)
-		{
-			
-			//$AC->installModul($m_key);
-			
-		}*/
-		
-		$AC = new wpsg_AdminController();
-		
+		   
 		// Module aus Lizenz nachinstallieren
-		foreach ($wpsg_update_data['updateData']->modulinfo as $modul_key => $modul_info)
+		foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info)
 		{
 			
Index: /views/admin/licence.phtml
===================================================================
--- /views/admin/licence.phtml	(revision 6521)
+++ /views/admin/licence.phtml	(revision 6522)
@@ -183,84 +183,5 @@
                         <br />
                         
-                        <?php if (wpsg_isSizedArray($wpsg_update_data)) { ?>
-                        
-                            <?php // Ich zeige hier nur die Aktiven Module an ?>
-                            <?php foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { if ($modul_info['active'] !== true) unset($wpsg_update_data['modulinfo'][$modul_key]); } ?>
-                            
-                            <table class="table modultable">
-                                <thead>
-                                    <tr>
-                                        <th><?php echo __('Modulname', 'wpsg'); ?></th>
-                                        <th><?php echo __('Version', 'wpsg'); ?></th>
-                                        <th><?php echo __('Lizenz', 'wpsg');  ?></th>
-                                        <th><?php echo __('verfÃŒgbare Version', 'wpsg'); ?></th>
-                                    </tr>
-                                </thead>
-                                <tbody>
-                                    <?php foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { ?>
-                                    <tr style="font-style:normal;" class="success">
-                                        <td><?php echo $modul_info['label']; ?></td>
-                                        <td>
-                                            
-                                            <?php if ($this->shop->hasModInstalled($modul_key)) { ?>
-                                                <?php echo $this->shop->arAllModule[$modul_key]->version; ?>
-                                            <?php } ?>
-                                            
-                                        </td>								
-                                        <td>
-                                            
-                                            <?php if ($modul_info['free'] === true) { ?>
-                                                <?php echo __('kostenlos', 'wpsg'); ?>
-                                            <?php } else if ($modul_info['active'] === true) { ?>
-                                                <?php echo __('enthalten', 'wpsg'); ?>
-                                            <?php } else { ?>
-                                                
-                                                <?php if (wpsg_isSizedString($modul_info['shop_url'])) { ?>
-                                                <a href="<?php echo $modul_info['shop_url']; ?>" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
-                                                <?php } else { ?>
-                                                <a href="https://shop.maennchen1.de" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
-                                                <?php } ?>
-                                                
-                                            <?php } ?>
-                                            
-                                        </td>
-                                        <td><?php 
-                                            
-                                            echo $modul_info['version'];
-                                             
-                                            if ($this->shop->hasModInstalled($modul_key) && $modul_info['version'] === $this->shop->arAllModule[$modul_key]->version)
-                                            {
-                                                
-                                                echo ' - <strong class="wpsg_message_ok">'.__('aktuell', 'wpsg').'</strong>';
-                                                
-                                            }
-                                            else if (version_compare($modul_info['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['version'], $this->shop->arAllModule[$modul_key]->versio) > 0) 
-                                            {
-                                                
-                                                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);
-                                                    
-                                                }
-                                                
-                                            }
-                                            
-                                        ?></td>
-                                    </tr>
-                                    <?php } ?>
-                                </tbody>
-                            </table>
-                                                
-                        <?php } ?>
+                        <?php include dirname(__FILE__).'/modulelist.phtml'; ?>
                                                                         
                     <?php } ?>
Index: /views/admin/module.phtml
===================================================================
--- /views/admin/module.phtml	(revision 6521)
+++ /views/admin/module.phtml	(revision 6522)
@@ -117,4 +117,5 @@
 					<?php } ?>
 					
+					<?php if ($this->bLicence === true) { ?>
 					<?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> ]					
@@ -128,4 +129,7 @@
 					
 					[ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=startDemo&modul=<?php echo $_REQUEST['modul']; ?>" onclick="return confirm('<?php echo __('Sind Sie sich sicher? Das Modul kann 14 Tage ab heute komplett in vollem Umfang getestet werden.', 'wpsg'); ?>');"><?php echo __('Demo Modus starten'); ?></a> ]
+					<?php } ?>
+					<?php } else { ?>
+					<br /><span class="wpsg_error"><?php echo __('Ohne Lizenz kÃ¶nnen Sie dieses Modul nicht verwenden.', 'wpsg'); ?></span>
 					<?php } ?>
 						
@@ -189,4 +193,5 @@
 		 	<div class="panel-body">
 	 	
+				<?php if ($this->bLicence === true) { ?>
 				<form method="POST" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=activatemodul">
 						
@@ -209,105 +214,17 @@
 					
 				</form>
-				
+				<?php } else { ?>
+					
+				<p><?php echo __('Modulcodes kÃ¶nnen erst verwendet werden, wenn ihre wpShopGermany Lizenz aktiviert ist.', 'wpsg'); ?>
+				
+				<?php } ?>			
+	
 				<hr />
 				
-				<?php $wpsg_update_data = wpsg_get_update_data(); ?>
-				<?php if (wpsg_isSizedArray($wpsg_update_data['modulinfo'])) { ?>
-				
-					<table class="table modultable">
-  						<thead>
-							<tr>
-								<th><?php echo __('Modulname', 'wpsg'); ?></th>
-								<th><?php echo __('Version', 'wpsg'); ?></th>
-								<th><?php echo __('Lizenz', 'wpsg');  ?></th>
-								<th><?php echo __('verfÃŒgbare Version', 'wpsg'); ?></th>
-							</tr>
-						</thead>
-						<tbody>
-							<?php foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { ?>
-							<tr style="font-style:normal;" class="
-							
-								<?php if ($modul_info['free'] === true) { ?>
-									<?php echo 'active'; ?>
-								<?php } else if ($modul_info['active'] === true) { ?>
-									<?php echo 'success'; ?>
-								<?php } else { ?>
-									<?php echo 'info'; ?>
-								<?php } ?>
-							
-							">
-								<td><?php echo $modul_info['label']; ?></td>
-								<td>
-									
-									<?php if ($this->hasModInstalled($modul_key)) { ?>
-										<?php echo $this->arAllModule[$modul_key]->version; ?>										
-									<?php } ?>
-									
-								</td>								
-								<td>
-									
-									<?php if ($modul_info['free'] === true) { ?>
-										<?php echo __('kostenlos', 'wpsg'); ?>
-									<?php } else if ($modul_info['active'] === true) { ?>
-										<?php echo __('enthalten', 'wpsg'); ?>
-									<?php } else { ?>
-										
-										<?php if (wpsg_isSizedString($modul_info['shop_url'])) { ?>
-										<a href="<?php echo $modul_info['shop_url']; ?>" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
-										<?php } else { ?>
-										<a href="https://shop.maennchen1.de" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
-										<?php } ?>
-										
-									<?php } ?>
-									
-								</td>
-								<td><?php 
-																	
-									echo $modul_info['version'];
-									 
-									if ($this->hasModInstalled($modul_key) && $modul_info['version'] === $this->arAllModule[$modul_key]->version)
-									{
-										
-										echo ' - <strong class="wpsg_message_ok">'.__('aktuell', 'wpsg').'</strong>';
-										
-									}
-									else if (version_compare($modul_info['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['version'], $this->arAllModule[$modul_key]->versio) > 0) 
-									{
-										
-										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);
-											
-										}
-									
-									}
-									
-								?></td>
-							</tr>
-							<?php } ?>
-						</tbody>
-					</table>
-										
-				<?php } else { ?>
-				
-				<p>
-					<?php echo __('Bitte erwerben Sie eine Lizenz fÃŒr wpShopGermany, damit sie unsere Erweiterungsmodule nutzen kÃ¶nnen.', 'wpsg'); ?>
-				</p>
-					
-				<?php } ?>
-		
+				<?php include dirname(__FILE__).'/modulelist.phtml'; ?>
+				 		
 			</div>
 	 	</div>
-	</div>
+	</div>	
 	
 <?php } ?>
Index: /views/admin/modulelist.phtml
===================================================================
--- /views/admin/modulelist.phtml	(revision 6522)
+++ /views/admin/modulelist.phtml	(revision 6522)
@@ -0,0 +1,141 @@
+<?php
+
+    /**
+     * Template fÃŒr die Liste der Module
+     * wird in der ModulverwaltungsÃŒbersicht und in der Lizenzverwaltung verwendet
+     */
+
+    $wpsg_update_data = wpsg_get_update_data();
+
+    if (get_class($this) === "wpsg_ShopController") 
+    {
+    
+        $source = 'module';
+        @$this->shop = &$this;
+
+    }
+    else
+    {
+
+        $source = 'licence';
+
+    }
+
+?>
+
+<?php if (wpsg_isSizedArray($wpsg_update_data['modulinfo'])) { ?>
+  
+    <?php /* foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { if ($modul_info['active'] !== true) unset($wpsg_update_data['modulinfo'][$modul_key]); }  */ ?>
+    
+    <table class="table modultable">
+        <thead>
+            <tr>
+                <th><?php echo __('Modulname', 'wpsg'); ?></th>
+                <th><?php echo __('Version', 'wpsg'); ?></th>
+                <th><?php echo __('Lizenz', 'wpsg');  ?></th>
+                <th><?php echo __('verfÃŒgbare Version', 'wpsg'); ?></th>
+            </tr>
+        </thead>
+        <tbody>
+            <?php foreach ($wpsg_update_data['modulinfo'] as $modul_key => $modul_info) { ?>
+            <tr style="font-style:normal;" class="<?php 
+            
+                if ($modul_info['free'] === true) echo 'active';
+				else if ($modul_info['active'] === true) echo 'success'; 
+                else echo 'info'; 
+                ?>">
+                <td><?php echo $modul_info['label']; ?></td>
+                <td>
+                    
+                    <?php if ($this->shop->hasModInstalled($modul_key)) { ?>
+                        <?php echo $this->shop->arAllModule[$modul_key]->version; ?>
+                    <?php } ?>
+                    
+                </td>								
+                <td>
+                    
+                    <?php if ($modul_info['free'] === true) { ?>
+                        <?php echo __('kostenlos', 'wpsg'); ?>
+                    <?php } else if ($modul_info['active'] === true) { ?>
+                        <?php echo __('enthalten', 'wpsg'); ?>
+                    <?php } else { ?>
+                        
+                        <?php if (wpsg_isSizedString($modul_info['shop_url'])) { ?>
+                        <a href="<?php echo $modul_info['shop_url']; ?>" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
+                        <?php } else { ?>
+                        <a href="https://shop.maennchen1.de" target="_blank"><?php echo __('Modulcode erwerben', 'wpsg'); ?></a>
+                        <?php } ?>
+                        
+                    <?php } ?>
+                    
+                    <?php if (!$this->shop->hasModInstalled($modul_key)) { ?>
+                    
+                        <br />
+                        <?php if ($modul_info['active'] === true || $modul_info['free'] === true) { ?>
+                            <?php 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.'&source='.$source); ?>
+                        <?php } else { ?>
+                            <?php echo wpsg_translate(__('<a href="#1#">Demo installieren</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$modul_key.'&source='.$source); ?>
+                        <?php } ?>
+                        
+                    <?php } ?>
+                    
+                </td>
+                <td><?php 
+                                         
+                    if ($modul_info['active'] === true && $modul_info['version'] != $modul_info['version_latest'] && version_compare($modul_info['version_latest'], $this->shop->arAllModule[$modul_key]->version) < 0)
+                    {
+                        
+                        echo $modul_info['version_latest'];
+                         
+                        echo ' - <strong class="wpsg_error">'.__('neue Version verfÃŒgbar', 'wpsg').'</strong>';
+                        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.'&source='.$source);
+                        
+                        echo '<br /><br />';
+                        
+                    }
+                    
+                    echo $modul_info['version'];
+                    
+                    if ($this->shop->hasModInstalled($modul_key) && $modul_info['version'] === $this->shop->arAllModule[$modul_key]->version)
+                    {
+                        
+                        echo ' - <strong class="wpsg_message_ok">'.__('aktuell', 'wpsg').'</strong>';
+                        
+                    }
+                    else if (version_compare($modul_info['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['version'], $this->shop->arAllModule[$modul_key]->version) > 0) 
+                    {
+                        
+                        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.'&source='.$source);
+                            
+                        }
+                        
+                    }
+                    
+                ?></td>
+            </tr>
+            <?php } ?>
+        </tbody>
+    </table>
+            
+<?php } else { ?>
+
+    <?php echo __('Mit einer Lizenz (Pro, Enterprise) machst du aus deinem wpShopGermany mehr.', 'wpsg'); ?><br /><br />
+    <?php echo __('Du erhÃ€ltst neben kostenlosem Support (per Mail oder Forum, 1 Jahr Updates frei) auch die MÃ¶glichkeit, die Vielzahl der zusÃ€tzlich erhÃ€ltlichen wpShopGermany Module zu nutzen.', 'wpsg'); ?>
+
+    <a href="https://shop.maennchen1.de/produkte/wpshopgermany-lizenzkey/" target="_blank"><?php echo __('wpShopGermany im Shop ansehen', 'wpsg'); ?></a>
+
+
+<?php } ?>
