Index: /controller/wpsg_OrderController.class.php
===================================================================
--- /controller/wpsg_OrderController.class.php	(revision 5632)
+++ /controller/wpsg_OrderController.class.php	(revision 5637)
@@ -365,5 +365,6 @@
 		public function indexAction()
 		{
-			
+
+			/*
 			$strQueryWHERE = '';
 			$strQueryStatusWHERE = '';
@@ -475,5 +476,5 @@
 			}
 			
-			if ($this->shop->view['filter']['k_id'] > 0)
+			if (wpsg_isSizedInt($this->shop->view['filter']['k_id']))
 			{
 				
@@ -649,4 +650,6 @@
 			$this->shop->view['pages'] = ceil($this->shop->view['count'] / $nPerPage); 			
 			if ($this->shop->view['seite'] <= 0 || $this->shop->view['seite'] > $this->shop->view['pages']) $this->shop->view['seite'] = 1;
+
+			$strQueryLIMIT = "";
 
 			// Beim Export Pager ignorieren
@@ -907,4 +910,36 @@
 			
 			}
+			*/
+
+			$nPerPage = $this->get_option('wpsg_order_perpage');
+			if ($nPerPage <= 0) $nPerPage = 10;
+
+			$this->shop->view['hasFilter'] = false;
+			$this->shop->view['pages'] = 0;
+			$this->shop->view['arStatus'] = array();
+			$this->shop->view['arFilter'] = array(
+				'order' => 'cdate',
+				'ascdesc' => 'DESC'
+			);
+			
+			if (wpsg_isSizedArray($_REQUEST['filter'])) $this->shop->view['arFilter'] = $_REQUEST['filter'];
+
+			foreach ($this->shop->arStatus as $status_key => $status_label)
+			{
+
+				$count = wpsg_order::count(array('status' => $status_key));
+
+				if (wpsg_isSizedInt($count)) $this->shop->view['arStatus'][$status_key] = array('label' => $status_label, 'count' => $count);
+
+			}
+
+			$this->shop->view['countAll'] = wpsg_order::count(array());
+
+			$this->shop->view['seite'] = 1;
+			$this->shop->view['pages'] = ceil($this->shop->view['countAll'] / $nPerPage);
+			if ($this->shop->view['seite'] <= 0 || $this->shop->view['seite'] > $this->shop->view['pages']) $this->shop->view['seite'] = 1;
+
+
+			$this->shop->render(WPSG_PATH_VIEW.'/order/index.phtml');
 			
 		} // public function indexAction()
Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 5632)
+++ /controller/wpsg_ShopController.class.php	(revision 5637)
@@ -624,5 +624,5 @@
 			if (is_admin() && preg_match('/wpsg/', wpsg_getStr($_REQUEST['page'])))
 			{
-				
+
 				wp_enqueue_script('wpsg_bsjs', $this->getRessourceURL('js/bootstrap-3.3.6-dist/js/bootstrap.min.js'));
 				
@@ -642,5 +642,5 @@
 				wp_enqueue_script('jquery-ui-datepicker-de', $this->url(WPSG_URL_CONTENT.'plugins/'.WPSG_FOLDERNAME.'/lib/ui/jquery.ui.datepicker-de.js'), array('jquery', 'jquery-ui-core'));
 			
-				if (in_array(wpsg_getStr($_REQUEST['page']), array('wpsg-Admin', 'wpsg-Produkt')))
+				if (in_array(wpsg_getStr($_REQUEST['page']), array('wpsg-Admin', 'wpsg-Produkt', 'wpsg-Order')))
 				{
 				
@@ -1155,5 +1155,5 @@
  		
 		/**
-		 * Shortcode für Warenkorbbutton, um Produkte aus Kategorieübersicht in Warenkorb zu legen (muss in jedem Beitrag eingefügt werden)
+		 * Shortcode fï¿œr Warenkorbbutton, um Produkte aus Kategorieï¿œbersicht in Warenkorb zu legen (muss in jedem Beitrag eingefï¿œgt werden)
 		 */
 		public function shortcode_basket($atts, $content = '')
@@ -1171,5 +1171,5 @@
 			$strReturn = '<a class="wpsg_button wpsg_button_categorie_basket wpsg_addProdukt ';
 				
-			/* Varianten=true -> öffnet Lightbox mit Variantenauswahl */
+			/* Varianten=true -> ï¿œffnet Lightbox mit Variantenauswahl */
 			$strReturn .= (($this->callMod('wpsg_mod_varianten', 'isVariantProduct', array($product_id)))?'wpsg_variantProduct':'');
 				
Index: /lib/functions.inc.php
===================================================================
--- /lib/functions.inc.php	(revision 5632)
+++ /lib/functions.inc.php	(revision 5637)
@@ -982,18 +982,5 @@
 		
 	} // function isSizedArray($array, $size = 1)
-	
-	/**
-	 * Gibt einen Float Wert zurÃŒck und verhindert Fehler/Warnungen wenn Wert nicht definiert wurde
-	 * Wenn Wert nicht definiert wird 0.0 zurÃŒckgegeben
-	 */
-	function wpsg_getFloat(&$value)
-	{
-		
-		if (!isset($value)) return 0.0;
-		
-		return floatval($value);
-		
-	} // function wpsg_getFloat(&$value)
-	
+
 	/**
 	 * Gibt die Numerische Entsprechung einer Variable zurÃŒck oder $default
@@ -1007,5 +994,13 @@
 		
 	}
-	
+
+	function wpsg_getFloat(&$value, $default = 0.0)
+	{
+
+		if (!isset($value)) return $default;
+		else return doubleval($value);
+
+	}
+
 	/**
 	 * Gibt einen String zurÃŒck und verhindert Fehler wenn eine Wert nicht definiert wurde
Index: /lib/wpsg_basket.class.php
===================================================================
--- /lib/wpsg_basket.class.php	(revision 5632)
+++ /lib/wpsg_basket.class.php	(revision 5637)
@@ -332,5 +332,5 @@
 				'name' => $kunde['name'],
 				'email' => $kunde['email'],
-				'geb' => strtotime('d.m.Y', $kunde['geb']),
+				'geb' => date('d.m.Y', strtotime($kunde['geb'])),
 				'email2' => $kunde['email'],
 				'tel' => $kunde['tel'],
@@ -345,5 +345,5 @@
 				'comment' => $order['comment'],
 				'onr' => $order['onr'],
-				'knr' => $order['knr'],
+				'knr' => $kunde['knr'],
 				'datum' => strftime($order['cdate'])
 			);
Index: /model/wpsg_order.class.php
===================================================================
--- /model/wpsg_order.class.php	(revision 5632)
+++ /model/wpsg_order.class.php	(revision 5637)
@@ -811,64 +811,45 @@
 				
 		} // public function delete()
-		
+
+		/* Statische Funktionen */
+
+		/**
+		 * ZÃ€hlt die Bestellungen anhand des Filters
+		 */
+		public static function count($arFilter)
+		{
+
+			list($strQueryWHERE, $strQueryJOIN, $strQueryHAVING) = self::getQueryString($arFilter);
+
+			$strQuery = "
+				SELECT
+					COUNT(*)
+				FROM
+					(
+						SELECT
+						  	O.`id`
+						FROM
+							`".WPSG_TBL_ORDER."` AS O
+							".$strQueryJOIN."
+						WHERE
+							1
+							".$strQueryWHERE."	
+						GROUP BY 
+							O.`id` 					
+					) AS innerSelect
+			";
+
+			return $GLOBALS['wpsg_db']->fetchOne($strQuery);
+
+		} // public static function count($arFilter)
+
 		/**
 		 * Gibt einen Array von Bestellungen zurÃŒck, die auf den ÃŒbergebenen Filter passen
 		 * @param array $arFilter
 		 */
-		public static function find($arFilter = array())
-		{
-			
-			$strQueryWHERE = "";
-			$strQueryJOIN = "";
-			
-			if (wpsg_isSizedInt($arFilter['k_id']))
-			{
-				
-				$strQueryWHERE .= " AND O.`k_id` = '".wpsg_q($arFilter['k_id'])."' ";
-				
-			}
-			
-			if (wpsg_isSizedInt($arFilter['status']))
-			{
-				
-				$strQueryWHERE .= " AND O.`status` = '".wpsg_q($arFilter['status'])."' ";
-				
-			}
-			else if (wpsg_isSizedArray($arFilter['status']))
-			{
-				
-				$strQueryWHERE .= " AND O.`status` IN (".wpsg_q(implode(',', $arFilter['status'])).") ";
-				
-			}
-			
-			if (wpsg_isSizedInt($arFilter['NOTstatus']))
-			{
-			
-				$strQueryWHERE .= " AND O.`status` != '".wpsg_q($arFilter['NOTstatus'])."' ";
-			
-			}
-			else if (wpsg_isSizedArray($arFilter['NOTstatus']))
-			{
-			
-				$strQueryWHERE .= " AND O.`status` NOT IN (".wpsg_q(implode(',', $arFilter['NOTstatus'])).") ";
-			
-			}
-			
-			if (wpsg_isSizedInt($arFilter['cdate_from']))
-			{
-			
-				$strQueryWHERE .= " AND O.`cdate` > '".wpsg_date('Y-m-d', $arFilter['cdate_from'])."' ";
-			
-			}
-			
-			if (wpsg_isSizedInt($arFilter['product_id']))
-			{
-				
-				$strQueryWHERE .= " AND OP.`p_id` = '".wpsg_q($arFilter['product_id'])."' ";
-				$bJoinProducts = true;
-				
-			}
-			
-			if ($bJoinProducts === true) $strQueryJOIN = " LEFT JOIN `".WPSG_TBL_ORDERPRODUCT."` AS OP ON (O.`id` = OP.`o_id`) ";
+		public static function find($arFilter = array(), $load = true)
+		{
+			
+			list($strQueryWHERE, $strQueryJOIN, $strQueryHAVING) = self::getQueryString($arFilter);
 			
 			$strQuery = "
@@ -886,10 +867,13 @@
 			 
 			$arOrderID = $GLOBALS['wpsg_db']->fetchAssocField($strQuery);
+
+			if ($load !== true) return $arOrderID;
+
 			$arReturn = array();
 			
 			foreach ($arOrderID as $order_id)
 			{
-				
-				$oOrder = $GLOBALS['wpsg_sc']->cache->loadOrderObject($order_id); 
+
+				$oOrder = $GLOBALS['wpsg_sc']->cache->loadOrderObject($order_id);
 				$arReturn[] = $oOrder;
 				
@@ -899,5 +883,67 @@
 			
 		} // public static function find($arFilter = array())
-		
+
+		public static function getQueryString($arFilter = array())
+		{
+
+			$strQueryWHERE = "";
+			$strQueryJOIN = "";
+			$strQueryHAVING = "";
+
+			$bJoinProducts = false;
+
+			if (wpsg_isSizedInt($arFilter['k_id'])) $strQueryWHERE .= " AND O.`k_id` = '".wpsg_q($arFilter['k_id'])."' ";
+			if (wpsg_isSizedInt($arFilter['cdate_from'])) $strQueryWHERE .= " AND O.`cdate` > '".wpsg_date('Y-m-d', $arFilter['cdate_from'])."' ";
+			if (wpsg_isSizedInt($arFilter['product_id'])) { $strQueryWHERE .= " AND OP.`p_id` = '".wpsg_q($arFilter['product_id'])."' "; $bJoinProducts = true; }
+			if (wpsg_isSizedString($arFilter['s']))
+			{
+
+				$strQueryWHERE .= "
+					C.`vname` LIKE '%".wpsg_q($arFilter['s'])."%' OR
+					C.`name` LIKE '%".wpsg_q($arFilter['s'])."%' OR
+					C.`email` LIKE '%".wpsg_q($arFilter['s'])."%' OR
+					C.`firma` LIKE '%".wpsg_q($arFilter['s'])."%' OR
+					C.`ustidnr` LIKE '%".wpsg_q($arFilter['s'])."%' OR					
+					O.`onr` LIKE '%".wpsg_q($arFilter['s'])."%' OR
+					O.`id` = '".wpsg_q($arFilter['s'])."' OR
+					O.`custom_data` LIKE '%".wpsg_q($arFilter['s'])."%' 		
+				";
+
+				$bJoinProducts = true;
+
+			}
+
+			if (wpsg_isSizedInt($arFilter['status']))
+			{
+
+				$strQueryWHERE .= " AND O.`status` = '".wpsg_q($arFilter['status'])."' ";
+
+			}
+			else if (wpsg_isSizedArray($arFilter['status']))
+			{
+
+				$strQueryWHERE .= " AND O.`status` IN (".wpsg_q(implode(',', $arFilter['status'])).") ";
+
+			}
+
+			if (wpsg_isSizedInt($arFilter['NOTstatus']))
+			{
+
+				$strQueryWHERE .= " AND O.`status` != '".wpsg_q($arFilter['NOTstatus'])."' ";
+
+			}
+			else if (wpsg_isSizedArray($arFilter['NOTstatus']))
+			{
+
+				$strQueryWHERE .= " AND O.`status` NOT IN (".wpsg_q(implode(',', $arFilter['NOTstatus'])).") ";
+
+			}
+
+			if ($bJoinProducts === true) $strQueryJOIN = " LEFT JOIN `".WPSG_TBL_ORDERPRODUCT."` AS OP ON (O.`id` = OP.`o_id`) ";
+
+			return array($strQueryWHERE, $strQueryJOIN, $strQueryHAVING);
+
+		}
+
 	} // class wpsg_mod_order extends wpsg_model
 
Index: /mods/wpsg_mod_deliverytime.class.php
===================================================================
--- /mods/wpsg_mod_deliverytime.class.php	(revision 5632)
+++ /mods/wpsg_mod_deliverytime.class.php	(revision 5637)
@@ -100,5 +100,5 @@
 			}
 			
-			$this->shop->view['wpsg_mod_deliverytime']['deliverytime'] = $produkt_data['wpsg_mod_deliverytime_deliverytime'];
+			$this->shop->view['wpsg_mod_deliverytime']['deliverytime'] = wpsg_getStr($produkt_data['wpsg_mod_deliverytime_deliverytime']);
 			
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_deliverytime/produkt_edit_allgemein.phtml');
Index: /mods/wpsg_mod_productgroups.class.php
===================================================================
--- /mods/wpsg_mod_productgroups.class.php	(revision 5632)
+++ /mods/wpsg_mod_productgroups.class.php	(revision 5637)
@@ -202,5 +202,5 @@
 			$this->shop->view['productgroups'] = $this->db->fetchAssoc("					
 				SELECT 
-					(SELECT COUNT(*) FROM `".WPSG_TBL_PRODUCTS."` AS P WHERE P.`pgruppe` = PG.`id` AND P.`deleted` != '1' ".$GLOBALS['wpsg_produkt_index_query_where'].") AS countProdukte,
+					(SELECT COUNT(*) FROM `".WPSG_TBL_PRODUCTS."` AS P WHERE P.`pgruppe` = PG.`id` AND P.`deleted` != '1' ".wpsg_getStr($GLOBALS['wpsg_produkt_index_query_where']).") AS countProdukte,
 					PG.*
 				FROM	
Index: /mods/wpsg_mod_weight.class.php
===================================================================
--- /mods/wpsg_mod_weight.class.php	(revision 5632)
+++ /mods/wpsg_mod_weight.class.php	(revision 5637)
@@ -150,5 +150,5 @@
 			if (isset($_REQUEST['wpsg_lang'])) return;
 			
-			$this->shop->view['wpsg_mod_weight']['weight'] = $produkt_data['weight'];
+			$this->shop->view['wpsg_mod_weight']['weight'] = wpsg_getFloat($produkt_data['weight']);
 			
 			$this->shop->render(WPSG_PATH_VIEW.'/mods/mod_weight/produkt_edit_allgemein.phtml');
Index: /views/css/admin.css
===================================================================
--- /views/css/admin.css	(revision 5632)
+++ /views/css/admin.css	(revision 5637)
@@ -102,5 +102,11 @@
 .wpsg_admin_submenu input[type="submit"], .wpsg_admin_submenu input[type="button"] { width:100%; margin-bottom:10px !important; }
 
-/* Modulverwaltung */
+/* Bestellverwaltung */
+.wpsg_order .wpsg_status_link_wrap ul li { list-style:none; float:left; }
+.wpsg_order .wpsg_status_link_wrap ul li:after { content:" | "; width:15px; text-align:center; display:inline-block; }
+.wpsg_order .wpsg_status_link_wrap ul li:last-child:after { content:""; width:auto; }
+.wpsg_order .wpsg-filter { max-width:800px; margin-left:0px; }
+
+    /* Modulverwaltung */
 .wpsg_admin_submenu .list-group-item.modul_akt { color:#3c763d; font-weight:bold; }
 .wpsg_admin_submenu .list-group-item.modul_akt .glyphicon { position:absolute; right:5px; top:5px; color:#3c763d; }
Index: /views/mods/mod_fuellmenge/produkt_edit_sidebar.phtml
===================================================================
--- /views/mods/mod_fuellmenge/produkt_edit_sidebar.phtml	(revision 5632)
+++ /views/mods/mod_fuellmenge/produkt_edit_sidebar.phtml	(revision 5637)
@@ -13,6 +13,6 @@
 	</div>
 	<div class="panel-body">
-		<?php echo wpsg_drawForm_Select('feinheit', __('Einheit', 'wpsg'), $this->view['data']['arFeinheiten'], $this->view['data']['feinheit']); ?>
-		<?php echo wpsg_drawForm_Input('fmenge', __('FÃŒllmenge', 'wpsg'), wpsg_tf($this->view['data']['fmenge'])); ?>
+		<?php echo wpsg_drawForm_Select('feinheit', __('Einheit', 'wpsg'), $this->view['data']['arFeinheiten'], wpsg_getStr($this->view['data']['feinheit'])); ?>
+		<?php echo wpsg_drawForm_Input('fmenge', __('FÃŒllmenge', 'wpsg'), wpsg_tf(wpsg_getFloat($this->view['data']['fmenge']))); ?>
 		
 	<?php echo wpsg_drawForm_Input('wpsg_mod_fuellmenge_einheit', __('MÃ¶gliche Einheiten (Kommagetrennt)', 'wpsg'), $this->get_option('wpsg_mod_fuellmenge_einheit'), array('help' => 'wpsg_mod_fuellmenge_einheit')); ?>
Index: /views/mods/mod_productgroups/produkt_addedit_sidebar.phtml
===================================================================
--- /views/mods/mod_productgroups/produkt_addedit_sidebar.phtml	(revision 5632)
+++ /views/mods/mod_productgroups/produkt_addedit_sidebar.phtml	(revision 5637)
@@ -14,14 +14,12 @@
 	<div class="panel-body">
 		
-		<?php if (sizeof($this->view['wpsg_mod_productgroups']['data']) <= 0) { ?>
+		<?php if (!wpsg_isSizedArray($this->view['wpsg_mod_productgroups']['data'])) { ?>
 		<p><?php echo __('Bisher wurden keine Produktgruppen angelegt.', 'wpsg'); ?></p>
 		<?php } else { ?>
-		<?php echo wpsg_drawForm_Select('wpsg_productgroup', __('Produktgruppe', 'wpsg'), @$this->view['wpsg_mod_productgroups']['data'], $this->view['wpsg_mod_productgroups']['produkt_data']['pgruppe']); ?>
+		<?php echo wpsg_drawForm_Select('wpsg_productgroup', __('Produktgruppe', 'wpsg'), @$this->view['wpsg_mod_productgroups']['data'], @$this->view['wpsg_mod_productgroups']['produkt_data']['pgruppe']); ?>
 		<?php echo wpsg_drawForm_Input('wpsg_productgroup_sticky_von', __('Sticky von', 'wpsg'), @$this->view['wpsg_mod_productgroups']['sticky_von']); ?>
 		<?php echo wpsg_drawForm_Input('wpsg_productgroup_sticky_bis', __('Sticky bis', 'wpsg'), @$this->view['wpsg_mod_productgroups']['sticky_bis']); ?>
 		<?php } ?>
-		
-		<br /><br />
-		
+		 
 		<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&amp;page=wpsg-Productgroups"><span class="wpsg-glyphicon glyphicon glyphicon-book"></span><?php echo __('Produktgruppenverwaltung', 'wpsg'); ?></a><br />
 		<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_productgroups"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration der Produktgruppe', 'wpsg'); ?></a>
Index: /views/mods/mod_produktbilder/produkt_addedit_content.phtml
===================================================================
--- /views/mods/mod_produktbilder/produkt_addedit_content.phtml	(revision 5632)
+++ /views/mods/mod_produktbilder/produkt_addedit_content.phtml	(revision 5637)
@@ -138,8 +138,6 @@
 			
 		<?php } else { ?>
-		<?php echo __('Das Hochladen von Produktbildern ist erst nach erstmaligem speichern mÃ¶glich.', 'wpsg'); ?>
-		<?php } ?>
-		
-		<br /><br />
+		<p><?php echo __('Das Hochladen von Produktbildern ist erst nach erstmaligem speichern mÃ¶glich.', 'wpsg'); ?></p>
+		<?php } ?> 
 	
 		<?php if (wpsg_isSizedInt($this->view['data']['id'])) { ?>
Index: /views/order/_index.phtml
===================================================================
--- /views/order/_index.phtml	(revision 5637)
+++ /views/order/_index.phtml	(revision 5637)
@@ -0,0 +1,566 @@
+<?php
+	
+	/**
+	 * Template fÃŒr die Ãbersicht der Bestellungen
+	 */
+	
+?>
+
+
+<div class="wrap wpsg_order_index">
+	<div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
+	<h2>
+		<?php echo __('Bestellverwaltung', 'wpsg'); ?>
+	</h2>
+
+	<script type="text/javascript">/* <![CDATA[ */
+
+		var wpsg_order = '<?php echo $this->view['filter']['order']; ?>';
+		var wpsg_ascdesc = '<?php echo $this->view['filter']['ascdesc']; ?>';
+    
+		function goPage(page)
+		{
+
+			if (page <= 0 || page == <?php echo $this->view['seite']; ?> || page > <?php echo $this->view['pages']; ?>) return;			
+			
+			jQuery('#seite').val(page);
+			jQuery('#filter_form').submit();
+
+			return false;
+			
+		} // function goPage(page)
+
+		function wpsg_setOrder(order)
+		{
+
+			if (order == wpsg_order)
+			{
+
+				// Nur Richtung Ã€ndern
+				if (wpsg_ascdesc == 'asc') jQuery('#wpsg_ascdesc').val('desc');
+				else jQuery('#wpsg_ascdesc').val('asc');
+				
+			}
+			else
+			{
+
+				jQuery('#wpsg_order').val(order);
+				jQuery('#wpsg_ascdesc').val('asc');
+				
+			}
+
+			jQuery('#seite').val(1);
+			jQuery('#filter_form').submit();
+			
+			return false;
+			
+		} // function wpsg_setOrder(order)
+
+		function goStatus(status_id)
+		{
+
+			jQuery.cookie("wpsg_order_status", status_id);
+
+			jQuery('#filter_status option').attr("selected", false);
+			jQuery('#filter_status option[value="' + status_id + '"]').attr("selected", true);
+			jQuery('#seite').val(1);
+
+			jQuery('#filter_form').submit();
+			
+			return false;
+			
+		} // function goStatus(status_id)
+
+		/**
+		 * Markiert/Demarkiert alle Rechnungen
+		 */
+		function wpsg_checkOrderCol(oElement)
+		{
+
+			if (jQuery(oElement).attr("checked") == "checked") 
+			{
+
+				jQuery('#wpsg_order_index_submit input').attr("checked", true);
+				
+			}
+			else
+			{
+
+				jQuery('#wpsg_order_index_submit input').attr("checked", false);
+				
+			}				
+			
+		} // function wpsg_checkOrderCol()			
+
+		jQuery(document).ready(function() {
+			
+			jQuery('.wpsg_handlediv').bind('click', function() {
+				jQuery(this).next().toggle();
+
+				var arClose = new Array();
+				jQuery('.wpsg_order_index .postbox .inside:hidden').each(function() {
+					arClose.push(jQuery(this).parent().attr("id"));
+				} );
+
+				jQuery.cookie('wpsg_order_index_closed', arClose.join(','));
+				
+			} );
+
+			if (jQuery.cookie('wpsg_order_index_closed') != null)
+			{
+
+				var arClose = jQuery.cookie('wpsg_order_index_closed').split(',');
+
+				for (index in arClose)
+				{
+					
+					if (arClose[index] != '') jQuery('#' + arClose[index] + ' .inside').hide();
+								
+				}
+				
+			}
+			
+		} );
+		
+	/* ]]> */</script>
+
+	<?php echo $this->writeBackendMessage(); ?>
+	
+	<form method="get" id="filter_form">
+	
+		<input type="hidden" name="" id="wpsg_order_index_noheader_filter" value="1" />	
+		<input type="hidden" name="page" value="wpsg-Order" /> 
+		
+		<?php if (isset($this->view['filter']['k_id']) && $this->view['filter']['k_id'] > 0) { ?>
+		<input type="hidden" name="filter[k_id]" id="filter_k_id" value="<?php echo $this->view['filter']['k_id']; ?>" />
+		<?php } ?>
+	
+		<?php if (isset($this->view['filter']['k_id']) && $this->view['filter']['k_id'] > 0) { ?>
+			<ul class="subsubsub wpsg_order_index_status">
+				<li><span class="text"><?php echo wpsg_translate(__('Bestellungen von Kunden #1#', 'wpsg'), $this->view['kunde']['vname'].' '.$this->view['kunde']['name']); ?></span></li>
+				<li><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order"><?php echo __('Alle anzeigen', 'wpsg'); ?></a></li>
+			</ul>
+			<div class="wpsg_clear"></div>
+		<?php } ?>
+			<ul class="subsubsub wpsg_order_index_status">
+				<?php $i = 0; foreach ($this->view['arStatus'] as $status_id => $count) { ?>
+				<?php if ($count > 0) { ?>
+				<li>
+					<?php if (in_array($status_id, explode(',', $this->view['filter']['status']))) { ?>
+					<span class="akt"><?php echo $this->arStatus[$status_id]; ?></span> <span class="count">(<?php echo $count; ?>) | </span>
+					<?php } else { ?>
+					<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goStatus(<?php echo $status_id; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order"><?php echo $this->arStatus[$status_id]; ?> <span class="count">(<?php echo $count; ?>)</span></a> |
+					<?php } ?>
+				</li>
+				<?php $i ++; } ?>
+				<?php } ?>
+				<li>
+					<?php if ($this->view['filter']['status'] == -1) { ?>
+					<span class="akt"><?php echo __('Alle', 'wpsg'); ?></span> <span class="count">(<?php echo $this->view['count']; ?>)</span>
+					<?php } else { ?>
+					<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goStatus(-1);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order"><?php echo __('Alle', 'wpsg'); ?> <span class="count">(<?php echo $this->view['countAll']; ?>)</span></a>
+					<?php } ?>
+				</li>
+			</ul>
+			
+		<p class="search-box wpsg-search-box">
+			<label for="post-search-input" class="screen-reader-text"><?php echo __('Bestellungen suchen', 'wpsg'); ?>:</label>
+			<input type="text" onchange="jQuery('#filtersearch').val(jQuery(this).val());" value="<?php echo wpsg_hspc($this->view['filter']['search']); ?>" name="filter[search]" id="post-search-input" />
+			<input type="submit" onclick="jQuery('#wpsg_mod_export_noheader').attr('name', '');" value="<?php echo __('Bestellung suchen', 'wpsg'); ?>" class="button" id="search-submit" name="search-submit" />
+		</p>
+		
+		<br class="clear" />
+			
+		<div class="tablenav top">
+		
+			<div class="alignleft actions">
+									
+				<label>
+					<input type="checkbox" <?php echo (($_COOKIE['wpsg_order_index_filter'] == '1')?'checked="checked"':''); ?> name="wpsg_order_index_filter" id="wpsg_order_index_filter" />&nbsp;<?php echo __('Filter', 'wpsg'); ?>
+				</label>
+											
+				<?php $this->callMods('produkt_index_head'); ?>						
+																			
+			</div>			
+			<?php //wpsg_debug($this->view) ?>
+			<div class="tablenav-pages tablenav-pages-wrap"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
+				<div class="tablenav-pages">	
+					<span class="pagination-links">
+						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(1);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=1&amp;s=<?php echo $_REQUEST['s']; ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">Â«</a>
+						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['seite'] - 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=<?php echo $this->view['seite'] - 1; ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">â¹</a>
+						<span class="paging-input"><input onfocus="jQuery('#wpsg_mod_export_noheader').attr('name', '');" type="text" size="1" value="<?php echo $this->view['seite']; ?>" id="seite" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
+						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['seite'] + 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=<?php echo $this->view['seite'] + 1; ?>" title="<?php echo __('Zur nÃ€chsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">âº</a>
+						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['pages']; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=<?php echo $this->view['pages']; ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">Â»</a>
+					</span>
+				</div>
+				
+				<script type="text/javascript">
+
+					jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
+				
+				</script>
+				 
+			</div>
+		
+		</div> 
+		 
+		<div class="metabox-holder" id="wpsg_order_index_filter_layer" style="<?php echo (($_COOKIE['wpsg_order_index_filter'] == '1')?'display:block;':'display:none;'); ?>">
+			<div id="wpsg_orderindexfilter" class="postbox">		
+				<h3 class="wpsg_handlediv">
+					<span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br></span>
+					<span><?php echo __('Bestellfilter', 'wpsg'); ?></span>
+				</h3>
+				<div class="inside">
+					
+					<?php 
+					
+						// Array der ZustÃ€nde aufbereiten
+						$arStatus = array('-1' => __('Alle', 'wpsg'));
+						foreach ($this->view['arStatus'] as $status_id => $v) { $arStatus[$status_id] = $this->arStatus[$status_id]; }
+					
+					?>
+					
+					<?php echo wpsg_drawForm_Input('filter[search]', __('Suchtext', 'wpsg'), $this->view['filter']['search']); ?>
+					<?php echo wpsg_drawForm_Select('filter[status]', __('Status', 'wpsg'), $arStatus, $this->view['filter']['status'], array('id' => 'filter_status')); ?>
+					<div class="wpsg_form_field">
+						<div class="wpsg_form_left">
+							<label for=""><?php echo __('Bestelldatum (Monat/Jahr)', 'wpsg'); ?>:</label>
+						</div>
+						<div class="wpsg_form_right">
+							<select name="filter[month_von]" id="month_von" style="float:left; width:45%; margin-right:5%;">
+								<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
+								<?php for ($i = 1; $i <= 12; $i ++) { ?>
+								<option <?php echo (($this->view['filter']['month_von'] == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo utf8_encode(strftime("%B", mktime(0, 0, 0, $i, 1, 2000))); ?></option>
+								<?php } ?>
+							</select>
+							<select name="filter[year_von]" id="year_von" style="float:left; width:45%;">
+								<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
+								<?php foreach ($this->view['years'] as $y) { ?>
+								<option <?php echo (($this->view['filter']['year_von'] == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
+								<?php } ?>
+							</select>
+						</div>
+						<div class="wpsg_clear"></div>
+					</div>			
+					<?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
+					<div class="wpsg_form_field">
+						<div class="wpsg_form_left">
+							<label for=""><?php echo __('Rechnungsdatum (Monat/Jahr)', 'wpsg'); ?>:</label>
+						</div>
+						<div class="wpsg_form_right">
+							<select name="filter[invoice_month_von]" id="invoice_month_von" style="float:left; width:45%; margin-right:5%;">
+								<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
+								<?php for ($i = 1; $i <= 12; $i ++) { ?>
+								<option <?php echo (($this->view['filter']['invoice_month_von'] == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); ?></option>
+								<?php } ?>
+							</select>
+							<select name="filter[invoice_year_von]" id="invoice_year_von" style="float:left; width:45%;">
+								<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
+								<?php foreach ($this->view['invoice_years'] as $y) { ?>
+								<option <?php echo (($this->view['filter']['invoice_year_von'] == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
+								<?php } ?>
+							</select>						
+						</div>
+					</div>		
+					<?php } ?>
+					
+					<div class="clear"></div>
+							
+					<br />			
+					<input onclick="jQuery('#wpsg_mod_export_noheader').attr('name', '');" class="button" name="search-submit" type="submit" value="<?php echo __("Auswahl einschrÃ€nken", "wpsg"); ?>" />
+					
+				</div>
+			</div>
+		</div>
+		
+		<script type="text/javascript">/* <![CDATA[ */
+
+			jQuery(document).ready(function() {
+
+				jQuery('#wpsg_order_index_filter').bind('change', function() {
+
+					if (jQuery(this).attr("checked")) 
+					{
+
+						jQuery('#wpsg_order_index_filter_layer').show();
+						jQuery.cookie('wpsg_order_index_filter', '1');
+						
+					}
+					else
+					{
+
+						jQuery('#wpsg_order_index_filter_layer').hide();
+						jQuery.cookie('wpsg_order_index_filter', '0');
+						
+					}
+					
+				} );
+				
+			} );			
+		
+		/* ]]> */</script>
+		
+		<input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo $this->view['filter']['order']; ?>" />
+		<input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo $this->view['filter']['ascdesc']; ?>" />
+				
+		<input style="display:none;" type="submit" name="suchen" value="" />
+		
+	</form>
+	
+	<?php $this->callMods('produkt_index_aftersearch'); ?>
+			
+	<?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
+	<form method="get" id="wpsg_order_index_submit">
+	
+		<input type="hidden" name="" id="wpsg_order_index_noheader" value="1" />
+		<input type="hidden" name="page" value="wpsg-Order" /> 
+	
+		<table class="widefat post fixed">
+			<thead>
+				<tr>
+					<th class="manage-column column-cb check-column" scope="col"><input type="checkbox" value="1" id="wpsg_check_all_order" onclick="wpsg_checkOrderCol(this);" name="" /></th>
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'nr')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">					
+						<a href="#" onclick="return wpsg_setOrder('nr');">
+							<span><?php echo __("Nr.", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>					
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'customer')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('customer');">
+							<span><?php echo __("Kunde", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'payment')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('payment');">
+							<span><?php echo __("Bezahlmethode", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'shipping')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('shipping');">
+							<span><?php echo __("Versandart", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>				
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'produkte')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('produkte');">
+							<span><?php echo __("Produkte", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'amount')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('amount');">
+							<span><?php echo __("Bestellwert", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>
+					<?php if ($this->hasMod('wpsg_mod_abo')) { ?>
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'abo')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('abo');">
+							<span><?php echo __("Abo Ende", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>
+					<?php } ?>
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'status')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('status');">
+							<span><?php echo __("Status", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a> 
+					</th>
+				</tr>
+			</thead>
+			<tbody>
+				<?php $i = 1; foreach ($this->view['data'] as $o) { ?>
+				<tr>
+					<td class="">
+						<input type="checkbox" value="1" name="wpsg_multido[<?php echo $o['id']; ?>]" />
+					</td>
+					<td class="post-title column-title">
+						<?php if (wpsg_isSizedString($o['language']) && $o['language'] != $this->getCurrentLanguage()) { $arLang = $this->getStoreLanguages(); $lang = $arLang[$o['language']]; ?>
+							<img src="<?php echo $this->getFlagURL().$lang['flag']; ?>" alt="<?php echo wpsg_translate(__('Bestellung wurde in der Sprache #1# durchgefÃŒhrt.', 'wpsg'), $lang['name']); ?>" title="<?php echo wpsg_translate(__('Bestellung wurde in der Sprache #1# durchgefÃŒhrt.', 'wpsg'), $lang['name']); ?>" />
+						<?php } ?>						
+						<?php echo (($o['onr'] == "")?$o['id']:$o['onr']); ?> <span class="wpsg_order_datum"><?php echo wpsg_hspc(date('d.m.Y H:i:s', strtotime($o['cdate']))); ?></span><br />
+						<?php if (trim($o['order_comment']) != '') { ?>
+						<a title="<?php echo wpsg_translate(__('Kommentar (Kunde): #1#', 'wpsg'), wpsg_hspc($o['order_comment'])); ?>" onclick="return false" href="">
+							<img alt="" src="<?php echo WPSG_URL_CONTENT; ?>plugins/<?php echo WPSG_FOLDERNAME; ?>/views/gfx/comment.png" />
+						</a>
+						<?php } ?>
+						<?php if (trim($o['admincomment']) != "") { ?>
+						<a title="<?php echo __("Kommentar (Admin): ", "wpsg").htmlspecialchars($o['admincomment']); ?>" onclick="return false;" href="">
+							<img alt="" src="<?php echo WPSG_URL_CONTENT; ?>plugins/<?php echo WPSG_FOLDERNAME; ?>/views/gfx/comment_admin.png" />
+						</a>
+						<?php } ?>
+						<div class="row-actions">
+							<span class="view"><a title="<?php echo __("Diese Bestellung ansehen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=view&amp;edit_id=<?php echo $o['id']; ?>"><?php echo __("Ansehen", "wpsg"); ?></a></span>
+							|
+							<span class="storno"><a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Bestellung stornieren mÃ¶chten?', 'wpsg'); ?>');" title="<?php echo __("Diese Bestellung stornieren", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=storno&amp;noheader=1&amp;edit_id=<?php echo $o['id']; ?>"><?php echo __("Stornieren", "wpsg"); ?></a></span>
+							|
+							<span class="delete"><a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Bestellung lÃ¶schen mÃ¶chten?', 'wpsg'); ?>');" title="<?php echo __('Diese Bestellung lÃ¶schen', 'wpsg'); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=delete&amp;noheader=1&amp;edit_id=<?php echo $o['id']; ?>"><?php echo __('LÃ¶schen', 'wpsg'); ?></a></span>														
+						</div>
+					</td>
+					<td>
+						<?php if (trim($o['firma']) != '') { ?>
+						<?php echo wpsg_hspc($o['firma']); ?><br />
+						<?php } ?>
+						<?php echo ((trim($o['title']) != '' && $o['title'] != '-1')?$o['title'].' ':'').wpsg_hspc($o['vname'].' '.$o['name']); ?><br />
+						<span class="wpsg_order_adress">
+							<?php echo wpsg_hspc($o['strasse']); ?><br />
+							<?php echo wpsg_hspc($o['plz'].' '.$o['ort'].' '.$o['land_krzl']); ?>
+						</span>
+					</td>
+					<td>
+					
+						<?php /* Bei Crefopay wird die Darstellung der Zahlungsart ÃŒber das Modul geregelt */ ?>
+						<?php if ($o['type_payment'] == 4000 && $this->hasMod('wpsg_mod_crefopay')) { ?>
+							<?php echo wpsg_hspc($this->callMod('wpsg_mod_crefopay', 'getOrderPaymentName', array($o['id']))); ?>
+						<?php } else { ?>
+							<?php echo wpsg_hspc(__($this->arPayment[$o['type_payment']]['name']), 'wpsg'); ?>
+						<?php } ?>
+						
+						<?php if ($o['basket']['sum']['preis_payment'] > 0) { ?>
+						<br /><?php echo wpsg_ff($o['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); ?>					
+						<?php } ?>
+					</td>
+					<td>
+						<?php echo wpsg_hspc($o['oOrder']->getShippingTypName()); ?>
+						<?php if ($o['basket']['sum']['preis_shipping'] > 0) { ?>
+						<br /><?php echo wpsg_ff($o['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?>					
+						<?php } ?>
+					</td>
+					<td>
+						<?php foreach ((array)$o['basket']['produkte'] as $p) { ?>
+						<?php echo wpsg_translate(__('#1# x <a href="#2#">#3#</a> fÃŒr je #4#', 'wpsg'), $p['menge'], WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$this->getProduktID($p['id']), $p['name'], wpsg_ff($p['preis'], $this->get_option('wpsg_currency'))); ?><br />
+						<?php } ?>
+					</td>
+					<td>
+						<?php echo wpsg_ff($o['basket']['sum']['preis_gesamt'], $this->get_option('wpsg_currency')); ?>
+					</td>
+					<?php if ($this->hasMod('wpsg_mod_abo')) { ?>
+					<td>
+						<?php if ($this->callMod('wpsg_mod_abo', 'isAboOrder', array($o['id'])) === 1) { ?>
+							<?php echo $this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($o['id'])) ?>
+						<?php } else if ($this->callMod('wpsg_mod_abo', 'isAboOrder', array($o['id'])) === 2) { ?>
+							<?php 
+							
+								$origin_order_id = $this->callMod('wpsg_mod_abo', 'getOriginOrder', array($o['id']));
+								$origin_order_data = $this->cache->loadOrder($origin_order_id);
+							
+							?>
+							<?php echo $this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array(
+								$origin_order_data['id']
+							)) ?><br />
+							<?php echo wpsg_translate(__('VerlÃ€ngerung zu Bestellung <a href="#1#">#2#</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$origin_order_id, $origin_order_data['onr']); ?>
+						<?php } ?>
+					</td>
+					<?php } ?>
+					<td>
+						<?php echo wpsg_hspc($this->arStatus[$o['status']]); ?>
+					</td>
+				</tr>
+				<?php $i++; } ?>
+			</tbody> 	
+			<tfoot>
+				<tr>
+					<th class="manage-column column-cb check-column" scope="col"><input type="checkbox" value="1" id="wpsg_check_all_order_2" onclick="wpsg_checkOrderCol(this);" name="" /></th>
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'nr')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">					
+						<a href="#" onclick="return wpsg_setOrder('nr');">
+							<span><?php echo __("Nr.", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>					
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'customer')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('customer');">
+							<span><?php echo __("Kunde", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'payment')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('payment');">
+							<span><?php echo __("Bezahlmethode", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'shipping')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('shipping');">
+							<span><?php echo __("Versandart", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>				
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'produkte')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('produkte');">
+							<span><?php echo __("Produkte", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'amount')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('amount');">
+							<span><?php echo __("Bestellwert", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>
+					<?php if ($this->hasMod('wpsg_mod_abo')) { ?>
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'abo')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('abo');">
+							<span><?php echo __("Abo Ende", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a>
+					</th>
+					<?php } ?>
+					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'status')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
+						<a href="#" onclick="return wpsg_setOrder('status');">
+							<span><?php echo __("Status", 'wpsg'); ?></span>
+							<span class="sorting-indicator"></span>
+						</a> 
+					</th>
+				</tr>
+			</tfoot>	
+		</table>
+		
+		<div class="tablenav bottom">
+			<div class="alignleft actions">
+				<select name="wpsg_action" id="wpsg_action">
+					<option value="-1"><?php echo __('Aktion wÃ€hlen', 'wpsg'); ?></option>
+					<?php foreach ($this->arStatus as $k => $status) { ?>
+					<option value="<?php echo $k; ?>"><?php echo wpsg_translate(__('Status auf "#1#" setzen.', 'wpsg'), $status); ?></option>
+					<?php } ?>
+					<option value="multiDelete"><?php echo __('Bestellungen lÃ¶schen', 'wpsg'); ?></option>
+					<?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>					
+					<option value="writeRechnung"><?php echo __('Rechnung schreiben', 'wpsg'); ?></option>
+					<option value="showRechnung"><?php echo __('Rechnung ansehen', 'wpsg'); ?></option>
+					<?php } ?>
+				</select>
+				<input onclick="if (jQuery('#wpsg_action').val() == 'multiDelete') { if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false; } jQuery('#wpsg_order_index_noheader').attr('name', 'noheader');" type="submit" value="<?php echo __('AusfÃŒhren', 'wpsg'); ?>" class="button-secondary action" id="doaction" name="wpsg_order_doaction" />
+			</div> 
+			
+			<div class="tablenav-pages"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
+				<div class="tablenav-pages">	
+					<span class="pagination-links">
+						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(1);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=1&amp;s=<?php echo $_REQUEST['s']; ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">Â«</a>
+						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['seite'] - 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=<?php echo $this->view['seite'] - 1; ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">â¹</a>
+						<span class="paging-input"><input onfocus="jQuery('#wpsg_mod_export_noheader').attr('name', '');" type="text" size="1" value="<?php echo $this->view['seite']; ?>" id="seite" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
+						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['seite'] + 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=<?php echo $this->view['seite'] + 1; ?>" title="<?php echo __('Zur nÃ€chsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">âº</a>
+						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['pages']; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=<?php echo $this->view['pages']; ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">Â»</a>
+					</span>
+				</div>
+				
+				<script type="text/javascript">
+
+					jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
+				
+				</script>
+				
+				<br class="clear">
+			</div>			
+		</div>
+		
+		<?php $this->callMod('wpsg_mod_export', 'produkt_index_foot'); ?>
+		
+	</form>
+	<?php } else { ?>
+	<br /><br />
+	<p><?php echo __('Keine Bestellungen in der Datenbank.', 'wpsg'); ?></p>
+	<?php } ?>
+	
+</div>
Index: /views/order/index.phtml
===================================================================
--- /views/order/index.phtml	(revision 5632)
+++ /views/order/index.phtml	(revision 5637)
@@ -4,561 +4,143 @@
 	 * Template fÃŒr die Ãbersicht der Bestellungen
 	 */
-	//wpsg_debug($this->view);
+	
 ?>
-<div class="wrap wpsg_order_index">
-	<div class="icon32 icon32-posts-post" id="icon-edit"><br></div>
-	<h2>
-		<?php echo __('Bestellverwaltung', 'wpsg'); ?>
-	</h2>
 
-	<script type="text/javascript">/* <![CDATA[ */
+<div class="wpsg_order" id="wpsg-bs">
 
-		var wpsg_order = '<?php echo $this->view['filter']['order']; ?>';
-		var wpsg_ascdesc = '<?php echo $this->view['filter']['ascdesc']; ?>';
-    
-		function goPage(page)
-		{
+	<nav class="navbar navbar-default">
+		<div class="container-fluid">
+			<div class="navbar-header">
+				<a class="navbar-brand" href="#"><?php echo __('wpShopGermany', 'wpsg'); ?></a>
+			</div>
+			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
+				<ul class="nav navbar-nav">
+					<li role="presentation" class="<?php echo ((!isset($_REQUEST['action']))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order"><?php echo __("BestellÃŒbersicht", "wpsg"); ?></a></li>
+					<li role="presentation" class="wpsg_showhide_filter <?php echo (($this->view['hasFilter'] === true)?'active':''); ?>"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Suche", "wpsg"); ?></a></li>
+				</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-Order&action=import&noheader=1"><span class="glyphicon glyphicon-import"></span><?php echo __("Import", "wpsg"); ?></a></li>
+					<?php if (wpsg_isSizedArray($this->view['data'])) { ?>
+						<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-Order&action=export&noheader=1"><span class="glyphicon glyphicon-export"></span><?php echo __("Export", "wpsg"); ?></a></li>
+					<?php } ?>
+				</ul>
+			</div>
+		</div>
+		<div class="wpsg-filter container-fluid form-horizontal" style="display:<?php echo (($this->view['hasFilter'] === true)?'block':'none'); ?>;">
+			<div class="row">
+				<div class="col-lg-12">
+					<form method="post" id="filter_form">
 
-			if (page <= 0 || page == <?php echo $this->view['seite']; ?> || page > <?php echo $this->view['pages']; ?>) return;			
-			
-			jQuery('#seite').val(page);
-			jQuery('#filter_form').submit();
+						<input id="wpsg_seite" type="text" name="seite" value="<?php echo $this->view['seite']; ?>" class="current-page" />
+						<input id="wpsg_order" type="text" name="filter[order]" value="<?php echo $this->view['arFilter']['order']; ?>" />
+						<input id="wpsg_ascdesc" type="text" name="filter[ascdesc]" value="<?php echo $this->view['arFilter']['ascdesc']; ?>" />
 
-			return false;
-			
-		} // function goPage(page)
+						<div class="container-fluid">
+							<div class="row">
+								<div class="col-lg-6">
+									<?php echo wpsg_drawForm_Input('filter[s]', __('Suchfeld', 'wpsg'), wpsg_getStr($_REQUEST['s'])); ?>
+								</div>
+								<div class="col-lg-6">
+									<?php echo wpsg_drawForm_Select('filter[status]', __('Bestellstatus', 'wpsg'), $this->arStatus, wpsg_getStr($_REQUEST['s'])); ?>
+								</div>
+							</div>
+						</div>
 
-		function wpsg_setOrder(order)
-		{
+						<div class="container-fluid">
+							<div class="row">
+								<div class="col-lg-6">
+								</div>
+								<div class="col-lg-6">
+									<?php echo wpsg_drawForm_SubmitButton(__('Bestellungen suchen')); ?>
+								</div>
+							</div>
+						</div>
 
-			if (order == wpsg_order)
-			{
-
-				// Nur Richtung Ã€ndern
-				if (wpsg_ascdesc == 'asc') jQuery('#wpsg_ascdesc').val('desc');
-				else jQuery('#wpsg_ascdesc').val('asc');
-				
-			}
-			else
-			{
-
-				jQuery('#wpsg_order').val(order);
-				jQuery('#wpsg_ascdesc').val('asc');
-				
-			}
-
-			jQuery('#seite').val(1);
-			jQuery('#filter_form').submit();
-			
-			return false;
-			
-		} // function wpsg_setOrder(order)
-
-		function goStatus(status_id)
-		{
-
-			jQuery.cookie("wpsg_order_status", status_id);
-
-			jQuery('#filter_status option').attr("selected", false);
-			jQuery('#filter_status option[value="' + status_id + '"]').attr("selected", true);
-			jQuery('#seite').val(1);
-
-			jQuery('#filter_form').submit();
-			
-			return false;
-			
-		} // function goStatus(status_id)
-
-		/**
-		 * Markiert/Demarkiert alle Rechnungen
-		 */
-		function wpsg_checkOrderCol(oElement)
-		{
-
-			if (jQuery(oElement).attr("checked") == "checked") 
-			{
-
-				jQuery('#wpsg_order_index_submit input').attr("checked", true);
-				
-			}
-			else
-			{
-
-				jQuery('#wpsg_order_index_submit input').attr("checked", false);
-				
-			}				
-			
-		} // function wpsg_checkOrderCol()			
-
-		jQuery(document).ready(function() {
-			
-			jQuery('.wpsg_handlediv').bind('click', function() {
-				jQuery(this).next().toggle();
-
-				var arClose = new Array();
-				jQuery('.wpsg_order_index .postbox .inside:hidden').each(function() {
-					arClose.push(jQuery(this).parent().attr("id"));
-				} );
-
-				jQuery.cookie('wpsg_order_index_closed', arClose.join(','));
-				
-			} );
-
-			if (jQuery.cookie('wpsg_order_index_closed') != null)
-			{
-
-				var arClose = jQuery.cookie('wpsg_order_index_closed').split(',');
-
-				for (index in arClose)
-				{
-					
-					if (arClose[index] != '') jQuery('#' + arClose[index] + ' .inside').hide();
-								
-				}
-				
-			}
-			
-		} );
-		
-	/* ]]> */</script>
-
-	<?php echo $this->writeBackendMessage(); ?>
-	
-	<form method="get" id="filter_form">
-	
-		<input type="hidden" name="" id="wpsg_order_index_noheader_filter" value="1" />	
-		<input type="hidden" name="page" value="wpsg-Order" /> 
-		
-		<?php if (isset($this->view['filter']['k_id']) && $this->view['filter']['k_id'] > 0) { ?>
-		<input type="hidden" name="filter[k_id]" id="filter_k_id" value="<?php echo $this->view['filter']['k_id']; ?>" />
-		<?php } ?>
-	
-		<?php if (isset($this->view['filter']['k_id']) && $this->view['filter']['k_id'] > 0) { ?>
-			<ul class="subsubsub wpsg_order_index_status">
-				<li><span class="text"><?php echo wpsg_translate(__('Bestellungen von Kunden #1#', 'wpsg'), $this->view['kunde']['vname'].' '.$this->view['kunde']['name']); ?></span></li>
-				<li><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order"><?php echo __('Alle anzeigen', 'wpsg'); ?></a></li>
-			</ul>
-			<div class="wpsg_clear"></div>
-		<?php } ?>
-			<ul class="subsubsub wpsg_order_index_status">
-				<?php $i = 0; foreach ($this->view['arStatus'] as $status_id => $count) { ?>
-				<?php if ($count > 0) { ?>
-				<li>
-					<?php if (in_array($status_id, explode(',', $this->view['filter']['status']))) { ?>
-					<span class="akt"><?php echo $this->arStatus[$status_id]; ?></span> <span class="count">(<?php echo $count; ?>) | </span>
-					<?php } else { ?>
-					<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goStatus(<?php echo $status_id; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order"><?php echo $this->arStatus[$status_id]; ?> <span class="count">(<?php echo $count; ?>)</span></a> |
-					<?php } ?>
-				</li>
-				<?php $i ++; } ?>
-				<?php } ?>
-				<li>
-					<?php if ($this->view['filter']['status'] == -1) { ?>
-					<span class="akt"><?php echo __('Alle', 'wpsg'); ?></span> <span class="count">(<?php echo $this->view['count']; ?>)</span>
-					<?php } else { ?>
-					<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goStatus(-1);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order"><?php echo __('Alle', 'wpsg'); ?> <span class="count">(<?php echo $this->view['countAll']; ?>)</span></a>
-					<?php } ?>
-				</li>
-			</ul>
-			
-		<p class="search-box wpsg-search-box">
-			<label for="post-search-input" class="screen-reader-text"><?php echo __('Bestellungen suchen', 'wpsg'); ?>:</label>
-			<input type="text" onchange="jQuery('#filtersearch').val(jQuery(this).val());" value="<?php echo wpsg_hspc($this->view['filter']['search']); ?>" name="filter[search]" id="post-search-input" />
-			<input type="submit" onclick="jQuery('#wpsg_mod_export_noheader').attr('name', '');" value="<?php echo __('Bestellung suchen', 'wpsg'); ?>" class="button" id="search-submit" name="search-submit" />
-		</p>
-		
-		<br class="clear" />
-			
-		<div class="tablenav top">
-		
-			<div class="alignleft actions">
-									
-				<label>
-					<input type="checkbox" <?php echo (($_COOKIE['wpsg_order_index_filter'] == '1')?'checked="checked"':''); ?> name="wpsg_order_index_filter" id="wpsg_order_index_filter" />&nbsp;<?php echo __('Filter', 'wpsg'); ?>
-				</label>
-											
-				<?php $this->callMods('produkt_index_head'); ?>						
-																			
-			</div>			
-			<?php //wpsg_debug($this->view) ?>
-			<div class="tablenav-pages tablenav-pages-wrap"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
-				<div class="tablenav-pages">	
-					<span class="pagination-links">
-						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(1);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=1&amp;s=<?php echo $_REQUEST['s']; ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">Â«</a>
-						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['seite'] - 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=<?php echo $this->view['seite'] - 1; ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">â¹</a>
-						<span class="paging-input"><input onfocus="jQuery('#wpsg_mod_export_noheader').attr('name', '');" type="text" size="1" value="<?php echo $this->view['seite']; ?>" id="seite" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
-						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['seite'] + 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=<?php echo $this->view['seite'] + 1; ?>" title="<?php echo __('Zur nÃ€chsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">âº</a>
-						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['pages']; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=<?php echo $this->view['pages']; ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">Â»</a>
-					</span>
-				</div>
-				
-				<script type="text/javascript">
-
-					jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
-				
-				</script>
-				 
-			</div>
-		
-		</div> 
-		 
-		<div class="metabox-holder" id="wpsg_order_index_filter_layer" style="<?php echo (($_COOKIE['wpsg_order_index_filter'] == '1')?'display:block;':'display:none;'); ?>">
-			<div id="wpsg_orderindexfilter" class="postbox">		
-				<h3 class="wpsg_handlediv">
-					<span class="handlediv" title="<?php echo __('Zum Ein/Ausklappen hier klicken', 'wpsg'); ?>"><br></span>
-					<span><?php echo __('Bestellfilter', 'wpsg'); ?></span>
-				</h3>
-				<div class="inside">
-					
-					<?php 
-					
-						// Array der ZustÃ€nde aufbereiten
-						$arStatus = array('-1' => __('Alle', 'wpsg'));
-						foreach ($this->view['arStatus'] as $status_id => $v) { $arStatus[$status_id] = $this->arStatus[$status_id]; }
-					
-					?>
-					
-					<?php echo wpsg_drawForm_Input('filter[search]', __('Suchtext', 'wpsg'), $this->view['filter']['search']); ?>
-					<?php echo wpsg_drawForm_Select('filter[status]', __('Status', 'wpsg'), $arStatus, $this->view['filter']['status'], array('id' => 'filter_status')); ?>
-					<div class="wpsg_form_field">
-						<div class="wpsg_form_left">
-							<label for=""><?php echo __('Bestelldatum (Monat/Jahr)', 'wpsg'); ?>:</label>
-						</div>
-						<div class="wpsg_form_right">
-							<select name="filter[month_von]" id="month_von" style="float:left; width:45%; margin-right:5%;">
-								<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
-								<?php for ($i = 1; $i <= 12; $i ++) { ?>
-								<option <?php echo (($this->view['filter']['month_von'] == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo utf8_encode(strftime("%B", mktime(0, 0, 0, $i, 1, 2000))); ?></option>
-								<?php } ?>
-							</select>
-							<select name="filter[year_von]" id="year_von" style="float:left; width:45%;">
-								<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
-								<?php foreach ($this->view['years'] as $y) { ?>
-								<option <?php echo (($this->view['filter']['year_von'] == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
-								<?php } ?>
-							</select>
-						</div>
-						<div class="wpsg_clear"></div>
-					</div>			
-					<?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>
-					<div class="wpsg_form_field">
-						<div class="wpsg_form_left">
-							<label for=""><?php echo __('Rechnungsdatum (Monat/Jahr)', 'wpsg'); ?>:</label>
-						</div>
-						<div class="wpsg_form_right">
-							<select name="filter[invoice_month_von]" id="invoice_month_von" style="float:left; width:45%; margin-right:5%;">
-								<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
-								<?php for ($i = 1; $i <= 12; $i ++) { ?>
-								<option <?php echo (($this->view['filter']['invoice_month_von'] == $i)?'selected="selected"':''); ?> value="<?php echo str_pad($i, 2, '0', STR_PAD_LEFT); ?>"><?php echo strftime("%B", mktime(0, 0, 0, $i, 1, 2000)); ?></option>
-								<?php } ?>
-							</select>
-							<select name="filter[invoice_year_von]" id="invoice_year_von" style="float:left; width:45%;">
-								<option value="-1"><?php echo __("Alle", "wpsg"); ?></option>
-								<?php foreach ($this->view['invoice_years'] as $y) { ?>
-								<option <?php echo (($this->view['filter']['invoice_year_von'] == $y)?'selected="selected"':''); ?> value="<?php echo $y; ?>"><?php echo $y; ?></option>
-								<?php } ?>
-							</select>						
-						</div>
-					</div>		
-					<?php } ?>
-					
-					<div class="clear"></div>
-							
-					<br />			
-					<input onclick="jQuery('#wpsg_mod_export_noheader').attr('name', '');" class="button" name="search-submit" type="submit" value="<?php echo __("Auswahl einschrÃ€nken", "wpsg"); ?>" />
-					
+					</form>
 				</div>
 			</div>
 		</div>
-		
-		<script type="text/javascript">/* <![CDATA[ */
+	</nav>
 
-			jQuery(document).ready(function() {
+	<?php if ($this->view['pages'] > 1) { ?>
+	<div class="wpsg_status_link_wrap">
 
-				jQuery('#wpsg_order_index_filter').bind('change', function() {
+		<ul>
+			<?php foreach ($this->view['arStatus'] as $status_key => $status_info) { ?>
+			<li><a href="#"><?php echo wpsg_translate(__('#1# (#2#)', 'wpsg'), $status_info['label'], $status_info['count']); ?></a></li>
+			<?php } ?>
+		</ul>
 
-					if (jQuery(this).attr("checked")) 
-					{
+	</div>
 
-						jQuery('#wpsg_order_index_filter_layer').show();
-						jQuery.cookie('wpsg_order_index_filter', '1');
-						
-					}
-					else
-					{
+	<nav class="pagination_wrap">
+		<ul class="pagination">
+			<?php if ($this->view['seite'] > 1) { ?>
+				<li><a onclick="return goPage(<?php echo $this->view['seite'] - 1; ?>);" href="#" aria-label="<?php echo __('Vorherige Seite'); ?>"><span aria-hidden="true">&laquo;</span></a></li>
+			<?php } ?>
+			<?php for ($i = 1; $i <= $this->view['pages']; $i ++) { ?>
+				<li class="<?php echo (($i == $this->view['seite'])?'active':''); ?>"><a onclick="return goPage(<?php echo $i; ?>);" href="#"><?php echo $i; ?></a></li>
+			<?php } ?>
+			<?php if ($this->view['seite'] + 1 <= $this->view['pages']) { ?>
+				<li><a onclick="return goPage(<?php echo $this->view['seite'] + 1; ?>);" href="#" aria-label="<?php echo __('NÃ€chste Seite'); ?>"><span aria-hidden="true">&raquo;</span></a></li>
+			<?php } ?>
+		</ul>
+	</nav>
+	<?php } ?>
 
-						jQuery('#wpsg_order_index_filter_layer').hide();
-						jQuery.cookie('wpsg_order_index_filter', '0');
-						
-					}
-					
-				} );
-				
-			} );			
-		
-		/* ]]> */</script>
-		
-		<input id="wpsg_order" type="hidden" name="filter[order]" value="<?php echo $this->view['filter']['order']; ?>" />
-		<input id="wpsg_ascdesc" type="hidden" name="filter[ascdesc]" value="<?php echo $this->view['filter']['ascdesc']; ?>" />
-				
-		<input style="display:none;" type="submit" name="suchen" value="" />
-		
-	</form>
-	
-	<?php $this->callMods('produkt_index_aftersearch'); ?>
-			
-	<?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
-	<form method="get" id="wpsg_order_index_submit">
-	
-		<input type="hidden" name="" id="wpsg_order_index_noheader" value="1" />
-		<input type="hidden" name="page" value="wpsg-Order" /> 
-	
-		<table class="widefat post fixed">
-			<thead>
-				<tr>
-					<th class="manage-column column-cb check-column" scope="col"><input type="checkbox" value="1" id="wpsg_check_all_order" onclick="wpsg_checkOrderCol(this);" name="" /></th>
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'nr')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">					
-						<a href="#" onclick="return wpsg_setOrder('nr');">
-							<span><?php echo __("Nr.", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>					
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'customer')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('customer');">
-							<span><?php echo __("Kunde", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'payment')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('payment');">
-							<span><?php echo __("Bezahlmethode", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'shipping')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('shipping');">
-							<span><?php echo __("Versandart", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>				
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'produkte')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('produkte');">
-							<span><?php echo __("Produkte", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'amount')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('amount');">
-							<span><?php echo __("Bestellwert", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>
-					<?php if ($this->hasMod('wpsg_mod_abo')) { ?>
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'abo')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('abo');">
-							<span><?php echo __("Abo Ende", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>
-					<?php } ?>
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'status')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('status');">
-							<span><?php echo __("Status", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a> 
-					</th>
-				</tr>
-			</thead>
-			<tbody>
-				<?php $i = 1; foreach ($this->view['data'] as $o) { ?>
-				<tr>
-					<td class="">
-						<input type="checkbox" value="1" name="wpsg_multido[<?php echo $o['id']; ?>]" />
-					</td>
-					<td class="post-title column-title">
-						<?php if (wpsg_isSizedString($o['language']) && $o['language'] != $this->getCurrentLanguage()) { $arLang = $this->getStoreLanguages(); $lang = $arLang[$o['language']]; ?>
-							<img src="<?php echo $this->getFlagURL().$lang['flag']; ?>" alt="<?php echo wpsg_translate(__('Bestellung wurde in der Sprache #1# durchgefÃŒhrt.', 'wpsg'), $lang['name']); ?>" title="<?php echo wpsg_translate(__('Bestellung wurde in der Sprache #1# durchgefÃŒhrt.', 'wpsg'), $lang['name']); ?>" />
-						<?php } ?>						
-						<?php echo (($o['onr'] == "")?$o['id']:$o['onr']); ?> <span class="wpsg_order_datum"><?php echo wpsg_hspc(date('d.m.Y H:i:s', strtotime($o['cdate']))); ?></span><br />
-						<?php if (trim($o['order_comment']) != '') { ?>
-						<a title="<?php echo wpsg_translate(__('Kommentar (Kunde): #1#', 'wpsg'), wpsg_hspc($o['order_comment'])); ?>" onclick="return false" href="">
-							<img alt="" src="<?php echo WPSG_URL_CONTENT; ?>plugins/<?php echo WPSG_FOLDERNAME; ?>/views/gfx/comment.png" />
-						</a>
-						<?php } ?>
-						<?php if (trim($o['admincomment']) != "") { ?>
-						<a title="<?php echo __("Kommentar (Admin): ", "wpsg").htmlspecialchars($o['admincomment']); ?>" onclick="return false;" href="">
-							<img alt="" src="<?php echo WPSG_URL_CONTENT; ?>plugins/<?php echo WPSG_FOLDERNAME; ?>/views/gfx/comment_admin.png" />
-						</a>
-						<?php } ?>
-						<div class="row-actions">
-							<span class="view"><a title="<?php echo __("Diese Bestellung ansehen", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=view&amp;edit_id=<?php echo $o['id']; ?>"><?php echo __("Ansehen", "wpsg"); ?></a></span>
-							|
-							<span class="storno"><a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Bestellung stornieren mÃ¶chten?', 'wpsg'); ?>');" title="<?php echo __("Diese Bestellung stornieren", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=storno&amp;noheader=1&amp;edit_id=<?php echo $o['id']; ?>"><?php echo __("Stornieren", "wpsg"); ?></a></span>
-							|
-							<span class="delete"><a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie diese Bestellung lÃ¶schen mÃ¶chten?', 'wpsg'); ?>');" title="<?php echo __('Diese Bestellung lÃ¶schen', 'wpsg'); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;action=delete&amp;noheader=1&amp;edit_id=<?php echo $o['id']; ?>"><?php echo __('LÃ¶schen', 'wpsg'); ?></a></span>														
-						</div>
-					</td>
-					<td>
-						<?php if (trim($o['firma']) != '') { ?>
-						<?php echo wpsg_hspc($o['firma']); ?><br />
-						<?php } ?>
-						<?php echo ((trim($o['title']) != '' && $o['title'] != '-1')?$o['title'].' ':'').wpsg_hspc($o['vname'].' '.$o['name']); ?><br />
-						<span class="wpsg_order_adress">
-							<?php echo wpsg_hspc($o['strasse']); ?><br />
-							<?php echo wpsg_hspc($o['plz'].' '.$o['ort'].' '.$o['land_krzl']); ?>
-						</span>
-					</td>
-					<td>
-					
-						<?php /* Bei Crefopay wird die Darstellung der Zahlungsart ÃŒber das Modul geregelt */ ?>
-						<?php if ($o['type_payment'] == 4000 && $this->hasMod('wpsg_mod_crefopay')) { ?>
-							<?php echo wpsg_hspc($this->callMod('wpsg_mod_crefopay', 'getOrderPaymentName', array($o['id']))); ?>
-						<?php } else { ?>
-							<?php echo wpsg_hspc(__($this->arPayment[$o['type_payment']]['name']), 'wpsg'); ?>
-						<?php } ?>
-						
-						<?php if ($o['basket']['sum']['preis_payment'] > 0) { ?>
-						<br /><?php echo wpsg_ff($o['basket']['sum']['preis_payment'], $this->get_option('wpsg_currency')); ?>					
-						<?php } ?>
-					</td>
-					<td>
-						<?php echo wpsg_hspc($o['oOrder']->getShippingTypName()); ?>
-						<?php if ($o['basket']['sum']['preis_shipping'] > 0) { ?>
-						<br /><?php echo wpsg_ff($o['basket']['sum']['preis_shipping'], $this->get_option('wpsg_currency')); ?>					
-						<?php } ?>
-					</td>
-					<td>
-						<?php foreach ((array)$o['basket']['produkte'] as $p) { ?>
-						<?php echo wpsg_translate(__('#1# x <a href="#2#">#3#</a> fÃŒr je #4#', 'wpsg'), $p['menge'], WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$this->getProduktID($p['id']), $p['name'], wpsg_ff($p['preis'], $this->get_option('wpsg_currency'))); ?><br />
-						<?php } ?>
-					</td>
-					<td>
-						<?php echo wpsg_ff($o['basket']['sum']['preis_gesamt'], $this->get_option('wpsg_currency')); ?>
-					</td>
-					<?php if ($this->hasMod('wpsg_mod_abo')) { ?>
-					<td>
-						<?php if ($this->callMod('wpsg_mod_abo', 'isAboOrder', array($o['id'])) === 1) { ?>
-							<?php echo $this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($o['id'])) ?>
-						<?php } else if ($this->callMod('wpsg_mod_abo', 'isAboOrder', array($o['id'])) === 2) { ?>
-							<?php 
-							
-								$origin_order_id = $this->callMod('wpsg_mod_abo', 'getOriginOrder', array($o['id']));
-								$origin_order_data = $this->cache->loadOrder($origin_order_id);
-							
-							?>
-							<?php echo $this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array(
-								$origin_order_data['id']
-							)) ?><br />
-							<?php echo wpsg_translate(__('VerlÃ€ngerung zu Bestellung <a href="#1#">#2#</a>', 'wpsg'), WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order&action=view&edit_id='.$origin_order_id, $origin_order_data['onr']); ?>
-						<?php } ?>
-					</td>
-					<?php } ?>
-					<td>
-						<?php echo wpsg_hspc($this->arStatus[$o['status']]); ?>
-					</td>
-				</tr>
-				<?php $i++; } ?>
-			</tbody> 	
-			<tfoot>
-				<tr>
-					<th class="manage-column column-cb check-column" scope="col"><input type="checkbox" value="1" id="wpsg_check_all_order_2" onclick="wpsg_checkOrderCol(this);" name="" /></th>
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'nr')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">					
-						<a href="#" onclick="return wpsg_setOrder('nr');">
-							<span><?php echo __("Nr.", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>					
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'customer')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('customer');">
-							<span><?php echo __("Kunde", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'payment')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('payment');">
-							<span><?php echo __("Bezahlmethode", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'shipping')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('shipping');">
-							<span><?php echo __("Versandart", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>				
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'produkte')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('produkte');">
-							<span><?php echo __("Produkte", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'amount')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('amount');">
-							<span><?php echo __("Bestellwert", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>
-					<?php if ($this->hasMod('wpsg_mod_abo')) { ?>
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'abo')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('abo');">
-							<span><?php echo __("Abo Ende", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a>
-					</th>
-					<?php } ?>
-					<th class="manage-column column-title <?php echo (($this->view['filter']['order'] == 'status')?'sorted':'sortable'); ?> <?php echo (($this->view['filter']['ascdesc'] == 'asc')?'asc':'desc'); ?>" scope="col">
-						<a href="#" onclick="return wpsg_setOrder('status');">
-							<span><?php echo __("Status", 'wpsg'); ?></span>
-							<span class="sorting-indicator"></span>
-						</a> 
-					</th>
-				</tr>
-			</tfoot>	
-		</table>
-		
-		<div class="tablenav bottom">
-			<div class="alignleft actions">
-				<select name="wpsg_action" id="wpsg_action">
-					<option value="-1"><?php echo __('Aktion wÃ€hlen', 'wpsg'); ?></option>
-					<?php foreach ($this->arStatus as $k => $status) { ?>
-					<option value="<?php echo $k; ?>"><?php echo wpsg_translate(__('Status auf "#1#" setzen.', 'wpsg'), $status); ?></option>
-					<?php } ?>
-					<option value="multiDelete"><?php echo __('Bestellungen lÃ¶schen', 'wpsg'); ?></option>
-					<?php if ($this->hasMod('wpsg_mod_rechnungen')) { ?>					
-					<option value="writeRechnung"><?php echo __('Rechnung schreiben', 'wpsg'); ?></option>
-					<option value="showRechnung"><?php echo __('Rechnung ansehen', 'wpsg'); ?></option>
-					<?php } ?>
-				</select>
-				<input onclick="if (jQuery('#wpsg_action').val() == 'multiDelete') { if (!confirm('<?php echo __('Sind Sie sich sicher?', 'wpsg'); ?>')) return false; } jQuery('#wpsg_order_index_noheader').attr('name', 'noheader');" type="submit" value="<?php echo __('AusfÃŒhren', 'wpsg'); ?>" class="button-secondary action" id="doaction" name="wpsg_order_doaction" />
-			</div> 
-			
-			<div class="tablenav-pages"><span class="displaying-num"><?php echo wpsg_translate(__('#1# Elemente', 'wpsg'), $this->view['count']); ?></span>
-				<div class="tablenav-pages">	
-					<span class="pagination-links">
-						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(1);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=1&amp;s=<?php echo $_REQUEST['s']; ?>" title="<?php echo __('Zur ersten Seite gehen', 'wpsg'); ?>" class="first-page <?php echo (($this->view['seite'] == '1')?'disabled':''); ?>">Â«</a>
-						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['seite'] - 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=<?php echo $this->view['seite'] - 1; ?>" title="<?php echo __('Zur vorherigen Seite gehen', 'wpsg'); ?>" class="prev-page <?php echo (($this->view['seite'] <= 1)?'disabled':''); ?>">â¹</a>
-						<span class="paging-input"><input onfocus="jQuery('#wpsg_mod_export_noheader').attr('name', '');" type="text" size="1" value="<?php echo $this->view['seite']; ?>" id="seite" name="seite" title="<?php echo __('Aktuelle Seite', 'wpsg'); ?>" class="current-page"> <?php echo __('von', 'wpsg'); ?> <span class="total-pages"><?php echo $this->view['pages']; ?></span></span>
-						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['seite'] + 1; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=<?php echo $this->view['seite'] + 1; ?>" title="<?php echo __('Zur nÃ€chsten Seite gehen', 'wpsg'); ?>" class="next-page <?php echo (($this->view['seite'] >= $this->view['pages'])?'disabled':''); ?>">âº</a>
-						<a onclick="jQuery('#wpsg_mod_export_noheader').attr('name', ''); return goPage(<?php echo $this->view['pages']; ?>);" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&amp;seite=<?php echo $this->view['pages']; ?>" title="<?php echo __('Zur letzten Seite gehen', 'wpsg'); ?>" class="last-page <?php echo (($this->view['seite'] == $this->view['pages'])?'disabled':''); ?>">Â»</a>
-					</span>
-				</div>
-				
-				<script type="text/javascript">
+	<?php echo $this->writeBackendMessage(); ?>
 
-					jQuery('.tablenav-pages .disabled').bind('click', function() { return false; } );
-				
-				</script>
-				
-				<br class="clear">
-			</div>			
-		</div>
-		
-		<?php $this->callMod('wpsg_mod_export', 'produkt_index_foot'); ?>
-		
-	</form>
-	<?php } else { ?>
-	<br /><br />
-	<p><?php echo __('Keine Bestellungen in der Datenbank.', 'wpsg'); ?></p>
-	<?php } ?>
-	
-</div>
+	<div class="content">
+
+		<?php if (is_array($this->view['data']) && sizeof($this->view['data']) > 0) { ?>
+
+		<?php } else { ?>
+		<p><?php echo __('Keine Bestellungen in der Datenbank.', 'wpsg'); ?></p>
+		<?php } ?>
+
+	</div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+	var wpsg_order = '<?php echo wpsg_getStr($this->view['search']['order']); ?>';
+	var wpsg_ascdesc = '<?php echo wpsg_getStr($this->view['search']['ascdesc']); ?>';
+
+	function goPage(page)
+	{
+
+		if (page <= 0 || page == <?php echo $this->view['seite']; ?> || page > <?php echo wpsg_getStr($this->view['pages'], '0'); ?>) return;
+
+		jQuery('#wpsg_seite').val(page);
+		jQuery('#filter_form').submit();
+
+		return false;
+
+	} // function goPage(page)
+
+	function wpsg_setOrder(order)
+	{
+
+		if (order == wpsg_order)
+		{
+
+			// Nur Richtung Ã€ndern
+			if (wpsg_ascdesc == 'asc') jQuery('#wpsg_ascdesc').val('desc');
+			else jQuery('#wpsg_ascdesc').val('asc');
+
+		}
+		else
+		{
+
+			jQuery('#wpsg_order').val(order);
+			jQuery('#wpsg_ascdesc').val('asc');
+
+		}
+
+		jQuery('#seite').val(1);
+		jQuery('#filter_form').submit();
+
+		return false;
+
+	} // function wpsg_setOrder(order)
+
+/* <![CDATA[ */</script>
Index: /views/produkt/addedit.phtml
===================================================================
--- /views/produkt/addedit.phtml	(revision 5632)
+++ /views/produkt/addedit.phtml	(revision 5637)
@@ -45,5 +45,5 @@
 			<br />
 				
-			<?php if ($_REQUEST['edit_id'] > 0) { ?>
+			<?php if (wpsg_isSizedString($_REQUEST['edit_id'])) { ?>
 			<input type="hidden" name="edit_id" value="<?php echo $_REQUEST['edit_id']; ?>" />
 			<?php } ?>
Index: /views/produkt/index.phtml
===================================================================
--- /views/produkt/index.phtml	(revision 5632)
+++ /views/produkt/index.phtml	(revision 5637)
@@ -6,49 +6,4 @@
 
 ?>
-
-<script type="text/javascript">
-
-	var wpsg_order = '<?php echo $this->view['search']['order']; ?>';
-	var wpsg_ascdesc = '<?php echo $this->view['search']['ascdesc']; ?>';
-
-	function goPage(page)
-	{
-
-		if (page <= 0 || page == <?php echo $this->view['seite']; ?> || page > <?php echo $this->view['pages']; ?>) return;			
-		
-		jQuery('#wpsg_seite').val(page);
-		jQuery('#filter_form').submit();
-
-		return false;
-		
-	} // function goPage(page)
-
-	function wpsg_setOrder(order)
-	{
-
-		if (order == wpsg_order)
-		{
-
-			// Nur Richtung Ã€ndern
-			if (wpsg_ascdesc == 'asc') jQuery('#wpsg_ascdesc').val('desc');
-			else jQuery('#wpsg_ascdesc').val('asc');
-			
-		}
-		else
-		{
-
-			jQuery('#wpsg_order').val(order);
-			jQuery('#wpsg_ascdesc').val('asc');
-			
-		}
-
-		jQuery('#seite').val(1);
-		jQuery('#filter_form').submit();
-		
-		return false;
-		
-	} // function wpsg_setOrder(order)
-	
-</script>
 
 <div class="wpsg_products" id="wpsg-bs">
@@ -62,5 +17,5 @@
 				<ul class="nav navbar-nav">
 					<li role="presentation" class="<?php echo ((!isset($_REQUEST['action']))?'active':''); ?>"><a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt"><?php echo __("ProduktÃŒbersicht", "wpsg"); ?></a></li>
-					<li role="presentation" class="wpsg_showhide_filter <?php echo (($this->view['hasFilter'] === true)?'active':''); ?>"><a href="#" onclick="return false;"><span class="glyphicon glyphicon-search"></span><?php echo __("Produktsuche", "wpsg"); ?></a></li>
+					<li role="presentation" class="wpsg_showhide_filter <?php echo (($this->view['hasFilter'] === 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>
 				</ul>
@@ -290,2 +245,47 @@
 	
 </div>
+
+<script type="text/javascript">/* <![CDATA[ */
+
+	var wpsg_order = '<?php echo $this->view['search']['order']; ?>';
+	var wpsg_ascdesc = '<?php echo $this->view['search']['ascdesc']; ?>';
+
+	function goPage(page)
+	{
+
+		if (page <= 0 || page == <?php echo $this->view['seite']; ?> || page > <?php echo $this->view['pages']; ?>) return;
+
+		jQuery('#wpsg_seite').val(page);
+		jQuery('#filter_form').submit();
+
+		return false;
+
+	} // function goPage(page)
+
+	function wpsg_setOrder(order)
+	{
+
+		if (order == wpsg_order)
+		{
+
+			// Nur Richtung Ã€ndern
+			if (wpsg_ascdesc == 'asc') jQuery('#wpsg_ascdesc').val('desc');
+			else jQuery('#wpsg_ascdesc').val('asc');
+
+		}
+		else
+		{
+
+			jQuery('#wpsg_order').val(order);
+			jQuery('#wpsg_ascdesc').val('asc');
+
+		}
+
+		jQuery('#seite').val(1);
+		jQuery('#filter_form').submit();
+
+		return false;
+
+	} // function wpsg_setOrder(order)
+
+/* ]]> */</script>
