Index: /changelog
===================================================================
--- /changelog	(revision 7808)
+++ /changelog	(revision 7809)
@@ -415,2 +415,5 @@
 #4.2.9
 - Bugfix: Fehlermeldung bei Installation ohne Newsletter korrigiert
+
+#4.2.10
+- Bugfix: Benutzerwechsel ÃŒber das Backend funktioniert wieder
Index: /controller/wpsg_OrderController.class.php
===================================================================
--- /controller/wpsg_OrderController.class.php	(revision 7808)
+++ /controller/wpsg_OrderController.class.php	(revision 7809)
@@ -1473,5 +1473,5 @@
 
 			$this->shop->addBackendMessage(__('Bestellung erfolgreich gelÃ¶scht.', 'wpsg'));
-			$this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order');
+            $this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Order');
 
 		} // public function deleteAction()
Index: /model/wpsg_order.class.php
===================================================================
--- /model/wpsg_order.class.php	(revision 7808)
+++ /model/wpsg_order.class.php	(revision 7809)
@@ -1041,5 +1041,5 @@
 			
 			// Module aufrufen, damit sie die AbhÃ€ngigkeiten lÃ¶schen kÃ¶nnen
-			$this->shop->callMods('delOrder', array(&$this->id));
+			$this->shop->callMods('delOrder', array($this->getId()));
 			 			
 			// Bestelldaten aus der Bestelltabelle lÃ¶schen
Index: /mods/mod_abo/wpsg_abo.php
===================================================================
--- /mods/mod_abo/wpsg_abo.php	(revision 7808)
+++ /mods/mod_abo/wpsg_abo.php	(revision 7809)
@@ -86,4 +86,22 @@
             
             return wpsg_order::getInstance(intval($this->data['order_id']));
+            
+        }
+        
+        public function getOrderProduct() {
+            
+            $order_product_id = intval($this->__get('order_product_id'));
+            
+            if ($order_product_id <= 0) return false;
+            
+            try {
+            
+                return wpsg_order_product::getInstance(intval($this->__get('order_product_id')));
+                
+            } catch (\Exception $e) {
+                
+                return false;
+                
+            }
             
         }
Index: /mods/wpsg_mod_abo.class.php
===================================================================
--- /mods/wpsg_mod_abo.class.php	(revision 7808)
+++ /mods/wpsg_mod_abo.class.php	(revision 7809)
@@ -50,13 +50,13 @@
         } // public function admin_setcapabilities()
          
-		public function install()
-		{
+		public function install() {
 
 			require_once(WPSG_PATH_WP.'/wp-admin/includes/upgrade.php');
 			
 			// Grundeinstellung Pro Seite
-			if ($this->shop->get_option('wpsg_mod_abo_perpage') === false || $this->shop->get_option('wpsg_mod_abo_perpage') == '')
-			{
+			if ($this->shop->get_option('wpsg_mod_abo_perpage') === false || $this->shop->get_option('wpsg_mod_abo_perpage') == '') {
+			    
 				$this->shop->update_option('wpsg_mod_abo_perpage', '20');
+				
 			}
 
@@ -81,4 +81,5 @@
 	  			cdate datetime NOT NULL,
 				order_id int(11) NOT NULL,
+				order_product_id int(11) NOT NULL,
 				product_key varchar(255) NOT NULL,
 				expiration DATETIME NOT NULL,
@@ -90,5 +91,6 @@
 				PRIMARY KEY  (id),
 	  			KEY order_id (order_id),
-				KEY product_key (product_key)
+				KEY product_key (product_key),
+				KEY order_product_id (order_product_id)
 			) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;";
 
@@ -115,10 +117,10 @@
 		} // public function install()
 
-        public function delOrder(&$order_id) {
+        public function delOrder($order_id) {
 
             // Alle Abo-Produkte zu dieser Bestellung in der Tabelle WP_WPSG_ABO lÃ¶schen
-            $this->db->Query("DELETE FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($this->id)."' ");
-            
-        } // public function delOrder(&$order_id)
+            $this->db->Query("DELETE FROM `".WPSG_TBL_ABO."` WHERE `order_id` = '".wpsg_q($order_id)."' ");
+            
+        } // public function delOrder($order_id)
          
 		/**
@@ -196,4 +198,15 @@
 		public function dispatch() {
 			
+		    if (wpsg_isSizedString($_REQUEST['action'], 'delete')) {
+		        
+		        $abo_id = intval($_REQUEST['abo_id']);
+
+                $this->db->Query("DELETE FROM `".WPSG_TBL_ABO."` WHERE `id` = '".wpsg_q($abo_id)."' ");
+
+                $this->shop->addBackendMessage(__('Abo erfolgreich gelÃ¶scht.', 'wpsg'));
+                $this->shop->redirect(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Abo');
+                
+            }
+		    
 			$this->be_indexAction();
 			
@@ -330,20 +343,16 @@
 		}	// public function setAboStatus($order_id, $status_id, $inform)
 		
-		public function setOrderStatus($order_id, $status_id, $inform)
-		{
-
-			if ($status_id == 100)
-			{
+		public function setOrderStatus($order_id, $status_id, $inform) {
+
+			if ($status_id == 100) {
 
 				// Sind in der Bestellung Abo Produkte?
 				$arBasket = $this->shop->cache->loadBasketArray($order_id);
 
-				foreach ($arBasket['produkte'] as $product)
-				{
+				foreach ($arBasket['produkte'] as $product) {
 
 					$product_data = $this->shop->cache->loadProduct($this->shop->getProduktID($product['productkey']));
 
-					if (substr($product['productkey'], 0, 3) == 'abo')
-					{
+					if (substr($product['productkey'], 0, 3) == 'abo') {
 
 						// BestellID der OriginalBestellung
@@ -356,13 +365,10 @@
 						if ($product_data['wpsg_mod_abo_resell'] != 0 && $abo_entry['rebuy'] + $product['menge'] > $product_data['wpsg_mod_abo_resell']) throw new \wpsg\Exception('Es wurde eine Bestellung auf Zahlung aktzeptiert gesetzt, das Abo konnte aber nicht verlÃ€ngert werden da es die gÃŒltige Anzahl im Produkt ÃŒberschreibt', __('wpsg'));
 
-						if (strtotime($abo_entry['expiration']) < time())
-						{
+						if (strtotime($abo_entry['expiration']) < time()) {
 
 							// Das Abo ist ausgelaufen
 							$abo_expiration = $this->getAboExpiration($product_data['id'], $product['menge'], time());
 
-						}
-						else
-						{
+						} else {
 
 							// Abo wurde verlÃ€ngert und der Zeitraum wird an die alte VerlÃ€ngerung angehÃ€ngt
@@ -390,6 +396,5 @@
 						}
 
-						if ($inform == true)
-						{
+						if ($inform == true) {
 
 							// Mail bei Erstkauf
@@ -398,10 +403,7 @@
 						}
 
-					}
-					else
-					{
-
-						if ($product_data['wpsg_mod_abo_activ'] == '1')
-						{
+					} else {
+
+						if ($product_data['wpsg_mod_abo_activ'] == '1') {
 
 							// Existiert ein Eintrag in der Abotabelle schon, so wird dieser gelÃ¶scht
@@ -416,4 +418,5 @@
 								'order_id' => wpsg_q($order_id),
 								'product_key' => wpsg_q($product['productkey']),
+								'order_product_id' => wpsg_q($product['order_product_id']),
 								'rebuy' => '0',
 								'expiration' => wpsg_q($abo_expiration),
Index: /mods/wpsg_mod_basic.class.php
===================================================================
--- /mods/wpsg_mod_basic.class.php	(revision 7808)
+++ /mods/wpsg_mod_basic.class.php	(revision 7809)
@@ -1218,5 +1218,5 @@
  		 * Wird beim lÃ¶schen einer Bestellung aufgerufen
  		 */
- 		public function delOrder(&$order_id) { } // public function delOrder(&$order_id)
+ 		public function delOrder($order_id) { } // public function delOrder($order_id)
 
 		public function systemcheck(&$arData) { } // public function systemcheck($arData)
Index: /mods/wpsg_mod_coverletter.class.php
===================================================================
--- /mods/wpsg_mod_coverletter.class.php	(revision 7808)
+++ /mods/wpsg_mod_coverletter.class.php	(revision 7809)
@@ -337,5 +337,5 @@
 		} // public function order_ajax()
 		
-		public function delOrder(&$order_id) {
+		public function delOrder($order_id) {
 				
 			// Anschreibene in der Datenbank lÃ¶schen
@@ -345,5 +345,5 @@
 			$path = $this->getFilePath($order_id); wpsg_rrmdir($path);
 				
-		} // public function delOrder(&$order_id)
+		} // public function delOrder($order_id)
 					
 		public function be_ajax() {
Index: /mods/wpsg_mod_deliverynote.class.php
===================================================================
--- /mods/wpsg_mod_deliverynote.class.php	(revision 7808)
+++ /mods/wpsg_mod_deliverynote.class.php	(revision 7809)
@@ -402,5 +402,5 @@
 		} // public function order_view_row(&$p, $i)
 		
-		public function delOrder(&$order_id)
+		public function delOrder($order_id)
 		{
 				
@@ -411,5 +411,5 @@
 			$path = $this->getFilePath($order_id); wpsg_rrmdir($path);
 				
-		} // public function delOrder(&$order_id)
+		} // public function delOrder($order_id)
 		
 		public function order_view($order_id, &$arSidebarArray)
Index: /mods/wpsg_mod_downloadplus.class.php
===================================================================
--- /mods/wpsg_mod_downloadplus.class.php	(revision 7808)
+++ /mods/wpsg_mod_downloadplus.class.php	(revision 7809)
@@ -92,5 +92,5 @@
     } // public function install()
 
-    public function delOrder(&$order_id)
+    public function delOrder($order_id)
     {
 
@@ -100,5 +100,5 @@
         $path = $this->getPDFIndivPath($order_id); wpsg_rrmdir($path);
 
-    } // public function delOrder(&$order_id)
+    } // public function delOrder($order_id)
 
     public function wpsg_enqueue_scripts()
Index: /mods/wpsg_mod_kundenverwaltung.class.php
===================================================================
--- /mods/wpsg_mod_kundenverwaltung.class.php	(revision 7808)
+++ /mods/wpsg_mod_kundenverwaltung.class.php	(revision 7809)
@@ -126,5 +126,7 @@
                 
             } else if ($_REQUEST['be_ajax'] === 'su_index' && is_admin()) {
-	
+
+                $this->shop->send_headers();
+			    
 				wpsg_checkNounce('Admin', 'module', ['modul' => 'wpsg_mod_kundenverwaltung', 'be_ajax' => 'su_index', 'k_id' => $_REQUEST['k_id']]);
 				
Index: /mods/wpsg_mod_orderupload.class.php
===================================================================
--- /mods/wpsg_mod_orderupload.class.php	(revision 7808)
+++ /mods/wpsg_mod_orderupload.class.php	(revision 7809)
@@ -306,5 +306,5 @@
 		} // public function order_view_sidebar(&$order_id)
 		
-		public function delOrder(&$order_id) 
+		public function delOrder($order_id) 
 		{ 
 			 
@@ -314,5 +314,5 @@
 			wpsg_rrmdir($path);
 			            
-		} // public function delOrder(&$order_id)
+		} // public function delOrder($order_id)
 
         public function product_addedit_content(&$product_content, &$product_data) {
Index: /mods/wpsg_mod_rechnungen.class.php
===================================================================
--- /mods/wpsg_mod_rechnungen.class.php	(revision 7808)
+++ /mods/wpsg_mod_rechnungen.class.php	(revision 7809)
@@ -78,5 +78,5 @@
 		} // public function install()
 		
-		public function delOrder(&$order_id) 
+		public function delOrder($order_id) 
 		{ 
 			
@@ -87,5 +87,5 @@
 			$path = $this->getFilePath($order_id); wpsg_rrmdir($path);
 			
-		} // public function delOrder(&$order_id)
+		} // public function delOrder($order_id)
 		
 		public function template_redirect() 
Index: /system/intern/mods/wpsg_mod_cab.class.php
===================================================================
--- /system/intern/mods/wpsg_mod_cab.class.php	(revision 7808)
+++ /system/intern/mods/wpsg_mod_cab.class.php	(revision 7809)
@@ -87,5 +87,5 @@
 		} // public function install()
 		
-		public function delOrder(&$order_id) { } // public function delOrder(&$order_id)
+		public function delOrder($order_id) { } // public function delOrder($order_id)
 		
 		public function settings_edit()
Index: /system/intern/mods/wpsg_mod_orderupload.class.php
===================================================================
--- /system/intern/mods/wpsg_mod_orderupload.class.php	(revision 7808)
+++ /system/intern/mods/wpsg_mod_orderupload.class.php	(revision 7809)
@@ -218,5 +218,5 @@
 		} // public function order_view_sidebar(&$order_id)
 		
-		public function delOrder(&$order_id) 
+		public function delOrder($order_id) 
 		{ 
 			 
@@ -226,5 +226,5 @@
 			wpsg_rrmdir($path);
 			
-		} // public function delOrder(&$order_id)
+		} // public function delOrder($order_id)
 		
 		/* -- */
Index: /system/intern/mods/wpsg_mod_videodownload.class.php
===================================================================
--- /system/intern/mods/wpsg_mod_videodownload.class.php	(revision 7808)
+++ /system/intern/mods/wpsg_mod_videodownload.class.php	(revision 7809)
@@ -62,5 +62,5 @@
 		} // public function install()
 		
-		public function delOrder(&$order_id) 
+		public function delOrder($order_id) 
 		{ 
 			
@@ -69,5 +69,5 @@
 			$path = $this->getVideoIndivPath($order_id); wpsg_rrmdir($order_id);
 			
-		} // public function delOrder(&$order_id)
+		} // public function delOrder($order_id)
 		
 		function wpsg_enqueue_scripts()
Index: /views/mods/mod_abo/index.phtml
===================================================================
--- /views/mods/mod_abo/index.phtml	(revision 7808)
+++ /views/mods/mod_abo/index.phtml	(revision 7809)
@@ -1,7 +1,8 @@
 <?php
 
-/**
- * Template fÃŒr die Ãbersicht der Abonnements
-*/
+	/**
+	 * Template fÃŒr die Ãbersicht der Abonnements
+	*/
+	
 ?>
 
@@ -134,5 +135,10 @@
                 </thead>
                 <tbody>
-                    <?php foreach ($this->view['arData'] as $oAbo) { $oOrder = $oAbo->getOrder(); ?>
+                    <?php foreach ($this->view['arData'] as $oAbo) { 
+                    	
+                    	$oOrder = $oAbo->getOrder(); 
+                    	$oOrderProduct = $oAbo->getOrderProduct();	
+                    	
+					?>
                     <tr>
                         <td class="col_checkbox">
@@ -155,5 +161,5 @@
                                 <span class="delete"><a onclick="return confirm('<?php echo __('Sind Sie sich sicher, dass Sie dieses Abonnement lÃ¶schen mÃ¶chten?', 'wpsg'); ?>');" title="<?php echo __('Dieses Abonnement lÃ¶schen', 'wpsg'); ?>" href="<?php 
 									
-									echo wpsg_admin_url('Order', 'delete', ['edit_id' => $oOrder->id], ['abo' => '1', 'noheader' => '1']);	
+									echo wpsg_admin_url('Abo', 'delete', ['abo_id' => $oAbo->id], ['noheader' => '1']);	
 																			
 								?>"><?php echo __('LÃ¶schen', 'wpsg'); ?></a></span>
@@ -214,17 +220,19 @@
                         <td class="col_products">
 
-                            <?php $oOrderProducts = $oOrder->getOrderProducts(); ?>
+							<?php if ($oOrderProduct === false) { ?>
+
+                                <?php echo __('Produkt nicht gefunden.', 'wpsg'); ?>
+								
+							<?php } else { ?>
+								
+								<?php echo wpsg_translate(__('#1# x <a href="#2#">#3#</a> fÃŒr je #4#', 'wpsg'),
+									$oOrderProduct->getCount(),
+									wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$oOrderProduct->getProductId(), 'wpsg-product-edit-'.$oOrderProduct->getProductId()),
+									$oOrderProduct->getProductName(),
+									wpsg_ff($oOrderProduct->getOneAmount(), $this->get_option('wpsg_currency'))
+								); ?>
+							
+							<?php } ?>
                             
-                            <?php foreach ($oOrderProducts as $oOrderProduct) { ?>
-                            
-                                <?php echo wpsg_translate(__('#1# x <a href="#2#">#3#</a> fÃŒr je #4#', 'wpsg'),
-                                    $oOrderProduct->getCount(),
-									wp_nonce_url(WPSG_URL_WP.'wp-admin/admin.php?page=wpsg-Produkt&action=edit&edit_id='.$oOrderProduct->getProductId(), 'wpsg-product-edit-'.$oOrderProduct->getProductId()),
-                                    $oOrderProduct->getProductName(),
-                                    wpsg_ff($oOrderProduct->getOneAmount(), $this->get_option('wpsg_currency'))
-                                ); ?>
-                            
-                            <?php } ?>
-
                         </td>
                         <td class="col_sum">
@@ -234,21 +242,30 @@
                         <?php /* Laufzeitspalte */ ?>
                         <td class="col_time">
-                            <?php if (in_array(strval($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id))), array(1))) { ?>
-
-                            	<?php $abo_expiration = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getProductKey()))); ?>
-
-                              <?php if ($abo_expiration > time()) { ?>
-                              	
-                              	<span class="wpsg_mod_abo_future_expire"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>
-                              
-                              <?php } else { ?>
-                              
-                              	<span class="wpsg_mod_abo_expired"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>
-                                
-                              <?php } ?>
-
-                              <br />
-                                        
-                            <?php } ?>
+
+                            <?php if ($oOrderProduct === false) { ?>
+
+                                <?php echo __('Produkt nicht gefunden.', 'wpsg'); ?>
+								
+							<?php } else { ?>
+							
+								<?php if (in_array(strval($this->callMod('wpsg_mod_abo', 'isAboOrder', array($oOrder->id))), array(1))) { ?>
+	
+									<?php $abo_expiration = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', array($oOrder->id, $oOrderProduct->getProductKey()))); ?>
+	
+									<?php if ($abo_expiration > time()) { ?>
+									
+										<span class="wpsg_mod_abo_future_expire"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>
+								  
+									<?php } else { ?>
+								  
+										<span class="wpsg_mod_abo_expired"><?php echo wpsg_formatTimestamp($abo_expiration); ?></span>
+									
+									<?php } ?>
+	
+									<br />
+											
+								<?php } ?>
+							
+							<?php } ?>
                             
                        </td>
Index: /views/mods/mod_abo/order_view.phtml
===================================================================
--- /views/mods/mod_abo/order_view.phtml	(revision 7808)
+++ /views/mods/mod_abo/order_view.phtml	(revision 7809)
@@ -11,85 +11,97 @@
 <?php foreach ($this->view['arOrderedAboProducts'] as $oOrderProduct) {
 
-    $oAbo = wpsg_abo::getFromOrderAndProduct($view['oOrder']->getId(), $oOrderProduct->getId());
+	try {
+    
+		$oAbo = wpsg_abo::getFromOrderAndProduct($view['oOrder']->getId(), $oOrderProduct->getId());
+		
+		?>
 	
-	?>
+		<?php echo wpsg_drawForm_AdminboxStart($oOrderProduct->getProduct()->getProductName()); ?>
+	
+			<?php $tExpire = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey()))); ?>
+			<?php echo wpsg_drawForm_Text(__('Laufzeit', 'wpsg'), wpsg_formatTimestamp($tExpire), 'wpsg_mod_abo_duration', Array('class_content_wrap' => 'wpsg_abo_state wpsg_abo_state_class_'.$oAbo->getState())); ?>
+		
+			<script>
+	
+				moment.locale('de');
+				
+				jQuery('#wpsg_mod_abo_duration').editable({
+					type: 'combodate',
+					display: function(value) {
+						
+						jQuery(this).html(value.format('DD.MM.YYYY HH:mm:ss'));
+						
+					},
+					success: function(response, newValue) {
+						
+						jQuery.ajax({
+							url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_abo&subaction=admin_inlineEdit&noheader=1',
+							data: {
+								field: 'duration',
+								product_key: '<?php echo $oOrderProduct->getProductKey(); ?>',
+								order_id: '<?php echo $view['oOrder']->getId() ?>',
+								date: newValue.format()
+							},
+							success: function(response) {
+	 
+								jQuery('.wpsg_abo_state').attr("class", "col-sm-6 wpsg_abo_state_class_" + response.state)
+															
+							}
+						})
+						
+					},
+					format: 'DD.MM.YYYY HH:mm:ss',
+					viewformat: 'DD.MM.YYYY HH:mm:ss',
+					template: 'D MMM YYYY  HH:mm:ss',
+					combodate: {
+						minYear: 2000,
+						maxYear: <?php echo (intval(date('Y')) + 1); ?>,
+						minuteStep: 1
+					}
+				}); 
+				
+			</script>
+	
+			<?php echo wpsg_drawForm_Text(wpsg_translate(__('Preis (#1# Tage):', 'wpsg'), $oOrderProduct->getProduct()->wpsg_mod_abo_durration), wpsg_ff($oOrderProduct->getProduct()->wpsg_mod_abo_price, $this->get_option('wpsg_currency'))); ?>
+			<?php
+		
+				$strURL = $this->callMod('wpsg_mod_abo', 'getRebuyLink', [$view['oOrder']->getId(), $oOrderProduct->getProductKey()]);
+				$strURL = '<a href="'.$strURL.'">'.$strURL.'</a>';
+		
+				echo wpsg_drawForm_Text(__('URL fÃŒr den Kauf einer VerlÃ€ngerung', 'wpsg'), $strURL); 
+				
+			?>
+		
+			<?php echo wpsg_drawForm_TextStart(); ?>
+			
+				<?php $abo_product_status = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey())); ?>
+		
+				<?php if ($abo_product_status['status'] === wpsg_mod_abo::STATUS_ACTIVE) { ?>
+			
+					<?php echo __('Aktiv', 'wpsg'); ?>
+			
+					&nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=stop&noheader=1"><?php echo __('Deaktivieren'); ?></a>&nbsp;]
+			
+				<?php } else if ($abo_product_status['status'] === wpsg_mod_abo::STATUS_STOPPED) { ?>
+			
+					<?php echo __('Inaktiv', 'wpsg'); ?>
+	
+					&nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=run&noheader=1"><?php echo __('Aktivieren'); ?></a>&nbsp;]
+			
+				<?php } ?>
+		
+			<?php echo wpsg_drawForm_TextEnd(__('VerlÃ€ngerung')); ?>
+			  
+		<?php echo wpsg_drawForm_AdminboxEnd(); ?>
+		
+	<?php } catch (\Exception $e) { ?>
 
-    <?php echo wpsg_drawForm_AdminboxStart($oOrderProduct->getProduct()->getProductName()); ?>
-
-        <?php $tExpire = strtotime($this->callMod('wpsg_mod_abo', 'getOrderAboExpiration', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey()))); ?>
-		<?php echo wpsg_drawForm_Text(__('Laufzeit', 'wpsg'), wpsg_formatTimestamp($tExpire), 'wpsg_mod_abo_duration', Array('class_content_wrap' => 'wpsg_abo_state wpsg_abo_state_class_'.$oAbo->getState())); ?>
-	
-		<script>
-
-            moment.locale('de');
-			
-            jQuery('#wpsg_mod_abo_duration').editable({
-				type: 'combodate',
-                display: function(value) {
-				    
-                    jQuery(this).html(value.format('DD.MM.YYYY HH:mm:ss'));
-				    
-				},
-                success: function(response, newValue) {
-				    
-					jQuery.ajax({
-                        url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_abo&subaction=admin_inlineEdit&noheader=1',
-						data: {
-                            field: 'duration',
-							product_key: '<?php echo $oOrderProduct->getProductKey(); ?>',
-							order_id: '<?php echo $view['oOrder']->getId() ?>',
-							date: newValue.format()
-                        },
-						success: function(response) {
- 
-                            jQuery('.wpsg_abo_state').attr("class", "col-sm-6 wpsg_abo_state_class_" + response.state)
-                                                        
-						}
-					})
-				    
-                },
-                format: 'DD.MM.YYYY HH:mm:ss',
-                viewformat: 'DD.MM.YYYY HH:mm:ss',
-                template: 'D MMM YYYY  HH:mm:ss',
-                combodate: {
-                    minYear: 2000,
-                    maxYear: <?php echo (intval(date('Y')) + 1); ?>,
-                    minuteStep: 1
-                }
-            }); 
-			
-		</script>
-
-        <?php echo wpsg_drawForm_Text(wpsg_translate(__('Preis (#1# Tage):', 'wpsg'), $oOrderProduct->getProduct()->wpsg_mod_abo_durration), wpsg_ff($oOrderProduct->getProduct()->wpsg_mod_abo_price, $this->get_option('wpsg_currency'))); ?>
-		<?php
-	
-			$strURL = $this->callMod('wpsg_mod_abo', 'getRebuyLink', [$view['oOrder']->getId(), $oOrderProduct->getProductKey()]);
-			$strURL = '<a href="'.$strURL.'">'.$strURL.'</a>';
-	
-			echo wpsg_drawForm_Text(__('URL fÃŒr den Kauf einer VerlÃ€ngerung', 'wpsg'), $strURL); 
-			
-		?>
-    
-        <?php echo wpsg_drawForm_TextStart(); ?>
-        
-            <?php $abo_product_status = $this->callMod('wpsg_mod_abo', 'getAboProductStatus', Array($_REQUEST['edit_id'], $oOrderProduct->getProductKey())); ?>
-    
-            <?php if ($abo_product_status['status'] === wpsg_mod_abo::STATUS_ACTIVE) { ?>
-        
-                <?php echo __('Aktiv', 'wpsg'); ?>
-        
-                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=stop&noheader=1"><?php echo __('Deaktivieren'); ?></a>&nbsp;]
-        
-            <?php } else if ($abo_product_status['status'] === wpsg_mod_abo::STATUS_STOPPED) { ?>
-        
-                <?php echo __('Inaktiv', 'wpsg'); ?>
-
-                &nbsp;[&nbsp;<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=ajax&mod=wpsg_mod_abo&edit_id=<?php echo $_REQUEST['edit_id'] ?>&product_key=<?php echo $oOrderProduct->getProductKey(); ?>&do=run&noheader=1"><?php echo __('Aktivieren'); ?></a>&nbsp;]
-        
-            <?php } ?>
-    
-        <?php echo wpsg_drawForm_TextEnd(__('VerlÃ€ngerung')); ?>
-          
-    <?php echo wpsg_drawForm_AdminboxEnd(); ?>
+        <?php echo wpsg_drawForm_AdminboxStart($oOrderProduct->getProduct()->getProductName()); ?>
+		
+			<p><?php echo __('Abo wurde gelÃ¶scht.', 'wpsg'); ?></p>
+		
+		<?php echo wpsg_drawForm_AdminboxEnd(); ?>
+		
+	<?php } ?>
     
 <?php } ?>
