Index: /changelog
===================================================================
--- /changelog	(revision 5448)
+++ /changelog	(revision 5449)
@@ -827,2 +827,4 @@
 #4.0.0 / 5259
  - Feature - Produktbilder - Mehrfacher Upload mÃ¶glich
+ - Feature - Produktbilder - Bilder unter /wpsg verschoben (!)
+ - Feature - Produktbilder - Einzelnes lÃ¶schen des Bildercaches fÃŒr ein Produkt
Index: /controller/wpsg_ShopController.class.php
===================================================================
--- /controller/wpsg_ShopController.class.php	(revision 5448)
+++ /controller/wpsg_ShopController.class.php	(revision 5449)
@@ -622,5 +622,5 @@
 			wp_enqueue_script('jquery');
 										
-			if (is_admin() && preg_match('/wpsg/', $_REQUEST['page']))
+			if (is_admin() && preg_match('/wpsg/', wpsg_getStr($_REQUEST['page'])))
 			{
 				
Index: /lib/helper_functions.inc.php
===================================================================
--- /lib/helper_functions.inc.php	(revision 5448)
+++ /lib/helper_functions.inc.php	(revision 5449)
@@ -583,4 +583,25 @@
 	} // function wpsg_drawForm_Checkbox($field_name, $field_label, $conf = array())
 
+	function wpsg_drawForm_AdminboxStart()
+	{
+		
+		ob_start();
+		
+	}
+	
+	function wpsg_drawForm_AdminboxEnd($title)
+	{
+		
+		$TC = new wpsg_ShopController();
+		
+		$TC->view['title'] = $title;
+		$TC->view['content'] = ob_get_contents();
+		
+		ob_end_clean();
+		
+		return $TC->render(WPSG_PATH_VIEW.'admin/form/adminbox.phtml', false);
+		
+	}
+	
 	function wpsg_drawForm_TextStart() 
 	{
Index: /mods/wpsg_mod_produktbilder.class.php
===================================================================
--- /mods/wpsg_mod_produktbilder.class.php	(revision 5448)
+++ /mods/wpsg_mod_produktbilder.class.php	(revision 5449)
@@ -103,22 +103,32 @@
 		} // public function admin_presentation_submit()
 		 
-		public function picClearCash()
+		public function picClearCash($product_id = false)
 		{	
-			
-			$handle = opendir($this->getPicPath(''));
-   
-			$strContent = "";
-			$arFiles = array();
-			while (false !== ($filename = readdir($handle))) 
-	   		{
-	   				
-	   			if (is_dir($this->getPicPath('').$filename) && $filename != "." && $filename != ".." && $filename != '')
-	   			{
-	   				
-	   				if (file_exists($this->getPicPath('').$filename.'/tn/')) wpsg_rrmdir($this->getPicPath('').$filename."/tn/");
-	   				
-	   			}
-	   				   				   				   				   				
-	   		}
+			 
+			if (wpsg_isSizedInt($product_id))
+			{
+				
+				if (file_exists($this->getPicPath('').$product_id.'/tn/')) wpsg_rrmdir($this->getPicPath('').$product_id."/tn/");
+				
+			}
+			else
+			{
+			
+				$handle = opendir($this->getPicPath(''));
+				
+				$arFiles = array();
+				while (false !== ($filename = readdir($handle))) 
+		   		{
+		   				
+		   			if (is_dir($this->getPicPath('').$filename) && $filename != "." && $filename != ".." && $filename != '')
+		   			{
+		   				
+		   				if (file_exists($this->getPicPath('').$filename.'/tn/')) wpsg_rrmdir($this->getPicPath('').$filename."/tn/");
+		   				
+		   			}
+		   			
+		   		}
+		   		
+			}
 
 		} // public function picClearCash()
@@ -127,5 +137,13 @@
 		{
 			
-			if ($_REQUEST['cmd'] == 'upload')
+			if (wpsg_isSizedString($_REQUEST['cmd'], 'clearProductCache'))
+			{
+				
+				$this->picClearCash($_REQUEST['edit_id']);
+				
+				die(__('Bildercache erfolgreich gelÃ¶scht.', 'wpsg'));
+				
+			}
+			else if ($_REQUEST['cmd'] == 'upload')
 			{
  
@@ -394,33 +412,14 @@
  		{
  		 	 			
- 			if ($this->shop->isMultiBlog())
-			{
- 
-				if ($url) $path = WPSG_URL_CONTENT.WPSG_MB_UPLOADS.'/wpsg/wpsg_produktbilder/'.$produkt_id.'/';
-				else 
-				{
-					
-					$path = WP_CONTENT_DIR.'/'.WPSG_MB_UPLOADS.'/wpsg/wpsg_produktbilder/'.$produkt_id.'/'; 
-					
-					if (!file_exists($path)) mkdir($path, 0777, true);
-					 
-				}
+ 			if ($url) $path = WPSG_URL_UPLOADS.'wpsg_produktbilder/'.$produkt_id.'/';
+			else 
+			{
+				
+				$path = WPSG_PATH_UPLOADS.'wpsg_produktbilder/'.$produkt_id.'/'; 
+				
+				if (!file_exists($path)) mkdir($path, 0777, true);
 				 
 			}
-			else
-			{
-				
-				if ($url) $path = WPSG_URL_CONTENT.'uploads/wpsg_produktbilder/'.$produkt_id.'/';
-				else 
-				{
-					
-					$path = WP_CONTENT_DIR.'/uploads/wpsg_produktbilder/'.$produkt_id.'/';
-					
-					if (!file_exists($path)) mkdir($path, 0777, true);
-					 
-				}
-				
-			}
-			
+			 			
 			if ($url === true) return $path;
 			else return wpsg_format_path($path);
Index: /views/admin/form/adminbox.phtml
===================================================================
--- /views/admin/form/adminbox.phtml	(revision 5449)
+++ /views/admin/form/adminbox.phtml	(revision 5449)
@@ -0,0 +1,6 @@
+<div class="panel panel-default">
+	<div class="panel-heading clearfix">
+		<h3 class="panel-title"><?php $this->view['title']; ?></h3>
+	</div>
+	<div class="panel-body"><?php echo $this->view['content']; ?></div>
+</div>
Index: /views/css/admin.css
===================================================================
--- /views/css/admin.css	(revision 5448)
+++ /views/css/admin.css	(revision 5449)
@@ -81,5 +81,5 @@
 /* Produktverwaltung */
 .wpsg_pic_col { width:50px; }
-.wpsg_admin_submenu input { width:100%; margin-bottom:10px !important; }
+.wpsg_admin_submenu input[type="submit"], .wpsg_admin_submenu input[type="button"] { width:100%; margin-bottom:10px !important; }
 
 /* Modulverwaltung */
Index: /views/mods/mod_produktbilder/produkt_addedit_content.phtml
===================================================================
--- /views/mods/mod_produktbilder/produkt_addedit_content.phtml	(revision 5448)
+++ /views/mods/mod_produktbilder/produkt_addedit_content.phtml	(revision 5449)
@@ -91,4 +91,20 @@
 
 				/**
+				 * LÃ¶scht den Bildercache dieses Produktes
+				 */
+				function wpsg_clearImageCache()
+				{
+
+					jQuery.ajax( {
+						url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_produktbilder&cmd=clearProductCache&noheader=1&edit_id=<?php echo $this->view['data']['id']; ?>',
+						async: true,						
+						success: function(data) { alert(data); }
+					} );
+					
+					return false;
+
+				} // function wpsg_clearImageCache()					
+            
+				/**
 				 * Wird beim lÃ¶schen eines Bilds (anklicken) aufgerufen
 				 */
@@ -127,6 +143,8 @@
 		<br /><br />
 	
-		<a href="#" data-toggle="modal" data-target="#wpsg_mod_produktbilder_ftppath"><span class="wpsg-glyphicon glyphicon glyphicon-folder-open"></span><?php echo __('FTP Pfad anzeigen', 'wpsg'); ?></a>	
-				
+		<a href="#" data-toggle="modal" data-target="#wpsg_mod_produktbilder_ftppath"><span class="wpsg-glyphicon glyphicon glyphicon-folder-open"></span><?php echo __('FTP Pfad anzeigen', 'wpsg'); ?></a><br />
+		<a href="#" onclick="return wpsg_clearImageCache();"><span class="wpsg-glyphicon glyphicon glyphicon-trash"></span><?php echo __('Bildercache dieses Produktes lÃ¶schen', 'wpsg'); ?></a><br />	
+		<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_produktbilder"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration der Produktbilder', 'wpsg'); ?></a>
+						
 	</div>
 </div>
Index: /views/mods/mod_produktbilder/settings_edit.phtml
===================================================================
--- /views/mods/mod_produktbilder/settings_edit.phtml	(revision 5448)
+++ /views/mods/mod_produktbilder/settings_edit.phtml	(revision 5449)
@@ -11,3 +11,3 @@
 <?php echo wpsg_drawForm_Input('wpsg_mod_produktbilder_quality', __('BildqualitÃ€t (PNG/JPG)', 'wpsg'), $this->get_option('wpsg_mod_produktbilder_quality'), array('help' => 'wpsg_mod_produktbilder_quality','hint' => __('0 = Schlechte QualitÃ€t, 100 = Gute QualitÃ€t', 'wpsg'))); ?>
 
-<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_produktbilder&wpsg_mod_produktbilder_clearcache=1&noheader=1"><?php echo __('Bildercache lÃ¶schen', 'wpsg'); ?></a>
+<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_produktbilder&wpsg_mod_produktbilder_clearcache=1&noheader=1"><span class="wpsg-glyphicon glyphicon glyphicon-trash"></span><?php echo __('Bildercache lÃ¶schen', 'wpsg'); ?></a>
Index: /views/produkt/addedit_general.phtml
===================================================================
--- /views/produkt/addedit_general.phtml	(revision 5448)
+++ /views/produkt/addedit_general.phtml	(revision 5449)
@@ -5,3 +5,16 @@
 	 */
 
-?>TODO
+?>
+
+<?php if (!isset($_REQUEST['wpsg_lang'])) { ?>
+	
+	<?php echo wpsg_drawForm_AdminboxStart(); ?>
+		<?php echo wpsg_drawForm_Select('mwst_key', __('Steuergruppe', 'wpsg'), wpsg_tax_groups(true), @$this->view['data']['mwst_key']); ?>								
+		<?php echo wpsg_drawForm_Input('preis', wpsg_translate(__('Preis (#1#)', 'wpsg'), (($this->getBackendTaxview() === WPSG_NETTO)?'NETTO':'BRUTTO')), wpsg_ff($this->view['data']['preis'])); ?>
+		<?php echo wpsg_drawForm_Input('oldprice', wpsg_translate(__('Alter Preis (#1#)', 'wpsg'), (($this->getBackendTaxview() === WPSG_NETTO)?'NETTO':'BRUTTO')), wpsg_ff($this->view['data']['oldprice'])); ?>
+		<?php echo wpsg_drawForm_Input('', __('Steueranteil', 'wpsg'), wpsg_ff(@$this->view['data']['tax_sum_value'], $this->get_option('wpsg_currency')).' / '.$this->getDefaultCountry()->kuerzel, array('text' => true)); ?>
+		<?php echo wpsg_drawForm_Checkbox('euleistungsortregel', __('Produkt unterliegt den EU-Leistungsortregeln', 'wpsg'), @$this->view['data']['euleistungsortregel'], array('fullrow' => true, 'help' => 'EU-Leistungsortregel')); ?>
+		<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender"><span class="glyphicon glyphicon-globe wpsg-glyphicon"></span><?php echo __('LÃ€nderverwaltung', 'wpsg'); ?></a>
+	<?php echo wpsg_drawForm_AdminboxEnd(__('Preis / Steuer', 'wpsg')); ?>
+	 
+<?php } ?>
