Index: /controller/wpsg_AdminController.class.php
===================================================================
--- /controller/wpsg_AdminController.class.php	(revision 6405)
+++ /controller/wpsg_AdminController.class.php	(revision 6406)
@@ -293,94 +293,32 @@
 		{
 
-			if (file_exists($_FILES['wpsg_licence_file']['tmp_name']))
-			{
-
-				if (!file_exists(WPSG_PATH.'/lib/.htpublic'))
-				{
-
-					$this->addBackendError(base64_decode('w5ZmZmVudGxpY2hlciBTY2hsw7xzc2VsIGV4aXN0aWVydCBuaWNodCE=')); // Ãffentlicher SchlÃŒssel existiert nicht!
-
-				}
-				else
-				{
-
-					if (!class_exists('Crypt_RSA'))
-					{
-
-						@set_include_path(WPSG_PATH.'/lib/phpseclib0.3.0/'.PATH_SEPARATOR.get_include_path());
-						require_once(WPSG_PATH.'/lib/phpseclib0.3.0/Crypt/RSA.php');
-
-					}
-
-					$rsa = new Crypt_RSA();
-					$load = $rsa->loadKey(file_get_contents(WPSG_PATH.'/lib/.htpublic'));
-
-					if ($load === false)
-					{
-
-						$this->addBackendMessage(base64_decode('TGFkZW4gZGVzIMO2ZmZlbnRsaWNoZW4gU2NobMO8c3NlbHMgaXN0IGZlaGxnZXNjaGxhZ2VuLg==')); // Laden des Ã¶ffentlichen SchlÃŒssels ist fehlgeschlagen.
-
-					}
-					else
-					{
-
-						$decrypt_key = $rsa->decrypt(base64_decode(file_get_contents($_FILES['wpsg_licence_file']['tmp_name'])));
-
-						if ($decrypt_key === false)
-						{
-
-							$this->addBackendError(base64_decode('RW50c2NobMO8c3NlbG4gZmVobGdlc2NobGFnZW4=')); // EntschlÃŒsseln fehlgeschlagen
-
-						}
-						else
-						{
-
-							$arKey = @unserialize($decrypt_key);
-
-							if (is_array($arKey) && $arKey['l'] < 3 && $this->shop->isMultiBlog())
-							{
-
-								$this->shop->update_option('wpsg_key', false, true);
-								$this->addBackendError(base64_decode('RsO8ciBkaWUgVmVyd2VuZHVuZyBpbiBlaW5lciBNdWx0aWJsb2cgVW1nZWJ1bmcgaXN0IGRpZSBFbnRlcnByaXNlIExpemVueiBuw7Z0aWcu')); // FÃŒr die Verwendung in einer Multiblog Umgebung ist die Enterprise Lizenz nÃ¶tig.
-
-							}
-							else
-							{
-
-								if (is_array($arKey) && $arKey['anwendung'] == 'wpShopGermany')
-								{
-
-									$this->shop->clearMessages();
-
-									// Key ist gÃŒltig und nun installieren
-									$this->shop->update_option('wpsg_key', file_get_contents($_FILES['wpsg_licence_file']['tmp_name']), true);
-									$this->addBackendMessage(base64_decode('S2V5IHd1cmRlIGVyZm9sZ3JlaWNoIGluc3RhbGxpZXJ0')); // Key wurde erfolgreich installiert
-
-								}
-								else
-								{
-
-									$this->addBackendError(base64_decode('VW5nw7xsdGlnZSBMaXplbnpkYXRlaQ==')); // UngÃŒltige Lizenzdatei
-
-								}
-
-							}
-
-						}
-
-					}
-
-				}
-
-				if ($this->shop->isMultiBlog()) die($this->redirect(WPSG_URL_WP.'wp-admin/network/plugins.php'));
-				else die($this->redirect(WPSG_URL_WP.'wp-admin/plugins.php'));
-
-			}
-			else
-			{
-
-				$this->addBackendError(base64_decode('S2VpbmUgTGl6ZW56ZGF0ZWkgYW5nZWdlYmVu')); // Keine Lizenzdatei angegeben
-
-			}
+		    $wpsg_update_data = wpsg_get_update_data($_REQUEST['wpsg_licence_file'], true);
+
+            if (!wpsg_isSizedArray($wpsg_update_data))
+            {
+
+                $this->addBackendError(__('Keine Verbindung zum Registrierungsserver', 'wpsg'));
+
+            }
+            else
+            {
+
+                if ($wpsg_update_data['returnCode'] === '0')
+                {
+
+                    $this->addBackendError(__('UngÃŒltiger Lizenzcode', 'wpsg'));
+
+                }
+                else
+                {
+
+                    $this->update_option('wpsg_key', $_REQUEST['wpsg_licence_file']);
+
+                }
+
+            }
+
+            if ($this->shop->isMultiBlog()) die($this->redirect(WPSG_URL_WP.'wp-admin/network/plugins.php'));
+            else die($this->redirect(WPSG_URL_WP.'wp-admin/plugins.php'));
 
 		} // public function loadLicenceAction()
Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 6405)
+++ /controller/wpsg_ShopController.class.php	(revision 6406)
@@ -10,6 +10,6 @@
 		var $arModule;
 
-		/** Array mit den Lizenzinformationen */
-		var $arLizenz = false;
+		/** True, wenn eine Lizenz verwendet wird */
+		var $bLicence = false;
 
 		/** BasketController */
@@ -110,35 +110,5 @@
 			$this->basketController = new wpsg_BasketController();
 
-			// Lizenz prÃŒfen
-			if ($this->get_option('wpsg_key', true) !== false)
-			{
-
-				if (!class_exists('Crypt_RSA'))
-				{
-
-					$bOK = @set_include_path(WPSG_PATH.'/lib/phpseclib0.3.0/'.PATH_SEPARATOR.get_include_path());
-
-					require_once(WPSG_PATH.'/lib/phpseclib0.3.0/Crypt/RSA.php');
-
-				}
-
-				$rsa = new Crypt_RSA();
-				$rsa->loadKey(file_get_contents(WPSG_PATH.'/lib/.htpublic'));
-
-				$arKey = @unserialize($rsa->decrypt(base64_decode($this->get_option('wpsg_key', true))));
-
-				if (is_array($arKey) && $arKey['anwendung'] == 'wpShopGermany')
-				{
-
-					$this->arLizenz = array(
-						'l' => $arKey['l'],
-						'nr' => $arKey['nr'],
-						'mods' => $arKey['mods'],
-						'dev' => (($this->get_option('wpsg_debugURL') == '1')?'1':'0')
-					);
-
-				}
-
-			}
+			if ($this->get_option('wpsg_key') !== false) $this->bLicence = true;
 
 			$this->arStatus = array(
@@ -658,5 +628,5 @@
 			}
 
-			if (preg_match('/update-core\.php/', $_SERVER['PHP_SELF']) || preg_match('//', $_SERVER['PHP_SELF']))
+			if (preg_match('/update-core\.php/', $_SERVER['PHP_SELF']))
 			{
 
@@ -699,8 +669,8 @@
 			if (false && is_admin())
 			{
-				
+
 				$current_screen = get_current_screen();
 				$current_screen = $current_screen->id;
-				
+
 				var_dump($current_screen);
 				$commercial = false;
@@ -713,9 +683,9 @@
             }
         }
-				
+
 					die(var_dump($commercial));
-				
-			}
-			
+
+			}
+
 			if (is_admin() && preg_match('/wpsg/', wpsg_getStr($_REQUEST['page'])))
 			{
Index: /lib/filter_functions.inc.php
===================================================================
--- /lib/filter_functions.inc.php	(revision 6405)
+++ /lib/filter_functions.inc.php	(revision 6406)
@@ -42,6 +42,6 @@
 		if ($plugindata['Name'] == 'wpShopGermany')
 		{
-					
-			if ($GLOBALS['wpsg_sc']->hasMod('wpsg_mod_core'))
+
+			if ($GLOBALS['wpsg_sc']->bLicence === true)
 			{
 			
@@ -49,45 +49,18 @@
 				
 				echo $GLOBALS['wpsg_sc']->writeBackendMessage();
-				
-				echo '<div class="update-wpsg-message">'; 
-				
-				if (intval($GLOBALS['wpsg_sc']->arLizenz['nr']) <= 0 && $GLOBALS['wpsg_sc']->getDemoDays() > 0)
-				{
-					echo wpsg_translate(__('Aktive Demo Lizenz (Noch #1# Tage)', 'wpsg'), $GLOBALS['wpsg_sc']->getDemoDays());
-				}
-				else if (intval($GLOBALS['wpsg_sc']->arLizenz['nr']) <= 0)
-				{
-					echo '<span style="color:red;">'.__('Keine gÃŒltige Lizenz', 'wpsg').'</span>';
-				}
-				else 
-				{
-					 
-					switch ($GLOBALS['wpsg_sc']->arLizenz['l'])
-					{
-						
-						case '1': echo __('Light Version', 'wpsg'); break;
-						case '2': echo __('Pro Version', 'wpsg'); break;
-						case '3': echo __('Enterprise Version', 'wpsg'); break;
-						default: die();
-						
-					}
-					
-					echo '<span id="wpsg_lizenz_link_download">';
-					echo '&nbsp;|&nbsp;<a href="'.WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&subaction=downloadLicence&noheader=1">'.__('Lizenz herunterladen', 'wpsg').'</a>';
-					echo '</span>';
-					
-				}
-				
+
 				echo '<span id="wpsg_lizenz_link">';
-				echo '&nbsp;|&nbsp;<a onclick="jQuery(\'#wpsg_lizenz\').show(500); jQuery(\'#wpsg_lizenz_link\').hide(); return false;" href="">'.__('Neue Lizenz aktivieren', 'wpsg').'</a>';
+				echo '<a style="margin-left:40px;" onclick="jQuery(\'#wpsg_lizenz\').show(500); jQuery(\'#wpsg_lizenz_link\').hide(); return false;" href="">'.__('Neue Lizenz aktivieren', 'wpsg').'</a>';
 				echo '</span>';
-										
-				echo '<div id="wpsg_lizenz" style="display:none; margin-top:10px;">';
-				echo '<input type="file" name="wpsg_licence_file" />';
-				echo '<input type="submit" onclick="jQuery(this).parents(\'tr\').prev().find(\'input\').prop(\'checked\', true);" class="button" value="'.__('Lizenz aktivieren.', 'wpsg').'" name="wpsg_insertlicence_submit" />';
-				echo '</div>';
-				
+
+                echo '<div id="wpsg_lizenz" style="display:none;"><div style="display:flex; align-items:center;">';
+                echo '<strong style="margin-left:40px;">'.__('Lizenzcode: ', 'wpsg').'</strong>';
+                echo '<input type="text" style="margin:0px 10px;" name="wpsg_licence_file" />';
+                echo '<input type="submit" style="margin:0px 10px;" class="button" value="'.__('Code prÃŒfen', 'wpsg').'" name="wpsg_insertlicence_submit" />';
+                echo '</div></div>';
+
 				echo '<script type="text/javascript"> ';
-				
+
+				echo 'jQuery("input[name=\'wpsg_insertlicence_submit\']").on("click", function() { jQuery("tr[data-slug=\'wpshopgermany\']").find("input[type=\'checkbox\']").prop("checked", true); } ); ';
 				echo 'jQuery("#the-list").parent().parent().attr("enctype", "multipart/form-data"); ';
 				
@@ -105,14 +78,26 @@
 				
 				echo '<tr class="plugin-update-trr '.((is_plugin_active(WPSG_FOLDERNAME.'/wpshopgermany.php'))?'active':'').'" id="wpsg-licence"><td colspan="4">';
+
+				echo $GLOBALS['wpsg_sc']->writeBackendMessage();
+
+				echo '<div style="margin-left:40px;">';
 				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'),
+					__('<span style="color:red; font-weight:bold;">wpShopGermany Vollversion erwerben, Updates erhalten und weitere Funktionen freischalten.</span><br />[ <a href="#" onclick="jQuery(\'#wpsg_lizenz\').show(500); return false;">Lizenzcode eingeben</a> ] [ <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/'
 				);
+				echo '</div>';
+
+                echo '<div id="wpsg_lizenz" style="display:none;"><br /><div style="display:flex; align-items:center;">';
+                echo '<strong style="margin-left:40px;">'.__('Lizenzcode: ', 'wpsg').'</strong>';
+                echo '<input type="text" style="margin:0px 10px;" name="wpsg_licence_file" />';
+                echo '<input type="submit" style="margin:0px 10px;" onclick="jQuery(this).closest(\'tr\').prev().find(\'input\').prop(\'checked\', true);" class="button" value="'.__('Code prÃŒfen', 'wpsg').'" name="wpsg_insertlicence_submit" />';
+                echo '</div></div>';
+
 				echo '</td></tr>';
 				
 			}
 			
-		}
+        }
 			
 	} // function wpsg_after_plugin_row_notactivated($pluginfile, $plugindata, $context)
@@ -261,35 +246,13 @@
 		else
 		{ 
-			 
-			if ($GLOBALS['wpsg_sc']->get_option('wpsg_debugURL') === '1' && $GLOBALS['wpsg_sc']->hasMod('wpsg_mod_core'))
-				$json_data = json_decode($GLOBALS['wpsg_sc']->get_url_content(base64_decode('aHR0cDovL2RsLm1hZW5uY2hlbjEuZGUvd3BzZy93cHNnX2luZm9fZGV2')), true); // http://dl.maennchen1.de/wpsg/wpsg_info_dev
-			else
-				$json_data = json_decode($GLOBALS['wpsg_sc']->get_url_content(base64_decode('aHR0cDovL2RsLm1hZW5uY2hlbjEuZGUvd3BzZy93cHNnX2luZm8=')), true); // http://dl.maennchen1.de/wpsg/wpsg_info
-			
-			$plugin_data = new StdClass();			
-			$plugin_data->name = 'wpShopGermany';
-			$plugin_data->slug = 'wpshopgermany';
-			$plugin_data->author = '<a href="http://maennchen1.de" target="_blank">maennchen1.de</a>';
-			$plugin_data->tested = $json_data['tested'];
-			$plugin_data->version = $json_data['version'];
-			
-			if (isset($json_data['active_installs'])) $plugin_data->active_installs = $json_data['active_installs']; else $plugin_data->last_updated = '';
-			if (isset($json_data['downloaded'])) $plugin_data->downloaded = $json_data['downloaded']; else $plugin_data->downloaded = '';
-			if (isset($json_data['last_updated'])) $plugin_data->last_updated = $json_data['last_updated']; else $plugin_data->last_updated = '';
-			if (isset($json_data['rating'])) $plugin_data->rating = $json_data['rating']; else $plugin_data->rating = '';
-			if (isset($json_data['num_ratings'])) $plugin_data->num_ratings = $json_data['num_ratings']; else $plugin_data->num_ratings = '';
-						
-			$plugin_data->requires = $json_data['requires'];
-			$plugin_data->sections = $json_data['sections'];
-			$plugin_data->homepage = 'http://wpshopgermany.de';
-						
-			if ($GLOBALS['wpsg_sc']->get_option('wpsg_debugURL') === '1' && $GLOBALS['wpsg_sc']->hasMod('wpsg_mod_core'))
-				$plugin_data->download_link = base64_decode('aHR0cDovL2RsLm1hZW5uY2hlbjEuZGUvd3BzZy93cHNnL3dwc2hvcGdlcm1hbnlfZGV2LnppcA=='); //http://dl.maennchen1.de/wpsg/wpsg/wpshopgermany_dev.zip';
-			else
-				$plugin_data->download_link = base64_decode('aHR0cDovL2RsLm1hZW5uY2hlbjEuZGUvd3BzZy93cHNnL3dwc2hvcGdlcm1hbnlfbGF0ZXN0LnppcA=='); //http://dl.maennchen1.de/wpsg/wpsg/wpshopgermany_latest.zip';
-			
-			$plugin_data->upgrade_notice = 'upgrade_notice';
-						
-			return $plugin_data;
+
+		    $wpsg_update_data = wpsg_get_update_data();
+
+            if ($wpsg_update_data['returnCode'] === '2')
+            {
+
+                return $wpsg_update_data['updateData'];
+
+            }
                 
 		} 
@@ -323,73 +286,74 @@
 		}
 	}
-	
+
+	function wpsg_updateNotification($currentPluginMetadata, $newPluginMetadata)
+    {
+
+        if (isset($newPluginMetadata->upgrade_notice) && strlen(trim($newPluginMetadata->upgrade_notice)) > 0)
+        {
+
+            echo '<span style="display:block; background-color:#d54e21; padding:10px; color:#f9f9f9; margin-top:10px;"><strong>'.__('Wichtiger Update Hinweis', 'wpsg').': </strong>'.$newPluginMetadata->upgrade_notice.'</span>';
+
+        }
+
+    }
+
+    function wpsg_get_update_data($key = false, $force = false)
+    {
+
+        if ($key === false) $key = $GLOBALS['wpsg_sc']->get_option('wpsg_key');
+
+        $wpsg_lastupdate = $GLOBALS['wpsg_sc']->get_option('wpsg_lastupdate');
+        $wpsg_update_data = $GLOBALS['wpsg_sc']->get_option('wpsg_updatedata');
+
+        if ($force === true) $wpsg_lastupdate = false;
+
+        if ($wpsg_lastupdate == false || $wpsg_lastupdate < time() - 60 * 15 || !wpsg_isSizedArray($wpsg_update_data))
+        {
+
+            $soap_client = new SoapClient(null, array(
+                'trace' => true,
+                'location' => 'https://api.maennchen1.de/',
+                'uri' => 'https://api.maennchen1.de/'
+            ));
+
+            $plugin_data = get_plugin_data(dirname(__FILE__).'/../wpshopgermany.php');
+
+            $wpsg_update_data = $soap_client->checkUpdate(
+                $key,
+                $plugin_data['Version']
+            );
+
+            if (wpsg_isSizedArray($wpsg_update_data) && wpsg_isSizedInt($wpsg_update_data['returnCode']))
+            {
+
+                $GLOBALS['wpsg_sc']->update_option('wpsg_lastupdate', strval(time()), true);
+                $GLOBALS['wpsg_sc']->update_option('wpsg_updatedata', $wpsg_update_data, true);
+
+            }
+
+        }
+
+        return $wpsg_update_data;
+
+    }
+
 	function wpsg_update($data)
 	{
-		
+
+	    unset($data->response[WPSG_SLUG]);
+
 		if (defined('WPSG_NO_UPDATE') && WPSG_NO_UPDATE === true) return false;
-		
-		$wpsg_lastupdate = $GLOBALS['wpsg_sc']->get_option('wpsg_lastupdate');
-		$wpsg_lastupdate = false;
-		
-		if ($wpsg_lastupdate == false || $wpsg_lastupdate < time() - 60 * 15)
-		{
-			 
-			$soap_client = new SoapClient(null, array(
-				'trace' => true,
-				'location' => 'https://api.maennchen1.de/',
-				'uri' => 'https://api.maennchen1.de/'
-			));
-
-			
-			
-		}
-		
+
+		$wpsg_update_data = wpsg_get_update_data();
+
+        if ($wpsg_update_data['returnCode'] === '2')
+        {
+
+            $data->response[WPSG_SLUG] = $wpsg_update_data['updateData'];
+
+        }
+
 		return $data;
-		
-		/*
-		$wpsg_lastupdate = $GLOBALS['wpsg_sc']->get_option('wpsg_lastupdate');
-		
-		if ($wpsg_lastupdate == false || $wpsg_lastupdate < time() - 60 * 15)
-		{
-
-			if ($GLOBALS['wpsg_sc']->get_option('wpsg_debugURL') === '1' && $GLOBALS['wpsg_sc']->hasMod('wpsg_mod_core'))
-				$remote_version = $GLOBALS['wpsg_sc']->get_url_content(base64_decode('aHR0cDovL2RsLm1hZW5uY2hlbjEuZGUvd3BzZy92ZXJzaW9uX2Rldg==')); //http://dl.maennchen1.de/wpsg/version_dev
-			else
-				$remote_version = $GLOBALS['wpsg_sc']->get_url_content(base64_decode('aHR0cDovL2RsLm1hZW5uY2hlbjEuZGUvd3BzZy92ZXJzaW9u')); //http://dl.maennchen1.de/wpsg/version
-			
-			$GLOBALS['wpsg_sc']->update_option('wpsg_lastupdate', time(), true); 
-			$GLOBALS['wpsg_sc']->update_option('wpsg_updateversion', $remote_version, true);
-			
-		}
-		else 
-		{
-			
-			$remote_version = $GLOBALS['wpsg_sc']->get_option('wpsg_updateversion', true);
-			
-		}
-				
-		if (!empty($remote_version) && version_compare($remote_version, WPSG_VERSION, '>')) 
-		{
-		
-			$plugin_data = new StdClass;
-			$plugin_data->id             = 0;
-        	$plugin_data->url            = base64_decode('aHR0cDovL3dwc2hvcGdlcm1hbnkuZGU='); //http://wpshopgermany.de';
-        	$plugin_data->slug           = 'wpshopgermany'; 
-        	$plugin_data->plugin = WPSG_SLUG;
-        	
-        	if ($GLOBALS['wpsg_sc']->get_option('wpsg_debugURL') === '1' && $GLOBALS['wpsg_sc']->hasMod('wpsg_mod_core'))
-        		$plugin_data->package        = base64_decode('aHR0cDovL2RsLm1hZW5uY2hlbjEuZGUvd3BzZy93cHNnL3dwc2hvcGdlcm1hbnlfZGV2LnppcA=='); // 'http://dl.maennchen1.de/wpsg/wpsg/wpshopgermany_dev.zip'
-        	else
-        		$plugin_data->package        = base64_decode('aHR0cDovL2RsLm1hZW5uY2hlbjEuZGUvd3BzZy93cHNnL3dwc2hvcGdlcm1hbnlfbGF0ZXN0LnppcA=='); // 'http://dl.maennchen1.de/wpsg/wpsg/wpshopgermany_latest.zip'
-        	
-        	$plugin_data->new_version    = $remote_version;
-        	$plugin_data->upgrade_notice = '';
-                    	
-        	$data->response[WPSG_SLUG] = $plugin_data;
-			
-		}
-		
-		return $data;
-		*/
 		
 	}
Index: /wpshopgermany.php
===================================================================
--- /wpshopgermany.php	(revision 6405)
+++ /wpshopgermany.php	(revision 6406)
@@ -209,6 +209,7 @@
 		add_action('admin_enqueue_scripts', array($GLOBALS['wpsg_sc'], 'wp_enqueue'));
 		add_action('admin_init', 'wpsg_admin_init');
-		add_action('admin_footer', 'wpsg_admin_footer');		 
-		
+		add_action('admin_footer', 'wpsg_admin_footer');
+        add_action('in_plugin_update_message-wpshopgermany/wpshopgermany.php', 'wpsg_updateNotification', 10, 2);
+
 	} 
 	else
