[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&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&r2=1.14">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products.php?rev=1.14&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&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&r2=1.7">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english/products.php?rev=1.7&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&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&r2=1.2">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol/products.php?rev=1.2&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&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&r2=1.2">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german/products.php?rev=1.2&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&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&r2=1.2">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products.php?rev=1.2&content-type=text/vnd.viewcvs-markup">1.2</a></td></tr>
<tr class="alt"><td><tt> /<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&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&r2=1.2">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_edit.php?rev=1.2&content-type=text/vnd.viewcvs-markup">1.2</a></td></tr>
<tr><td><tt> /<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&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&r2=1.2">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_preview.php?rev=1.2&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&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&r2=1.14">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products.php?rev=1.14&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->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"> limit 1</span>');
</pre><pre class="diff" id="added">+ $Qcheck = $osC_Database->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->bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
$Qcheck->bindInt(':products_id', $products_id);
$Qcheck->bindRaw(':attributes', implode('", "', $attributes_array));
$Qcheck->execute();
if ($Qcheck->numberOfRows()) {
</pre><pre class="diff" id="removed">- $Qdelete = $osC_Database->query('delete from :table_products_attributes where products_id = :products_id and concat(options_id, "-", options_values_id) not in (":attributes")');
- $Qdelete->bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
- $Qdelete->bindInt(':products_id', $products_id);
- $Qdelete->bindRaw(':attributes', implode('", "', $attributes_array));
- $Qdelete->execute();
</pre><pre class="diff" id="added">+ while ($Qcheck->next()) {
+ $Qdelete = $osC_Database->query('delete from :table_products_attributes where products_attributes_id = :products_attributes_id');
+ $Qdelete->bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
+ $Qdelete->bindInt(':products_attributes_id', $Qcheck->valueInt('products_attributes_id'));
+ $Qdelete->execute();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- if ($osC_Database->isError()) {
- $error = true;
</pre><pre class="diff" id="added">+ if ($osC_Database->isError() === false) {
+ $Qdelete = $osC_Database->query('delete from :table_products_attributes_download where products_attributes_id = :products_attributes_id');
+ $Qdelete->bindTable(':table_products_attributes_download', TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD);
+ $Qdelete->bindInt(':products_attributes_id', $Qcheck->valueInt('products_attributes_id'));
+ $Qdelete->execute();
+
+ if ($osC_Database->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&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&r2=1.7">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/english/products.php?rev=1.7&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 &quot;%s&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&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&r2=1.2">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/espanol/products.php?rev=1.2&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&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&oacute;n');
</pre><pre class="diff" id="context">
define('TEXT_NEW_PRODUCT', 'Nuevo Producto en &quot;%s&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&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&r2=1.2">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/includes/languages/german/products.php?rev=1.2&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 &quot;%s&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&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&r2=1.2">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products.php?rev=1.2&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"> <thead>
<tr>
<th><?php echo TABLE_HEADING_PRODUCTS; ?></th>
</pre><pre class="diff" id="added">+ <th><?php echo TABLE_HEADING_PRICE; ?></th>
+ <th><?php echo TABLE_HEADING_QUANTITY; ?></th>
</pre><pre class="diff" id="context"> <th><?php echo TABLE_HEADING_STATUS; ?></th>
<th><?php echo TABLE_HEADING_ACTION; ?></th>
</tr>
</pre><pre class="diff"><small id="info">@@ -39,10 +41,10 @@
</small></pre><pre class="diff" id="context"> <tbody>
<?php
if (isset($_GET['search']) && !empty($_GET['search'])) {
</pre><pre class="diff" id="removed">- $Qproducts = $osC_Database->query('select p.products_id, pd.products_name, p.products_quantity, p.products_<span id="removedchars">image, 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->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->bindValue(':products_name', '%' . $_GET['search'] . '%');
} else {
</pre><pre class="diff" id="removed">- $Qproducts = $osC_Database->query('select p.products_id, pd.products_name, p.products_quantity, p.products_<span id="removedchars">image, 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->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->bindTable(':table_products', TABLE_PRODUCTS);
$Qproducts->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"> }
?>
<td><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS, 'page=' . $_GET['page'] . '&cPath=' . $cPath . '&pID=' . $Qproducts->valueInt('products_id') . '&action=new_product_preview&read=only') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '&nbsp;' . $Qproducts->value('products_name') . '</a>'; ?></td>
</pre><pre class="diff" id="added">+ <td align="right"><?php echo $osC_Currencies->format($Qproducts->value('products_price')); ?></td>
+ <td align="right"><?php echo $Qproducts->valueInt('products_quantity'); ?></td>
</pre><pre class="diff" id="context"> <td align="center"><?php echo tep_image('templates/' . $template . '/images/icons/' . (($Qproducts->valueInt('products_status') === 1) ? 'checkbox_ticked.gif' : 'checkbox_crossed.gif')); ?></td>
<td align="right">
<?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&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&r2=1.2">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_edit.php?rev=1.2&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->setExcludeEntries('CVS');
+ $osC_Dir_Images->setIncludeFiles(false);
+ $osC_Dir_Images->setRecursive(true);
+ $osC_Dir_Images->setAddDirectoryToFilename(true);
+ $files = $osC_Dir_Images->getFiles();
+
+ $image_directories = array(array('id' => '', 'text' => 'images/'));
+ foreach ($files as $file) {
+ $image_directories[] = array('id' => $file['name'], 'text' => 'images/' . $file['name']);
+ }
</pre><pre class="diff" id="context"> ?>
<script type="text/javascript" src="external/FCKeditor/2.0b1/fckeditor.js"></script>
</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<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<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<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<rowFields.length; rF++) {
- if (rowFields[rF].type != 'button') {
- rowFields[rF].disabled = true;
</pre><pre class="diff" id="added">+ for (rF=0; rF<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<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<rowFields.length; rF++) {
- if (rowFields[rF].type != 'button') {
- rowFields[rF].disabled = false;
</pre><pre class="diff" id="added">+ for (rF=0; rF<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<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 = '<?php echo DIR_WS_CATALOG_IMAGES; ?>' + image;
+ }
</pre><pre class="diff" id="context"> //--></script>
<link type="text/css" rel="stylesheet" href="external/tabpane/css/luna/tab.css" />
</pre><pre class="diff"><small id="info">@@ -198,144 +234,209 @@
</small></pre><pre class="diff" id="context">
<h1><?php echo sprintf(TEXT_NEW_PRODUCT, tep_output_generated_category_path($current_category_id)); ?></h1>
</pre><pre class="diff" id="removed">-<div class="tab-pane" id="tabPane1">
- <script type="text/javascript">
- tp1 = new WebFXTabPane( document.getElementById( "tabPane1" ) );
- </script>
</pre><pre class="diff" id="added">+<div class="tab-pane" id="mainTabPane">
+ <script type="text/javascript"><!--
+ var mainTabPane = new WebFXTabPane( document.getElementById( "mainTabPane" ) );
+ //--></script>
</pre><pre class="diff" id="context">
<?php
echo tep_draw_form('new_product', FILENAME_PRODUCTS, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . '&action=new_product_preview', 'post', 'enctype="multipart/form-data"');
?>
</pre><pre class="diff" id="removed">- <div class="tab-page" id="tab<span id="removedchars">Page1</span>">
</pre><pre class="diff" id="added">+ <div class="tab-page" id="tab<span id="addedchars">Description</span>">
</pre><pre class="diff" id="context"> <h2 class="tab"><?php echo TAB_GENERAL; ?></h2>
</pre><pre class="diff" id="removed">- <script type="text/javascript">tp1.addTabPage( document.getElementById( "tabPage1" ) );</script>
</pre><pre class="diff" id="added">+ <script type="text/javascript"><!--
+ mainTabPane.addTabPage( document.getElementById( "tabDescription" ) );
+ //--></script>
+
+ <div class="tab-pane" id="descriptionTabPane">
+ <script type="text/javascript"><!--
+ var descriptionTabPane = new WebFXTabPane( document.getElementById( "descriptionTabPane" ) );
+ //--></script>
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- <table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td class="main"><?php echo TEXT_PRODUCTS_STATUS; ?></td>
- <td class="main"><?php echo osc_draw_radio_field('products_status', array(array('id' => '1', 'text' => TEXT_PRODUCT_AVAILABLE), array('id' => '0', 'text' => TEXT_PRODUCT_NOT_AVAILABLE)), (isset($pInfo) ? $pInfo->products_status : '0')); ?></td>
- </tr>
- <tr>
- <td class="smallText" colspan="2">&nbsp;</td>
- </tr>
- <tr>
- <td class="main"><?php echo TEXT_PRODUCTS_DATE_AVAILABLE; ?><br><small>(YYYY-MM-DD)</small></td>
- <td class="main"><?php echo osc_draw_input_field('products_date_available', (isset($pInfo) ? $pInfo->products_date_available : ''), 'id="calendarValue"'); ?><input type="button" value="..." id="calendarTrigger" class="operationButton"><script type="text/javascript">Calendar.setup( { inputField: "calendarValue", ifFormat: "%Y-%m-%d", button: "calendarTrigger" } );</script></td>
- </tr>
- <tr>
- <td class="smallText" colspan="2">&nbsp;</td>
- </tr>
- <tr>
- <td class="main"><?php echo TEXT_PRODUCTS_MANUFACTURER; ?></td>
- <td class="main"><?php echo osc_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($pInfo) ? $pInfo->manufacturers_id : '')); ?></td>
- </tr>
- <tr>
- <td class="smallText" colspan="2">&nbsp;</td>
- </tr>
- <tr bgcolor="#fff3e7">
- <td class="main">&nbsp;</td>
- <td>
</pre><pre class="diff" id="context"> <?php
foreach ($languages as $l_entry) {
</pre><pre class="diff" id="removed">- echo ' <span id="lang_' . $l_entry['code'] . '"' . (($l_entry['directory'] == $osC_Session->value('language')) ? ' class="highlight"' : '') . '><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\');">' . tep_image(DIR_WS_CATALOG_LANGUAGES . $l_entry['directory'] . '/images/' . $l_entry['image'], $l_entry['name']) . '</a></span>&nbsp;&nbsp;';
- }
</pre><pre class="diff" id="context"> ?>
</pre><pre class="diff" id="removed">- </td>
- </tr>
- <tr bgcolor="#fff3e7">
- <td class="main"><?php echo TEXT_PRODUCTS_NAME; ?></td>
- <td>
</pre><pre class="diff" id="added">+
+ <div class="tab-page" id="tabDescriptionLanguages_<?php echo $l_entry['code']; ?>">
+ <h2 class="tab"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $l_entry['directory'] . '/images/' . $l_entry['image'], $l_entry['name']) . '&nbsp;' . $l_entry['name']; ?></h2>
+
+ <script type="text/javascript"><!--
+ descriptionTabPane.addTabPage( document.getElementById( "tabDescriptionLanguages_<?php echo $l_entry['code']; ?>" ) );
+ //--></script>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText"><?php echo TEXT_PRODUCTS_NAME; ?></td>
+ <td class="smallText"><?php echo osc_draw_input_field('products_name[' . $l_entry['id'] . ']', (isset($pInfo) && is_array($pInfo->products_name) && isset($pInfo->products_name[$l_entry['id']]) ? $pInfo->products_name[$l_entry['id']] : '')); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText" valign="top"><?php echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
+ <td class="smallText"><?php echo tep_draw_textarea_field('products_description[' . $l_entry['id'] . ']', 'soft', '70', '15', (isset($pInfo) && is_array($pInfo->products_description) && isset($pInfo->products_description[$l_entry['id']]) ? $pInfo->products_description[$l_entry['id']] : ''), 'id="fckpd_' . $l_entry['code'] . '" style="width: 100%;"'); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText"><?php echo TEXT_PRODUCTS_URL; ?></td>
+ <td class="smallText"><?php echo osc_draw_input_field('products_url[' . $l_entry['id'] . ']', (isset($pInfo) && is_array($pInfo->products_url) && isset($pInfo->products_url[$l_entry['id']]) ? $pInfo->products_url[$l_entry['id']] : '')); ?></td>
+ </tr>
+ </table>
+
+ <script type="text/javascript"><!--
+ var fckpd_<?php echo $l_entry['code']; ?> = new FCKeditor('fckpd_<?php echo $l_entry['code']; ?>');
+ fckpd_<?php echo $l_entry['code']; ?>.BasePath = "<?php echo DIR_WS_ADMIN . 'external/FCKeditor/2.0b1/'; ?>";
+ fckpd_<?php echo $l_entry['code']; ?>.Height = "400";
+ fckpd_<?php echo $l_entry['code']; ?>.ReplaceTextarea();
+ //--></script>
+ </div>
+
</pre><pre class="diff" id="context"> <?php
</pre><pre class="diff" id="removed">- foreach ($languages as $l_entry) {
- echo ' <div id="pName_' . $l_entry['code'] . '"' . (($l_entry['directory'] != $osC_Session->value('language')) ? ' style="display: none;"' : '') . '>' . osc_draw_input_field('products_name[' . $l_entry['id'] . ']', (isset($pInfo) && is_array($pInfo->products_name) && isset($pInfo->products_name[$l_entry['id']]) ? $pInfo->products_name[$l_entry['id']] : '')) . '</div>';
</pre><pre class="diff" id="context"> }
?>
</pre><pre class="diff" id="removed">- </td>
- </tr>
- <tr bgcolor="#fff3e7">
- <td class="main" valign="top"><?php echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
- <td>
-<?php
- foreach ($languages as $l_entry) {
- echo ' <div id="pDesc_' . $l_entry['code'] . '"' . (($l_entry['directory'] != $osC_Session->value('language')) ? ' style="display: none;"' : '') . '>' . tep_draw_textarea_field('products_description[' . $l_entry['id'] . ']', 'soft', '70', '15', (isset($pInfo) && is_array($pInfo->products_description) && isset($pInfo->products_description[$l_entry['id']]) ? $pInfo->products_description[$l_entry['id']] : ''), 'id="fckpd_' . $l_entry['code'] . '" style="width: 100%;"') . '</div>';
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- echo '<script type="text/javascript"><!--' . "\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" .
- '//--></script>';
- }
-?>
</pre><pre class="diff" id="added">+ </div>
+ </div>
+
+ <div class="tab-page" id="tabData">
+ <h2 class="tab"><?php echo 'Data'; ?></h2>
+
+ <script type="text/javascript"><!--
+ mainTabPane.addTabPage( document.getElementById( "tabData" ) );
+ //--></script>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText" width="50%" height="100%" valign="top">
+ <fieldset style="height: 100%;">
+ <legend>Price</legend>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText"><?php echo TEXT_PRODUCTS_TAX_CLASS; ?></td>
+ <td class="smallText"><?php echo osc_draw_pull_down_menu('products_tax_class_id', $tax_class_array, (isset($pInfo) ? $pInfo->products_tax_class_id : ''), 'onchange="updateGross()"'); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td>
+ <td class="smallText"><?php echo osc_draw_input_field('products_price', (isset($pInfo) ? $pInfo->products_price : ''), 'onKeyUp="updateGross()"'); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td>
+ <td class="smallText"><?php echo osc_draw_input_field('products_price_gross', (isset($pInfo) ? $pInfo->products_price : ''), 'OnKeyUp="updateNet()"'); ?></td>
+ </tr>
+ </table>
+
+ <script language="javascript"><!--
+ updateGross();
+ //--></script>
+ </fieldset>
</pre><pre class="diff" id="context"> </td>
</pre><pre class="diff" id="removed">- </tr>
- <tr bgcolor="#fff3e7">
- <td class="main"><?php echo TEXT_PRODUCTS_URL . '<br><small>' . TEXT_PRODUCTS_URL_WITHOUT_HTTP . '</small>'; ?></td>
- <td>
-<?php
- foreach ($languages as $l_entry) {
- echo ' <div id="pURL_' . $l_entry['code'] . '"' . (($l_entry['directory'] != $osC_Session->value('language')) ? ' style="display: none;"' : '') . '>' . osc_draw_input_field('products_url[' . $l_entry['id'] . ']', (isset($pInfo) && is_array($pInfo->products_url) && isset($pInfo->products_url[$l_entry['id']]) ? $pInfo->products_url[$l_entry['id']] : '')) . '</div>';
- }
-?>
</pre><pre class="diff" id="added">+ <td class="smallText" width="50%" height="100%" valign="top">
+ <fieldset style="height: 100%;">
+ <legend>Data</legend>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText"><?php echo TEXT_PRODUCTS_MANUFACTURER; ?></td>
+ <td class="smallText"><?php echo osc_draw_pull_down_menu('manufacturers_id', $manufacturers_array, (isset($pInfo) ? $pInfo->manufacturers_id : '')); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText"><?php echo TEXT_PRODUCTS_MODEL; ?></td>
+ <td class="smallText"><?php echo osc_draw_input_field('products_model', (isset($pInfo) ? $pInfo->products_model : '')); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText"><?php echo TEXT_PRODUCTS_QUANTITY; ?></td>
+ <td class="smallText"><?php echo osc_draw_input_field('products_quantity', (isset($pInfo) ? $pInfo->products_quantity : '')); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>
+ <td class="smallText"><?php echo osc_draw_input_field('products_weight', (isset($pInfo) ? $pInfo->products_weight : '')). '&nbsp;' . osc_draw_pull_down_menu('products_weight_class', $weight_class_array, (isset($pInfo) ? $pInfo->products_weight_class : SHIPPING_WEIGHT_UNIT)); ?></td>
+ </tr>
+ </table>
+ </fieldset>
</pre><pre class="diff" id="context"> </td>
</tr>
</pre><pre class="diff" id="removed">- <tr>
- <td class="smallText" colspan="2">&nbsp;</td>
- </tr>
- <tr bgcolor="#ebebff">
- <td class="main"><?php echo TEXT_PRODUCTS_TAX_CLASS; ?></td>
- <td class="main"><?php echo osc_draw_pull_down_menu('products_tax_class_id', $tax_class_array, (isset($pInfo) ? $pInfo->products_tax_class_id : ''), 'onchange="updateGross()"'); ?></td>
- </tr>
- <tr bgcolor="#ebebff">
- <td class="main"><?php echo TEXT_PRODUCTS_PRICE_NET; ?></td>
- <td class="main"><?php echo osc_draw_input_field('products_price', (isset($pInfo) ? $pInfo->products_price : ''), 'onKeyUp="updateGross()"'); ?></td>
- </tr>
- <tr bgcolor="#ebebff">
- <td class="main"><?php echo TEXT_PRODUCTS_PRICE_GROSS; ?></td>
- <td class="main"><?php echo osc_draw_input_field('products_price_gross', (isset($pInfo) ? $pInfo->products_price : ''), 'OnKeyUp="updateNet()"'); ?></td>
- </tr>
- <tr>
- <td class="smallText" colspan="2">&nbsp;</td>
- </tr>
- <tr>
- <td class="main"><?php echo TEXT_PRODUCTS_QUANTITY; ?></td>
- <td class="main"><?php echo osc_draw_input_field('products_quantity', (isset($pInfo) ? $pInfo->products_quantity : '')); ?></td>
- </tr>
- <tr>
- <td class="smallText" colspan="2">&nbsp;</td>
- </tr>
- <tr>
- <td class="main"><?php echo TEXT_PRODUCTS_MODEL; ?></td>
- <td class="main"><?php echo osc_draw_input_field('products_model', (isset($pInfo) ? $pInfo->products_model : '')); ?></td>
- </tr>
- <tr>
- <td class="smallText" colspan="2">&nbsp;</td>
- </tr>
</pre><pre class="diff" id="context"> <tr>
</pre><pre class="diff" id="removed">- <td class="main"><?php echo TEXT_PRODUCTS_IMAGE; ?></td>
- <td class="main"><?php echo osc_draw_file_field('products_image') . '<br>' . (isset($pInfo) ? $pInfo->products_image . osc_draw_hidden_field('products_previous_image', $pInfo->products_image) : ''); ?></td>
- </tr>
- <tr>
- <td class="smallText" colspan="2">&nbsp;</td>
- </tr>
- <tr>
- <td class="main"><?php echo TEXT_PRODUCTS_WEIGHT; ?></td>
- <td class="main"><?php echo osc_draw_input_field('products_weight', (isset($pInfo) ? $pInfo->products_weight : '')). '&nbsp;' . osc_draw_pull_down_menu('products_weight_class', $weight_class_array, (isset($pInfo) ? $pInfo->products_weight_class : SHIPPING_WEIGHT_UNIT)); ?></td>
</pre><pre class="diff" id="added">+ <td class="smallText" width="50%" height="100%" valign="top">
+ <fieldset style="height: 100%;">
+ <legend><?php echo TEXT_PRODUCTS_STATUS; ?></legend>
+
+ <?php echo osc_draw_radio_field('products_status', array(array('id' => '1', 'text' => TEXT_PRODUCT_AVAILABLE), array('id' => '0', 'text' => TEXT_PRODUCT_NOT_AVAILABLE)), (isset($pInfo) ? $pInfo->products_status : '0'), '', false, '<br>'); ?>
+ </fieldset>
+ </td>
+ <td class="smallText" width="50%" height="100%" valign="top">
+ <fieldset style="height: 100%;">
+ <legend>Information</legend>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText"><?php echo TEXT_PRODUCTS_DATE_AVAILABLE; ?></td>
+ <td class="smallText"><?php echo osc_draw_input_field('products_date_available', (isset($pInfo) ? $pInfo->products_date_available : ''), 'id="calendarValue"'); ?><input type="button" value="..." id="calendarTrigger" class="operationButton"><script type="text/javascript">Calendar.setup( { inputField: "calendarValue", ifFormat: "%Y-%m-%d", button: "calendarTrigger" } );</script><small>(YYYY-MM-DD)</small></td>
+ </tr>
+ </table>
+ </fieldset>
+ </td>
</pre><pre class="diff" id="context"> </tr>
</table>
</pre><pre class="diff" id="added">+ </div>
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">-<script language="javascript"><!--
- updateGross();
-//--></script>
</pre><pre class="diff" id="added">+ <div class="tab-page" id="tabImage">
+ <h2 class="tab"><?php echo 'Image'; ?></h2>
+
+ <script type="text/javascript"><!--
+ mainTabPane.addTabPage( document.getElementById( "tabImage" ) );
+ //--></script>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText" width="50%" height="100%" valign="top">
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText" width="50%" height="100%" valign="top">
+ <fieldset style="height: 100%;">
+ <legend>Image Location</legend>
+
+ <p><?php echo DIR_WS_CATALOG_IMAGES . osc_draw_input_field('products_image', (isset($pInfo) ? $pInfo->products_image : '')) . '&nbsp;<input type="button" value="Preview" onClick="reloadImage();" class="infoBoxButton">'; ?></p>
+ </fieldset>
+ </td>
+ </tr>
+ <tr>
+ <td class="smallText" width="50%" height="100%" valign="top">
+ <fieldset style="height: 100%;">
+ <legend>Upload New Image</legend>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText"><?php echo TEXT_PRODUCTS_IMAGE; ?></td>
+ <td class="smallText"><?php echo osc_draw_file_field('products_image_new'); ?></td>
+ </tr>
+ <tr>
+ <td class="smallText"><?php echo 'Destination'; ?></td>
+ <td class="smallText"><?php echo osc_draw_pull_down_menu('products_image_location', $image_directories, dirname($pInfo->products_image)); ?></td>
+ </tr>
+ </table>
+ </fieldset>
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td class="smallText" width="50%" height="100%" valign="top">
+ <fieldset style="height: 100%;">
+ <legend>Preview</legend>
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="added">+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td align="center"><?php echo tep_image(DIR_WS_CATALOG_IMAGES . $pInfo->products_image, '', '', '', 'id="previewImage"'); ?></td>
+ </tr>
+ </table>
+ </fieldset>
+ </td>
+ </tr>
+ </table>
</pre><pre class="diff" id="context"> </div>
</pre><pre class="diff" id="removed">- <div class="tab-page" id="tab<span id="removedchars">Page2</span>">
</pre><pre class="diff" id="added">+ <div class="tab-page" id="tab<span id="addedchars">Attributes</span>">
</pre><pre class="diff" id="context"> <h2 class="tab"><?php echo TAB_ATTRIBUTES; ?></h2>
</pre><pre class="diff" id="removed">-<script type="text/javascript">tp1.addTabPage( document.getElementById( "tabPage2" ) );</script>
</pre><pre class="diff" id="added">+<script type="text/javascript">mainTabPane.addTabPage( document.getElementById( "tabAttributes" ) );</script>
</pre><pre class="diff" id="context">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
</pre><pre class="diff"><small id="info">@@ -365,7 +466,7 @@
</small></pre><pre class="diff" id="context"> ?>
</select></td>
<td align="center" width="10%" class="smallText">
</pre><pre class="diff" id="removed">- <input type="button" value=">>" onClick="moreFields()">
</pre><pre class="diff" id="added">+ <input type="button" value=">>" onClick="moreFields()"<span id="addedchars"> class="infoBoxButton"</span>>
</pre><pre class="diff" id="context"> </td>
<td width="60%" valign="top" class="smallText">
<fieldset>
</pre><pre class="diff"><small id="info">@@ -395,8 +496,8 @@
</small></pre><pre class="diff" id="context">
echo ' <tr id="attribute-' . $Qattributes->valueInt('products_options_id') . '_' . $Qattributes->valueInt('products_options_values_id') . '">' . "\n" .
' <td class="smallText" width="50%">' . $Qattributes->value('products_options_values_name') . '</td>' . "\n" .
</pre><pre class="diff" id="removed">- ' <td class="smallText">' . osc_draw_input_field('attribute_prefix[' . $Qattributes->valueInt('products_options_id') . '][' . $Qattributes->valueInt('products_options_values_id') . ']', $Qattributes->value('price_prefix'), 'size="1" maxlength="1"') . '&nbsp;' . osc_draw_input_field('attribute_price[' . $Qattributes->valueInt('products_options_id') . '][' . $Qattributes->valueInt('products_options_values_id') . ']', $Qattributes->value('options_values_price')) . '</td>' . "\n" .
- ' <td class="smallText" align="right"><input type="button" value="-" id="attribute-' . $Qattributes->valueInt('products_options_id') . '_' . $Qattributes->valueInt('products_options_values_id') . '-button" onClick="toggleAttributeStatus(\'attribute-' . $Qattributes->valueInt('products_options_id') . '_' . $Qattributes->valueInt('products_options_values_id') . '\');"></td>' . "\n" .
</pre><pre class="diff" id="added">+ ' <td class="smallText">' . osc_draw_pull_down_menu('attribute_prefix[' . $Qattributes->valueInt('products_options_id') . '][' . $Qattributes->valueInt('products_options_values_id') . ']', array(array('id' => '+', 'text' => '+'), array('id' => '-', 'text' => '-')), $Qattributes->value('price_prefix')) . '&nbsp;' . osc_draw_input_field('attribute_price[' . $Qattributes->valueInt('products_options_id') . '][' . $Qattributes->valueInt('products_options_values_id') . ']', $Qattributes->value('options_values_price')) . '</td>' . "\n" .
+ ' <td class="smallText" align="right"><input type="button" value="-" id="attribute-' . $Qattributes->valueInt('products_options_id') . '_' . $Qattributes->valueInt('products_options_values_id') . '-button" onClick="toggleAttributeStatus(\'attribute-' . $Qattributes->valueInt('products_options_id') . '_' . $Qattributes->valueInt('products_options_values_id') . '\');" class="infoBoxButton"></td>' . "\n" .
</pre><pre class="diff" id="context"> ' </tr>' . "\n";
}
?>
</pre><pre class="diff"><small id="info">@@ -411,8 +512,8 @@
</small></pre><pre class="diff" id="context"> </tr>
<tr class="attributeAdd">
<td class="smallText" width="50%"><span id="attributeKey">&nbsp;</span></td>
</pre><pre class="diff" id="removed">- <td class="smallText"><?php echo osc_draw_input_field('new_attribute_prefix', '+', 'disabled size="1" maxlength="1"') . '&nbsp;' . osc_draw_input_field('new_attribute_price', '', 'disabled'); ?></td>
- <td class="smallText" align="right"><input type="button" value="-" onClick="this.parentNode.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode.parentNode);"></td>
</pre><pre class="diff" id="added">+ <td class="smallText"><?php echo osc_draw_pull_down_menu('new_attribute_prefix', array(array('id' => '+', 'text' => '+'), array('id' => '-', 'text' => '-')), '+', 'disabled') . '&nbsp;' . osc_draw_input_field('new_attribute_price', '', 'disabled'); ?></td>
+ <td class="smallText" align="right"><input type="button" value="-" onClick="this.parentNode.parentNode.parentNode.parentNode.removeChild(this.parentNode.parentNode.parentNode);" class="infoBoxButton"></td>
</pre><pre class="diff" id="context"> </tr>
</table>
</div>
</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&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&r2=1.2">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_preview.php?rev=1.2&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->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->set_destination($destination);
+ if ($products_image->parse() && $products_image->save()) {
+ $products_image_name = (!empty($_POST['products_image_location']) ? $_POST['products_image_location'] . '/' : '') . $products_image->filename;
+ }
</pre><pre class="diff" id="context"> }
}
}
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> 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