Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 6414)
+++ /controller/wpsg_ShopController.class.php	(revision 6425)
@@ -2141,54 +2141,33 @@
 			$this->arAllModule = array();
 
-			if (file_exists(WPSG_PATH_MOD.'wpsg_mod_core.class.php'))
-			{
-
-				require_once WPSG_PATH_MOD.'wpsg_mod_core.class.php';
-
-				$mod = new wpsg_mod_core();
-
-				return $mod->loadModule($all);
-
-			}
-			else
-			{
-
-				$mod_dir = opendir(WPSG_PATH_MOD);
-
-				$global = false;
-				if ($this->isMultiBlog() && $this->get_option('wpsg_multiblog_standalone', true) != '1') $global = true;
-
-				while ($file = readdir($mod_dir))
-				{
-
-					if (!is_dir(WPSG_PATH_MOD."/".$file) && $file != "." && $file != ".." && preg_match("/(.*)\.class\.php/i", $file) && $file != "wpsg_mod_basic.class.php")
-					{
-
-						if (file_exists(WPSG_PATH_USERMOD.$file)) require_once(WPSG_PATH_USERMOD.$file);
-						else require_once(WPSG_PATH_MOD.$file);
-
-						$class_name = preg_replace("/\.class\.php/", "", $file);
-
-						$mod = new $class_name();
-
-						// Demo oder Modul fÃŒr Lizenz aktiv
-						if (!isset($mod->version) && 1 >= $mod->lizenz)
-						{
-
-							if ($this->get_option($class_name, $global) > 0)
-							{
-
-								$this->arModule[$class_name] = $mod;
-
-							}
-
-							if ($all)
-							{
-
-								$this->arAllModule[$class_name] = $mod;
-
-							}
-
-						}
+			$mod_dir = opendir(WPSG_PATH_MOD);
+
+			$global = false;
+			if ($this->isMultiBlog() && $this->get_option('wpsg_multiblog_standalone', true) != '1') $global = true;
+
+			while ($file = readdir($mod_dir))
+			{
+
+				if (!is_dir(WPSG_PATH_MOD."/".$file) && $file != "." && $file != ".." && preg_match("/(.*)\.class\.php/i", $file) && $file != "wpsg_mod_basic.class.php")
+				{
+
+					if (file_exists(WPSG_PATH_USERMOD.$file)) require_once(WPSG_PATH_USERMOD.$file);
+					else require_once(WPSG_PATH_MOD.$file);
+
+					$class_name = preg_replace("/\.class\.php/", "", $file);
+
+					$mod = new $class_name();
+
+					if ($this->get_option($class_name, $global) > 0)
+					{
+
+						$this->arModule[$class_name] = $mod;
+
+					}
+
+					if ($all)
+					{
+
+						$this->arAllModule[$class_name] = $mod;
 
 					}
Index: /controller/wpsg_SystemController.class.php
===================================================================
--- /controller/wpsg_SystemController.class.php	(revision 6414)
+++ /controller/wpsg_SystemController.class.php	(revision 6425)
@@ -512,25 +512,5 @@
 			 
 			if (wpsg_isSizedString($strOut)) $strOut = '<div class="wrap">'.$strOut.'</div>';
-
-			if (!$onlyMessage)
-			{
-
-				if (!$this->hasMod('wpsg_mod_core'))
-				{
-
-					// Free Version => Bannern
-					$banner = base64_decode(strrev('==wZwpmLwYDe4YDNyVmbuFmQtA1VvIXZu5WYi9yczVmcwRmcvd3LlRmLx4WZoNmbuVWYt5yZtl2LvoDc0RHa')); //http://img.maennchen1.de/wordpress/banner/WP-Banner468x60.jpg
-
-					if (@file_get_contents($banner))
-					{
-
-						$strOut = '<div class="msg_wrap"><a href="http://shop.maennchen1.de/category/' . WPSG_FOLDERNAME . '/" target="_blank"><img src="' . $banner . '" /></a><br />' . $strOut . '</div>';
-
-					}
-
-				}
-
-			}
-
+ 
 			return $strOut;
 			
Index: /cron.php
===================================================================
--- /cron.php	(revision 6414)
+++ /cron.php	(revision 6425)
@@ -8,4 +8,6 @@
 	ini_set("display_errors", "1");
 	 
+	define('WPSG_CRON', true);
+
 	require_once(dirname(__FILE__).'/../../../wp-load.php'); 
  
Index: /lib/functions.inc.php
===================================================================
--- /lib/functions.inc.php	(revision 6414)
+++ /lib/functions.inc.php	(revision 6425)
@@ -541,5 +541,18 @@
 	 */
 	function wpsg_hspc($string) { if (isset($string)) return htmlspecialchars($string); else return ''; } // function wpsg_hspc($string)
-	
+
+	/**
+	 * Dient zur Erkennung des Cron Jobs
+	 * (FÃŒr die Funktion canDisplay im Produkt wird der Admin Status abgefragt, so dass Produkte im Backend angezeigt werden auch wenn sie ausverkauft sind
+	 * Im Cron mÃŒssen diese Produkte auch exportiert werden damit die Darstellung mit dem Backend stimmt
+	 */
+	function wpsg_is_cron()
+	{
+		
+		if (defined("WPSG_CRON") && WPSG_CRON === true) return true;
+		else return false;
+		
+	}
+
 	/**
 	 * Formatiert einen Double Wert fÃŒr Ausgaben im Frontend
Index: /model/wpsg_product.class.php
===================================================================
--- /model/wpsg_product.class.php	(revision 6414)
+++ /model/wpsg_product.class.php	(revision 6425)
@@ -625,5 +625,5 @@
 				".$strLimit."
 			";
-
+ 
 			$arID = $GLOBALS['wpsg_db']->fetchAssocField($strQuery);
 			$arReturn = array();
Index: /mods/wpsg_mod_core.class
===================================================================
--- /mods/wpsg_mod_core.class	(revision 6425)
+++ /mods/wpsg_mod_core.class	(revision 6425)
@@ -0,0 +1,606 @@
+<?php
+
+	/**
+	 * Dieses Modul ist ein verstecktes System Modul und ist nur in der Lizezierten Version vorhanden
+	 * @author Daschmi (daniel@maennchen1.de) 02.10.2015
+	 */
+	class wpsg_mod_core extends wpsg_mod_basic
+	{
+		 
+		var $id = 1630;
+		
+		public function __construct()
+		{
+			
+			parent::__construct(); 
+			
+		} // public function __construct()
+		
+		/**
+		 * LÃ€dt die Module
+		 */
+		public function loadModule($all)
+		{
+			 
+			$mod_dir = opendir(WPSG_PATH_MOD);
+				
+			$global = false;
+			if ($this->shop->isMultiBlog() && $this->shop->get_option('wpsg_multiblog_standalone', true) != '1') $global = true;
+				
+			while ($file = readdir($mod_dir))
+			{
+			
+				if (!is_dir(WPSG_PATH_MOD."/".$file) && $file != "." && $file != ".." && preg_match("/(.*)\.class\.php/i", $file) && $file != "wpsg_mod_basic.class.php")
+				{
+						
+					if (file_exists(WPSG_PATH_USERMOD.$file)) require_once(WPSG_PATH_USERMOD.$file);
+					else require_once(WPSG_PATH_MOD.$file);
+						
+					$class_name = preg_replace("/\.class\.php/", "", $file);
+						
+					$mod = new $class_name();
+						
+					// Demo oder Modul fÃŒr Lizenz aktiv
+					/*if ($this->shop->arLizenz['l'] == 0 || $this->shop->arLizenz['l'] >= $mod->lizenz)
+					{
+							
+						if (!isset($mod->version) || $mod->getDemoDays() > 0 || (isset($this->shop->arLizenz) && in_array(get_class($mod), (array)$this->shop->arLizenz['mods'])))
+						{
+			
+							if ($this->shop->get_option($class_name, $global) > 0 || $class_name === 'wpsg_mod_core')
+							{
+			
+								$this->shop->arModule[$class_name] = $mod;
+			
+							}
+			
+						}
+							
+						if ($all)
+						{
+			
+							$this->shop->arAllModule[$class_name] = $mod;
+			
+						}
+			
+					} */
+						
+				}
+			
+			}
+			
+			$pluginModule = array(); $pluginModule = apply_filters('wpsg_modul_load', array($pluginModule));
+			
+			if (wpsg_isSizedArray($pluginModule))
+			{
+				
+				foreach ($pluginModule as $class_name => $mod)
+				{
+					
+					if (!is_object($mod)) continue;
+					
+					if ($this->shop->get_option($class_name, $global) > 0)
+					{
+	
+						$this->shop->arModule[$class_name] = $mod;
+	
+					}
+					
+					if ($all)
+					{
+		
+						$this->shop->arAllModule[$class_name] = $mod;
+		
+					}
+					
+				}
+				
+			}
+			 			
+			uasort($this->shop->arModule, array($this->shop, "cmp_mods"));
+				
+			if ($all) uasort($this->shop->arAllModule, array($this->shop, "cmp_mods"));
+			
+			// Module werden hier erst initiiert, da dann alle Module bekannt sind und die Reihenfolge hergestellt ist
+			foreach ($this->shop->arModule as $mod_key => $m)
+			{
+			
+				if ($this->shop->get_option(get_class($m), $global) > 0)
+				{
+			
+					$m->init();
+						
+				}
+			
+			}
+			
+		} // public function loadModule($all)
+		
+		/**
+		 * Gibt true zurÃŒck wenn eine aktive Lizenz eingebunden ist
+		 */
+		public function hasActiveLicence()
+		{
+			
+			if (is_array($this->shop->arLizenz) && isset($this->shop->arLizenz['l']))
+			{
+			
+				// PrÃŒfen das in einem Multiblog nur mit der Enterprise Version gearbeitet wird
+				if ($this->shop->isMultiBlog() && $this->shop->arLizenz['l'] < 3)
+				{
+						
+					// Die installierte Lizenz kann nicht in einer Multiblog Umgebung eingesetzt werden.
+					$this->shop->addBackendError(base64_decode('RGllIGluc3RhbGxpZXJ0ZSBMaXplbnoga2FubiBuaWNodCBpbiBlaW5lciBNdWx0aWJsb2cgVW1nZWJ1bmcgZWluZ2VzZXR6dCB3ZXJkZW4u'));
+					
+					return false;
+						
+				}
+			
+				return true;
+			
+			}
+				
+			if ($this->shop->getDemoDays() < 0)
+			{
+			
+				// Ihre Lizenz von wpShopGermany ist abgelaufen
+				//$this->shop->addBackendError(base64_decode('SWhyZSBMaXplbnogdm9uIHdwU2hvcEdlcm1hbnkgaXN0IGFiZ2VsYXVmZW4='));
+			
+			}
+			
+			return false;
+			
+		}
+		
+		/**
+		 * Gibt die Tage der DemoVersion zurÃŒck
+		 */
+		public function getDemoDays()
+		{
+			
+			$isnt = $this->shop->get_option('wpsg_installed', true);
+			$rem = round((($isnt + 14 * 60 * 60 * 24) - time()) / (60 * 60 * 24), 0);
+				
+			return $rem;
+			
+		} // public function getDemoDays()
+		
+		public function admin_registrierung()
+		{
+			
+			if (!class_exists('SoapClient'))
+			{
+			
+				$this->shop->addBackendError(__('nohspc_Ihrem Server fehlt die PHP-Bibliothek fÃŒr die SOAP-UnterstÃŒtzung. Eine Registrierung Ihrer Domain ist somit nicht mÃ¶glich! <br />Weitere Informationen finden Sie in unseren <a target="_blank" href="http://wpshopgermany.maennchen1.de/faqs/wie-pruefe-ich-ob-soap-und-curl-auf-meinem-server-aktiviert-sind/">FAQ</a>.', 'wpsg'));
+				$this->shop->view['actionName'] = 'registrierung';
+				$this->shop->render(WPSG_PATH_VIEW.'/admin/index.phtml');
+			
+				return;
+			
+			}
+				
+			if (!$this->shop->arLizenz['nr'] > 0 && wpsg_getStr($_REQUEST['do']) != 'installModul') {
+			
+				$this->shop->view = array(
+					'actionName' => 'registrierung',
+					'subTemplate' => WPSG_PATH_VIEW.base64_decode('L21vZHMvbW9kX2NvcmUvYWRtaW5fbGljZW5jZS5waHRtbA==') // /mods/mod_core/admin_licence.phtml
+				);
+			
+			}
+			else
+			{
+			
+				if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'remove')
+				{
+			
+					$reg_data = $this->shop->callMod('wpsg_mod_core', 'RegisterCall', array('removeURL', array($_REQUEST['url'])));
+						
+					if ($reg_data === false) { $this->shop->addBackendError(__('Keine Registrierungsdaten gefunden.', 'wpsg')); }
+					else if (is_array($reg_data) && isset($reg_data['error']) && array_key_exists('error', $reg_data)) { $this->shop->addBackendError(wpsg_translate(__('Fehler im Registrierungsserver: #1#', 'wpsg'), $reg_data['error'])); }
+					else { $this->shop->addBackendMessage(__('Domainregistrierung erfolgreich entfernt.', 'wpsg')); }
+						
+					$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=domains');
+						
+				}
+				else if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'register')
+				{
+						
+					$reg_data = $this->shop->callMod('wpsg_mod_core', 'RegisterCall', array('registerURL', array($this->shop->get_option('siteurl'))));
+						
+					if ($reg_data === false) { $this->shop->addBackendError(__('Keine Registrierungsdaten gefunden.', 'wpsg')); }
+					else if (is_array($reg_data) && isset($reg_data['error']) && array_key_exists('error', $reg_data)) { $this->shop->addBackendError(wpsg_translate(__('Fehler im Registrierungsserver: #1#', 'wpsg'), $reg_data['error'])); }
+					else { $this->shop->addBackendMessage(__('Domainregistrierung erfolgreich.', 'wpsg')); }
+						
+					$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=domains');
+						
+				}
+				else if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'getCredentials')
+				{
+						
+					$this->getCredentialsAction();
+						
+					return;
+						
+				}
+				else if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'installModul')
+				{
+											
+					if ($this->installModul($_REQUEST['modul']))
+					{
+			
+						$this->shop->addBackendMessage(__('Modul erfolgreich installiert.', 'wpsg'));
+			
+					}
+			
+					$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module');
+						
+				}
+				else if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'aktivateModul')
+				{
+						
+					$reg_data = $this->shop->callMod('wpsg_mod_core', 'RegisterCall', array('aktivateModul', array($_REQUEST['wpsg_modulkey'])));
+						
+					if ($reg_data === false) { $this->shop->addBackendError(__('Modul konnte nicht aktiviert werden.', 'wpsg')); }
+					else if ($reg_data === -1) { $this->shop->addBackendError(__('UngÃŒltiger Modulcode.', 'wpsg')); }
+					else if ($reg_data === -2) { $this->shop->addBackendError(__('Code bereits fÃŒr einen anderen SchlÃŒssel verwendet.', 'wpsg')); }
+					else if ($reg_data === -3) { $this->shop->addBackendError(__('Modul bereits aktiviert.', 'wpsg')); }
+					else if (is_array($reg_data) && isset($reg_data['error']) && array_key_exists('error', $reg_data)) { $this->shop->addBackendError(wpsg_translate(__('Fehler im Registrierungsserver: #1#', 'wpsg'), $reg_data['error'])); }
+					else {
+			
+						// Neuen Modulcode speichern
+						$this->shop->update_option('wpsg_key', $reg_data, true);
+			
+						$this->shop->addBackendMessage(__('Modul erfolgreich aktiviert.', 'wpsg'));
+							
+					}
+						
+					$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=module');
+						
+				}
+			
+				if (isset($_REQUEST['registerdata-submit']))
+				{
+						
+					$reg_data = $this->shop->callMod('wpsg_mod_core', 'RegisterCall', array('setRegisterInfo', array($_REQUEST)));
+						
+					if ($reg_data === false) { $this->shop->addBackendError(__('Keine Registrierungsdaten gefunden.', 'wpsg')); }
+					else if (is_array($reg_data) && isset($reg_data['error']) && array_key_exists('error', $reg_data)) { $this->shop->addBackendError(wpsg_translate(__('Fehler im Registrierungsserver: #1#', 'wpsg'), $reg_data['error'])); }
+					else { $this->shop->addBackendMessage(__('Registrierungsdaten erfolgreich ÃŒbermittelt', 'wpsg')); }
+						
+					$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung');
+						
+				}
+			
+				// Daten vom Registrierungsserver laden
+				$reg_data = $this->shop->callMod('wpsg_mod_core', 'RegisterCall', array('getRegisterInfo'));
+			
+				// Aktuelle Domain registriert?
+				$reg_data['registred'] = false;
+				$arURLs = array();
+				foreach ((array)$reg_data['domains'] as $d)
+				{
+						
+					$arURLs[] = preg_replace('/(.*)\/\//', '', $d['url']);
+						
+					if (preg_match('/((http\:\/\/)|(https\:\/\/)){0,1}'.preg_quote($this->shop->get_option('siteurl'), '/').'\/*/', $d['url']))
+					{
+						$reg_data['registred'] = true; break;
+					}
+						
+				}
+			
+				$this->shop->update_option('wpsg_registredURLs', $arURLs);
+			
+				if ($reg_data === false)
+				{
+						
+					$this->shop->addBackendError(__('Keine Registrierungsdaten gefunden.', 'wpsg'));
+						
+				}
+				else if (is_array($reg_data) && isset($reg_data['error']) && array_key_exists('error', $reg_data))
+				{
+						
+					$this->shop->addBackendError(wpsg_translate(__('Fehler im Registrierungsserver: #1#', 'wpsg'), $reg_data['error']));
+			
+				}
+			
+				$this->shop->view = array(
+					'data' => $reg_data,
+					'actionName' => 'registrierung',
+					'subTemplate' => WPSG_PATH_VIEW.base64_decode('L21vZHMvbW9kX2NvcmUvYWRtaW5fcmVnaXN0ZXIucGh0bWw='), // /mods/mod_core/admin_register.phtml
+					'mods' => $this->shop->arLizenz['mods']
+				);
+			
+				$this->shop->loadModule(true);
+			
+				switch ($this->shop->arLizenz['l'])
+				{
+						
+					case '1': $this->shop->view['typ'] = __('Light Version', 'wpsg'); break;
+					case '2': $this->shop->view['typ'] = __('Pro Version', 'wpsg'); break;
+					case '3': $this->shop->view['typ'] = __('Enterprise Version', 'wpsg'); break;
+					default: die();
+						
+				}
+			
+			}
+			
+			$this->shop->render(WPSG_PATH_VIEW.'/admin/index.phtml');
+			
+		} // public function admin_registrierung()
+		
+		public function module_index()
+		{
+			
+			if (class_exists('SoapClient'))
+			{
+		
+				$this->shop->view['arOnlineModule'] = $this->RegisterCall('getModulInfo_V2');
+		
+				foreach ((array)$this->shop->view['arOnlineModule'] as $k => $m)
+				{
+		
+					if (wpsg_isSizedString($m['version_dev']) && wpsg_isSizedInt($this->shop->get_option('wpsg_debugURL'))) $this->shop->view['arOnlineModule'][$k]['version'] = $m['version_dev'];
+		
+					$this->shop->view['arOnlineModule'][$k]['version_local'] = $this->shop->arAllModule[$m['key']]->version;
+		
+					$global = false;
+					if ($this->shop->isMultiBlog() && $this->shop->get_option('wpsg_multiblog_standalone', true) != '1') $global = true;
+		
+					if ($this->shop->get_option($m['key'], $global) > 0)
+					{
+							
+						$this->shop->view['arOnlineModule'][$k]['installed'] = true;
+							
+					}
+					else
+					{
+							
+						$this->shop->view['arOnlineModule'][$k]['installed'] = false;
+							
+					}
+		
+					if ($this->shop->get_option('wpsg_debugURL') == '1' && isset($this->shop->view['arOnlineModule'][$k]['version_dev']))
+					{
+		
+						$this->shop->view['arOnlineModule'][$k]['version'] = $m['version_dev'];
+							
+					}
+		
+				}
+						
+			}
+			else
+			{
+					
+				$this->shop->addBackendError(__('nohspc_Ihrem Server fehlt die PHP-Bibliothek fÃŒr die SOAP-UnterstÃŒtzung. Eine Registrierung Ihrer Domain ist somit nicht mÃ¶glich! <br />Weitere Informationen finden Sie in unseren <a target="_blank" href="http://wpshopgermany.maennchen1.de/faqs/wie-pruefe-ich-ob-soap-und-curl-auf-meinem-server-aktiviert-sind/">FAQ</a>.', 'wpsg'));
+					
+			}
+			
+			echo $this->render(WPSG_PATH_VIEW.'/mods/mod_core/module_index.phtml');
+			
+		} // public function module_index()
+		
+		/**
+		 * Sendet eine Anfrage an den Registrierungs Server und gibt das Ergebnis zurÃŒck
+		 */
+		public function RegisterCall($func_name, $args = array())
+		{
+				
+			$SOAP = new SoapClient(
+				null,
+				array(
+					'location' => base64_decode('aHR0cHM6Ly9zaG9wLm1hZW5uY2hlbjEuZGUvcmVnaXN0cmllcnVuZy8='), // https://shop.maennchen1.de/registrierung/
+					'uri' => 'http://shop.maennchen1.de',
+					'cache_wsdl' => WSDL_CACHE_NONE
+				)
+			);
+				
+			if (!$this->shop->hasActiveLicence())
+			{
+					
+				$args = array_merge(array('No_wpsg'), $args);
+		
+			}
+			else
+			{
+		
+				// Hier kein wpsg_array_merge da die index gleich sind
+				$args = array_merge(array($this->shop->get_option('wpsg_key', true)), $args);
+		
+			}
+				
+			try {
+					
+				$result = $SOAP->__soapCall($func_name, $args);
+		
+			}
+			catch (Exception $e)
+			{
+		
+				$this->shop->addBackendError(wpsg_translate(__('SOAP Fehler: #1#', 'wpsg'), $e->getMessage()));
+		
+			}
+				
+			return $result;
+				
+		} // public function RegisterCall($func_name, $args)
+	
+		public function installModul($modul_key)
+		{
+			
+			global $wp_filesystem;
+			
+			ob_start();
+			$request_creds = request_filesystem_credentials(
+				WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$modul_key,
+				'',
+				false,
+				false,
+				null
+			);
+			ob_end_clean();
+				
+			// 1 gibt es bei Windows Rechnern zurÃŒck, da es hier egal ist
+			// Ein Array ist es wenn das Formular bereits abgeschickt wurde und die Anfrage vom Formular kommt
+			// false ist es wenn kein Zugriff ist dann muss das Formular angezeigt werden
+				
+			if (false === $request_creds)
+			{
+			
+				// Berechtigungen anfragen
+				$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&do=getCredentials&modul='.$_REQUEST['modul']);
+			
+			}
+			else if (is_array($request_creds))
+			{
+			
+				if (!WP_Filesystem($request_creds))
+				{
+			
+					// Eingegebene Daten waren falsch
+					$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&do=getCredentials&modul='.$_REQUEST['modul']);
+			
+				}
+			
+			}
+			
+			$temp_name = $this->shop->getTempName($modul_key.'.zip');
+			@unlink($temp_name);
+				
+			if ($this->shop->get_option('wpsg_debugURL') === '1' && $this->shop->hasMod('wpsg_mod_core'))
+			{
+			
+				$url = 'http://dl.maennchen1.de/wpsg/'.$modul_key.'/'.$modul_key.'_dev.zip';
+			
+			}
+			else
+			{
+			
+				$url = 'http://dl.maennchen1.de/wpsg/'.$modul_key.'/'.$modul_key.'_latest.zip';
+			
+			}
+			
+			$bOK = @copy($url, $temp_name);
+			
+			if (!$bOK)
+			{
+			
+				$bOK = @file_put_contents($temp_name, $this->shop->get_url_content($url));
+			
+				if (!$bOK)
+				{
+						
+					// Pfad finden fÃŒr das Wordpress Filesystem
+					if ($GLOBALS['wpsg_sc']->isMultiBlog())
+						$ftp_path = WP_CONTENT_DIR.'/'.WPSG_MB_UPLOADS.'/wpsg/wpsg_temp/';
+						else
+							$ftp_path = WP_CONTENT_DIR.'/uploads/wpsg_temp/';
+								
+							$ftp_path = trailingslashit($wp_filesystem->find_folder($ftp_path)).preg_replace('/(.*)\/wpsg_temp\//', '', $temp_name);
+								
+							$bOK = $wp_filesystem->put_contents($ftp_path, $this->shop->get_url_content($url), FS_CHMOD_FILE);
+								
+							if (!$bOK)
+							{
+									
+								$this->shop->addBackendError(wpsg_translate(__('Modul (#1#) konnte nicht kopiert werden!', 'wpsg'), $modul_key));
+								return false;
+			
+							}
+								
+				}
+			
+			}
+				
+			$zip = new ZipArchive();
+			
+			if ($zip->open($temp_name) === true)
+			{
+			
+				try
+				{
+						
+					$bOK = @$zip->extractTo(WPSG_PATH.'/../');
+					$zip->close();
+			
+					if ($bOK === false)
+					{
+			
+						throw new Exception();
+							
+					}
+					else
+					{
+			
+						return true;
+							
+					}
+			
+				}
+				catch (Exception $e)
+				{
+						
+					// Es ist ein Fehler aufgetreten, jetzt versuche ich die Datei mit dem Wordpress Filesystem zu entpacken
+						
+					// Pfad finden fÃŒr das Wordpress Filesystem
+					$ftp_path = trailingslashit($wp_filesystem->find_folder(realpath(WPSG_PATH.'/../')));
+						
+					$bOK = unzip_file($temp_name, $ftp_path);
+						
+					if ($bOK !== true)
+					{
+			
+						$strError = '';
+			
+						// Hier ist immer noch ein Fehler aufgetreten
+						foreach ((array)$bOK->errors as $e)
+						{
+								
+							$strError .= $e[0].' ';
+			
+						}
+						 
+						$this->shop->addBackendError(wpsg_translate(__('Fehler beim Entpacken: #1#', 'wpsg'), $strError)); return false;
+			
+					}
+					else
+					{
+			
+						return true;
+			
+					}
+						
+				}
+			
+			}
+			else
+			{
+			
+				$this->shop->addBackendError(__('Datei konnte nicht ÃŒbertragen werden.', 'wpsg')); return false;
+			
+			}
+			
+			$this->shop->addBackendError(__('Datei konnte nicht entpackt werden.', 'wpsg')); return false;
+			
+		} // public function installModul($modul_key)
+		
+		/**
+		 * Fragt die Rechte ab und installiert anschlieÃend ein Modul
+		 */
+		public function getCredentialsAction()
+		{
+				
+			echo request_filesystem_credentials(
+				WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$_REQUEST['modul'],
+				'',
+				false,
+				false,
+				null
+			);
+				
+		} // public function getCredentialsAction()
+		
+	} // class wpsg_mod_core extends wpsg_mod_basic
+
+?>
Index: ds/wpsg_mod_core.class.php
===================================================================
--- /mods/wpsg_mod_core.class.php	(revision 6414)
+++ 	(revision )
@@ -1,606 +1,0 @@
-<?php
-
-	/**
-	 * Dieses Modul ist ein verstecktes System Modul und ist nur in der Lizezierten Version vorhanden
-	 * @author Daschmi (daniel@maennchen1.de) 02.10.2015
-	 */
-	class wpsg_mod_core extends wpsg_mod_basic
-	{
-		 
-		var $id = 1630;
-		
-		public function __construct()
-		{
-			
-			parent::__construct(); 
-			
-		} // public function __construct()
-		
-		/**
-		 * LÃ€dt die Module
-		 */
-		public function loadModule($all)
-		{
-			 
-			$mod_dir = opendir(WPSG_PATH_MOD);
-				
-			$global = false;
-			if ($this->shop->isMultiBlog() && $this->shop->get_option('wpsg_multiblog_standalone', true) != '1') $global = true;
-				
-			while ($file = readdir($mod_dir))
-			{
-			
-				if (!is_dir(WPSG_PATH_MOD."/".$file) && $file != "." && $file != ".." && preg_match("/(.*)\.class\.php/i", $file) && $file != "wpsg_mod_basic.class.php")
-				{
-						
-					if (file_exists(WPSG_PATH_USERMOD.$file)) require_once(WPSG_PATH_USERMOD.$file);
-					else require_once(WPSG_PATH_MOD.$file);
-						
-					$class_name = preg_replace("/\.class\.php/", "", $file);
-						
-					$mod = new $class_name();
-						
-					// Demo oder Modul fÃŒr Lizenz aktiv
-					if ($this->shop->arLizenz['l'] == 0 || $this->shop->arLizenz['l'] >= $mod->lizenz)
-					{
-							
-						if (!isset($mod->version) || $mod->getDemoDays() > 0 || (isset($this->shop->arLizenz) && in_array(get_class($mod), (array)$this->shop->arLizenz['mods'])))
-						{
-			
-							if ($this->shop->get_option($class_name, $global) > 0 || $class_name === 'wpsg_mod_core')
-							{
-			
-								$this->shop->arModule[$class_name] = $mod;
-			
-							}
-			
-						}
-							
-						if ($all)
-						{
-			
-							$this->shop->arAllModule[$class_name] = $mod;
-			
-						}
-			
-					}
-						
-				}
-			
-			}
-			
-			$pluginModule = array(); $pluginModule = apply_filters('wpsg_modul_load', array($pluginModule));
-			
-			if (wpsg_isSizedArray($pluginModule))
-			{
-				
-				foreach ($pluginModule as $class_name => $mod)
-				{
-					
-					if (!is_object($mod)) continue;
-					
-					if ($this->shop->get_option($class_name, $global) > 0)
-					{
-	
-						$this->shop->arModule[$class_name] = $mod;
-	
-					}
-					
-					if ($all)
-					{
-		
-						$this->shop->arAllModule[$class_name] = $mod;
-		
-					}
-					
-				}
-				
-			}
-			 			
-			uasort($this->shop->arModule, array($this->shop, "cmp_mods"));
-				
-			if ($all) uasort($this->shop->arAllModule, array($this->shop, "cmp_mods"));
-			
-			// Module werden hier erst initiiert, da dann alle Module bekannt sind und die Reihenfolge hergestellt ist
-			foreach ($this->shop->arModule as $mod_key => $m)
-			{
-			
-				if ($this->shop->get_option(get_class($m), $global) > 0)
-				{
-			
-					$m->init();
-						
-				}
-			
-			}
-			
-		} // public function loadModule($all)
-		
-		/**
-		 * Gibt true zurÃŒck wenn eine aktive Lizenz eingebunden ist
-		 */
-		public function hasActiveLicence()
-		{
-			
-			if (is_array($this->shop->arLizenz) && isset($this->shop->arLizenz['l']))
-			{
-			
-				// PrÃŒfen das in einem Multiblog nur mit der Enterprise Version gearbeitet wird
-				if ($this->shop->isMultiBlog() && $this->shop->arLizenz['l'] < 3)
-				{
-						
-					// Die installierte Lizenz kann nicht in einer Multiblog Umgebung eingesetzt werden.
-					$this->shop->addBackendError(base64_decode('RGllIGluc3RhbGxpZXJ0ZSBMaXplbnoga2FubiBuaWNodCBpbiBlaW5lciBNdWx0aWJsb2cgVW1nZWJ1bmcgZWluZ2VzZXR6dCB3ZXJkZW4u'));
-					
-					return false;
-						
-				}
-			
-				return true;
-			
-			}
-				
-			if ($this->shop->getDemoDays() < 0)
-			{
-			
-				// Ihre Lizenz von wpShopGermany ist abgelaufen
-				//$this->shop->addBackendError(base64_decode('SWhyZSBMaXplbnogdm9uIHdwU2hvcEdlcm1hbnkgaXN0IGFiZ2VsYXVmZW4='));
-			
-			}
-			
-			return false;
-			
-		}
-		
-		/**
-		 * Gibt die Tage der DemoVersion zurÃŒck
-		 */
-		public function getDemoDays()
-		{
-			
-			$isnt = $this->shop->get_option('wpsg_installed', true);
-			$rem = round((($isnt + 14 * 60 * 60 * 24) - time()) / (60 * 60 * 24), 0);
-				
-			return $rem;
-			
-		} // public function getDemoDays()
-		
-		public function admin_registrierung()
-		{
-			
-			if (!class_exists('SoapClient'))
-			{
-			
-				$this->shop->addBackendError(__('nohspc_Ihrem Server fehlt die PHP-Bibliothek fÃŒr die SOAP-UnterstÃŒtzung. Eine Registrierung Ihrer Domain ist somit nicht mÃ¶glich! <br />Weitere Informationen finden Sie in unseren <a target="_blank" href="http://wpshopgermany.maennchen1.de/faqs/wie-pruefe-ich-ob-soap-und-curl-auf-meinem-server-aktiviert-sind/">FAQ</a>.', 'wpsg'));
-				$this->shop->view['actionName'] = 'registrierung';
-				$this->shop->render(WPSG_PATH_VIEW.'/admin/index.phtml');
-			
-				return;
-			
-			}
-				
-			if (!$this->shop->arLizenz['nr'] > 0 && wpsg_getStr($_REQUEST['do']) != 'installModul') {
-			
-				$this->shop->view = array(
-					'actionName' => 'registrierung',
-					'subTemplate' => WPSG_PATH_VIEW.base64_decode('L21vZHMvbW9kX2NvcmUvYWRtaW5fbGljZW5jZS5waHRtbA==') // /mods/mod_core/admin_licence.phtml
-				);
-			
-			}
-			else
-			{
-			
-				if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'remove')
-				{
-			
-					$reg_data = $this->shop->callMod('wpsg_mod_core', 'RegisterCall', array('removeURL', array($_REQUEST['url'])));
-						
-					if ($reg_data === false) { $this->shop->addBackendError(__('Keine Registrierungsdaten gefunden.', 'wpsg')); }
-					else if (is_array($reg_data) && isset($reg_data['error']) && array_key_exists('error', $reg_data)) { $this->shop->addBackendError(wpsg_translate(__('Fehler im Registrierungsserver: #1#', 'wpsg'), $reg_data['error'])); }
-					else { $this->shop->addBackendMessage(__('Domainregistrierung erfolgreich entfernt.', 'wpsg')); }
-						
-					$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=domains');
-						
-				}
-				else if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'register')
-				{
-						
-					$reg_data = $this->shop->callMod('wpsg_mod_core', 'RegisterCall', array('registerURL', array($this->shop->get_option('siteurl'))));
-						
-					if ($reg_data === false) { $this->shop->addBackendError(__('Keine Registrierungsdaten gefunden.', 'wpsg')); }
-					else if (is_array($reg_data) && isset($reg_data['error']) && array_key_exists('error', $reg_data)) { $this->shop->addBackendError(wpsg_translate(__('Fehler im Registrierungsserver: #1#', 'wpsg'), $reg_data['error'])); }
-					else { $this->shop->addBackendMessage(__('Domainregistrierung erfolgreich.', 'wpsg')); }
-						
-					$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=domains');
-						
-				}
-				else if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'getCredentials')
-				{
-						
-					$this->getCredentialsAction();
-						
-					return;
-						
-				}
-				else if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'installModul')
-				{
-											
-					if ($this->installModul($_REQUEST['modul']))
-					{
-			
-						$this->shop->addBackendMessage(__('Modul erfolgreich installiert.', 'wpsg'));
-			
-					}
-			
-					$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=module');
-						
-				}
-				else if (isset($_REQUEST['do']) && $_REQUEST['do'] == 'aktivateModul')
-				{
-						
-					$reg_data = $this->shop->callMod('wpsg_mod_core', 'RegisterCall', array('aktivateModul', array($_REQUEST['wpsg_modulkey'])));
-						
-					if ($reg_data === false) { $this->shop->addBackendError(__('Modul konnte nicht aktiviert werden.', 'wpsg')); }
-					else if ($reg_data === -1) { $this->shop->addBackendError(__('UngÃŒltiger Modulcode.', 'wpsg')); }
-					else if ($reg_data === -2) { $this->shop->addBackendError(__('Code bereits fÃŒr einen anderen SchlÃŒssel verwendet.', 'wpsg')); }
-					else if ($reg_data === -3) { $this->shop->addBackendError(__('Modul bereits aktiviert.', 'wpsg')); }
-					else if (is_array($reg_data) && isset($reg_data['error']) && array_key_exists('error', $reg_data)) { $this->shop->addBackendError(wpsg_translate(__('Fehler im Registrierungsserver: #1#', 'wpsg'), $reg_data['error'])); }
-					else {
-			
-						// Neuen Modulcode speichern
-						$this->shop->update_option('wpsg_key', $reg_data, true);
-			
-						$this->shop->addBackendMessage(__('Modul erfolgreich aktiviert.', 'wpsg'));
-							
-					}
-						
-					$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&subaction=module');
-						
-				}
-			
-				if (isset($_REQUEST['registerdata-submit']))
-				{
-						
-					$reg_data = $this->shop->callMod('wpsg_mod_core', 'RegisterCall', array('setRegisterInfo', array($_REQUEST)));
-						
-					if ($reg_data === false) { $this->shop->addBackendError(__('Keine Registrierungsdaten gefunden.', 'wpsg')); }
-					else if (is_array($reg_data) && isset($reg_data['error']) && array_key_exists('error', $reg_data)) { $this->shop->addBackendError(wpsg_translate(__('Fehler im Registrierungsserver: #1#', 'wpsg'), $reg_data['error'])); }
-					else { $this->shop->addBackendMessage(__('Registrierungsdaten erfolgreich ÃŒbermittelt', 'wpsg')); }
-						
-					$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung');
-						
-				}
-			
-				// Daten vom Registrierungsserver laden
-				$reg_data = $this->shop->callMod('wpsg_mod_core', 'RegisterCall', array('getRegisterInfo'));
-			
-				// Aktuelle Domain registriert?
-				$reg_data['registred'] = false;
-				$arURLs = array();
-				foreach ((array)$reg_data['domains'] as $d)
-				{
-						
-					$arURLs[] = preg_replace('/(.*)\/\//', '', $d['url']);
-						
-					if (preg_match('/((http\:\/\/)|(https\:\/\/)){0,1}'.preg_quote($this->shop->get_option('siteurl'), '/').'\/*/', $d['url']))
-					{
-						$reg_data['registred'] = true; break;
-					}
-						
-				}
-			
-				$this->shop->update_option('wpsg_registredURLs', $arURLs);
-			
-				if ($reg_data === false)
-				{
-						
-					$this->shop->addBackendError(__('Keine Registrierungsdaten gefunden.', 'wpsg'));
-						
-				}
-				else if (is_array($reg_data) && isset($reg_data['error']) && array_key_exists('error', $reg_data))
-				{
-						
-					$this->shop->addBackendError(wpsg_translate(__('Fehler im Registrierungsserver: #1#', 'wpsg'), $reg_data['error']));
-			
-				}
-			
-				$this->shop->view = array(
-					'data' => $reg_data,
-					'actionName' => 'registrierung',
-					'subTemplate' => WPSG_PATH_VIEW.base64_decode('L21vZHMvbW9kX2NvcmUvYWRtaW5fcmVnaXN0ZXIucGh0bWw='), // /mods/mod_core/admin_register.phtml
-					'mods' => $this->shop->arLizenz['mods']
-				);
-			
-				$this->shop->loadModule(true);
-			
-				switch ($this->shop->arLizenz['l'])
-				{
-						
-					case '1': $this->shop->view['typ'] = __('Light Version', 'wpsg'); break;
-					case '2': $this->shop->view['typ'] = __('Pro Version', 'wpsg'); break;
-					case '3': $this->shop->view['typ'] = __('Enterprise Version', 'wpsg'); break;
-					default: die();
-						
-				}
-			
-			}
-			
-			$this->shop->render(WPSG_PATH_VIEW.'/admin/index.phtml');
-			
-		} // public function admin_registrierung()
-		
-		public function module_index()
-		{
-			
-			if (class_exists('SoapClient'))
-			{
-		
-				$this->shop->view['arOnlineModule'] = $this->RegisterCall('getModulInfo_V2');
-		
-				foreach ((array)$this->shop->view['arOnlineModule'] as $k => $m)
-				{
-		
-					if (wpsg_isSizedString($m['version_dev']) && wpsg_isSizedInt($this->shop->get_option('wpsg_debugURL'))) $this->shop->view['arOnlineModule'][$k]['version'] = $m['version_dev'];
-		
-					$this->shop->view['arOnlineModule'][$k]['version_local'] = $this->shop->arAllModule[$m['key']]->version;
-		
-					$global = false;
-					if ($this->shop->isMultiBlog() && $this->shop->get_option('wpsg_multiblog_standalone', true) != '1') $global = true;
-		
-					if ($this->shop->get_option($m['key'], $global) > 0)
-					{
-							
-						$this->shop->view['arOnlineModule'][$k]['installed'] = true;
-							
-					}
-					else
-					{
-							
-						$this->shop->view['arOnlineModule'][$k]['installed'] = false;
-							
-					}
-		
-					if ($this->shop->get_option('wpsg_debugURL') == '1' && isset($this->shop->view['arOnlineModule'][$k]['version_dev']))
-					{
-		
-						$this->shop->view['arOnlineModule'][$k]['version'] = $m['version_dev'];
-							
-					}
-		
-				}
-						
-			}
-			else
-			{
-					
-				$this->shop->addBackendError(__('nohspc_Ihrem Server fehlt die PHP-Bibliothek fÃŒr die SOAP-UnterstÃŒtzung. Eine Registrierung Ihrer Domain ist somit nicht mÃ¶glich! <br />Weitere Informationen finden Sie in unseren <a target="_blank" href="http://wpshopgermany.maennchen1.de/faqs/wie-pruefe-ich-ob-soap-und-curl-auf-meinem-server-aktiviert-sind/">FAQ</a>.', 'wpsg'));
-					
-			}
-			
-			echo $this->render(WPSG_PATH_VIEW.'/mods/mod_core/module_index.phtml');
-			
-		} // public function module_index()
-		
-		/**
-		 * Sendet eine Anfrage an den Registrierungs Server und gibt das Ergebnis zurÃŒck
-		 */
-		public function RegisterCall($func_name, $args = array())
-		{
-				
-			$SOAP = new SoapClient(
-				null,
-				array(
-					'location' => base64_decode('aHR0cHM6Ly9zaG9wLm1hZW5uY2hlbjEuZGUvcmVnaXN0cmllcnVuZy8='), // https://shop.maennchen1.de/registrierung/
-					'uri' => 'http://shop.maennchen1.de',
-					'cache_wsdl' => WSDL_CACHE_NONE
-				)
-			);
-				
-			if (!$this->shop->hasActiveLicence())
-			{
-					
-				$args = array_merge(array('No_wpsg'), $args);
-		
-			}
-			else
-			{
-		
-				// Hier kein wpsg_array_merge da die index gleich sind
-				$args = array_merge(array($this->shop->get_option('wpsg_key', true)), $args);
-		
-			}
-				
-			try {
-					
-				$result = $SOAP->__soapCall($func_name, $args);
-		
-			}
-			catch (Exception $e)
-			{
-		
-				$this->shop->addBackendError(wpsg_translate(__('SOAP Fehler: #1#', 'wpsg'), $e->getMessage()));
-		
-			}
-				
-			return $result;
-				
-		} // public function RegisterCall($func_name, $args)
-	
-		public function installModul($modul_key)
-		{
-			
-			global $wp_filesystem;
-			
-			ob_start();
-			$request_creds = request_filesystem_credentials(
-				WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$modul_key,
-				'',
-				false,
-				false,
-				null
-			);
-			ob_end_clean();
-				
-			// 1 gibt es bei Windows Rechnern zurÃŒck, da es hier egal ist
-			// Ein Array ist es wenn das Formular bereits abgeschickt wurde und die Anfrage vom Formular kommt
-			// false ist es wenn kein Zugriff ist dann muss das Formular angezeigt werden
-				
-			if (false === $request_creds)
-			{
-			
-				// Berechtigungen anfragen
-				$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&do=getCredentials&modul='.$_REQUEST['modul']);
-			
-			}
-			else if (is_array($request_creds))
-			{
-			
-				if (!WP_Filesystem($request_creds))
-				{
-			
-					// Eingegebene Daten waren falsch
-					$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&do=getCredentials&modul='.$_REQUEST['modul']);
-			
-				}
-			
-			}
-			
-			$temp_name = $this->shop->getTempName($modul_key.'.zip');
-			@unlink($temp_name);
-				
-			if ($this->shop->get_option('wpsg_debugURL') === '1' && $this->shop->hasMod('wpsg_mod_core'))
-			{
-			
-				$url = 'http://dl.maennchen1.de/wpsg/'.$modul_key.'/'.$modul_key.'_dev.zip';
-			
-			}
-			else
-			{
-			
-				$url = 'http://dl.maennchen1.de/wpsg/'.$modul_key.'/'.$modul_key.'_latest.zip';
-			
-			}
-			
-			$bOK = @copy($url, $temp_name);
-			
-			if (!$bOK)
-			{
-			
-				$bOK = @file_put_contents($temp_name, $this->shop->get_url_content($url));
-			
-				if (!$bOK)
-				{
-						
-					// Pfad finden fÃŒr das Wordpress Filesystem
-					if ($GLOBALS['wpsg_sc']->isMultiBlog())
-						$ftp_path = WP_CONTENT_DIR.'/'.WPSG_MB_UPLOADS.'/wpsg/wpsg_temp/';
-						else
-							$ftp_path = WP_CONTENT_DIR.'/uploads/wpsg_temp/';
-								
-							$ftp_path = trailingslashit($wp_filesystem->find_folder($ftp_path)).preg_replace('/(.*)\/wpsg_temp\//', '', $temp_name);
-								
-							$bOK = $wp_filesystem->put_contents($ftp_path, $this->shop->get_url_content($url), FS_CHMOD_FILE);
-								
-							if (!$bOK)
-							{
-									
-								$this->shop->addBackendError(wpsg_translate(__('Modul (#1#) konnte nicht kopiert werden!', 'wpsg'), $modul_key));
-								return false;
-			
-							}
-								
-				}
-			
-			}
-				
-			$zip = new ZipArchive();
-			
-			if ($zip->open($temp_name) === true)
-			{
-			
-				try
-				{
-						
-					$bOK = @$zip->extractTo(WPSG_PATH.'/../');
-					$zip->close();
-			
-					if ($bOK === false)
-					{
-			
-						throw new Exception();
-							
-					}
-					else
-					{
-			
-						return true;
-							
-					}
-			
-				}
-				catch (Exception $e)
-				{
-						
-					// Es ist ein Fehler aufgetreten, jetzt versuche ich die Datei mit dem Wordpress Filesystem zu entpacken
-						
-					// Pfad finden fÃŒr das Wordpress Filesystem
-					$ftp_path = trailingslashit($wp_filesystem->find_folder(realpath(WPSG_PATH.'/../')));
-						
-					$bOK = unzip_file($temp_name, $ftp_path);
-						
-					if ($bOK !== true)
-					{
-			
-						$strError = '';
-			
-						// Hier ist immer noch ein Fehler aufgetreten
-						foreach ((array)$bOK->errors as $e)
-						{
-								
-							$strError .= $e[0].' ';
-			
-						}
-						 
-						$this->shop->addBackendError(wpsg_translate(__('Fehler beim Entpacken: #1#', 'wpsg'), $strError)); return false;
-			
-					}
-					else
-					{
-			
-						return true;
-			
-					}
-						
-				}
-			
-			}
-			else
-			{
-			
-				$this->shop->addBackendError(__('Datei konnte nicht ÃŒbertragen werden.', 'wpsg')); return false;
-			
-			}
-			
-			$this->shop->addBackendError(__('Datei konnte nicht entpackt werden.', 'wpsg')); return false;
-			
-		} // public function installModul($modul_key)
-		
-		/**
-		 * Fragt die Rechte ab und installiert anschlieÃend ein Modul
-		 */
-		public function getCredentialsAction()
-		{
-				
-			echo request_filesystem_credentials(
-				WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Admin&action=registrierung&noheader=1&do=installModul&modul='.$_REQUEST['modul'],
-				'',
-				false,
-				false,
-				null
-			);
-				
-		} // public function getCredentialsAction()
-		
-	} // class wpsg_mod_core extends wpsg_mod_basic
-
-?>
Index: /mods/wpsg_mod_export.class.php
===================================================================
--- /mods/wpsg_mod_export.class.php	(revision 6414)
+++ /mods/wpsg_mod_export.class.php	(revision 6425)
@@ -29,4 +29,5 @@
 		
 		const TYPE_ORDER = '1';
+		const TYPE_PRODUCT = '2';
 		
 		const ENCODING_UTF8 = '1';
@@ -97,7 +98,7 @@
 		   	$sql = "CREATE TABLE ".WPSG_TBL_EXPORTPROFILE." (
 		   		id mediumint(9) NOT NULL AUTO_INCREMENT,
-		   		name VARCHAR(255) NOT NULL COMMENT 'Der Name des Profils',
+		   		name VARCHAR(255) NOT NULL COMMENT 'Der Name des Profils', 
 		   		filename VARCHAR(255) NOT NULL COMMENT 'Dateiname fÃŒr den Export',
-		   		export_type INT(1) NOT NULL COMMENT 'Typ des Exportprofils',
+		   		export_type INT(1) NOT NULL COMMENT 'Typ des Exportprofils (Produkt / Bestellung)',
 		   		format INT(1) NOT NULL COMMENT 'Format des Exportes (XML/CSV)',
 		   		field_delimiter VARCHAR(1) NOT NULL COMMENT 'Feld-Trennzeichen (CSV)',
@@ -157,6 +158,6 @@
 				FROM
 					`".WPSG_TBL_EXPORTPROFILE."`
-			");
-            
+			"); 
+			
             if ($selected_profile_id !== false) $this->shop->view['profil_id'] = $selected_profile_id;
 			 			
@@ -172,6 +173,5 @@
 			parse_str($_REQUEST['filter'], $filter);
 			if (!wpsg_isSizedArray($filter['filter'])) $filter['filter'] = array();
-
-			$arData = wpsg_order::find($filter['filter']);
+  
 			$arFiles = array();
             
@@ -186,6 +186,18 @@
                     $profil = $this->loadProfil($profil_id);
                 
-                    if ($profil['format'] == self::FORMAT_CSV) $file = $this->handleExportCSV($profil_id);
-                    else if ($profil['format'] == self::FORMAT_XML) $file = $this->handleExportXML($profil_id);
+					if ($profil['export_type'] === self::TYPE_ORDER)
+					{
+                    
+						if ($profil['format'] == self::FORMAT_CSV) $file = $this->handleExportCSV($profil_id, $filter['filter']);
+                    	else if ($profil['format'] == self::FORMAT_XML) $file = $this->handleExportXML($profil_id, $filter['filter']);
+						
+					}
+					else if ($profil['export_type'] === self::TYPE_PRODUCT)
+					{
+						
+						if ($profil['format'] == self::FORMAT_CSV) $file = $this->handleExportProductCSV($profil_id, $filter['filter']);
+						else if ($profil['format'] == self::FORMAT_XML) $file = $this->handleExportProductXML($profil_id, $filter['filter']);
+						
+					}
                  
                     $arFiles[] = array(
@@ -253,4 +265,11 @@
 		} // public function handleExport()
 		
+		public function product_index_tab() 
+		{ 
+			
+			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_export/product_index_tab.phtml');
+			
+		} // public function product_index_tab() 
+		
 		public function order_index_tab(&$arTabs)
 		{
@@ -277,5 +296,5 @@
 					'name' => wpsg_q(__('Neues Profil', 'wpsg')),
 					'filename' => 'export.csv',
-					'export_type' => wpsg_q(self::TYPE_ORDER),
+					'export_type' => wpsg_q($_REQUEST['type']),
 					'file_encoding' => wpsg_q(self::ENCODING_UTF8),
 					'field_delimiter' => ';',
@@ -394,4 +413,6 @@
 						case 'cdate_y': $col = 'cdate_y'; break;
 						case 'invoicedate_m': $col = 'invoicedate_m'; break;
+						case 'productgroup_ids': $col = 'productgroup_ids'; break;
+						case 'productcategory_ids': $col = 'productcategory_ids'; break;
 											
 						default: throw new \Exception(__('UngÃŒltiger Feldname (Bestellfilter)', 'wpsg'));
@@ -518,5 +539,5 @@
 			$arProfile = $this->db->fetchAssoc("
 				SELECT
-					EXP.`id`, EXP.`cron_interval`, EXP.`cron_lastrun`, EXP.`orderfilter`, EXP.`cron_path`, EXP.`filename`, EXP.`format`
+					EXP.`id`, EXP.`cron_interval`, EXP.`cron_lastrun`, EXP.`orderfilter`, EXP.`cron_path`, EXP.`filename`, EXP.`format`, EXP.`export_type`
 				FROM
 					`".WPSG_TBL_EXPORTPROFILE."` AS EXP 
@@ -532,5 +553,4 @@
 				
 				$bRun = false;
-				
 				if ($cron_lastrun <= 0) $bRun = true;
 				else 
@@ -567,32 +587,138 @@
 				{
 					
-					$aOrderrFilter = @unserialize($profil['orderfilter']);
-					if (!wpsg_isSizedArray($aOrderrFilter)) $aOrderrFilter = array();
-					
-                    if ($profil['format'] == self::FORMAT_CSV)
-                    {
+					$arFilter = @unserialize($profil['orderfilter']);
+					if (!wpsg_isSizedArray($arFilter)) $arFilter = array();
+					
+					if ($profil['export_type'] == self::TYPE_ORDER)
+					{
+                    
+						if ($profil['format'] == self::FORMAT_CSV) $file = $this->handleExportCSV($profil['id'], $arFilter);
+                    	else if ($profil['format'] == self::FORMAT_XML) $file = $this->handleExportXML($profil['id'], $arFilter);
+						
+					}
+					else if ($profil['export_type'] == self::TYPE_PRODUCT)
+					{
+						
+						if ($profil['format'] == self::FORMAT_CSV) $file = $this->handleExportProductCSV($profil['id'], $arFilter);
+                    	else if ($profil['format'] == self::FORMAT_XML) $file = $this->handleExportProductXML($profil['id'], $arFilter);
+						
+					}
+                    
+                    if (wpsg_remoteconnection::handleConenctionString($profil['cron_path'], $profil['filename'], $file) !== true)
+					{
+						
+						$target_path = $profil['cron_path'];
+						if (is_dir($target_path)) $target_path = $target_path.'/'.$profil['filename'];
+									
+						file_put_contents($target_path, file_get_contents($file));
+												
+					}
+									
+					// Letzte AusfÃŒhrung speichern
+					$this->db->UpdateQuery(WPSG_TBL_EXPORTPROFILE, array(
+						'cron_lastrun' => 'NOW()'
+					), " `id` = '".wpsg_q($profil['id'])."' ");
+					
+				}
+				
+			}
+			
+		} // public function cron()
+		
+		/* Modulfunktionen */
+
+		/**
+		 * Gibt einen Array der Profile aus der Datenbank zurÃŒck
+		 * @param Array $type
+		 */
+		public function getProfile($type)
+		{
+			
+			return $this->db->fetchAssoc("
+				SELECT
+					P.*
+				FROM
+					`".WPSG_TBL_EXPORTPROFILE."` AS P
+			  	WHERE
+					P.`export_type` = '".wpsg_q($type)."'  
+			");
+			
+		} // public function getProfile($type)
+
+		/**
+		 * Erstellt die CSV und gibt den Pfad zur erstellten Datei zurÃŒck (FÃŒr einen Produktexport)
+		 * 
+		 * @param $profil_id
+		 * @param array $arOrderFilter
+		 */
+		private function handleExportProductCSV($profil_id, $arProductFilter = array()) 
+		{
+			 
+			$this->loadFields(); 
+			
+			$arData = wpsg_product::find($arProductFilter); 
+
+            $tmpfname = tempnam($this->getTmpFilePath(), "wpsg");
+            $filehandler = fopen($tmpfname, 'w');
+            
+            $profil = $this->loadProfil($profil_id);
+            
+            $arExportData = array();
+            
+            if ($profil['csv_fieldnames'] == '1')
+            {
+                
+                $row = array();
+                
+                foreach ($profil['fields'] as $f)
+                {
+                    
+                    $row[] = $f['name'];
+                    
+                }
+                
+                $arExportData[] = $row;
+                
+            }
+            
+            foreach ($arData as $oProduct) 
+            {
+                
+				$row = array();
+				                        
+				foreach ($profil['fields'] as $f)
+				{
+
+					$row[] = $this->getValue($f, $profil['field_delimiter'], false, $oProduct->id);
+														
+				}
+
+                $arExportData[] = $row; 
+                                
+            } // foreach arData
+             
+            foreach ($arExportData as $row)
+            {
+                
+                fputcsv($filehandler, $row, $profil['field_delimiter'], $profil['field_enclosure'], $profil['field_escape']);
+                                    
+            }
+            
+            fclose($filehandler);
+            
+            // In ISO wandeln
+            if ($profil['file_encoding'] == self::ENCODING_ISO88591)
+            {
+                
+                file_put_contents($tmpfname, utf8_decode(file_get_contents($tmpfname)));
+                                        
+            }
                         
-                        $file = $this->handleExportCSV($profil['id'], $aOrderrFilter);
-                        
-                    }
-                    else if ($profil['format'] == self::FORMAT_XML)
-                    {
-                     
-                        $file = $this->handleExportXML($profil['id'], $aOrderrFilter);
-                        
-                    } 
-                    
-                    if (wpsg_remoteconnection::handleConenctionString($profil['cron_path'], $profil['filename'], $file) !== true) file_put_contents($file, file_get_contents($profil['filename']));
-										
-				}
-				
-			}
-			
-		} // public function cron()
-		
-		/* Modulfunktionen */
-
+            return $tmpfname;
+			
+		} // private function handleExportProductXML($profil_id, $arOrderFilter = array())
+		
         /**
-         * Gibt den TemporÃ€ren Dateinamen zurÃŒck
+		 * Erstellt die CSV und gibt den Pfad zur erstellten Datei zurÃŒck (FÃŒr einen Bestellexport)
          * 
          * @param $profil_id
@@ -604,6 +730,5 @@
 			$this->loadFields();
 			
-			$arData = wpsg_order::find($arOrderFilter);
-			$arFiles = array(); 	
+			$arData = wpsg_order::find($arOrderFilter); 
 												
             $tmpfname = tempnam($this->getTmpFilePath(), "wpsg");
@@ -704,6 +829,82 @@
 		} // private function handleExportCSV($arProfile, $arOrderFilter = array(), $cron = false)
 
+		/**
+		 * Erstellt die XML und gibt den Pfad zur erstellten Datei zurÃŒck (FÃŒr einen Produktexport)
+		 * 
+		 * @param $profil_id
+		 * @param array $arProductFilter
+		 * @return string
+		 * @throws Exception
+		 */
+		private function handleExportProductXML($profil_id, $arProductFilter = array())
+		{
+			
+			$this->loadFields();
+			
+			$arData = wpsg_product::find($arProductFilter);
+			$profil = $this->loadProfil($profil_id);
+			
+			if (!wpsg_isSizedString($profil['xml_roottag'])) throw new \Exception(wpsg_translate(__('Kein XML Root Tagname fÃŒr Profil "#1#" gesetzt!', 'wpsg'), $profil['name']));
+			if (!wpsg_isSizedString($profil['xml_producttag'])) throw new \Exception(wpsg_translate(__('Kein XML Produkt Tagname fÃŒr Profil "#1#" gesetzt!', 'wpsg'), $profil['name']));
+			
+			$doc = new DOMDocument('1.0');
+            $doc->formatOutput = true;
+            
+            $root = $doc->createElement($this->clearXML($profil['xml_roottag']));					
+            $root = $doc->appendChild($root);
+			
+			foreach ($arData as $oProduct)
+            {
+                
+                $tag_product = $doc->createElement($this->clearXML($profil['xml_producttag']));
+                $tag_product = $root->appendChild($tag_product);
+			
+				foreach ($profil['fields'] as $f)
+                {
+                    
+                    $value = $this->getValue($f, $profil['field_delimiter'], false, $oProduct->id);
+                                                    
+					if (wpsg_isSizedInt($f['xml_att']))
+					{
+						
+						$att = $doc->createAttribute($this->clearXML($f['name']));
+						$att->value = htmlspecialchars($value);
+						
+						$tag_product->appendChild($att);
+
+						
+					}
+					else
+					{
+						
+						$tag = $doc->createElement($this->clearXML($f['name']));
+						$tag = $tag_product->appendChild($tag);
+						
+						$tag_value = $doc->createTextNode(htmlspecialchars($value));
+						$tag->appendChild($tag_value);
+						
+					}
+                                         
+                }
+				
+			}
+			
+			$tmpfname = tempnam($this->getTmpFilePath(), "wpsg");
+            file_put_contents($tmpfname, $doc->saveXML());
+            
+            // In ISO wandeln
+            if ($profil['file_encoding'] == self::ENCODING_ISO88591)
+            {
+                
+                file_put_contents($tmpfname, utf8_decode(file_get_contents($tmpfname)));
+                                        
+            }
+            
+            return $tmpfname;
+			
+		} // private function handleExportProductXML($profil_id, $arProductFilter = array())
+		
         /**
-         * Erstellt die XML und gibt den Pfad zur erstellten Datei zurÃŒck
+         * Erstellt die XML und gibt den Pfad zur erstellten Datei zurÃŒck (FÃŒr einen Bestellexport)
          * 
          * @param $arProfile
@@ -715,6 +916,5 @@
 			$this->loadFields();
 			
-			$arData = wpsg_order::find($arOrderFilter);
-			$arFiles = array(); 	
+			$arData = wpsg_order::find($arOrderFilter); 
 												
             $profil = $this->loadProfil($profil_id);
Index: /mods/wpsg_mod_stock.class.php
===================================================================
--- /mods/wpsg_mod_stock.class.php	(revision 6414)
+++ /mods/wpsg_mod_stock.class.php	(revision 6425)
@@ -88,5 +88,5 @@
 		{
 
-			if (!is_admin() && $this->shop->get_option('wpsg_mod_stock_hideSoldout') === '1' && $this->getBestand($product_key) - $this->getAmountSession($product_key) <= 0) return -2;
+			if (!is_admin() && !wpsg_is_cron() && $this->shop->get_option('wpsg_mod_stock_hideSoldout') === '1' && $this->getBestand($product_key) - $this->getAmountSession($product_key) <= 0) return -2;
 
 		} // public function canDisplay($product_key)
Index: /views/admin/konfiguration.phtml
===================================================================
--- /views/admin/konfiguration.phtml	(revision 6414)
+++ /views/admin/konfiguration.phtml	(revision 6425)
@@ -24,57 +24,5 @@
           		<h3 class="panel-title"><?php echo __('Allgemeine Einstellungen', 'wpsg'); ?></h3>
         	</div>
-  			<div class="panel-body">
-		  		<?php if ($this->hasMod('wpsg_mod_core')) { ?>
-		  		
-					<?php if ($this->arLizenz['l'] == 0) { ?>
-						<?php
-
-                        if ($this->getDemoDays() < 0)
-                        {
-							$strText = wpsg_translate(__('Vor #1# Tage(n) abgelaufen.', 'wpsg'), abs($this->getDemoDays()));
-
-                            } else {
-
-                            $strText = wpsg_translate(__('#1# Tage verbleibend.', 'wpsg'), $this->getDemoDays());
-
-                        }
-
-                        echo wpsg_drawForm_Text(__('Lizenzende', 'wpsg'), $strText, '', array('help' => 'DemoMode'));
-
-                        ?>
-						
-					<?php } else { ?>
-					
-					<?php 
-					
-						$strText = '';
-						switch ($this->arLizenz['l'])
-						{
-								
-							case '1': $strText = __('Light Version', 'wpsg'); break;
-							case '2': $strText = __('Pro Version', 'wpsg'); break;
-							case '3': $strText = __('Enterprise Version', 'wpsg'); break;
-							default: die();
-								
-						}
-						
-						echo wpsg_drawForm_Text(__('Lizenzstatus', 'wpsg'), $strText);
-					
-					?>
-					<?php } ?>
-				<?php } else { ?> 
-				<div class="wpsg_form_field">
-					<div class="wpsg_form_left">&nbsp;</div>
-					<div class="wpsg_form_right">
-						<?php echo wpsg_translate(
-							__('<span style="color:red; font-weight:bold;">Weitere Funktionen in der Vollversion.</span><br />[ <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/'
-						); ?>
-					</div>
-					<div class="wpsg_clear"></div>
-				</div>		
-				<?php } ?>
-				
+  			<div class="panel-body">		  						
 				<?php if ($this->get_option("wpsg_version_installed", true) != WPSG_VERSION) { ?>
 				<div class="wpsg_form_field">
Index: /views/css/admin.css
===================================================================
--- /views/css/admin.css	(revision 6414)
+++ /views/css/admin.css	(revision 6425)
@@ -12,4 +12,5 @@
 #wpsg-bs nav.navbar .active { margin-right:2px; }
 #wpsg-bs nav.navbar .glyphicon { margin-right:10px; }
+#wpsg-bs .wpsg-export,
 #wpsg-bs .wpsg-filter-tab,
 #wpsg-bs .wpsg-filter { border-top:1px solid #E0E0E0; padding:15px; }
Index: /views/mods/mod_export/product_index_tab.phtml
===================================================================
--- /views/mods/mod_export/product_index_tab.phtml	(revision 6425)
+++ /views/mods/mod_export/product_index_tab.phtml	(revision 6425)
@@ -0,0 +1,57 @@
+<?php
+
+    /**
+     * Template fÃŒr die Integration der Profilauswahl in die Produktverwaltung (Ãbersicht)
+     */
+
+    $arProfile = $this->callMod('wpsg_mod_export', 'getProfile', array(wpsg_mod_export::TYPE_PRODUCT));
+
+?>
+
+<?php if (wpsg_isSizedArray($arProfile)) { ?>
+<div class="wpsg-export container-fluid form-horizontal" style="display:none;">
+            
+    <form class="container-fluid form-horizontal" target="_blank" method="post" action="<?php echo WPSG_URL_WP ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=handleExport&noheader=1" onsubmit="wpsg_mod_export_serializefilter();">
+
+    <div class="row">
+		<div class="col-lg-4">
+
+            <?php foreach ($arProfile as $p) { ?>
+                <?php echo wpsg_drawForm_Checkbox('wpsg_mod_export_profile[]', $p['name'], false, array('value' => $p['id'], 'noHidden' => true)); ?>
+            <?php } ?>
+
+            <br /><?php echo wpsg_drawForm_SubmitButton(__('Export starten')); ?>
+
+        </div>
+    </div>
+
+    <input type="hidden" name="filter" id="wpsg_mod_export_filter" value="" />
+
+</form>
+        
+</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+           
+    function wpsg_mod_export_serializefilter()
+    {
+
+        jQuery('#wpsg_mod_export_filter').val(jQuery('#filter_form').serialize());
+
+    }
+    
+    jQuery(document).ready(function() {
+        
+        jQuery('.wpsg_showhide_export').off('click').on('click', function() {
+            
+            jQuery(this).toggleClass('active');
+            jQuery('.wpsg-export').toggle(250);
+            
+            return false;
+            
+        } );
+        
+    } );
+
+/* ]]> */</script>
+<?php } ?>
Index: /views/mods/mod_export/profil.phtml
===================================================================
--- /views/mods/mod_export/profil.phtml	(revision 6414)
+++ /views/mods/mod_export/profil.phtml	(revision 6425)
@@ -39,6 +39,10 @@
             
                 <?php echo wpsg_drawForm_Text('Root-Tagname', $this->view['profil']['xml_roottag'], 'xml_roottag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
-                <?php echo wpsg_drawForm_Text('Bestellung-Tagname', $this->view['profil']['xml_ordertag'], 'xml_ordertag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
-                <?php echo wpsg_drawForm_Text('Produkt-Root-Tagname', $this->view['profil']['xml_productroottag'], 'xml_productroottag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+                
+                <?php if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?>
+                    <?php echo wpsg_drawForm_Text('Bestellung-Tagname', $this->view['profil']['xml_ordertag'], 'xml_ordertag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+                    <?php echo wpsg_drawForm_Text('Produkt-Root-Tagname', $this->view['profil']['xml_productroottag'], 'xml_productroottag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+                <?php } ?>
+                
                 <?php echo wpsg_drawForm_Text('Produkt-Tagname', $this->view['profil']['xml_producttag'], 'xml_producttag', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
                 
@@ -50,10 +54,14 @@
                         
             <br />
-            
-            <?php echo wpsg_drawForm_Checkbox('order_onetime', __('Bestellungen nur einmalig exportieren', 'wpsg'), $this->view['profil']['order_onetime'], array('label' => __('Optionen', 'wpsg'), 'inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
     
-            <div class="wpsg_mod_export_format wpsg_mod_export_format_<?php echo wpsg_mod_export::FORMAT_CSV; ?>" style="display:<?php echo (($this->view['profil']['format'] == wpsg_mod_export::FORMAT_CSV)?'block':'none'); ?>">
-            <?php echo wpsg_drawForm_Checkbox('order_online', __('Eine Zeile pro Bestellung', 'wpsg'), $this->view['profil']['order_online'], array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
-            </div>
+            <?php if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?>              
+                
+                <?php echo wpsg_drawForm_Checkbox('order_onetime', __('Bestellungen nur einmalig exportieren', 'wpsg'), $this->view['profil']['order_onetime'], array('label' => __('Optionen', 'wpsg'), 'inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+                
+                <div class="wpsg_mod_export_format wpsg_mod_export_format_<?php echo wpsg_mod_export::FORMAT_CSV; ?>" style="display:<?php echo (($this->view['profil']['format'] == wpsg_mod_export::FORMAT_CSV)?'block':'none'); ?>">
+                <?php echo wpsg_drawForm_Checkbox('order_online', __('Eine Zeile pro Bestellung', 'wpsg'), $this->view['profil']['order_online'], array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+                </div>
+            
+            <?php } ?>
                 
             <div class="wpsg_mod_export_format wpsg_mod_export_format_<?php echo wpsg_mod_export::FORMAT_CSV; ?>" style="display:<?php echo (($this->view['profil']['format'] == wpsg_mod_export::FORMAT_CSV)?'block':'none'); ?>">
@@ -82,4 +90,5 @@
                 <?php echo wpsg_drawForm_Text(__('Cron URL', 'wpsg'), '<a href="'.WPSG_PLUGIN_URL.'wpshopgermany/cron.php">'.WPSG_PLUGIN_URL.'wpshopgermany/cron.php</a>', false, array('noP' => false)); ?>
                 
+                <?php if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_ORDER) { ?>
                 <fieldset id="wpsg_mod_export_orderfilter">                                                
                     
@@ -174,4 +183,26 @@
                     
                 </fieldset>
+                <?php } else if ($this->view['profil']['export_type'] === wpsg_mod_export::TYPE_PRODUCT) { ?>
+                <fieldset id="wpsg_mod_export_productfilter">                                                
+                    
+                    <legend><div class="col-sm-offset-6"><?php echo __('Produktfilter', 'wpsg'); ?></div></legend>
+                    
+                    <form id="wpsg_mod_export_searchfilter">
+                                         
+                        <?php echo wpsg_drawForm_Text(__('Suchfeld', 'wpsg'), wpsg_getStr($this->view['profil']['orderfilter']['s']), 'orderfilter_s', array('inlineEdit' => true, 'inlineEdit_url' => $inlineEdit_url)); ?>
+                        
+                        <?php if ($this->hasMod('wpsg_mod_productgroups')) { $arProductGroupSelect = array('-1' => __('Alle Produktgruppen', 'wpsg')) + wpsg_productgroup::getProductgroupSelect(); ?>                        
+                        <?php echo wpsg_drawForm_Text(__('Produktgruppe', 'wpsg'), $arProductGroupSelect[wpsg_getStr($this->view['profil']['orderfilter']['productgroup_ids'], '-1')], 'orderfilter_productgroup_ids', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_url' => $inlineEdit_url, 'inlineEdit_source' => $arProductGroupSelect)); ?>
+                        <?php } ?>
+                        
+                        <?php if ($this->hasMod('wpsg_mod_produktartikel')) { $temp = $this->callMod('wpsg_mod_produktartikel', 'getProductcategorySelect', array()); ?>
+                        <?php $arProductCategorySelect = array(); foreach ($temp as $k => $v) $arProductCategorySelect[$v['term_id']] = $v['label']; ?>
+                        <?php echo wpsg_drawForm_Text(__('Produktkategorie', 'wpsg'), $arProductCategorySelect[wpsg_getStr($this->view['profil']['orderfilter']['productcategory_ids'], '-1')], 'orderfilter_productcategory_ids', array('inlineEdit' => true, 'inlineEdit_type' => 'select', 'inlineEdit_url' => $inlineEdit_url, 'inlineEdit_source' => $arProductCategorySelect)); ?>
+                        <?php } ?>
+                                                
+                    </form>
+                    
+                </fieldset>
+                <?php } ?>
                 
             </div>
Index: /views/mods/mod_export/profillist.phtml
===================================================================
--- /views/mods/mod_export/profillist.phtml	(revision 6414)
+++ /views/mods/mod_export/profillist.phtml	(revision 6425)
@@ -6,5 +6,14 @@
 
     $arProfilSelect = array();
-    foreach ($this->view['arProfile'] as $p) $arProfilSelect[$p['id']] = $p['name'];
+
+    foreach ($this->view['arProfile'] as $p)
+	{
+	
+		$arProfilSelect[$p['id']] = $p['name'];
+		
+		if ($p['export_type'] === wpsg_mod_export::TYPE_ORDER) $arProfilSelect[$p['id']] .= ' ('.__('Bestellexport', 'wpsg').')';
+		else if ($p['export_type'] === wpsg_mod_export::TYPE_PRODUCT) $arProfilSelect[$p['id']] .= ' ('.__('Produktexport', 'wpsg').')';
+		
+	}
 
 ?>
Index: /views/mods/mod_export/settings_edit.phtml
===================================================================
--- /views/mods/mod_export/settings_edit.phtml	(revision 6414)
+++ /views/mods/mod_export/settings_edit.phtml	(revision 6425)
@@ -97,5 +97,5 @@
 	} // function wpsg_mod_export_removeProfil(profil_id)
 	
-	function wpsg_mod_export_addProfil()
+	function wpsg_mod_export_addProfil(type)
 	{
 
@@ -103,7 +103,12 @@
 
 		jQuery.ajax( {			
-			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_addProfil&noheader=1',			
+			url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_export&do=wpsg_mod_export_addProfil&noheader=1',
+			data: {
+				type: type
+			},
 			success: function(data) {
+				
 				jQuery("#wpsg_profil_list").html(data);
+				
 			}
 		} );
@@ -127,5 +132,5 @@
 			success: function(data) {
 				
-				if (data != '1')
+				if (data != '1' && data != '0')
 				{
 					
@@ -141,5 +146,7 @@
 </script>
 
-<a title="<?php echo __('Neuens Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil();"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil anlegen', 'wpsg'); ?></a>
+<a title="<?php echo __('Neuens Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil(<?php echo wpsg_mod_export::TYPE_ORDER; ?>);"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil fÃŒr Bestellungen anlegen', 'wpsg'); ?></a><br />
+<a title="<?php echo __('Neuens Exportprofil anlegen', 'wpsg'); ?>" href="#" class="" onclick="return wpsg_mod_export_addProfil(<?php echo wpsg_mod_export::TYPE_PRODUCT; ?>);"><span class="wpsg-glyphicon glyphicon glyphicon-plus"></span><?php echo __('Neues Exportprofil fÃŒr Produkte anlegen', 'wpsg'); ?></a>
+
 <br /><br />
 
Index: /views/order/index.phtml
===================================================================
--- /views/order/index.phtml	(revision 6414)
+++ /views/order/index.phtml	(revision 6425)
@@ -33,10 +33,4 @@
 		</div>
 
-        <?php foreach ($this->view['tabs'] as $tab_positions) { ?>
-        <?php foreach ($tab_positions as $k => $tab) { ?>
-        <div class="wpsg-order-tab-mods-content wpsg-filter-tab wpsg-order-tab-<?php echo $k ?>" style="display:none;"><?php echo $tab['tab_content']; ?></div>
-        <?php } ?>
-        <?php } ?>
-
 		<div class="wpsg-filter wpsg-order-tab wpsg-order-tab-0 container-fluid form-horizontal" style="display:<?php echo (($this->view['hasFilter'] === true)?'none':'none'); ?>;">
 			<div class="row">
@@ -100,5 +94,12 @@
 			</div>
 		</div>
-	</nav>
+	
+        <?php foreach ($this->view['tabs'] as $tab_positions) { ?>
+        <?php foreach ($tab_positions as $k => $tab) { ?>
+        <div class="wpsg-order-tab-mods-content wpsg-filter-tab wpsg-order-tab-<?php echo $k ?>" style="display:none;"><?php echo $tab['tab_content']; ?></div>
+        <?php } ?>
+        <?php } ?>
+    
+    </nav>
 
 	<div class="pagination_wrap wpsg_status_link_wrap">
Index: /views/produkt/index.phtml
===================================================================
--- /views/produkt/index.phtml	(revision 6414)
+++ /views/produkt/index.phtml	(revision 6425)
@@ -22,11 +22,19 @@
 					<li role="presentation" class="wpsg_showhide_filter <?php echo (($this->view['submit'] === true)?'active':''); ?>"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
 			 		<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'add'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=add"><span class="glyphicon glyphicon-plus"></span><?php echo __("HinzufÃŒgen", "wpsg"); ?></a></li>
+                    
+                    <?php /* Integration Exportprofile */ ?>
+                    <?php if ($this->hasMod('wpsg_mod_export')) { $arProfile = $this->callMod('wpsg_mod_export', 'getProfile', array(wpsg_mod_export::TYPE_PRODUCT)); ?>
+                    <?php if (wpsg_isSizedArray($arProfile)) { ?>
+                    <li role="presentation" class="wpsg_showhide_export"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-export"></span><?php echo __('Produktexport (Exportprofile)', 'wpsg'); ?></a></li>
+                    <?php } ?>
+                    <?php } ?>
+                    
 				</ul>
 				<ul class="nav navbar-nav navbar-right">
-					<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'import'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=import"><span class="glyphicon glyphicon-import"></span><?php echo __("Import", "wpsg"); ?></a></li>
+					<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'import'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=import"><span class="glyphicon glyphicon-import"></span><?php echo __("Daten-Import", "wpsg"); ?></a></li>
 					<?php if (wpsg_isSizedArray($this->view['arData'])) { ?>
-					<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=export&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Export", "wpsg"); ?></a></li>
+					<li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=export&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Daten-Export", "wpsg"); ?></a></li>
                     <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
-                    <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=exportMedia&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Export mit Medien", "wpsg"); ?></a></li>
+                    <li role="presentation" class="<?php echo ((wpsg_isSizedString($_REQUEST['action'], 'export'))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=exportMedia&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Daten-Export mit Medien", "wpsg"); ?></a></li>
                     <?php } ?>
 					<?php } ?>
@@ -34,4 +42,5 @@
 			</div>
 		</div>
+                        
 		<div class="wpsg-filter container-fluid form-horizontal" style="display:<?php echo (($this->view['submit'] === true)?'block':'none'); ?>;">
 			<div class="row">
@@ -74,4 +83,7 @@
 			</div>
 		</div>
+        
+        <?php echo $this->callMod('wpsg_mod_export', 'product_index_tab'); ?>
+        
 	</nav>
 
