[TEP-COMMIT] [CVS admin] separate the product information into groups represented by tabs

hpdl-OfajU3CKLf1/[email protected] 29 Aug 2004 22:17:25 -0000
Newsgroups gmane.comp.web.oscommerce.cvs
Message-ID <[email protected]>
<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>admin/admin</tt></b><span id="info"> on MAIN</span></td></tr>
<tr><td><tt><a href="#file1">products.php</a></tt></td><td align="right" id="added">+20</td><td align="right" id="removed">-8</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products.php?rev=1.13&amp;content-type=text/vnd.viewcvs-markup">1.13</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products.php.diff?r1=1.13&amp;r2=1.14">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products.php?rev=1.14&amp;content-type=text/vnd.viewcvs-markup">1.14</a></td></tr>
<tr class="alt"><td><tt>includes/languages/english/<a href="#file2">products.php</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english/products.php?rev=1.6&amp;content-type=text/vnd.viewcvs-markup">1.6</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english/products.php.diff?r1=1.6&amp;r2=1.7">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english/products.php?rev=1.7&amp;content-type=text/vnd.viewcvs-markup">1.7</a></td></tr>
<tr><td><tt>includes/languages/espanol/<a href="#file3">products.php</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol/products.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol/products.php.diff?r1=1.1&amp;r2=1.2">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol/products.php?rev=1.2&amp;content-type=text/vnd.viewcvs-markup">1.2</a></td></tr>
<tr class="alt"><td><tt>includes/languages/german/<a href="#file4">products.php</a></tt></td><td align="right" id="added">+3</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german/products.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german/products.php.diff?r1=1.1&amp;r2=1.2">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german/products.php?rev=1.2&amp;content-type=text/vnd.viewcvs-markup">1.2</a></td></tr>
<tr><td><tt>templates/pages/<a href="#file5">products.php</a></tt></td><td align="right" id="added">+6</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products.php.diff?r1=1.1&amp;r2=1.2">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products.php?rev=1.2&amp;content-type=text/vnd.viewcvs-markup">1.2</a></td></tr>
<tr class="alt"><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file6">products_edit.php</a></tt></td><td align="right" id="added">+227</td><td align="right" id="removed">-126</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_edit.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_edit.php.diff?r1=1.1&amp;r2=1.2">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_edit.php?rev=1.2&amp;content-type=text/vnd.viewcvs-markup">1.2</a></td></tr>
<tr><td><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/<a href="#file7">products_preview.php</a></tt></td><td align="right" id="added">+9</td><td align="right" id="removed">-5</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_preview.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_preview.php.diff?r1=1.1&amp;r2=1.2">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_preview.php?rev=1.2&amp;content-type=text/vnd.viewcvs-markup">1.2</a></td></tr>
<tr><td></td><td align="right" id="added">+271</td><td align="right" id="removed">-144</td><td></td></tr>
</table>
<small id="info">7 modified files</small><br />
<pre class="comment">
separate the product information into groups represented by tabs

provide a target possibility for new/uploaded product images
provide a possibility to preview product images already on the server

also delete from the attribute downloads table when removing product
attributes
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a><br /></span>
<div class="fileheader"><big><b>products.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products.php?rev=1.13&amp;content-type=text/vnd.viewcvs-markup">1.13</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products.php.diff?r1=1.13&amp;r2=1.14">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products.php?rev=1.14&amp;content-type=text/vnd.viewcvs-markup">1.14</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.13 -r1.14
--- products.php	2004/08/27 22:13:11	1.13
+++ products.php	2004/08/29 22:17:19	1.14
@@ -216,21 +216,33 @@
</small></pre><pre class="diff" id="context">               }
             }
 
</pre><pre class="diff" id="removed">-            $Qcheck = $osC_Database-&gt;query('select products_attributes_id from :table_products_attributes where products_id = :products_id and concat(options_id, "-", options_values_id) not in (":attributes")<span id="removedchars">&nbsp;limit&nbsp;1</span>');
</pre><pre class="diff" id="added">+            $Qcheck = $osC_Database-&gt;query('select products_attributes_id from :table_products_attributes where products_id = :products_id and concat(options_id, "-", options_values_id) not in (":attributes")');
</pre><pre class="diff" id="context">             $Qcheck-&gt;bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
             $Qcheck-&gt;bindInt(':products_id', $products_id);
             $Qcheck-&gt;bindRaw(':attributes', implode('", "', $attributes_array));
             $Qcheck-&gt;execute();
 
             if ($Qcheck-&gt;numberOfRows()) {
</pre><pre class="diff" id="removed">-              $Qdelete = $osC_Database-&gt;query('delete from :table_products_attributes where products_id = :products_id and concat(options_id, "-", options_values_id) not in (":attributes")');
-              $Qdelete-&gt;bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
-              $Qdelete-&gt;bindInt(':products_id', $products_id);
-              $Qdelete-&gt;bindRaw(':attributes', implode('", "', $attributes_array));
-              $Qdelete-&gt;execute();
</pre><pre class="diff" id="added">+              while ($Qcheck-&gt;next()) {
+                $Qdelete = $osC_Database-&gt;query('delete from :table_products_attributes where products_attributes_id = :products_attributes_id');
+                $Qdelete-&gt;bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
+                $Qdelete-&gt;bindInt(':products_attributes_id', $Qcheck-&gt;valueInt('products_attributes_id'));
+                $Qdelete-&gt;execute();
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-              if ($osC_Database-&gt;isError()) {
-                $error = true;
</pre><pre class="diff" id="added">+                if ($osC_Database-&gt;isError() === false) {
+                  $Qdelete = $osC_Database-&gt;query('delete from :table_products_attributes_download where products_attributes_id = :products_attributes_id');
+                  $Qdelete-&gt;bindTable(':table_products_attributes_download', TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD);
+                  $Qdelete-&gt;bindInt(':products_attributes_id', $Qcheck-&gt;valueInt('products_attributes_id'));
+                  $Qdelete-&gt;execute();
+
+                  if ($osC_Database-&gt;isError()) {
+                    $error = true;
+                    break;
+                  }
+                } else {
+                  $error = true;
+                  break;
+                }
</pre><pre class="diff" id="context">               }
             }
           }
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages">languages</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english">english</a><br /></span>
<div class="fileheader"><big><b>products.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english/products.php?rev=1.6&amp;content-type=text/vnd.viewcvs-markup">1.6</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english/products.php.diff?r1=1.6&amp;r2=1.7">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english/products.php?rev=1.7&amp;content-type=text/vnd.viewcvs-markup">1.7</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.6 -r1.7
--- products.php	2004/08/27 22:13:13	1.6
+++ products.php	2004/08/29 22:17:20	1.7
@@ -20,8 +20,10 @@
</small></pre><pre class="diff" id="context">   define('FIELDSET_ASSIGNED_ATTRIBUTES', 'Assigned Attributes');
 
   define('TABLE_HEADING_PRODUCTS', 'Products');
</pre><pre class="diff" id="removed">-  define('TABLE_HEADING_ACTION', 'Action');
</pre><pre class="diff" id="added">+  define('TABLE_HEADING_PRICE', 'Price');
+  define('TABLE_HEADING_QUANTITY', 'Quantity');
</pre><pre class="diff" id="context">   define('TABLE_HEADING_STATUS', 'Status');
</pre><pre class="diff" id="added">+  define('TABLE_HEADING_ACTION', 'Action');
</pre><pre class="diff" id="context"> 
   define('TEXT_NEW_PRODUCT', 'New Product in &amp;quot;%s&amp;quot;');
   define('TEXT_CATEGORIES', 'Categories:');
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages">languages</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol">espanol</a><br /></span>
<div class="fileheader"><big><b>products.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol/products.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol/products.php.diff?r1=1.1&amp;r2=1.2">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol/products.php?rev=1.2&amp;content-type=text/vnd.viewcvs-markup">1.2</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- products.php	2004/08/27 22:13:14	1.1
+++ products.php	2004/08/29 22:17:20	1.2
@@ -20,8 +20,10 @@
</small></pre><pre class="diff" id="context">   define('FIELDSET_ASSIGNED_ATTRIBUTES', 'Assigned Attributes');
 
   define('TABLE_HEADING_PRODUCTS', 'Productos');
</pre><pre class="diff" id="removed">-  define('TABLE_HEADING_ACTION', 'Acci&amp;oacute;n');
</pre><pre class="diff" id="added">+  define('TABLE_HEADING_PRICE', 'Price');
+  define('TABLE_HEADING_QUANTITY', 'Quantity');
</pre><pre class="diff" id="context">   define('TABLE_HEADING_STATUS', 'Estado');
</pre><pre class="diff" id="added">+  define('TABLE_HEADING_ACTION', 'Acci&amp;oacute;n');
</pre><pre class="diff" id="context"> 
   define('TEXT_NEW_PRODUCT', 'Nuevo Producto en &amp;quot;%s&amp;quot;');
   define('TEXT_CATEGORIES', 'Categorias:');
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes">includes</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages">languages</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german">german</a><br /></span>
<div class="fileheader"><big><b>products.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german/products.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german/products.php.diff?r1=1.1&amp;r2=1.2">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german/products.php?rev=1.2&amp;content-type=text/vnd.viewcvs-markup">1.2</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- products.php	2004/08/27 22:13:14	1.1
+++ products.php	2004/08/29 22:17:21	1.2
@@ -20,8 +20,10 @@
</small></pre><pre class="diff" id="context">   define('FIELDSET_ASSIGNED_ATTRIBUTES', 'Assigned Attributes');
 
   define('TABLE_HEADING_PRODUCTS', 'Produkte');
</pre><pre class="diff" id="removed">-  define('TABLE_HEADING_ACTION', 'Aktion');
</pre><pre class="diff" id="added">+  define('TABLE_HEADING_PRICE', 'Preis');
+  define('TABLE_HEADING_QUANTITY', 'Anzahl');
</pre><pre class="diff" id="context">   define('TABLE_HEADING_STATUS', 'Status');
</pre><pre class="diff" id="added">+  define('TABLE_HEADING_ACTION', 'Aktion');
</pre><pre class="diff" id="context"> 
   define('TEXT_NEW_PRODUCT', 'Neuer Produkt in &amp;quot;%s&amp;quot;');
   define('TEXT_CATEGORIES', 'Kategorien:');
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates">templates</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages">pages</a><br /></span>
<div class="fileheader"><big><b>products.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products.php.diff?r1=1.1&amp;r2=1.2">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products.php?rev=1.2&amp;content-type=text/vnd.viewcvs-markup">1.2</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- products.php	2004/08/27 22:13:15	1.1
+++ products.php	2004/08/29 22:17:21	1.2
@@ -32,6 +32,8 @@
</small></pre><pre class="diff" id="context">     &lt;thead&gt;
       &lt;tr&gt;
         &lt;th&gt;&lt;?php echo TABLE_HEADING_PRODUCTS; ?&gt;&lt;/th&gt;
</pre><pre class="diff" id="added">+        &lt;th&gt;&lt;?php echo TABLE_HEADING_PRICE; ?&gt;&lt;/th&gt;
+        &lt;th&gt;&lt;?php echo TABLE_HEADING_QUANTITY; ?&gt;&lt;/th&gt;
</pre><pre class="diff" id="context">         &lt;th&gt;&lt;?php echo TABLE_HEADING_STATUS; ?&gt;&lt;/th&gt;
         &lt;th&gt;&lt;?php echo TABLE_HEADING_ACTION; ?&gt;&lt;/th&gt;
       &lt;/tr&gt;
</pre><pre class="diff"><small id="info">@@ -39,10 +41,10 @@
</small></pre><pre class="diff" id="context">     &lt;tbody&gt;
 &lt;?php
   if (isset($_GET['search']) &amp;&amp; !empty($_GET['search'])) {
</pre><pre class="diff" id="removed">-    $Qproducts = $osC_Database-&gt;query('select p.products_id, pd.products_name, p.products_quantity, p.products_<span id="removedchars">image,&nbsp;p.products_</span>price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from :table_products p, :table_products_description pd, :table_products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = :language_id and p.products_id = p2c.products_id and pd.products_name like :products_name order by pd.products_name');
</pre><pre class="diff" id="added">+    $Qproducts = $osC_Database-&gt;query('select p.products_id, pd.products_name, p.products_quantity, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p2c.categories_id from :table_products p, :table_products_description pd, :table_products_to_categories p2c where p.products_id = pd.products_id and pd.language_id = :language_id and p.products_id = p2c.products_id and pd.products_name like :products_name order by pd.products_name');
</pre><pre class="diff" id="context">     $Qproducts-&gt;bindValue(':products_name', '%' . $_GET['search'] . '%');
   } else {
</pre><pre class="diff" id="removed">-    $Qproducts = $osC_Database-&gt;query('select p.products_id, pd.products_name, p.products_quantity, p.products_<span id="removedchars">image,&nbsp;p.products_</span>price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from :table_products p, :table_products_description pd where p.products_id = pd.products_id and pd.language_id = :language_id order by pd.products_name');
</pre><pre class="diff" id="added">+    $Qproducts = $osC_Database-&gt;query('select p.products_id, pd.products_name, p.products_quantity, p.products_price, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status from :table_products p, :table_products_description pd where p.products_id = pd.products_id and pd.language_id = :language_id order by pd.products_name');
</pre><pre class="diff" id="context">   }
   $Qproducts-&gt;bindTable(':table_products', TABLE_PRODUCTS);
   $Qproducts-&gt;bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
</pre><pre class="diff"><small id="info">@@ -72,6 +74,8 @@
</small></pre><pre class="diff" id="context">     }
 ?&gt;
         &lt;td&gt;&lt;?php echo '&lt;a href="' . tep_href_link(FILENAME_PRODUCTS, 'page=' . $_GET['page'] . '&amp;cPath=' . $cPath . '&amp;pID=' . $Qproducts-&gt;valueInt('products_id') . '&amp;action=new_product_preview&amp;read=only') . '"&gt;' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '&amp;nbsp;' . $Qproducts-&gt;value('products_name') . '&lt;/a&gt;'; ?&gt;&lt;/td&gt;
</pre><pre class="diff" id="added">+        &lt;td align="right"&gt;&lt;?php echo $osC_Currencies-&gt;format($Qproducts-&gt;value('products_price')); ?&gt;&lt;/td&gt;
+        &lt;td align="right"&gt;&lt;?php echo $Qproducts-&gt;valueInt('products_quantity'); ?&gt;&lt;/td&gt;
</pre><pre class="diff" id="context">         &lt;td align="center"&gt;&lt;?php echo tep_image('templates/' . $template . '/images/icons/' . (($Qproducts-&gt;valueInt('products_status') === 1) ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif')); ?&gt;&lt;/td&gt;
         &lt;td align="right"&gt;
 &lt;?php
</pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates">templates</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages">pages</a><br /></span>
<div class="fileheader"><big><b>products_edit.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_edit.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_edit.php.diff?r1=1.1&amp;r2=1.2">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_edit.php?rev=1.2&amp;content-type=text/vnd.viewcvs-markup">1.2</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- products_edit.php	2004/08/27 22:13:15	1.1
+++ products_edit.php	2004/08/29 22:17:21	1.2
@@ -65,6 +65,19 @@
</small></pre><pre class="diff" id="context">   }
 
   $languages = tep_get_languages();
</pre><pre class="diff" id="added">+
+  require('includes/classes/directory_listing.php');
+  $osC_Dir_Images = new osC_DirectoryListing('../images');
+  $osC_Dir_Images-&gt;setExcludeEntries('CVS');
+  $osC_Dir_Images-&gt;setIncludeFiles(false);
+  $osC_Dir_Images-&gt;setRecursive(true);
+  $osC_Dir_Images-&gt;setAddDirectoryToFilename(true);
+  $files = $osC_Dir_Images-&gt;getFiles();
+
+  $image_directories = array(array('id' =&gt; '', 'text' =&gt; 'images/'));
+  foreach ($files as $file) {
+    $image_directories[] = array('id' =&gt; $file['name'], 'text' =&gt; 'images/' . $file['name']);
+  }
</pre><pre class="diff" id="context"> ?&gt;
 
 &lt;script type="text/javascript" src="external/FCKeditor/2.0b1/fckeditor.js"&gt;&lt;/script&gt;
</pre><pre class="diff"><small id="info">@@ -137,7 +150,7 @@
</small></pre><pre class="diff" id="context">     var attributeExists = false;
 
     for (i=0; i&lt;existingFields.length; i++) {
</pre><pre class="diff" id="removed">-      if (existingFields[i].name == 'attribute_pr<span id="removedchars">efix</span>[' + document.new_product.attributes.options[document.new_product.attributes.options.selectedIndex].parentNode.id + '][' + document.new_product.attributes.options[document.new_product.attributes.options.selectedIndex].value + ']') {
</pre><pre class="diff" id="added">+      if (existingFields[i].name == 'attribute_pr<span id="addedchars">ice</span>[' + document.new_product.attributes.options[document.new_product.attributes.options.selectedIndex].parentNode.id + '][' + document.new_product.attributes.options[document.new_product.attributes.options.selectedIndex].value + ']') {
</pre><pre class="diff" id="context">         attributeExists = true;
         break;
       }
</pre><pre class="diff"><small id="info">@@ -151,15 +164,23 @@
</small></pre><pre class="diff" id="context"> 
       var spanFields = newFields.getElementsByTagName('span');
       var inputFields = newFields.getElementsByTagName('input');
</pre><pre class="diff" id="added">+      var selectFields = newFields.getElementsByTagName('select');
</pre><pre class="diff" id="context"> 
       spanFields[0].innerHTML = document.new_product.attributes.options[document.new_product.attributes.options.selectedIndex].parentNode.label;
       spanFields[1].innerHTML = document.new_product.attributes.options[document.new_product.attributes.options.selectedIndex].text;
 
       for (y=0; y&lt;inputFields.length; y++) {
</pre><pre class="diff" id="removed">-        inputFields[y].name = inputFields[y].name.substr(4) + '[' + document.new_product.attributes.options[document.new_product.attributes.options.selectedIndex].parentNode.id + '][' + document.new_product.attributes.options[document.new_product.attributes.options.selectedIndex].value + ']';
-        inputFields[y].disabled = false;
</pre><pre class="diff" id="added">+        if (inputFields[y].type != 'button') {
+          inputFields[y].name = inputFields[y].name.substr(4) + '[' + document.new_product.attributes.options[document.new_product.attributes.options.selectedIndex].parentNode.id + '][' + document.new_product.attributes.options[document.new_product.attributes.options.selectedIndex].value + ']';
+          inputFields[y].disabled = false;
+        }
</pre><pre class="diff" id="context">       }
 
</pre><pre class="diff" id="added">+      for (y=0; y&lt;selectFields.length; y++) {
+        selectFields[y].name = selectFields[y].name.substr(4) + '[' + document.new_product.attributes.options[document.new_product.attributes.options.selectedIndex].parentNode.id + '][' + document.new_product.attributes.options[document.new_product.attributes.options.selectedIndex].value + ']';
+        selectFields[y].disabled = false;
+      }
+
</pre><pre class="diff" id="context">       var insertHere = document.getElementById('writeroot');
       insertHere.parentNode.insertBefore(newFields,insertHere);
     }
</pre><pre class="diff"><small id="info">@@ -168,29 +189,44 @@
</small></pre><pre class="diff" id="context">   function toggleAttributeStatus(attributeID) {
     var row = document.getElementById(attributeID);
     var rowButton = document.getElementById(attributeID + '-button');
</pre><pre class="diff" id="removed">-    var <span id="removedchars">row</span>Fields = row.getElementsByTagName('input');
</pre><pre class="diff" id="added">+    var <span id="addedchars">input</span>Fields = row.getElementsByTagName('input');
+    var selectFields = row.getElementsByTagName('select');
</pre><pre class="diff" id="context"> 
     if (rowButton.value == '-') {
</pre><pre class="diff" id="removed">-      for (rF=0; rF&lt;rowFields.length; rF++) {
-        if (rowFields[rF].type != 'button') {
-          rowFields[rF].disabled = true;
</pre><pre class="diff" id="added">+      for (rF=0; rF&lt;inputFields.length; rF++) {
+        if (inputFields[rF].type != 'button') {
+          inputFields[rF].disabled = true;
</pre><pre class="diff" id="context">         }
       }
 
</pre><pre class="diff" id="added">+      for (rF=0; rF&lt;selectFields.length; rF++) {
+        selectFields[rF].disabled = true;
+      }
+
</pre><pre class="diff" id="context">       row.className = 'attributeRemove';
       rowButton.value = '+';
     } else {
</pre><pre class="diff" id="removed">-      for (rF=0; rF&lt;rowFields.length; rF++) {
-        if (rowFields[rF].type != 'button') {
-          rowFields[rF].disabled = false;
</pre><pre class="diff" id="added">+      for (rF=0; rF&lt;inputFields.length; rF++) {
+        if (inputFields[rF].type != 'button') {
+          inputFields[rF].disabled = false;
</pre><pre class="diff" id="context">         }
       }
 
</pre><pre class="diff" id="added">+      for (rF=0; rF&lt;selectFields.length; rF++) {
+        selectFields[rF].disabled = false;
+      }
+
</pre><pre class="diff" id="context">       row.className = '';
       rowButton.value = '-';
     }
   }
 
</pre><pre class="diff" id="added">+  function reloadImage() {
+    var image = document.new_product.products_image.value;
+    var preview = document.getElementById('previewImage');
+
+    preview.src = '&lt;?php echo DIR_WS_CATALOG_IMAGES; ?&gt;' + image;
+  }
</pre><pre class="diff" id="context"> //--&gt;&lt;/script&gt;
 
 &lt;link type="text/css" rel="stylesheet" href="external/tabpane/css/luna/tab.css" /&gt;
</pre><pre class="diff"><small id="info">@@ -198,144 +234,209 @@
</small></pre><pre class="diff" id="context"> 
 &lt;h1&gt;&lt;?php echo sprintf(TEXT_NEW_PRODUCT, tep_output_generated_category_path($current_category_id)); ?&gt;&lt;/h1&gt;
 
</pre><pre class="diff" id="removed">-&lt;div class="tab-pane" id="tabPane1"&gt;
-  &lt;script type="text/javascript"&gt;
-    tp1 = new WebFXTabPane( document.getElementById( "tabPane1" ) );
-  &lt;/script&gt;
</pre><pre class="diff" id="added">+&lt;div class="tab-pane" id="mainTabPane"&gt;
+  &lt;script type="text/javascript"&gt;&lt;!--
+    var mainTabPane = new WebFXTabPane( document.getElementById( "mainTabPane" ) );
+  //--&gt;&lt;/script&gt;
</pre><pre class="diff" id="context"> 
 &lt;?php
   echo tep_draw_form('new_product', FILENAME_PRODUCTS, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&amp;pID=' . $_GET['pID'] : '') . '&amp;action=new_product_preview', 'post', 'enctype="multipart/form-data"');
 ?&gt;
 
</pre><pre class="diff" id="removed">-  &lt;div class="tab-page" id="tab<span id="removedchars">Page1</span>"&gt;
</pre><pre class="diff" id="added">+  &lt;div class="tab-page" id="tab<span id="addedchars">Description</span>"&gt;
</pre><pre class="diff" id="context">     &lt;h2 class="tab"&gt;&lt;?php echo TAB_GENERAL; ?&gt;&lt;/h2&gt;
 
</pre><pre class="diff" id="removed">-    &lt;script type="text/javascript"&gt;tp1.addTabPage( document.getElementById( "tabPage1" ) );&lt;/script&gt;
</pre><pre class="diff" id="added">+    &lt;script type="text/javascript"&gt;&lt;!--
+      mainTabPane.addTabPage( document.getElementById( "tabDescription" ) );
+    //--&gt;&lt;/script&gt;
+
+    &lt;div class="tab-pane" id="descriptionTabPane"&gt;
+      &lt;script type="text/javascript"&gt;&lt;!--
+        var descriptionTabPane = new WebFXTabPane( document.getElementById( "descriptionTabPane" ) );
+      //--&gt;&lt;/script&gt;
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-    &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
-      &lt;tr&gt;
-        &lt;td class="main"&gt;&lt;?php echo TEXT_PRODUCTS_STATUS; ?&gt;&lt;/td&gt;
-        &lt;td class="main"&gt;&lt;?php echo osc_draw_radio_field('products_status', array(array('id' =&gt; '1', 'text' =&gt; TEXT_PRODUCT_AVAILABLE), array('id' =&gt; '0', 'text' =&gt; TEXT_PRODUCT_NOT_AVAILABLE)), (isset($pInfo) ? $pInfo-&gt;products_status : '0')); ?&gt;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr&gt;
-        &lt;td class="smallText" colspan="2"&gt;&amp;nbsp;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr&gt;
-        &lt;td class="main"&gt;&lt;?php echo TEXT_PRODUCTS_DATE_AVAILABLE; ?&gt;&lt;br&gt;&lt;small&gt;(YYYY-MM-DD)&lt;/small&gt;&lt;/td&gt;
-        &lt;td class="main"&gt;&lt;?php echo osc_draw_input_field('products_date_available', (isset($pInfo) ? $pInfo-&gt;products_date_available : ''), 'id="calendarValue"'); ?&gt;&lt;input type="button" value="..." id="calendarTrigger" class="operationButton"&gt;&lt;script type="text/javascript"&gt;Calendar.setup( { inputField: "calendarValue", ifFormat: "%Y-%m-%d", button: "calendarTrigger" } );&lt;/script&gt;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr&gt;
-        &lt;td class="smallText" colspan="2"&gt;&amp;nbsp;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr&gt;
-        &lt;td class="main"&gt;&lt;?php echo TEXT_PRODUCTS_MANUFACTURER; ?&gt;&lt;/td&gt;
-        &lt;td class="main"&gt;&lt;?php echo osc_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($pInfo) ? $pInfo-&gt;manufacturers_id : '')); ?&gt;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr&gt;
-        &lt;td class="smallText" colspan="2"&gt;&amp;nbsp;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr bgcolor="#fff3e7"&gt;
-        &lt;td class="main"&gt;&amp;nbsp;&lt;/td&gt;
-        &lt;td&gt;
</pre><pre class="diff" id="context"> &lt;?php
   foreach ($languages as $l_entry) {
</pre><pre class="diff" id="removed">-    echo '          &lt;span id="lang_' . $l_entry['code'] . '"' . (($l_entry['directory'] == $osC_Session-&gt;value('language')) ? ' class="highlight"' : '') . '&gt;&lt;a href="javascript:toggleDivBlocks(\'pName_\', \'pName_' . $l_entry['code'] . '\'); toggleDivBlocks(\'pDesc_\', \'pDesc_' . $l_entry['code'] . '\'); toggleDivBlocks(\'pURL_\', \'pURL_' . $l_entry['code'] . '\'); toggleClass(\'lang_\', \'lang_' . $l_entry['code'] . '\', \'highlight\', \'span\');"&gt;' . tep_image(DIR_WS_CATALOG_LANGUAGES . $l_entry['directory'] . '/images/' . $l_entry['image'], $l_entry['name']) . '&lt;/a&gt;&lt;/span&gt;&amp;nbsp;&amp;nbsp;';
-  }
</pre><pre class="diff" id="context"> ?&gt;
</pre><pre class="diff" id="removed">-        &lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr bgcolor="#fff3e7"&gt;
-        &lt;td class="main"&gt;&lt;?php echo TEXT_PRODUCTS_NAME; ?&gt;&lt;/td&gt;
-        &lt;td&gt;
</pre><pre class="diff" id="added">+
+      &lt;div class="tab-page" id="tabDescriptionLanguages_&lt;?php echo $l_entry['code']; ?&gt;"&gt;
+        &lt;h2 class="tab"&gt;&lt;?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $l_entry['directory'] . '/images/' . $l_entry['image'], $l_entry['name']) . '&amp;nbsp;' . $l_entry['name']; ?&gt;&lt;/h2&gt;
+
+        &lt;script type="text/javascript"&gt;&lt;!--
+          descriptionTabPane.addTabPage( document.getElementById( "tabDescriptionLanguages_&lt;?php echo $l_entry['code']; ?&gt;" ) );
+        //--&gt;&lt;/script&gt;
+
+        &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
+          &lt;tr&gt;
+            &lt;td class="smallText"&gt;&lt;?php echo TEXT_PRODUCTS_NAME; ?&gt;&lt;/td&gt;
+            &lt;td class="smallText"&gt;&lt;?php echo osc_draw_input_field('products_name[' . $l_entry['id'] . ']', (isset($pInfo) &amp;&amp; is_array($pInfo-&gt;products_name) &amp;&amp; isset($pInfo-&gt;products_name[$l_entry['id']]) ? $pInfo-&gt;products_name[$l_entry['id']] : '')); ?&gt;&lt;/td&gt;
+          &lt;/tr&gt;
+          &lt;tr&gt;
+            &lt;td class="smallText" valign="top"&gt;&lt;?php echo TEXT_PRODUCTS_DESCRIPTION; ?&gt;&lt;/td&gt;
+            &lt;td class="smallText"&gt;&lt;?php echo tep_draw_textarea_field('products_description[' . $l_entry['id'] . ']', 'soft', '70', '15', (isset($pInfo) &amp;&amp; is_array($pInfo-&gt;products_description) &amp;&amp; isset($pInfo-&gt;products_description[$l_entry['id']]) ? $pInfo-&gt;products_description[$l_entry['id']] : ''), 'id="fckpd_' . $l_entry['code'] . '" style="width: 100%;"'); ?&gt;&lt;/td&gt;
+          &lt;/tr&gt;
+          &lt;tr&gt;
+            &lt;td class="smallText"&gt;&lt;?php echo TEXT_PRODUCTS_URL; ?&gt;&lt;/td&gt;
+            &lt;td class="smallText"&gt;&lt;?php echo osc_draw_input_field('products_url[' . $l_entry['id'] . ']', (isset($pInfo) &amp;&amp; is_array($pInfo-&gt;products_url) &amp;&amp; isset($pInfo-&gt;products_url[$l_entry['id']]) ? $pInfo-&gt;products_url[$l_entry['id']] : '')); ?&gt;&lt;/td&gt;
+          &lt;/tr&gt;
+        &lt;/table&gt;
+
+        &lt;script type="text/javascript"&gt;&lt;!--
+          var fckpd_&lt;?php echo $l_entry['code']; ?&gt; = new FCKeditor('fckpd_&lt;?php echo $l_entry['code']; ?&gt;');
+          fckpd_&lt;?php echo $l_entry['code']; ?&gt;.BasePath = "&lt;?php echo DIR_WS_ADMIN . 'external/FCKeditor/2.0b1/'; ?&gt;";
+          fckpd_&lt;?php echo $l_entry['code']; ?&gt;.Height = "400";
+          fckpd_&lt;?php echo $l_entry['code']; ?&gt;.ReplaceTextarea();
+        //--&gt;&lt;/script&gt;
+      &lt;/div&gt;
+
</pre><pre class="diff" id="context"> &lt;?php
</pre><pre class="diff" id="removed">-  foreach ($languages as $l_entry) {
-    echo '          &lt;div id="pName_' . $l_entry['code'] . '"' . (($l_entry['directory'] != $osC_Session-&gt;value('language')) ? ' style="display: none;"' : '') . '&gt;' . osc_draw_input_field('products_name[' . $l_entry['id'] . ']', (isset($pInfo) &amp;&amp; is_array($pInfo-&gt;products_name) &amp;&amp; isset($pInfo-&gt;products_name[$l_entry['id']]) ? $pInfo-&gt;products_name[$l_entry['id']] : '')) . '&lt;/div&gt;';
</pre><pre class="diff" id="context">   }
 ?&gt;
</pre><pre class="diff" id="removed">-        &lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr bgcolor="#fff3e7"&gt;
-        &lt;td class="main" valign="top"&gt;&lt;?php echo TEXT_PRODUCTS_DESCRIPTION; ?&gt;&lt;/td&gt;
-        &lt;td&gt;
-&lt;?php
-  foreach ($languages as $l_entry) {
-    echo '        &lt;div id="pDesc_' . $l_entry['code'] . '"' . (($l_entry['directory'] != $osC_Session-&gt;value('language')) ? ' style="display: none;"' : '') . '&gt;' . tep_draw_textarea_field('products_description[' . $l_entry['id'] . ']', 'soft', '70', '15', (isset($pInfo) &amp;&amp; is_array($pInfo-&gt;products_description) &amp;&amp; isset($pInfo-&gt;products_description[$l_entry['id']]) ? $pInfo-&gt;products_description[$l_entry['id']] : ''), 'id="fckpd_' . $l_entry['code'] . '" style="width: 100%;"') . '&lt;/div&gt;';
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-    echo '&lt;script type="text/javascript"&gt;&lt;!--' . "\n" .
-         '  var fckpd_' . $l_entry['code'] . ' = new FCKeditor(\'fckpd_' . $l_entry['code'] . '\');' . "\n" .
-         '  fckpd_' . $l_entry['code'] . '.BasePath = "' . DIR_WS_ADMIN . 'external/FCKeditor/2.0b1/";' . "\n" .
-         '  fckpd_' . $l_entry['code'] . '.Height = "400";' . "\n" .
-         '  fckpd_' . $l_entry['code'] . '.ReplaceTextarea();' . "\n" .
-         '//--&gt;&lt;/script&gt;';
-  }
-?&gt;
</pre><pre class="diff" id="added">+    &lt;/div&gt;
+  &lt;/div&gt;
+
+  &lt;div class="tab-page" id="tabData"&gt;
+    &lt;h2 class="tab"&gt;&lt;?php echo 'Data'; ?&gt;&lt;/h2&gt;
+
+    &lt;script type="text/javascript"&gt;&lt;!--
+      mainTabPane.addTabPage( document.getElementById( "tabData" ) );
+    //--&gt;&lt;/script&gt;
+
+    &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
+      &lt;tr&gt;
+        &lt;td class="smallText" width="50%" height="100%" valign="top"&gt;
+          &lt;fieldset style="height: 100%;"&gt;
+            &lt;legend&gt;Price&lt;/legend&gt;
+
+            &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
+              &lt;tr&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo TEXT_PRODUCTS_TAX_CLASS; ?&gt;&lt;/td&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo osc_draw_pull_down_menu('products_tax_class_id', $tax_class_array, (isset($pInfo) ? $pInfo-&gt;products_tax_class_id : ''), 'onchange="updateGross()"'); ?&gt;&lt;/td&gt;
+              &lt;/tr&gt;
+              &lt;tr&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo TEXT_PRODUCTS_PRICE_NET; ?&gt;&lt;/td&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo osc_draw_input_field('products_price', (isset($pInfo) ? $pInfo-&gt;products_price : ''), 'onKeyUp="updateGross()"'); ?&gt;&lt;/td&gt;
+              &lt;/tr&gt;
+              &lt;tr&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo TEXT_PRODUCTS_PRICE_GROSS; ?&gt;&lt;/td&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo osc_draw_input_field('products_price_gross', (isset($pInfo) ? $pInfo-&gt;products_price : ''), 'OnKeyUp="updateNet()"'); ?&gt;&lt;/td&gt;
+              &lt;/tr&gt;
+            &lt;/table&gt;
+
+            &lt;script language="javascript"&gt;&lt;!--
+              updateGross();
+            //--&gt;&lt;/script&gt;
+          &lt;/fieldset&gt;
</pre><pre class="diff" id="context">         &lt;/td&gt;
</pre><pre class="diff" id="removed">-      &lt;/tr&gt;
-      &lt;tr bgcolor="#fff3e7"&gt;
-        &lt;td class="main"&gt;&lt;?php echo TEXT_PRODUCTS_URL . '&lt;br&gt;&lt;small&gt;' . TEXT_PRODUCTS_URL_WITHOUT_HTTP . '&lt;/small&gt;'; ?&gt;&lt;/td&gt;
-        &lt;td&gt;
-&lt;?php
-  foreach ($languages as $l_entry) {
-    echo '        &lt;div id="pURL_' . $l_entry['code'] . '"' . (($l_entry['directory'] != $osC_Session-&gt;value('language')) ? ' style="display: none;"' : '') . '&gt;' . osc_draw_input_field('products_url[' . $l_entry['id'] . ']', (isset($pInfo) &amp;&amp; is_array($pInfo-&gt;products_url) &amp;&amp; isset($pInfo-&gt;products_url[$l_entry['id']]) ? $pInfo-&gt;products_url[$l_entry['id']] : '')) . '&lt;/div&gt;';
-  }
-?&gt;
</pre><pre class="diff" id="added">+        &lt;td class="smallText" width="50%" height="100%" valign="top"&gt;
+          &lt;fieldset style="height: 100%;"&gt;
+            &lt;legend&gt;Data&lt;/legend&gt;
+
+            &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
+              &lt;tr&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo TEXT_PRODUCTS_MANUFACTURER; ?&gt;&lt;/td&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo osc_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($pInfo) ? $pInfo-&gt;manufacturers_id : '')); ?&gt;&lt;/td&gt;
+              &lt;/tr&gt;
+              &lt;tr&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo TEXT_PRODUCTS_MODEL; ?&gt;&lt;/td&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo osc_draw_input_field('products_model', (isset($pInfo) ? $pInfo-&gt;products_model : '')); ?&gt;&lt;/td&gt;
+              &lt;/tr&gt;
+              &lt;tr&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo TEXT_PRODUCTS_QUANTITY; ?&gt;&lt;/td&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo osc_draw_input_field('products_quantity', (isset($pInfo) ? $pInfo-&gt;products_quantity : '')); ?&gt;&lt;/td&gt;
+              &lt;/tr&gt;
+              &lt;tr&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo TEXT_PRODUCTS_WEIGHT; ?&gt;&lt;/td&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo osc_draw_input_field('products_weight', (isset($pInfo) ? $pInfo-&gt;products_weight : '')). '&amp;nbsp;' . osc_draw_pull_down_menu('products_weight_class', $weight_class_array, (isset($pInfo) ? $pInfo-&gt;products_weight_class : SHIPPING_WEIGHT_UNIT)); ?&gt;&lt;/td&gt;
+              &lt;/tr&gt;
+            &lt;/table&gt;
+          &lt;/fieldset&gt;
</pre><pre class="diff" id="context">         &lt;/td&gt;
       &lt;/tr&gt;
</pre><pre class="diff" id="removed">-      &lt;tr&gt;
-        &lt;td class="smallText" colspan="2"&gt;&amp;nbsp;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr bgcolor="#ebebff"&gt;
-        &lt;td class="main"&gt;&lt;?php echo TEXT_PRODUCTS_TAX_CLASS; ?&gt;&lt;/td&gt;
-        &lt;td class="main"&gt;&lt;?php echo osc_draw_pull_down_menu('products_tax_class_id', $tax_class_array, (isset($pInfo) ? $pInfo-&gt;products_tax_class_id : ''), 'onchange="updateGross()"'); ?&gt;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr bgcolor="#ebebff"&gt;
-        &lt;td class="main"&gt;&lt;?php echo TEXT_PRODUCTS_PRICE_NET; ?&gt;&lt;/td&gt;
-        &lt;td class="main"&gt;&lt;?php echo osc_draw_input_field('products_price', (isset($pInfo) ? $pInfo-&gt;products_price : ''), 'onKeyUp="updateGross()"'); ?&gt;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr bgcolor="#ebebff"&gt;
-        &lt;td class="main"&gt;&lt;?php echo TEXT_PRODUCTS_PRICE_GROSS; ?&gt;&lt;/td&gt;
-        &lt;td class="main"&gt;&lt;?php echo osc_draw_input_field('products_price_gross', (isset($pInfo) ? $pInfo-&gt;products_price : ''), 'OnKeyUp="updateNet()"'); ?&gt;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr&gt;
-        &lt;td class="smallText" colspan="2"&gt;&amp;nbsp;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr&gt;
-        &lt;td class="main"&gt;&lt;?php echo TEXT_PRODUCTS_QUANTITY; ?&gt;&lt;/td&gt;
-        &lt;td class="main"&gt;&lt;?php echo osc_draw_input_field('products_quantity', (isset($pInfo) ? $pInfo-&gt;products_quantity : '')); ?&gt;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr&gt;
-        &lt;td class="smallText" colspan="2"&gt;&amp;nbsp;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr&gt;
-        &lt;td class="main"&gt;&lt;?php echo TEXT_PRODUCTS_MODEL; ?&gt;&lt;/td&gt;
-        &lt;td class="main"&gt;&lt;?php echo osc_draw_input_field('products_model', (isset($pInfo) ? $pInfo-&gt;products_model : '')); ?&gt;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr&gt;
-        &lt;td class="smallText" colspan="2"&gt;&amp;nbsp;&lt;/td&gt;
-      &lt;/tr&gt;
</pre><pre class="diff" id="context">       &lt;tr&gt;
</pre><pre class="diff" id="removed">-        &lt;td class="main"&gt;&lt;?php echo TEXT_PRODUCTS_IMAGE; ?&gt;&lt;/td&gt;
-        &lt;td class="main"&gt;&lt;?php echo osc_draw_file_field('products_image') . '&lt;br&gt;' . (isset($pInfo) ? $pInfo-&gt;products_image . osc_draw_hidden_field('products_previous_image', $pInfo-&gt;products_image) : ''); ?&gt;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr&gt;
-        &lt;td class="smallText" colspan="2"&gt;&amp;nbsp;&lt;/td&gt;
-      &lt;/tr&gt;
-      &lt;tr&gt;
-        &lt;td class="main"&gt;&lt;?php echo TEXT_PRODUCTS_WEIGHT; ?&gt;&lt;/td&gt;
-        &lt;td class="main"&gt;&lt;?php echo osc_draw_input_field('products_weight', (isset($pInfo) ? $pInfo-&gt;products_weight : '')). '&amp;nbsp;' . osc_draw_pull_down_menu('products_weight_class', $weight_class_array, (isset($pInfo) ? $pInfo-&gt;products_weight_class : SHIPPING_WEIGHT_UNIT)); ?&gt;&lt;/td&gt;
</pre><pre class="diff" id="added">+        &lt;td class="smallText" width="50%" height="100%" valign="top"&gt;
+          &lt;fieldset style="height: 100%;"&gt;
+            &lt;legend&gt;&lt;?php echo TEXT_PRODUCTS_STATUS; ?&gt;&lt;/legend&gt;
+
+            &lt;?php echo osc_draw_radio_field('products_status', array(array('id' =&gt; '1', 'text' =&gt; TEXT_PRODUCT_AVAILABLE), array('id' =&gt; '0', 'text' =&gt; TEXT_PRODUCT_NOT_AVAILABLE)), (isset($pInfo) ? $pInfo-&gt;products_status : '0'), '', false, '&lt;br&gt;'); ?&gt;
+          &lt;/fieldset&gt;
+        &lt;/td&gt;
+        &lt;td class="smallText" width="50%" height="100%" valign="top"&gt;
+          &lt;fieldset style="height: 100%;"&gt;
+            &lt;legend&gt;Information&lt;/legend&gt;
+
+            &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
+              &lt;tr&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo TEXT_PRODUCTS_DATE_AVAILABLE; ?&gt;&lt;/td&gt;
+                &lt;td class="smallText"&gt;&lt;?php echo osc_draw_input_field('products_date_available', (isset($pInfo) ? $pInfo-&gt;products_date_available : ''), 'id="calendarValue"'); ?&gt;&lt;input type="button" value="..." id="calendarTrigger" class="operationButton"&gt;&lt;script type="text/javascript"&gt;Calendar.setup( { inputField: "calendarValue", ifFormat: "%Y-%m-%d", button: "calendarTrigger" } );&lt;/script&gt;&lt;small&gt;(YYYY-MM-DD)&lt;/small&gt;&lt;/td&gt;
+              &lt;/tr&gt;
+            &lt;/table&gt;
+          &lt;/fieldset&gt;
+        &lt;/td&gt;
</pre><pre class="diff" id="context">       &lt;/tr&gt;
     &lt;/table&gt;
</pre><pre class="diff" id="added">+  &lt;/div&gt;
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="removed">-&lt;script language="javascript"&gt;&lt;!--
-  updateGross();
-//--&gt;&lt;/script&gt;
</pre><pre class="diff" id="added">+  &lt;div class="tab-page" id="tabImage"&gt;
+    &lt;h2 class="tab"&gt;&lt;?php echo 'Image'; ?&gt;&lt;/h2&gt;
+
+    &lt;script type="text/javascript"&gt;&lt;!--
+      mainTabPane.addTabPage( document.getElementById( "tabImage" ) );
+    //--&gt;&lt;/script&gt;
+
+    &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
+      &lt;tr&gt;
+        &lt;td class="smallText" width="50%" height="100%" valign="top"&gt;
+          &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
+            &lt;tr&gt;
+              &lt;td class="smallText" width="50%" height="100%" valign="top"&gt;
+                &lt;fieldset style="height: 100%;"&gt;
+                  &lt;legend&gt;Image Location&lt;/legend&gt;
+
+                  &lt;p&gt;&lt;?php echo DIR_WS_CATALOG_IMAGES . osc_draw_input_field('products_image', (isset($pInfo) ? $pInfo-&gt;products_image : '')) . '&amp;nbsp;&lt;input type="button" value="Preview" onClick="reloadImage();" class="infoBoxButton"&gt;'; ?&gt;&lt;/p&gt;
+                &lt;/fieldset&gt;
+              &lt;/td&gt;
+            &lt;/tr&gt;
+            &lt;tr&gt;
+              &lt;td class="smallText" width="50%" height="100%" valign="top"&gt;
+                &lt;fieldset style="height: 100%;"&gt;
+                  &lt;legend&gt;Upload New Image&lt;/legend&gt;
+
+                  &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
+                    &lt;tr&gt;
+                      &lt;td class="smallText"&gt;&lt;?php echo TEXT_PRODUCTS_IMAGE; ?&gt;&lt;/td&gt;
+                      &lt;td class="smallText"&gt;&lt;?php echo osc_draw_file_field('products_image_new'); ?&gt;&lt;/td&gt;
+                    &lt;/tr&gt;
+                    &lt;tr&gt;
+                      &lt;td class="smallText"&gt;&lt;?php echo 'Destination'; ?&gt;&lt;/td&gt;
+                      &lt;td class="smallText"&gt;&lt;?php echo osc_draw_pull_down_menu('products_image_location', $image_directories, dirname($pInfo-&gt;products_image)); ?&gt;&lt;/td&gt;
+                    &lt;/tr&gt;
+                  &lt;/table&gt;
+                &lt;/fieldset&gt;
+              &lt;/td&gt;
+            &lt;/tr&gt;
+          &lt;/table&gt;
+        &lt;/td&gt;
+        &lt;td class="smallText" width="50%" height="100%" valign="top"&gt;
+          &lt;fieldset style="height: 100%;"&gt;
+            &lt;legend&gt;Preview&lt;/legend&gt;
</pre><pre class="diff" id="context"> 
</pre><pre class="diff" id="added">+            &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
+              &lt;tr&gt;
+                &lt;td align="center"&gt;&lt;?php echo tep_image(DIR_WS_CATALOG_IMAGES . $pInfo-&gt;products_image, '', '', '', 'id="previewImage"'); ?&gt;&lt;/td&gt;
+              &lt;/tr&gt;
+            &lt;/table&gt;
+          &lt;/fieldset&gt;
+        &lt;/td&gt;
+      &lt;/tr&gt;
+    &lt;/table&gt;
</pre><pre class="diff" id="context">   &lt;/div&gt;
 
</pre><pre class="diff" id="removed">-  &lt;div class="tab-page" id="tab<span id="removedchars">Page2</span>"&gt;
</pre><pre class="diff" id="added">+  &lt;div class="tab-page" id="tab<span id="addedchars">Attributes</span>"&gt;
</pre><pre class="diff" id="context">     &lt;h2 class="tab"&gt;&lt;?php echo TAB_ATTRIBUTES; ?&gt;&lt;/h2&gt;
 
</pre><pre class="diff" id="removed">-&lt;script type="text/javascript"&gt;tp1.addTabPage( document.getElementById( "tabPage2" ) );&lt;/script&gt;
</pre><pre class="diff" id="added">+&lt;script type="text/javascript"&gt;mainTabPane.addTabPage( document.getElementById( "tabAttributes" ) );&lt;/script&gt;
</pre><pre class="diff" id="context"> 
     &lt;table border="0" width="100%" cellspacing="0" cellpadding="2"&gt;
       &lt;tr&gt;
</pre><pre class="diff"><small id="info">@@ -365,7 +466,7 @@
</small></pre><pre class="diff" id="context"> ?&gt;
         &lt;/select&gt;&lt;/td&gt;
         &lt;td align="center" width="10%" class="smallText"&gt;
</pre><pre class="diff" id="removed">-          &lt;input type="button" value="&gt;&gt;" onClick="moreFields()"&gt;
</pre><pre class="diff" id="added">+          &lt;input type="button" value="&gt;&gt;" onClick="moreFields()"<span id="addedchars">&nbsp;class="infoBoxButton"</span>&gt;
</pre><pre class="diff" id="context">         &lt;/td&gt;
         &lt;td width="60%" valign="top" class="smallText"&gt;
           &lt;fieldset&gt;
</pre><pre class="diff"><small id="info">@@ -395,8 +496,8 @@
</small></pre><pre class="diff" id="context"> 
     echo '              &lt;tr id="attribute-' . $Qattributes-&gt;valueInt('products_options_id') . '_' . $Qattributes-&gt;valueInt('products_options_values_id') . '"&gt;' . "\n" .
          '                &lt;td class="smallText" width="50%"&gt;' . $Qattributes-&gt;value('products_options_values_name') . '&lt;/td&gt;' . "\n" .
</pre><pre class="diff" id="removed">-         '                &lt;td class="smallText"&gt;' . osc_draw_input_field('attribute_prefix[' . $Qattributes-&gt;valueInt('products_options_id') . '][' . $Qattributes-&gt;valueInt('products_options_values_id') . ']', $Qattributes-&gt;value('price_prefix'), 'size="1" maxlength="1"') . '&amp;nbsp;' . osc_draw_input_field('attribute_price[' . $Qattributes-&gt;valueInt('products_options_id') . '][' . $Qattributes-&gt;valueInt('products_options_values_id') . ']', $Qattributes-&gt;value('options_values_price')) . '&lt;/td&gt;' . "\n" .
-         '                &lt;td class="smallText" align="right"&gt;&lt;input type="button" value="-" id="attribute-' . $Qattributes-&gt;valueInt('products_options_id') . '_' . $Qattributes-&gt;valueInt('products_options_values_id') . '-button" onClick="toggleAttributeStatus(\'attribute-' . $Qattributes-&gt;valueInt('products_options_id') . '_' . $Qattributes-&gt;valueInt('products_options_values_id') . '\');"&gt;&lt;/td&gt;' . "\n" .
</pre><pre class="diff" id="added">+         '                &lt;td class="smallText"&gt;' . osc_draw_pull_down_menu('attribute_prefix[' . $Qattributes-&gt;valueInt('products_options_id') . '][' . $Qattributes-&gt;valueInt('products_options_values_id') . ']', array(array('id' =&gt; '+', 'text' =&gt; '+'), array('id' =&gt; '-', 'text' =&gt; '-')), $Qattributes-&gt;value('price_prefix')) . '&amp;nbsp;' . osc_draw_input_field('attribute_price[' . $Qattributes-&gt;valueInt('products_options_id') . '][' . $Qattributes-&gt;valueInt('products_options_values_id') . ']', $Qattributes-&gt;value('options_values_price')) . '&lt;/td&gt;' . "\n" .
+         '                &lt;td class="smallText" align="right"&gt;&lt;input type="button" value="-" id="attribute-' . $Qattributes-&gt;valueInt('products_options_id') . '_' . $Qattributes-&gt;valueInt('products_options_values_id') . '-button" onClick="toggleAttributeStatus(\'attribute-' . $Qattributes-&gt;valueInt('products_options_id') . '_' . $Qattributes-&gt;valueInt('products_options_values_id') . '\');" class="infoBoxButton"&gt;&lt;/td&gt;' . "\n" .
</pre><pre class="diff" id="context">          '              &lt;/tr&gt;' . "\n";
   }
 ?&gt;
</pre><pre class="diff"><small id="info">@@ -411,8 +512,8 @@
</small></pre><pre class="diff" id="context">                 &lt;/tr&gt;
                 &lt;tr class="attributeAdd"&gt;
                   &lt;td class="smallText" width="50%"&gt;&lt;span id="attributeKey"&gt;&amp;nbsp;&lt;/span&gt;&lt;/td&gt;
</pre><pre class="diff" id="removed">-                  &lt;td class="smallText"&gt;&lt;?php echo osc_draw_input_field('new_attribute_prefix', '+', 'disabled size="1" maxlength="1"') . '&amp;nbsp;' . osc_draw_input_field('new_attribute_price', '', 'disabled'); ?&gt;&lt;/td&gt;
-                  &lt;td class="smallText" align="right"&gt;&lt;input type="button" value="-" onClick="this.parentNode.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode.parentNode);"&gt;&lt;/td&gt;
</pre><pre class="diff" id="added">+                  &lt;td class="smallText"&gt;&lt;?php echo osc_draw_pull_down_menu('new_attribute_prefix', array(array('id' =&gt; '+', 'text' =&gt; '+'), array('id' =&gt; '-', 'text' =&gt; '-')), '+', 'disabled') . '&amp;nbsp;' . osc_draw_input_field('new_attribute_price', '', 'disabled'); ?&gt;&lt;/td&gt;
+                  &lt;td class="smallText" align="right"&gt;&lt;input type="button" value="-" onClick="this.parentNode.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode.parentNode);" class="infoBoxButton"&gt;&lt;/td&gt;
</pre><pre class="diff" id="context">                 &lt;/tr&gt;
               &lt;/table&gt;
             &lt;/div&gt;
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin">admin</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates">templates</a>/<a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages">pages</a><br /></span>
<div class="fileheader"><big><b>products_preview.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_preview.php?rev=1.1&amp;content-type=text/vnd.viewcvs-markup">1.1</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_preview.php.diff?r1=1.1&amp;r2=1.2">-&gt;</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_preview.php?rev=1.2&amp;content-type=text/vnd.viewcvs-markup">1.2</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.1 -r1.2
--- products_preview.php	2004/08/27 22:13:15	1.1
+++ products_preview.php	2004/08/29 22:17:21	1.2
@@ -35,11 +35,15 @@
</small></pre><pre class="diff" id="context">     $pInfo = new objectInfo($_POST);
 
     if (!isset($_GET['read'])) {
</pre><pre class="diff" id="removed">-// copy image only if modified
-      if ($products_image = new upload('products_image', DIR_FS_CATALOG_IMAGES)) {
-        $products_image_name = $products_image-&gt;filename;
-      } else {
-        $products_image_name = (isset($_POST['products_previous_image']) ? $_POST['products_previous_image'] : '');
</pre><pre class="diff" id="added">+      $products_image_name = $_POST['products_image'];
+
+      $destination = realpath(DIR_FS_CATALOG_IMAGES . $_POST['products_image_location']);
+      if (substr($destination, 0, strlen(DIR_FS_CATALOG_IMAGES)) == DIR_FS_CATALOG_IMAGES) {
+        $products_image = new upload('products_image_new');
+        $products_image-&gt;set_destination($destination);
+        if ($products_image-&gt;parse() &amp;&amp; $products_image-&gt;save()) {
+          $products_image_name = (!empty($_POST['products_image_location']) ? $_POST['products_image_location'] . '/' : '') . $products_image-&gt;filename;
+        }
</pre><pre class="diff" id="context">       }
     }
   }
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; email">CVSspam</a> 0.2.9</small></center>
</body></html>


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click