[TEP-COMMIT] [CVS admin] update to the template structure implementation / standards updates
hpdl-OfajU3CKLf1/[email protected] 29 Aug 2004 22:19:10 -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_attributes.php</a></tt></td><td align="right" id="added">+199</td><td align="right" id="removed">-806</td><td nowrap="nowrap" align="center"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products_attributes.php?rev=1.54&content-type=text/vnd.viewcvs-markup">1.54</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products_attributes.php.diff?r1=1.54&r2=1.55">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products_attributes.php?rev=1.55&content-type=text/vnd.viewcvs-markup">1.55</a></td></tr>
<tr class="alt"><td><tt>templates/pages/<a href="#file2"><span id="added">products_attributes.php</span></a></tt></td><td align="right" id="added">+211</td><td></td><td nowrap="nowrap" align="right">added <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_attributes.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></td></tr>
<tr><td><tt> /<a href="#file3"><span id="added">products_attributes_listing.php</span></a></tt></td><td align="right" id="added">+165</td><td></td><td nowrap="nowrap" align="right">added <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_attributes_listing.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></td></tr>
<tr><td></td><td align="right" id="added">+575</td><td align="right" id="removed">-806</td><td></td></tr>
</table>
<small id="info">2 added + 1 modified, total 3 files</small><br />
<pre class="comment">
update to the template structure implementation / standards updates
</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_attributes.php</b></big> <small id="info"><a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products_attributes.php?rev=1.54&content-type=text/vnd.viewcvs-markup">1.54</a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products_attributes.php.diff?r1=1.54&r2=1.55">-></a> <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/products_attributes.php?rev=1.55&content-type=text/vnd.viewcvs-markup">1.55</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.54 -r1.55
--- products_attributes.php 2004/07/22 23:33:00 1.54
+++ products_attributes.php 2004/08/29 22:19:03 1.55
@@ -5,55 +5,12 @@
</small></pre><pre class="diff" id="context"> osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
</pre><pre class="diff" id="removed">- Copyright (c) 200<span id="removedchars">3</span> osCommerce
</pre><pre class="diff" id="added">+ Copyright (c) 200<span id="addedchars">4</span> osCommerce
</pre><pre class="diff" id="context">
Released under the GNU General Public License
*/
</pre><pre class="diff" id="removed">- require('includes/application_top.php');
-
- $selected_box = 'catalog';
-
- $languages = tep_get_languages();
-
- $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
-
- if (tep_not_null($action)) {
- $page_info = '';
- if (isset($HTTP_GET_VARS['option_page'])) $page_info .= 'option_page=' . $HTTP_GET_VARS['option_page'] . '&';
- if (isset($HTTP_GET_VARS['value_page'])) $page_info .= 'value_page=' . $HTTP_GET_VARS['value_page'] . '&';
- if (isset($HTTP_GET_VARS['attribute_page'])) $page_info .= 'attribute_page=' . $HTTP_GET_VARS['attribute_page'] . '&';
- if (tep_not_null($page_info)) {
- $page_info = substr($page_info, 0, -1);
- }
-
- switch ($action) {
- case 'add_product_options':
- $products_options_id = tep_db_prepare_input($HTTP_POST_VARS['products_options_id']);
- $option_name_array = $HTTP_POST_VARS['option_name'];
-
- for ($i=0, $n=sizeof($languages); $i<$n; $i ++) {
- $option_name = tep_db_prepare_input($option_name_array[$languages[$i]['id']]);
-
- tep_db_query("insert into " . TABLE_PRODUCTS_OPTIONS . " (products_options_id, products_options_name, language_id) values ('" . (int)$products_options_id . "', '" . tep_db_input($option_name) . "', '" . (int)$languages[$i]['id'] . "')");
- }
- tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info));
- break;
- case 'add_product_option_values':
- $value_name_array = $HTTP_POST_VARS['value_name'];
- $value_id = tep_db_prepare_input($HTTP_POST_VARS['value_id']);
- $option_id = tep_db_prepare_input($HTTP_POST_VARS['option_id']);
-
- for ($i=0, $n=sizeof($languages); $i<$n; $i ++) {
- $value_name = tep_db_prepare_input($value_name_array[$languages[$i]['id']]);
-
- tep_db_query("insert into " . TABLE_PRODUCTS_OPTIONS_VALUES . " (products_options_values_id, language_id, products_options_values_name) values ('" . (int)$value_id . "', '" . (int)$languages[$i]['id'] . "', '" . tep_db_input($value_name) . "')");
- }
-
- tep_db_query("insert into " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " (products_options_id, products_options_values_id) values ('" . (int)$option_id . "', '" . (int)$value_id . "')");
-
- tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info));
- break;
</pre><pre class="diff" id="added">+/*
</pre><pre class="diff" id="context"> case 'add_product_attributes':
$products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);
$options_id = tep_db_prepare_input($HTTP_POST_VARS['options_id']);
</pre><pre class="diff"><small id="info">@@ -77,811 +34,247 @@
</small></pre><pre class="diff" id="context">
tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info));
break;
</pre><pre class="diff" id="removed">- case 'update_option_name':
- $option_name_array = $HTTP_POST_VARS['option_name'];
- $option_id = tep_db_prepare_input($HTTP_POST_VARS['option_id']);
</pre><pre class="diff" id="added">+*/
+ require('includes/application_top.php');
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- for ($i=0, $n=sizeof($languages); $i<$n; $i ++) {
- $option_name = tep_db_prepare_input($option_name_array[$languages[$i]['id']]);
</pre><pre class="diff" id="added">+ $selected_box = 'catalog';
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- tep_db_query("update " . TABLE_PRODUCTS_OPTIONS . " set products_options_name = '" . tep_db_input($option_name) . "' where products_options_id = '" . (int)$option_id . "' and language_id = '" . (int)$languages[$i]['id'] . "'");
- }
</pre><pre class="diff" id="added">+ $languages = tep_get_languages();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info));
- break;
- case 'update_value':
- $value_name_array = $HTTP_POST_VARS['value_name'];
- $value_id = tep_db_prepare_input($HTTP_POST_VARS['value_id']);
- $option_id = tep_db_prepare_input($HTTP_POST_VARS['option_id']);
</pre><pre class="diff" id="added">+ $action = (isset($_GET['action']) ? $_GET['action'] : '');
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- for ($i=0, $n=sizeof($languages); $i<$n; $i ++) {
- $value_name = tep_db_prepare_input($value_name_array[$languages[$i]['id']]);
</pre><pre class="diff" id="added">+ if (!isset($_GET['page']) || (isset($_GET['page']) && !is_numeric($_GET['page']))) {
+ $_GET['page'] = 1;
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- tep_db_query("update " . TABLE_PRODUCTS_OPTIONS_VALUES . " set products_options_values_name = '" . tep_db_input($value_name) . "' where products_options_values_id = '" . tep_db_input($value_id) . "' and language_id = '" . (int)$languages[$i]['id'] . "'");
- }
</pre><pre class="diff" id="added">+ $entriesAction = (isset($_GET['entriesAction']) ? $_GET['entriesAction'] : '');
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- tep_db_query("update " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " set products_options_id = '" . (int)$option_id . "' where products_options_values_id = '" . (int)$value_id . "'");
</pre><pre class="diff" id="added">+ if (!isset($_GET['entriesPage']) || (isset($_GET['entriesPage']) && !is_numeric($_GET['entriesPage']))) {
+ $_GET['entriesPage'] = 1;
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info));
- break;
- case 'update_product_attribute':
- $products_id = tep_db_prepare_input($HTTP_POST_VARS['products_id']);
- $options_id = tep_db_prepare_input($HTTP_POST_VARS['options_id']);
- $values_id = tep_db_prepare_input($HTTP_POST_VARS['values_id']);
- $value_price = tep_db_prepare_input($HTTP_POST_VARS['value_price']);
- $price_prefix = tep_db_prepare_input($HTTP_POST_VARS['price_prefix']);
- $attribute_id = tep_db_prepare_input($HTTP_POST_VARS['attribute_id']);
</pre><pre class="diff" id="added">+ if (!empty($action)) {
+ switch ($action) {
+ case 'saveGroup':
+ $languages = tep_get_languages();
+ $error = false;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- tep_db_query("update " . TABLE_PRODUCTS_ATTRIBUTES . " set products_id = '" . (int)$products_id . "', options_id = '" . (int)$options_id . "', options_values_id = '" . (int)$values_id . "', options_values_price = '" . tep_db_input($value_price) . "', price_prefix = '" . tep_db_input($price_prefix) . "' where products_attributes_id = '" . (int)$attribute_id . "'");
</pre><pre class="diff" id="added">+ if (isset($_GET['paID']) && is_numeric($_GET['paID'])) {
+ $group_id = $_GET['paID'];
+ } else {
+ $Qcheck = $osC_Database->query('select max(products_options_id) as products_options_id from :table_products_options');
+ $Qcheck->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS);
+ $Qcheck->execute();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- if (DOWNLOAD_ENABLED == 'true') {
- $products_attributes_filename = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_filename']);
- $products_attributes_maxdays = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_maxdays']);
- $products_attributes_maxcount = tep_db_prepare_input($HTTP_POST_VARS['products_attributes_maxcount']);
</pre><pre class="diff" id="added">+ $group_id = $Qcheck->valueInt('products_options_id') + 1;
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- if (tep_not_null($products_attributes_filename)) {
- tep_db_query("replace into " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " set products_attributes_id = '" . (int)$attribute_id . "', products_attributes_filename = '" . tep_db_input($products_attributes_filename) . "', products_attributes_maxdays = '" . tep_db_input($products_attributes_maxdays) . "', products_attributes_maxcount = '" . tep_db_input($products_attributes_maxcount) . "'");
</pre><pre class="diff" id="added">+ $osC_Database->startTransaction();
+
+ foreach ($languages as $l_entry) {
+ if (isset($_GET['paID']) && is_numeric($_GET['paID'])) {
+ $Qgroup = $osC_Database->query('update :table_products_options set products_options_name = :products_options_name where products_options_id = :products_options_id and language_id = :language_id');
+ } else {
+ $Qgroup = $osC_Database->query('insert into :table_products_options (products_options_id, language_id, products_options_name) values (:products_options_id, :language_id, :products_options_name)');
+ }
+ $Qgroup->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS);
+ $Qgroup->bindInt(':products_options_id', $group_id);
+ $Qgroup->bindValue(':products_options_name', $_POST['group_name'][$l_entry['id']]);
+ $Qgroup->bindInt(':language_id', $l_entry['id']);
+ $Qgroup->execute();
+
+ if ($osC_Database->isError()) {
+ $error = true;
+ break;
</pre><pre class="diff" id="context"> }
}
</pre><pre class="diff" id="removed">- tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info));
- break;
- case 'delete_option':
- $option_id = tep_db_prepare_input($HTTP_GET_VARS['option_id']);
</pre><pre class="diff" id="added">+ if ($error === false) {
+ $osC_Database->commitTransaction();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$option_id . "'");
</pre><pre class="diff" id="added">+ $messageStack->add_session(SUCCESS_DB_ROWS_UPDATED, 'success');
+ } else {
+ $osC_Database->rollbackTransaction();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info));
</pre><pre class="diff" id="added">+ $messageStack->add_session(ERROR_DB_ROWS_NOT_UPDATED, 'error');
+ }
+
+ tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $group_id));
</pre><pre class="diff" id="context"> break;
</pre><pre class="diff" id="removed">- case 'delete_value':
- $value_id = tep_db_prepare_input($HTTP_GET_VARS['value_id']);
</pre><pre class="diff" id="added">+ case 'deleteConfirm':
+ if (isset($_GET['paID']) && is_numeric($_GET['paID'])) {
+ $error = false;
+
+ $osC_Database->startTransaction();
+
+ $Qentries = $osC_Database->query('select products_options_values_id from :table_products_options_values_to_products_options where products_options_id = :products_options_id');
+ $Qentries->bindTable(':table_products_options_values_to_products_options', TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS);
+ $Qentries->bindInt(':products_options_id', $_GET['paID']);
+ $Qentries->execute();
+
+ while ($Qentries->next()) {
+ $Qdelete = $osC_Database->query('delete from :table_products_options_values where products_options_values_id = :products_options_values_id');
+ $Qdelete->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES);
+ $Qdelete->bindInt(':products_options_values_id', $Qentries->valueInt('products_options_values_id'));
+ $Qdelete->execute();
+
+ if ($osC_Database->isError()) {
+ $error = true;
+ break;
+ }
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int)$value_id . "'");
- tep_db_query("delete from " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " where products_options_values_id = '" . (int)$value_id . "'");
</pre><pre class="diff" id="added">+ if ($error === false) {
+ $Qdelete = $osC_Database->query('delete from :table_products_options_values_to_products_options where products_options_id = :products_options_id');
+ $Qdelete->bindTable(':table_products_options_values_to_products_options', TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS);
+ $Qdelete->bindInt(':products_options_id', $_GET['paID']);
+ $Qdelete->execute();
+
+ if ($osC_Database->isError()) {
+ $error = true;
+ break;
+ }
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info));
- break;
- case 'delete_attribute':
- $attribute_id = tep_db_prepare_input($HTTP_GET_VARS['attribute_id']);
</pre><pre class="diff" id="added">+ if ($error === false) {
+ $Qdelete = $osC_Database->query('delete from :table_products_options where products_options_id = :products_options_id');
+ $Qdelete->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS);
+ $Qdelete->bindInt(':products_options_id', $_GET['paID']);
+ $Qdelete->execute();
+
+ if ($osC_Database->isError()) {
+ $error = true;
+ break;
+ }
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES . " where products_attributes_id = '" . (int)$attribute_id . "'");
</pre><pre class="diff" id="added">+ if ($error === false) {
+ $osC_Database->commitTransaction();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">-// added for DOWNLOAD_ENABLED. Always try to remove attributes, even if downloads are no longer enabled
- tep_db_query("delete from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " where products_attributes_id = '" . (int)$attribute_id . "'");
</pre><pre class="diff" id="added">+ $messageStack->add_session(SUCCESS_DB_ROWS_UPDATED, 'success');
+ } else {
+ $osC_Database->rollbackTransaction();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, $page_info));
</pre><pre class="diff" id="added">+ $messageStack->add_session(ERROR_DB_ROWS_NOT_UPDATED, 'error');
+ }
+ }
+
+ tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page']));
</pre><pre class="diff" id="context"> break;
}
}
</pre><pre class="diff" id="removed">-?>
-<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html <?php echo HTML_PARAMS; ?>>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
-<title><?php echo TITLE; ?></title>
-<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
-<script language="javascript"><!--
-function go_option() {
- if (document.option_order_by.selected.options[document.option_order_by.selected.selectedIndex].value != "none") {
- location = "<?php echo tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_page=' . ($HTTP_GET_VARS['option_page'] ? $HTTP_GET_VARS['option_page'] : 1)); ?>&option_order_by="+document.option_order_by.selected.options[document.option_order_by.selected.selectedIndex].value;
- }
-}
-//--></script>
-</head>
-<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
-<!-- header //-->
-<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
-<!-- header_eof //-->
-
-<!-- body //-->
-<table border="0" width="100%" cellspacing="2" cellpadding="2">
- <tr>
- <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
-<!-- left_navigation //-->
-<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
-<!-- left_navigation_eof //-->
- </table></td>
-<!-- body_text //-->
- <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
-<!-- options and values//-->
- <tr>
- <td width="100%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
- <tr>
- <td valign="top" width="50%"><table width="100%" border="0" cellspacing="0" cellpadding="2">
-<!-- options //-->
-<?php
- if ($action == 'delete_product_option') { // delete product option
- $options = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . (int)$HTTP_GET_VARS['option_id'] . "' and language_id = '" . (int)$languages_id . "'");
- $options_values = tep_db_fetch_array($options);
-?>
- <tr>
- <td class="pageHeading">&nbsp;<?php echo $options_values['products_options_name']; ?>&nbsp;</td>
- <td>&nbsp;<?php echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '53'); ?>&nbsp;</td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td colspan="3"><?php echo tep_black_line(); ?></td>
- </tr>
-<?php
- $products = tep_db_query("select p.products_id, pd.products_name, pov.products_options_values_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov, " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pov.language_id = '" . (int)$languages_id . "' and pd.language_id = '" . (int)$languages_id . "' and pa.products_id = p.products_id and pa.options_id='" . (int)$HTTP_GET_VARS['option_id'] . "' and pov.products_options_values_id = pa.options_values_id order by pd.products_name");
- if (tep_db_num_rows($products)) {
-?>
- <tr class="dataTableHeadingRow">
- <td class="dataTableHeadingContent" align="center">&nbsp;<?php echo TABLE_HEADING_ID; ?>&nbsp;</td>
- <td class="dataTableHeadingContent">&nbsp;<?php echo TABLE_HEADING_PRODUCT; ?>&nbsp;</td>
- <td class="dataTableHeadingContent">&nbsp;<?php echo TABLE_HEADING_OPT_VALUE; ?>&nbsp;</td>
- </tr>
- <tr>
- <td colspan="3"><?php echo tep_black_line(); ?></td>
- </tr>
-<?php
- $rows = 0;
- while ($products_values = tep_db_fetch_array($products)) {
- $rows++;
-?>
- <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>">
- <td align="center" class="smallText">&nbsp;<?php echo $products_values['products_id']; ?>&nbsp;</td>
- <td class="smallText">&nbsp;<?php echo $products_values['products_name']; ?>&nbsp;</td>
- <td class="smallText">&nbsp;<?php echo $products_values['products_options_values_name']; ?>&nbsp;</td>
- </tr>
-<?php
- }
-?>
- <tr>
- <td colspan="3"><?php echo tep_black_line(); ?></td>
- </tr>
- <tr>
- <td colspan="3" class="main"><br><?php echo TEXT_WARNING_OF_DELETE; ?></td>
- </tr>
- <tr>
- <td align="right" colspan="3" class="main"><br><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, (isset($HTTP_GET_VARS['value_page']) ? 'value_page=' . $HTTP_GET_VARS['value_page'] . '&' : '') . (isset($HTTP_GET_VARS['attribute_page']) ? 'attribute_page=' . $HTTP_GET_VARS['attribute_page'] : ''), 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', ' cancel '); ?></a>&nbsp;</td>
- </tr>
-<?php
- } else {
-?>
- <tr>
- <td class="main" colspan="3"><br><?php echo TEXT_OK_TO_DELETE; ?></td>
- </tr>
- <tr>
- <td class="main" align="right" colspan="3"><br><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_option&option_id=' . $HTTP_GET_VARS['option_id'], 'NONSSL') . '">'; ?><?php echo tep_image_button('button_delete.gif', ' delete '); ?></a>&nbsp;&nbsp;&nbsp;<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, (isset($HTTP_GET_VARS['order_by']) ? 'order_by=' . $HTTP_GET_VARS['order_by'] . '&' : '') . (isset($HTTP_GET_VARS['page']) ? 'page=' . $HTTP_GET_VARS['page'] : ''), 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', ' cancel '); ?></a>&nbsp;</td>
- </tr>
-<?php
- }
-?>
- </table></td>
- </tr>
-<?php
- } else {
- if (isset($HTTP_GET_VARS['option_order_by'])) {
- $option_order_by = $HTTP_GET_VARS['option_order_by'];
- } else {
- $option_order_by = 'products_options_id';
- }
-?>
- <tr>
- <td colspan="2" class="pageHeading">&nbsp;<?php echo HEADING_TITLE_OPT; ?>&nbsp;</td>
- <td align="right"><br><form name="option_order_by" action="<?php echo FILENAME_PRODUCTS_ATTRIBUTES; ?>"><select name="selected" onChange="go_option()"><option value="products_options_id"<?php if ($option_order_by == 'products_options_id') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_ID; ?></option><option value="products_options_name"<?php if ($option_order_by == 'products_options_name') { echo ' SELECTED'; } ?>><?php echo TEXT_OPTION_NAME; ?></option></select></form></td>
- </tr>
- <tr>
- <td colspan="3" class="smallText">
-<?php
- $per_page = MAX_ROW_LISTS_OPTIONS;
- $options = "select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$languages_id . "' order by " . $option_order_by;
- if (!isset($option_page)) {
- $option_page = 1;
- }
- $prev_option_page = $option_page - 1;
- $next_option_page = $option_page + 1;
-
- $option_query = tep_db_query($options);
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- $option_page_start = ($per_page * $option_page) - $per_page;
- $num_rows = tep_db_num_rows($option_query);
</pre><pre class="diff" id="added">+ if (!empty($entriesAction)) {
+ switch ($entriesAction) {
+ case 'saveGroupEntry':
+ $languages = tep_get_languages();
+ $error = false;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- if ($num_rows <= $per_page) {
- $num_pages = 1;
- } else if (($num_rows % $per_page) == 0) {
- $num_pages = ($num_rows / $per_page);
- } else {
- $num_pages = ($num_rows / $per_page) + 1;
- }
- $num_pages = (int) $num_pages;
-
- $options = $options . " LIMIT $option_page_start, $per_page";
</pre><pre class="diff" id="added">+ if (isset($_GET['paeID']) && is_numeric($_GET['paeID'])) {
+ $entry_id = $_GET['paeID'];
+ } else {
+ $Qcheck = $osC_Database->query('select max(products_options_values_id) as products_options_values_id from :table_products_options_values');
+ $Qcheck->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES);
+ $Qcheck->execute();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- // Previous
- if ($prev_option_page) {
- echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_page=' . $prev_option_page) . '"> &lt;&lt; </a> | ';
- }
</pre><pre class="diff" id="added">+ $entry_id = $Qcheck->valueInt('products_options_values_id') + 1;
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- for ($i = 1; $i <= $num_pages; $i++) {
- if ($i != $option_page) {
- echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_page=' . $i) . '">' . $i . '</a> | ';
- } else {
- echo '<b><font color=red>' . $i . '</font></b> | ';
- }
- }
</pre><pre class="diff" id="added">+ $osC_Database->startTransaction();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- // Next
- if ($option_page != $num_pages) {
- echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_page=' . $next_option_page) . '"> &gt;&gt; </a>';
- }
-?>
- </td>
- </tr>
- <tr>
- <td colspan="3"><?php echo tep_black_line(); ?></td>
- </tr>
- <tr class="dataTableHeadingRow">
- <td class="dataTableHeadingContent">&nbsp;<?php echo TABLE_HEADING_ID; ?>&nbsp;</td>
- <td class="dataTableHeadingContent">&nbsp;<?php echo TABLE_HEADING_OPT_NAME; ?>&nbsp;</td>
- <td class="dataTableHeadingContent" align="center">&nbsp;<?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
- </tr>
- <tr>
- <td colspan="3"><?php echo tep_black_line(); ?></td>
- </tr>
-<?php
- $next_id = 1;
- $rows = 0;
- $options = tep_db_query($options);
- while ($options_values = tep_db_fetch_array($options)) {
- $rows++;
-?>
- <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>">
-<?php
- if (($action == 'update_option') && ($HTTP_GET_VARS['option_id'] == $options_values['products_options_id'])) {
- echo '<form name="option" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_option_name', 'NONSSL') . '" method="post">';
- $inputs = '';
- for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) {
- $option_name = tep_db_query("select products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id = '" . $options_values['products_options_id'] . "' and language_id = '" . $languages[$i]['id'] . "'");
- $option_name = tep_db_fetch_array($option_name);
- $inputs .= $languages[$i]['code'] . ':&nbsp;<input type="text" name="option_name[' . $languages[$i]['id'] . ']" size="20" value="' . $option_name['products_options_name'] . '">&nbsp;<br>';
</pre><pre class="diff" id="added">+ foreach ($languages as $l_entry) {
+ if (isset($_GET['paeID']) && is_numeric($_GET['paeID'])) {
+ $Qentry = $osC_Database->query('update :table_products_options_values set products_options_values_name = :products_options_values_name where products_options_values_id = :products_options_values_id and language_id = :language_id');
+ } else {
+ $Qentry = $osC_Database->query('insert into :table_products_options_values (products_options_values_id, language_id, products_options_values_name) values (:products_options_values_id, :language_id, :products_options_values_name)');
+ }
+ $Qentry->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES);
+ $Qentry->bindInt(':products_options_values_id', $entry_id);
+ $Qentry->bindValue(':products_options_values_name', $_POST['entry_name'][$l_entry['id']]);
+ $Qentry->bindInt(':language_id', $l_entry['id']);
+ $Qentry->execute();
+
+ if ($osC_Database->isError()) {
+ $error = true;
+ break;
+ }
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">-?>
- <td align="center" class="smallText">&nbsp;<?php echo $options_values['products_options_id']; ?><input type="hidden" name="option_id" value="<?php echo $options_values['products_options_id']; ?>">&nbsp;</td>
- <td class="smallText"><?php echo $inputs; ?></td>
- <td align="center" class="smallText">&nbsp;<?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?>&nbsp;<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', IMAGE_CANCEL); ?></a>&nbsp;</td>
-<?php
- echo '</form>' . "\n";
- } else {
-?>
- <td align="center" class="smallText">&nbsp;<?php echo $options_values["products_options_id"]; ?>&nbsp;</td>
- <td class="smallText">&nbsp;<?php echo $options_values["products_options_name"]; ?>&nbsp;</td>
- <td align="center" class="smallText">&nbsp;<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_option&option_id=' . $options_values['products_options_id'] . '&option_order_by=' . $option_order_by . '&option_page=' . $option_page, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_edit.gif', IMAGE_UPDATE); ?></a>&nbsp;&nbsp;<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_product_option&option_id=' . $options_values['products_options_id'], 'NONSSL') , '">'; ?><?php echo tep_image_button('button_delete.gif', IMAGE_DELETE); ?></a>&nbsp;</td>
-<?php
- }
-?>
- </tr>
-<?php
- $max_options_id_query = tep_db_query("select max(products_options_id) + 1 as next_id from " . TABLE_PRODUCTS_OPTIONS);
- $max_options_id_values = tep_db_fetch_array($max_options_id_query);
- $next_id = $max_options_id_values['next_id'];
- }
-?>
- <tr>
- <td colspan="3"><?php echo tep_black_line(); ?></td>
- </tr>
-<?php
- if ($action != 'update_option') {
-?>
- <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>">
-<?php
- echo '<form name="options" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=add_product_options&option_page=' . $option_page, 'NONSSL') . '" method="post"><input type="hidden" name="products_options_id" value="' . $next_id . '">';
- $inputs = '';
- for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) {
- $inputs .= $languages[$i]['code'] . ':&nbsp;<input type="text" name="option_name[' . $languages[$i]['id'] . ']" size="20">&nbsp;<br>';
- }
-?>
- <td align="center" class="smallText">&nbsp;<?php echo $next_id; ?>&nbsp;</td>
- <td class="smallText"><?php echo $inputs; ?></td>
- <td align="center" class="smallText">&nbsp;<?php echo tep_image_submit('button_insert.gif', IMAGE_INSERT); ?>&nbsp;</td>
-<?php
- echo '</form>';
-?>
- </tr>
- <tr>
- <td colspan="3"><?php echo tep_black_line(); ?></td>
- </tr>
-<?php
- }
- }
-?>
- </table></td>
-<!-- options eof //-->
- <td valign="top" width="50%"><table width="100%" border="0" cellspacing="0" cellpadding="2">
-<!-- value //-->
-<?php
- if ($action == 'delete_option_value') { // delete product option value
- $values = tep_db_query("select products_options_values_id, products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int)$HTTP_GET_VARS['value_id'] . "' and language_id = '" . (int)$languages_id . "'");
- $values_values = tep_db_fetch_array($values);
-?>
- <tr>
- <td colspan="3" class="pageHeading">&nbsp;<?php echo $values_values['products_options_values_name']; ?>&nbsp;</td>
- <td>&nbsp;<?php echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '53'); ?>&nbsp;</td>
- </tr>
- <tr>
- <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td colspan="3"><?php echo tep_black_line(); ?></td>
- </tr>
-<?php
- $products = tep_db_query("select p.products_id, pd.products_name, po.products_options_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS . " po, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and po.language_id = '" . (int)$languages_id . "' and pa.products_id = p.products_id and pa.options_values_id='" . (int)$HTTP_GET_VARS['value_id'] . "' and po.products_options_id = pa.options_id order by pd.products_name");
- if (tep_db_num_rows($products)) {
-?>
- <tr class="dataTableHeadingRow">
- <td class="dataTableHeadingContent" align="center">&nbsp;<?php echo TABLE_HEADING_ID; ?>&nbsp;</td>
- <td class="dataTableHeadingContent">&nbsp;<?php echo TABLE_HEADING_PRODUCT; ?>&nbsp;</td>
- <td class="dataTableHeadingContent">&nbsp;<?php echo TABLE_HEADING_OPT_NAME; ?>&nbsp;</td>
- </tr>
- <tr>
- <td colspan="3"><?php echo tep_black_line(); ?></td>
- </tr>
-<?php
- while ($products_values = tep_db_fetch_array($products)) {
- $rows++;
-?>
- <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>">
- <td align="center" class="smallText">&nbsp;<?php echo $products_values['products_id']; ?>&nbsp;</td>
- <td class="smallText">&nbsp;<?php echo $products_values['products_name']; ?>&nbsp;</td>
- <td class="smallText">&nbsp;<?php echo $products_values['products_options_name']; ?>&nbsp;</td>
- </tr>
-<?php
- }
-?>
- <tr>
- <td colspan="3"><?php echo tep_black_line(); ?></td>
- </tr>
- <tr>
- <td class="main" colspan="3"><br><?php echo TEXT_WARNING_OF_DELETE; ?></td>
- </tr>
- <tr>
- <td class="main" align="right" colspan="3"><br><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, (isset($HTTP_GET_VARS['value_page']) ? 'value_page=' . $HTTP_GET_VARS['value_page'] . '&' : '') . (isset($HTTP_GET_VARS['attribute_page']) ? 'attribute_page=' . $attribute_page : ''), 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', ' cancel '); ?></a>&nbsp;</td>
- </tr>
-<?php
- } else {
-?>
- <tr>
- <td class="main" colspan="3"><br><?php echo TEXT_OK_TO_DELETE; ?></td>
- </tr>
- <tr>
- <td class="main" align="right" colspan="3"><br><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_value&value_id=' . $HTTP_GET_VARS['value_id'], 'NONSSL') . '">'; ?><?php echo tep_image_button('button_delete.gif', ' delete '); ?></a>&nbsp;&nbsp;&nbsp;<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '&option_page=' . $option_page . (isset($HTTP_GET_VARS['value_page']) ? '&value_page=' . $value_page : '') . (isset($HTTP_GET_VARS['attribute_page']) ? '&attribute_page=' . $attribute_page : ''), 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', ' cancel '); ?></a>&nbsp;</td>
- </tr>
-<?php
- }
-?>
- </table></td>
- </tr>
-<?php
- } else {
-?>
- <tr>
- <td colspan="3" class="pageHeading">&nbsp;<?php echo HEADING_TITLE_VAL; ?>&nbsp;</td>
- <td>&nbsp;<?php echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '53'); ?>&nbsp;</td>
- </tr>
- <tr>
- <td colspan="4" class="smallText">
-<?php
- $per_page = MAX_ROW_LISTS_OPTIONS;
- $values = "select pov.products_options_values_id, pov.products_options_values_name, pov2po.products_options_id from " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov left join " . TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS . " pov2po on pov.products_options_values_id = pov2po.products_options_values_id where pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_id";
- if (!isset($value_page)) {
- $value_page = 1;
- }
- $prev_value_page = $value_page - 1;
- $next_value_page = $value_page + 1;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- $value_query = tep_db_query($values);
</pre><pre class="diff" id="added">+ if ($error === false) {
+ if (!isset($_GET['paeID'])) {
+ $Qlink = $osC_Database->query('insert into :table_products_options_values_to_products_options (products_options_id, products_options_values_id) values (:products_options_id, :products_options_values_id)');
+ $Qlink->bindTable(':table_products_options_values_to_products_options', TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS);
+ $Qlink->bindInt(':products_options_id', $_GET['paID']);
+ $Qlink->bindInt(':products_options_values_id', $entry_id);
+ $Qlink->execute();
+
+ if ($osC_Database->isError()) {
+ $error = true;
+ }
+ }
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- $value_page_start = ($per_page * $value_page) - $per_page;
- $num_rows = tep_db_num_rows($value_query);
</pre><pre class="diff" id="added">+ if ($error === false) {
+ $osC_Database->commitTransaction();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- if ($num_rows <= $per_page) {
- $num_pages = 1;
- } else if (($num_rows % $per_page) == 0) {
- $num_pages = ($num_rows / $per_page);
- } else {
- $num_pages = ($num_rows / $per_page) + 1;
- }
- $num_pages = (int) $num_pages;
</pre><pre class="diff" id="added">+ $messageStack->add_session(SUCCESS_DB_ROWS_UPDATED, 'success');
+ } else {
+ $osC_Database->rollbackTransaction();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- $values = $values . " LIMIT $value_page_start, $per_page";
</pre><pre class="diff" id="added">+ $messageStack->add_session(ERROR_DB_ROWS_NOT_UPDATED, 'error');
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- // Previous
- if ($prev_value_page) {
- echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'option_order_by=' . $option_order_by . '&value_page=' . $prev_value_page) . '"> &lt;&lt; </a> | ';
- }
</pre><pre class="diff" id="added">+ tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $_GET['paID'] . '&action=list&entriesPage=' . $_GET['entriesPage'] . '&paeID=' . $entry_id));
+ break;
+ case 'deleteConfirm':
+ if (isset($_GET['paeID']) && is_numeric($_GET['paeID'])) {
+ $error = false;
+
+ $osC_Database->startTransaction();
+
+ $Qentry = $osC_Database->query('delete from :table_products_options_values where products_options_values_id = :products_options_values_id');
+ $Qentry->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES);
+ $Qentry->bindInt(':products_options_values_id', $_GET['paeID']);
+ $Qentry->execute();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- for ($i = 1; $i <= $num_pages; $i++) {
- if ($i != $value_page) {
- echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, (isset($option_order_by) ? 'option_order_by=' . $option_order_by . '&' : '') . 'value_page=' . $i) . '">' . $i . '</a> | ';
- } else {
- echo '<b><font color=red>' . $i . '</font></b> | ';
- }
- }
</pre><pre class="diff" id="added">+ if ($osC_Database->isError()) {
+ $error = true;
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- // Next
- if ($value_page != $num_pages) {
- echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, (isset($option_order_by) ? 'option_order_by=' . $option_order_by . '&' : '') . 'value_page=' . $next_value_page) . '"> &gt;&gt;</a> ';
- }
-?>
- </td>
- </tr>
- <tr>
- <td colspan="4"><?php echo tep_black_line(); ?></td>
- </tr>
- <tr class="dataTableHeadingRow">
- <td class="dataTableHeadingContent">&nbsp;<?php echo TABLE_HEADING_ID; ?>&nbsp;</td>
- <td class="dataTableHeadingContent">&nbsp;<?php echo TABLE_HEADING_OPT_NAME; ?>&nbsp;</td>
- <td class="dataTableHeadingContent">&nbsp;<?php echo TABLE_HEADING_OPT_VALUE; ?>&nbsp;</td>
- <td class="dataTableHeadingContent" align="center">&nbsp;<?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
- </tr>
- <tr>
- <td colspan="4"><?php echo tep_black_line(); ?></td>
- </tr>
-<?php
- $next_id = 1;
- $rows = 0;
- $values = tep_db_query($values);
- while ($values_values = tep_db_fetch_array($values)) {
- $options_name = tep_options_name($values_values['products_options_id']);
- $values_name = $values_values['products_options_values_name'];
- $rows++;
-?>
- <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>">
-<?php
- if (($action == 'update_option_value') && ($HTTP_GET_VARS['value_id'] == $values_values['products_options_values_id'])) {
- echo '<form name="values" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_value', 'NONSSL') . '" method="post">';
- $inputs = '';
- for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) {
- $value_name = tep_db_query("select products_options_values_name from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where products_options_values_id = '" . (int)$values_values['products_options_values_id'] . "' and language_id = '" . (int)$languages[$i]['id'] . "'");
- $value_name = tep_db_fetch_array($value_name);
- $inputs .= $languages[$i]['code'] . ':&nbsp;<input type="text" name="value_name[' . $languages[$i]['id'] . ']" size="15" value="' . $value_name['products_options_values_name'] . '">&nbsp;<br>';
- }
-?>
- <td align="center" class="smallText">&nbsp;<?php echo $values_values['products_options_values_id']; ?><input type="hidden" name="value_id" value="<?php echo $values_values['products_options_values_id']; ?>">&nbsp;</td>
- <td align="center" class="smallText">&nbsp;<?php echo "\n"; ?><select name="option_id">
-<?php
- $options = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . (int)$languages_id . "' order by products_options_name");
- while ($options_values = tep_db_fetch_array($options)) {
- echo "\n" . '<option name="' . $options_values['products_options_name'] . '" value="' . $options_values['products_options_id'] . '"';
- if ($values_values['products_options_id'] == $options_values['products_options_id']) {
- echo ' selected';
</pre><pre class="diff" id="added">+ if ($error === false) {
+ $Qlink = $osC_Database->query('delete from :table_products_options_values_to_products_options where products_options_id = :products_options_id and products_options_values_id = :products_options_values_id');
+ $Qlink->bindTable(':table_products_options_values_to_products_options', TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS);
+ $Qlink->bindInt(':products_options_id', $_GET['paID']);
+ $Qlink->bindInt(':products_options_values_id', $_GET['paeID']);
+ $Qlink->execute();
+
+ if ($osC_Database->isError()) {
+ $error = true;
+ }
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">- echo '>' . $options_values['products_options_name'] . '</option>';
- }
-?>
- </select>&nbsp;</td>
- <td class="smallText"><?php echo $inputs; ?></td>
- <td align="center" class="smallText">&nbsp;<?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?>&nbsp;<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '', 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', IMAGE_CANCEL); ?></a>&nbsp;</td>
-<?php
- echo '</form>';
- } else {
-?>
- <td align="center" class="smallText">&nbsp;<?php echo $values_values["products_options_values_id"]; ?>&nbsp;</td>
- <td align="center" class="smallText">&nbsp;<?php echo $options_name; ?>&nbsp;</td>
- <td class="smallText">&nbsp;<?php echo $values_name; ?>&nbsp;</td>
- <td align="center" class="smallText">&nbsp;<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_option_value&value_id=' . $values_values['products_options_values_id'] . (isset($HTTP_GET_VARS['value_page']) ? '&value_page=' . $HTTP_GET_VARS['value_page'] : ''), 'NONSSL') . '">'; ?><?php echo tep_image_button('button_edit.gif', IMAGE_UPDATE); ?></a>&nbsp;&nbsp;<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_option_value&value_id=' . $values_values['products_options_values_id'], 'NONSSL') , '">'; ?><?php echo tep_image_button('button_delete.gif', IMAGE_DELETE); ?></a>&nbsp;</td>
-<?php
- }
- $max_values_id_query = tep_db_query("select max(products_options_values_id) + 1 as next_id from " . TABLE_PRODUCTS_OPTIONS_VALUES);
- $max_values_id_values = tep_db_fetch_array($max_values_id_query);
- $next_id = $max_values_id_values['next_id'];
- }
-?>
- </tr>
- <tr>
- <td colspan="4"><?php echo tep_black_line(); ?></td>
- </tr>
-<?php
- if ($action != 'update_option_value') {
-?>
- <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>">
-<?php
- echo '<form name="values" action="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=add_product_option_values&value_page=' . $value_page, 'NONSSL') . '" method="post">';
-?>
- <td align="center" class="smallText">&nbsp;<?php echo $next_id; ?>&nbsp;</td>
- <td align="center" class="smallText">&nbsp;<select name="option_id">
-<?php
- $options = tep_db_query("select products_options_id, products_options_name from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . $languages_id . "' order by products_options_name");
- while ($options_values = tep_db_fetch_array($options)) {
- echo '<option name="' . $options_values['products_options_name'] . '" value="' . $options_values['products_options_id'] . '">' . $options_values['products_options_name'] . '</option>';
- }
-
- $inputs = '';
- for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) {
- $inputs .= $languages[$i]['code'] . ':&nbsp;<input type="text" name="value_name[' . $languages[$i]['id'] . ']" size="15">&nbsp;<br>';
- }
-?>
- </select>&nbsp;</td>
- <td class="smallText"><input type="hidden" name="value_id" value="<?php echo $next_id; ?>"><?php echo $inputs; ?></td>
- <td align="center" class="smallText">&nbsp;<?php echo tep_image_submit('button_insert.gif', IMAGE_INSERT); ?>&nbsp;</td>
-<?php
- echo '</form>';
-?>
- </tr>
- <tr>
- <td colspan="4"><?php echo tep_black_line(); ?></td>
- </tr>
-<?php
- }
- }
-?>
- </table></td>
- </tr>
- </table></td>
-<!-- option value eof //-->
- </tr>
-<!-- products_attributes //-->
- <tr>
- <td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
- <tr>
- <td class="pageHeading">&nbsp;<?php echo HEADING_TITLE_ATRIB; ?>&nbsp;</td>
- <td>&nbsp;<?php echo tep_image(DIR_WS_IMAGES . 'pixel_trans.gif', '', '1', '53'); ?>&nbsp;</td>
- </tr>
- </table></td>
- </tr>
- <tr>
-<?php
- if ($action == 'update_attribute') {
- $form_action = 'update_product_attribute';
- } else {
- $form_action = 'add_product_attributes';
- }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- if (!isset($attribute_page)) {
- $attribute_page = 1;
- }
- $prev_attribute_page = $attribute_page - 1;
- $next_attribute_page = $attribute_page + 1;
-?>
- <td><form name="attributes" action="<?php echo tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=' . $form_action . '&option_page=' . $option_page . '&value_page=' . $value_page . '&attribute_page=' . $attribute_page); ?>" method="post"><table border="0" width="100%" cellspacing="0" cellpadding="2">
- <tr>
- <td colspan="7" class="smallText">
-<?php
- $per_page = MAX_ROW_LISTS_OPTIONS;
- $attributes = "select pa.* from " . TABLE_PRODUCTS_ATTRIBUTES . " pa left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name";
- $attribute_query = tep_db_query($attributes);
-
- $attribute_page_start = ($per_page * $attribute_page) - $per_page;
- $num_rows = tep_db_num_rows($attribute_query);
-
- if ($num_rows <= $per_page) {
- $num_pages = 1;
- } else if (($num_rows % $per_page) == 0) {
- $num_pages = ($num_rows / $per_page);
- } else {
- $num_pages = ($num_rows / $per_page) + 1;
- }
- $num_pages = (int) $num_pages;
</pre><pre class="diff" id="added">+ if ($error === false) {
+ $osC_Database->commitTransaction();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- $attributes = $attributes . " LIMIT $attribute_page_start, $per_page";
</pre><pre class="diff" id="added">+ $messageStack->add_session(SUCCESS_DB_ROWS_UPDATED, 'success');
+ } else {
+ $osC_Database->rollbackTransaction();
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- // Previous
- if ($prev_attribute_page) {
- echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'attribute_page=' . $prev_attribute_page) . '"> &lt;&lt; </a> | ';
- }
</pre><pre class="diff" id="added">+ $messageStack->add_session(ERROR_DB_ROWS_NOT_UPDATED, 'error');
+ }
+ }
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- for ($i = 1; $i <= $num_pages; $i++) {
- if ($i != $attribute_page) {
- echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'attribute_page=' . $i) . '">' . $i . '</a> | ';
- } else {
- echo '<b><font color="red">' . $i . '</font></b> | ';
</pre><pre class="diff" id="added">+ tep_redirect(tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $_GET['paID'] . '&action=list&entriesPage=' . $_GET['entriesPage']));
+ break;
</pre><pre class="diff" id="context"> }
}
</pre><pre class="diff" id="removed">- // Next
- if ($attribute_page != $num_pages) {
- echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'attribute_page=' . $next_attribute_page) . '"> &gt;&gt; </a>';
</pre><pre class="diff" id="added">+ switch ($action) {
+ case 'list': $page_contents = 'products_attributes_listing.php'; break;
+ default: $page_contents = 'products_attributes.php';
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+
+ require('templates/default.php');
+
+ require('includes/application_bottom.php');
</pre><pre class="diff" id="context"> ?>
</pre><pre class="diff" id="removed">- </td>
- </tr>
- <tr>
- <td colspan="7"><?php echo tep_black_line(); ?></td>
- </tr>
- <tr class="dataTableHeadingRow">
- <td class="dataTableHeadingContent">&nbsp;<?php echo TABLE_HEADING_ID; ?>&nbsp;</td>
- <td class="dataTableHeadingContent">&nbsp;<?php echo TABLE_HEADING_PRODUCT; ?>&nbsp;</td>
- <td class="dataTableHeadingContent">&nbsp;<?php echo TABLE_HEADING_OPT_NAME; ?>&nbsp;</td>
- <td class="dataTableHeadingContent">&nbsp;<?php echo TABLE_HEADING_OPT_VALUE; ?>&nbsp;</td>
- <td class="dataTableHeadingContent" align="right">&nbsp;<?php echo TABLE_HEADING_OPT_PRICE; ?>&nbsp;</td>
- <td class="dataTableHeadingContent" align="center">&nbsp;<?php echo TABLE_HEADING_OPT_PRICE_PREFIX; ?>&nbsp;</td>
- <td class="dataTableHeadingContent" align="center">&nbsp;<?php echo TABLE_HEADING_ACTION; ?>&nbsp;</td>
- </tr>
- <tr>
- <td colspan="7"><?php echo tep_black_line(); ?></td>
- </tr>
-<?php
- $next_id = 1;
- $attributes = tep_db_query($attributes);
- while ($attributes_values = tep_db_fetch_array($attributes)) {
- $products_name_only = tep_get_products_name($attributes_values['products_id']);
- $options_name = tep_options_name($attributes_values['options_id']);
- $values_name = tep_values_name($attributes_values['options_values_id']);
- $rows++;
-?>
- <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>">
-<?php
- if (($action == 'update_attribute') && ($HTTP_GET_VARS['attribute_id'] == $attributes_values['products_attributes_id'])) {
-?>
- <td class="smallText">&nbsp;<?php echo $attributes_values['products_attributes_id']; ?><input type="hidden" name="attribute_id" value="<?php echo $attributes_values['products_attributes_id']; ?>">&nbsp;</td>
- <td class="smallText">&nbsp;<select name="products_id">
-<?php
- $products = tep_db_query("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $languages_id . "' order by pd.products_name");
- while($products_values = tep_db_fetch_array($products)) {
- if ($attributes_values['products_id'] == $products_values['products_id']) {
- echo "\n" . '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '" SELECTED>' . $products_values['products_name'] . '</option>';
- } else {
- echo "\n" . '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '">' . $products_values['products_name'] . '</option>';
- }
- }
-?>
- </select>&nbsp;</td>
- <td class="smallText">&nbsp;<select name="options_id">
-<?php
- $options = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS . " where language_id = '" . $languages_id . "' order by products_options_name");
- while($options_values = tep_db_fetch_array($options)) {
- if ($attributes_values['options_id'] == $options_values['products_options_id']) {
- echo "\n" . '<option name="' . $options_values['products_options_name'] . '" value="' . $options_values['products_options_id'] . '" SELECTED>' . $options_values['products_options_name'] . '</option>';
- } else {
- echo "\n" . '<option name="' . $options_values['products_options_name'] . '" value="' . $options_values['products_options_id'] . '">' . $options_values['products_options_name'] . '</option>';
- }
- }
-?>
- </select>&nbsp;</td>
- <td class="smallText">&nbsp;<select name="values_id">
-<?php
- $values = tep_db_query("select * from " . TABLE_PRODUCTS_OPTIONS_VALUES . " where language_id ='" . $languages_id . "' order by products_options_values_name");
- while($values_values = tep_db_fetch_array($values)) {
- if ($attributes_values['options_values_id'] == $values_values['products_options_values_id']) {
- echo "\n" . '<option name="' . $values_values['products_options_values_name'] . '" value="' . $values_values['products_options_values_id'] . '" SELECTED>' . $values_values['products_options_values_name'] . '</option>';
- } else {
- echo "\n" . '<option name="' . $values_values['products_options_values_name'] . '" value="' . $values_values['products_options_values_id'] . '">' . $values_values['products_options_values_name'] . '</option>';
- }
- }
-?>
- </select>&nbsp;</td>
- <td align="right" class="smallText">&nbsp;<input type="text" name="value_price" value="<?php echo $attributes_values['options_values_price']; ?>" size="6">&nbsp;</td>
- <td align="center" class="smallText">&nbsp;<input type="text" name="price_prefix" value="<?php echo $attributes_values['price_prefix']; ?>" size="2">&nbsp;</td>
- <td align="center" class="smallText">&nbsp;<?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?>&nbsp;<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '&attribute_page=' . $attribute_page, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', IMAGE_CANCEL); ?></a>&nbsp;</td>
-<?php
- if (DOWNLOAD_ENABLED == 'true') {
- $download_query_raw ="select products_attributes_filename, products_attributes_maxdays, products_attributes_maxcount
- from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . "
- where products_attributes_id='" . $attributes_values['products_attributes_id'] . "'";
- $download_query = tep_db_query($download_query_raw);
- if (tep_db_num_rows($download_query) > 0) {
- $download = tep_db_fetch_array($download_query);
- $products_attributes_filename = $download['products_attributes_filename'];
- $products_attributes_maxdays = $download['products_attributes_maxdays'];
- $products_attributes_maxcount = $download['products_attributes_maxcount'];
- }
-?>
- <tr class="<?php echo (!($rows % 2)? 'attributes-even' : 'attributes-odd');?>">
- <td>&nbsp;</td>
- <td colspan="5">
- <table>
- <tr class="<?php echo (!($rows % 2)? 'attributes-even' : 'attributes-odd');?>">
- <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_DOWNLOAD; ?>&nbsp;</td>
- <td class="smallText"><?php echo TABLE_TEXT_FILENAME; ?></td>
- <td class="smallText"><?php echo tep_draw_input_field('products_attributes_filename', $products_attributes_filename, 'size="15"'); ?>&nbsp;</td>
- <td class="smallText"><?php echo TABLE_TEXT_MAX_DAYS; ?></td>
- <td class="smallText"><?php echo tep_draw_input_field('products_attributes_maxdays', $products_attributes_maxdays, 'size="5"'); ?>&nbsp;</td>
- <td class="smallText"><?php echo TABLE_TEXT_MAX_COUNT; ?></td>
- <td class="smallText"><?php echo tep_draw_input_field('products_attributes_maxcount', $products_attributes_maxcount, 'size="5"'); ?>&nbsp;</td>
- </tr>
- </table>
- </td>
- <td>&nbsp;</td>
- </tr>
-<?php
- }
-?>
-<?php
- } elseif (($action == 'delete_product_attribute') && ($HTTP_GET_VARS['attribute_id'] == $attributes_values['products_attributes_id'])) {
-?>
- <td class="smallText">&nbsp;<b><?php echo $attributes_values["products_attributes_id"]; ?></b>&nbsp;</td>
- <td class="smallText">&nbsp;<b><?php echo $products_name_only; ?></b>&nbsp;</td>
- <td class="smallText">&nbsp;<b><?php echo $options_name; ?></b>&nbsp;</td>
- <td class="smallText">&nbsp;<b><?php echo $values_name; ?></b>&nbsp;</td>
- <td align="right" class="smallText">&nbsp;<b><?php echo $attributes_values["options_values_price"]; ?></b>&nbsp;</td>
- <td align="center" class="smallText">&nbsp;<b><?php echo $attributes_values["price_prefix"]; ?></b>&nbsp;</td>
- <td align="center" class="smallText">&nbsp;<b><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_attribute&attribute_id=' . $HTTP_GET_VARS['attribute_id']) . '">'; ?><?php echo tep_image_button('button_confirm.gif', IMAGE_CONFIRM); ?></a>&nbsp;&nbsp;<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, '&option_page=' . $option_page . '&value_page=' . $value_page . '&attribute_page=' . $attribute_page, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_cancel.gif', IMAGE_CANCEL); ?></a>&nbsp;</b></td>
-<?php
- } else {
-?>
- <td class="smallText">&nbsp;<?php echo $attributes_values["products_attributes_id"]; ?>&nbsp;</td>
- <td class="smallText">&nbsp;<?php echo $products_name_only; ?>&nbsp;</td>
- <td class="smallText">&nbsp;<?php echo $options_name; ?>&nbsp;</td>
- <td class="smallText">&nbsp;<?php echo $values_name; ?>&nbsp;</td>
- <td align="right" class="smallText">&nbsp;<?php echo $attributes_values["options_values_price"]; ?>&nbsp;</td>
- <td align="center" class="smallText">&nbsp;<?php echo $attributes_values["price_prefix"]; ?>&nbsp;</td>
- <td align="center" class="smallText">&nbsp;<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=update_attribute&attribute_id=' . $attributes_values['products_attributes_id'] . '&attribute_page=' . $attribute_page, 'NONSSL') . '">'; ?><?php echo tep_image_button('button_edit.gif', IMAGE_UPDATE); ?></a>&nbsp;&nbsp;<?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=delete_product_attribute&attribute_id=' . $attributes_values['products_attributes_id'] . '&attribute_page=' . $attribute_page, 'NONSSL') , '">'; ?><?php echo tep_image_button('button_delete.gif', IMAGE_DELETE); ?></a>&nbsp;</td>
-<?php
- }
- $max_attributes_id_query = tep_db_query("select max(products_attributes_id) + 1 as next_id from " . TABLE_PRODUCTS_ATTRIBUTES);
- $max_attributes_id_values = tep_db_fetch_array($max_attributes_id_query);
- $next_id = $max_attributes_id_values['next_id'];
-?>
- </tr>
-<?php
- }
- if ($action != 'update_attribute') {
-?>
- <tr>
- <td colspan="7"><?php echo tep_black_line(); ?></td>
- </tr>
- <tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>">
- <td class="smallText">&nbsp;<?php echo $next_id; ?>&nbsp;</td>
- <td class="smallText">&nbsp;<select name="products_id">
-<?php
</pre></pre>
<strong class="error">[truncated at 1000 lines; 70 more skipped]</strong>
</div>
<hr /><a name="file2" /><div class="file">
<span class="pathname" id="added"><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" id="added"><big><b>products_attributes.php</b></big> <small id="info">added at <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_attributes.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></small></div>
<pre class="diff"><small id="info">diff -N products_attributes.php
--- /dev/null Mon Aug 30 00:19:04 2004
+++ /tmp/cvsAAAITaO5U Mon Aug 30 00:19:04 2004
@@ -0,0 +1,211 @@
</small></pre><pre class="diff" id="added">+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2004 osCommerce
+
+ Released under the GNU General Public License
+*/
+
+/*
+ if (DOWNLOAD_ENABLED == 'true') {
+ $download_query_raw ="select products_attributes_filename, products_attributes_maxdays, products_attributes_maxcount
+ from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . "
+ where products_attributes_id='" . $attributes_values['products_attributes_id'] . "'";
+ $download_query = tep_db_query($download_query_raw);
+ if (tep_db_num_rows($download_query) > 0) {
+ $download = tep_db_fetch_array($download_query);
+ $products_attributes_filename = $download['products_attributes_filename'];
+ $products_attributes_maxdays = $download['products_attributes_maxdays'];
+ $products_attributes_maxcount = $download['products_attributes_maxcount'];
+ }
+?>
+ <tr class="<?php echo (!($rows % 2)? 'attributes-even' : 'attributes-odd');?>">
+ <td>&nbsp;</td>
+ <td colspan="5">
+ <table>
+ <tr class="<?php echo (!($rows % 2)? 'attributes-even' : 'attributes-odd');?>">
+ <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_DOWNLOAD; ?>&nbsp;</td>
+ <td class="smallText"><?php echo TABLE_TEXT_FILENAME; ?></td>
+ <td class="smallText"><?php echo tep_draw_input_field('products_attributes_filename', $products_attributes_filename, 'size="15"'); ?>&nbsp;</td>
+ <td class="smallText"><?php echo TABLE_TEXT_MAX_DAYS; ?></td>
+ <td class="smallText"><?php echo tep_draw_input_field('products_attributes_maxdays', $products_attributes_maxdays, 'size="5"'); ?>&nbsp;</td>
+ <td class="smallText"><?php echo TABLE_TEXT_MAX_COUNT; ?></td>
+ <td class="smallText"><?php echo tep_draw_input_field('products_attributes_maxcount', $products_attributes_maxcount, 'size="5"'); ?>&nbsp;</td>
+ </tr>
+ </table>
+ </td>
+ <td>&nbsp;</td>
+ </tr>
+<?php
+ }
+*/
+
+ $languages = tep_get_languages();
+?>
+
+<h1><?php echo HEADING_TITLE;?></h1>
+
+<div id="infoBox_paDefault" <?php if (!empty($action)) { echo 'style="display: none;"'; } ?>>
+ <table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo TABLE_HEADING_ATTRIBUTE_GROUPS; ?></th>
+ <th><?php echo TABLE_HEADING_TOTAL_ENTRIES; ?></th>
+ <th><?php echo TABLE_HEADING_ACTION; ?></th>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+ $Qgroups = $osC_Database->query('select products_options_id, products_options_name from :table_products_options where language_id = :language_id order by products_options_name');
+ $Qgroups->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS);
+ $Qgroups->bindInt(':language_id', $osC_Session->value('languages_id'));
+ $Qgroups->setBatchLimit($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS);
+ $Qgroups->execute();
+
+ while ($Qgroups->next()) {
+ $Qentries = $osC_Database->query('select count(*) as total_entries from :table_products_options_values_to_products_options where products_options_id = :products_options_id');
+ $Qentries->bindTable(':table_products_options_values_to_products_options', TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS);
+ $Qentries->bindInt(':products_options_id', $Qgroups->valueInt('products_options_id'));
+ $Qentries->execute();
+
+ if (!isset($paInfo) && (!isset($_GET['paID']) || (isset($_GET['paID']) && ($_GET['paID'] == $Qgroups->valueInt('products_options_id'))))) {
+ $Qproducts = $osC_Database->query('select count(*) as total_products from :table_products_attributes where options_id = :options_id');
+ $Qproducts->bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
+ $Qproducts->bindInt(':options_id', $Qgroups->valueInt('products_options_id'));
+ $Qproducts->execute();
+
+ $paInfo = new objectInfo(array_merge($Qgroups->toArray(), $Qentries->toArray(), $Qproducts->toArray()));
+ }
+
+ if (isset($paInfo) && ($Qgroups->valueInt('products_options_id') == $paInfo->products_options_id)) {
+ echo ' <tr class="selected">' . "\n";
+ } else {
+ echo ' <tr onMouseOver="rowOverEffect(this);" onMouseOut="rowOutEffect(this);" onClick="document.location.href=\'' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $Qgroups->valueInt('products_options_id')) . '\';">' . "\n";
+ }
+?>
+ <td><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $Qgroups->valueInt('products_options_id') . '&action=list') . '">' . tep_image(DIR_WS_ICONS . 'folder.gif', ICON_FOLDER) . '&nbsp;' . $Qgroups->value('products_options_name') . '</a>'; ?></td>
+ <td><?php echo $Qentries->valueInt('total_entries'); ?></td>
+ <td align="right">
+<?php
+ if (isset($paInfo) && ($Qgroups->valueInt('products_options_id') == $paInfo->products_options_id)) {
+ echo '<a href="#" onClick="toggleInfoBox(\'paEdit\');">' . tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . '</a>&nbsp;' .
+ '<a href="#" onClick="toggleInfoBox(\'paDelete\');">' . tep_image('templates/' . $template . '/images/icons/16x16/trash.png', IMAGE_DELETE, '16', '16') . '</a>';
+ } else {
+ echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $Qgroups->valueInt('products_options_id') . '&action=paEdit') . '">' . tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . '</a>&nbsp;' .
+ '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $Qgroups->valueInt('products_options_id') . '&action=paDelete') . '">' . tep_image('templates/' . $template . '/images/icons/16x16/trash.png', IMAGE_DELETE, '16', '16') . '</a>';
+ }
+?>
+ </td>
+ </tr>
+<?php
+ }
+?>
+ </tbody>
+ </table>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText"><?php echo $Qgroups->displayBatchLinksTotal(TEXT_DISPLAY_NUMBER_OF_PRODUCTS); ?></td>
+ <td class="smallText" align="right"><?php echo $Qgroups->displayBatchLinksPullDown(); ?></td>
+ </tr>
+ </table>
+
+ <p align="right"><?php echo '<input type="button" value="' . IMAGE_INSERT . '" onClick="toggleInfoBox(\'paNew\');" class="infoBoxButton">'; ?></p>
+</div>
+
+<div id="infoBox_paNew" <?php if ($action != 'paNew') { echo 'style="display: none;"'; } ?>>
+ <div class="infoBoxHeading"><?php echo tep_image('templates/' . $template . '/images/icons/16x16/new.png', IMAGE_INSERT, '16', '16') . ' ' . TEXT_INFO_HEADING_NEW_ATTRIBUTE_GROUP; ?></div>
+ <div class="infoBoxContent">
+ <?php echo tep_draw_form('paNew', FILENAME_PRODUCTS_ATTRIBUTES, 'action=saveGroup'); ?>
+
+ <p><?php echo TEXT_INFO_INSERT_ATTRIBUTE_INTRO; ?></p>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText" width="40%" valign="top"><?php echo '<b>' . TEXT_INFO_ATTRIBUTE_GROUP_NAME . '</b>'; ?></td>
+ <td class="smallText" width="60%">
+<?php
+ foreach ($languages as $l_entry) {
+ echo tep_image(DIR_WS_CATALOG_LANGUAGES . $l_entry['directory'] . '/images/icon.gif', $l_entry['name']) . '&nbsp;' . osc_draw_input_field('group_name[' . $l_entry['id'] . ']') . '<br>';
+ }
+?>
+ </td>
+ </tr>
+ </table>
+
+ <p align="center"><?php echo '<input type="submit" value="' . IMAGE_SAVE . '" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'paDefault\');" class="operationButton">'; ?></p>
+
+ </form>
+ </div>
+</div>
+
+<?php
+ if (isset($paInfo)) {
+?>
+
+<div id="infoBox_paEdit" <?php if ($action != 'paEdit') { echo 'style="display: none;"'; } ?>>
+ <div class="infoBoxHeading"><?php echo tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . ' ' . $paInfo->products_options_name; ?></div>
+ <div class="infoBoxContent">
+ <?php echo tep_draw_form('paEdit', FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $paInfo->products_options_id . '&action=saveGroup'); ?>
+
+ <p><?php echo TEXT_INFO_EDIT_INTRO; ?></p>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText" width="40%" valign="top"><?php echo '<b>' . TEXT_INFO_ATTRIBUTE_GROUP_NAME . '</b>'; ?></td>
+ <td class="smallText" width="60%">
+<?php
+ $Qgd = $osC_Database->query('select language_id, products_options_name from :table_products_options where products_options_id = :products_options_id');
+ $Qgd->bindTable(':table_products_options', TABLE_PRODUCTS_OPTIONS);
+ $Qgd->bindInt(':products_options_id', $_GET['paID']);
+ $Qgd->execute();
+
+ $group_names = array();
+ while ($Qgd->next()) {
+ $group_names[$Qgd->valueInt('language_id')] = $Qgd->value('products_options_name');
+ }
+
+ foreach ($languages as $l_entry) {
+ echo tep_image(DIR_WS_CATALOG_LANGUAGES . $l_entry['directory'] . '/images/icon.gif', $l_entry['name']) . '&nbsp;' . osc_draw_input_field('group_name[' . $l_entry['id'] . ']', (isset($group_names[$l_entry['id']]) ? $group_names[$l_entry['id']] : '')) . '<br>';
+ }
+?>
+ </td>
+ </tr>
+ </table>
+
+ <p align="center"><?php echo '<input type="submit" value="' . IMAGE_SAVE . '" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'paDefault\');" class="operationButton">'; ?></p>
+
+ </form>
+ </div>
+</div>
+
+<div id="infoBox_paDelete" <?php if ($action != 'paDelete') { echo 'style="display: none;"'; } ?>>
+ <div class="infoBoxHeading"><?php echo tep_image('templates/' . $template . '/images/icons/16x16/trash.png', IMAGE_DELETE, '16', '16') . ' ' . $paInfo->products_options_name; ?></div>
+ <div class="infoBoxContent">
+
+<?php
+ if ($paInfo->total_products > 0) {
+ echo ' <p><b>' . sprintf(TEXT_INFO_DELETE_ATTRIBUTE_GROUP_PROHIBITED, $paInfo->total_products) . '</b></p>' . "\n" .
+ ' <p align="center"><input type="button" value="' . IMAGE_BACK . '" onClick="toggleInfoBox(\'paDefault\');" class="operationButton"></p>' . "\n";
+ } else {
+ echo ' <p>' . TEXT_INFO_DELETE_ATTRIBUTE_INTRO . '</p>' . "\n" .
+ ' <p><b>' . $paInfo->products_options_name . '</b></p>' . "\n";
+
+ if ($paInfo->total_entries > 0) {
+ echo ' <p><b>' . sprintf(TEXT_INFO_DELETE_ATTRIBUTE_GROUP_WARNING, $paInfo->total_entries) . '</b></p>' . "\n";
+ }
+
+ echo ' <p align="center"><input type="button" value="' . IMAGE_DELETE . '" onClick="document.location.href=\'' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $paInfo->products_options_id . '&action=deleteConfirm') . '\';" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'paDefault\');" class="operationButton"></p>' . "\n";
+ }
+?>
+
+ </div>
+</div>
+
+<?php
+ }
+?>
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname" id="added"><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" id="added"><big><b>products_attributes_listing.php</b></big> <small id="info">added at <a href="http://cvs.oscommerce.com/viewcvs.cgi/admin/admin/templates/pages/products_attributes_listing.php?rev=1.1&content-type=text/vnd.viewcvs-markup">1.1</a></small></div>
<pre class="diff"><small id="info">diff -N products_attributes_listing.php
--- /dev/null Mon Aug 30 00:19:04 2004
+++ /tmp/cvsAAAmVa45U Mon Aug 30 00:19:05 2004
@@ -0,0 +1,165 @@
</small></pre><pre class="diff" id="added">+<?php
+/*
+ $Id$
+
+ osCommerce, Open Source E-Commerce Solutions
+ http://www.oscommerce.com
+
+ Copyright (c) 2004 osCommerce
+
+ Released under the GNU General Public License
+*/
+?>
+
+<h1><?php echo HEADING_TITLE; ?></h1>
+
+<div id="infoBox_paeDefault" <?php if (!empty($entriesAction)) { echo 'style="display: none;"'; } ?>>
+ <table border="0" width="100%" cellspacing="0" cellpadding="2" class="dataTable">
+ <thead>
+ <tr>
+ <th><?php echo 'Entry'; ?></th>
+ <th><?php echo TABLE_HEADING_ACTION; ?></th>
+ </tr>
+ </thead>
+ <tbody>
+<?php
+ $Qentries = $osC_Database->query('select pov.products_options_values_id, pov.products_options_values_name from :table_products_options_values pov, :table_products_options_values_to_products_options pov2po where pov2po.products_options_id = :products_options_id and pov2po.products_options_values_id = pov.products_options_values_id and pov.language_id = :language_id order by pov.products_options_values_name');
+ $Qentries->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES);
+ $Qentries->bindTable(':table_products_options_values_to_products_options', TABLE_PRODUCTS_OPTIONS_VALUES_TO_PRODUCTS_OPTIONS);
+ $Qentries->bindInt(':products_options_id', $_GET['paID']);
+ $Qentries->bindInt(':language_id', $osC_Session->value('languages_id'));
+ $Qentries->setBatchLimit($_GET['entriesPage'], MAX_DISPLAY_SEARCH_RESULTS);
+ $Qentries->execute();
+
+ while ($Qentries->next()) {
+ if (!isset($paeInfo) && (!isset($_GET['paeID']) || (isset($_GET['paeID']) && ($_GET['paeID'] == $Qentries->valueInt('products_options_values_id'))))) {
+ $Qproducts = $osC_Database->query('select count(*) as total_products from :table_products_attributes where options_values_id = :options_values_id');
+ $Qproducts->bindTable(':table_products_attributes', TABLE_PRODUCTS_ATTRIBUTES);
+ $Qproducts->bindInt(':options_values_id', $Qentries->valueInt('products_options_values_id'));
+ $Qproducts->execute();
+
+ $paeInfo = new objectInfo(array_merge($Qentries->toArray(), $Qproducts->toArray()));
+ }
+
+ if (isset($paeInfo) && ($Qentries->valueInt('products_options_values_id') == $paeInfo->products_options_values_id)) {
+ echo ' <tr class="selected">' . "\n";
+ } else {
+ echo ' <tr onMouseOver="rowOverEffect(this);" onMouseOut="rowOutEffect(this);" onClick="document.location.href=\'' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $_GET['paID'] . '&action=list&entriesPage=' . $_GET['entriesPage'] . '&paeID=' . $Qentries->valueInt('products_options_values_id')) . '\';">' . "\n";
+ }
+?>
+ <td><?php echo $Qentries->value('products_options_values_name'); ?></td>
+ <td align="right">
+<?php
+ if (isset($paeInfo) && ($Qentries->valueInt('products_options_values_id') == $paeInfo->products_options_values_id)) {
+ echo '<a href="#" onClick="toggleInfoBox(\'paeEdit\');">' . tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . '</a>&nbsp;' .
+ '<a href="#" onClick="toggleInfoBox(\'paeDelete\');">' . tep_image('templates/' . $template . '/images/icons/16x16/trash.png', IMAGE_DELETE, '16', '16') . '</a>';
+ } else {
+ echo '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $_GET['paID'] . '&action=list&entriesPage=' . $_GET['entriesPage'] . '&paeID=' . $Qentries->valueInt('products_options_values_id') . '&entriesAction=paeEdit') . '">' . tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . '</a>&nbsp;' .
+ '<a href="' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $_GET['paID'] . '&action=list&entriesPage=' . $_GET['entriesPage'] . '&paeID=' . $Qentries->valueInt('products_options_values_id') . '&entriesAction=paeDelete') . '">' . tep_image('templates/' . $template . '/images/icons/16x16/trash.png', IMAGE_DELETE, '16', '16') . '</a>';
+ }
+?>
+ </td>
+ </tr>
+<?php
+ }
+?>
+ </tbody>
+ </table>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText"><?php echo $Qentries->displayBatchLinksTotal(TEXT_DISPLAY_NUMBER_OF_COUNTRIES); ?></td>
+ <td class="smallText" align="right"><?php echo $Qentries->displayBatchLinksPullDown('entriesPage', 'page=' . $_GET['page'] . '&paID=' . $_GET['paID'] . '&action=list'); ?></td>
+ </tr>
+ </table>
+
+ <p align="right"><?php echo '<input type="button" value="' . IMAGE_BACK . '" onClick="document.location.href=\'' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $_GET['paID']) . '\';" class="infoBoxButton"> <input type="button" value="' . IMAGE_INSERT . '" onClick="toggleInfoBox(\'paeNew\');" class="infoBoxButton">'; ?></p>
+</div>
+
+<div id="infoBox_paeNew" <?php if ($entriesAction != 'paeNew') { echo 'style="display: none;"'; } ?>>
+ <div class="infoBoxHeading"><?php echo tep_image('templates/' . $template . '/images/icons/16x16/new.png', IMAGE_INSERT, '16', '16') . ' ' . TEXT_INFO_HEADING_NEW_ATTRIBUTE_ENTRY; ?></div>
+ <div class="infoBoxContent">
+ <?php echo tep_draw_form('paeNew', FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $_GET['paID'] . '&action=list&entriesAction=saveGroupEntry'); ?>
+
+ <p><?php echo TEXT_INFO_INSERT_ATTRIBUTE_ENTRY_INTRO; ?></p>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText" width="40%" valign="top"><?php echo '<b>' . TEXT_INFO_ATTRIBUTE_ENTRY_NAME . '</b>'; ?></td>
+ <td class="smallText" width="60%">
+<?php
+ foreach ($languages as $l_entry) {
+ echo tep_image(DIR_WS_CATALOG_LANGUAGES . $l_entry['directory'] . '/images/icon.gif', $l_entry['name']) . '&nbsp;' . osc_draw_input_field('entry_name[' . $l_entry['id'] . ']') . '<br>';
+ }
+?>
+ </td>
+ </tr>
+ </table>
+
+ <p align="center"><?php echo '<input type="submit" value="' . IMAGE_SAVE . '" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'paeDefault\');" class="operationButton">'; ?></p>
+
+ </form>
+ </div>
+</div>
+
+<?php
+ if (isset($paeInfo)) {
+?>
+
+<div id="infoBox_paeEdit" <?php if ($entriesAction != 'paeEdit') { echo 'style="display: none;"'; } ?>>
+ <div class="infoBoxHeading"><?php echo tep_image('templates/' . $template . '/images/icons/16x16/configure.png', IMAGE_EDIT, '16', '16') . ' ' . $paeInfo->products_options_values_name; ?></div>
+ <div class="infoBoxContent">
+ <?php echo tep_draw_form('paeEdit', FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $_GET['paID'] . '&action=list&entriesPage=' . $_GET['entriesPage'] . '&paeID=' . $paeInfo->products_options_values_id . '&entriesAction=saveGroupEntry'); ?>
+
+ <p><?php echo TEXT_INFO_EDIT_INTRO; ?></p>
+
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+ <td class="smallText" width="40%" valign="top"><?php echo '<b>' . TEXT_INFO_ATTRIBUTE_ENTRY_NAME . '</b>'; ?></td>
+ <td class="smallText" width="60%">
+<?php
+ $Qed = $osC_Database->query('select language_id, products_options_values_name from :table_products_options_values where products_options_values_id = :products_options_values_id');
+ $Qed->bindTable(':table_products_options_values', TABLE_PRODUCTS_OPTIONS_VALUES);
+ $Qed->bindInt(':products_options_values_id', $paeInfo->products_options_values_id);
+ $Qed->execute();
+
+ $entry_names = array();
+ while ($Qed->next()) {
+ $entry_names[$Qed->valueInt('language_id')] = $Qed->value('products_options_values_name');
+ }
+
+ foreach ($languages as $l_entry) {
+ echo tep_image(DIR_WS_CATALOG_LANGUAGES . $l_entry['directory'] . '/images/icon.gif', $l_entry['name']) . '&nbsp;' . osc_draw_input_field('entry_name[' . $l_entry['id'] . ']', (isset($entry_names[$l_entry['id']]) ? $entry_names[$l_entry['id']] : '')) . '<br>';
+ }
+?>
+ </td>
+ </tr>
+ </table>
+
+ <p align="center"><?php echo '<input type="submit" value="' . IMAGE_SAVE . '" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'paeDefault\');" class="operationButton">'; ?></p>
+
+ </form>
+ </div>
+</div>
+
+<div id="infoBox_paeDelete" <?php if ($entriesAction != 'paeDelete') { echo 'style="display: none;"'; } ?>>
+ <div class="infoBoxHeading"><?php echo tep_image('templates/' . $template . '/images/icons/16x16/trash.png', IMAGE_DELETE, '16', '16') . ' ' . $paeInfo->products_options_values_name; ?></div>
+ <div class="infoBoxContent">
+
+<?php
+ if ($paeInfo->total_products > 0) {
+ echo ' <p><b>' . sprintf(TEXT_INFO_DELETE_ATTRIBUTE_ENTRY_PROHIBITED, $paeInfo->total_products) . '</b></p>' . "\n" .
+ ' <p align="center"><input type="button" value="' . IMAGE_BACK . '" onClick="toggleInfoBox(\'paeDefault\');" class="operationButton"></p>' . "\n";
+ } else {
+ echo ' <p>' . TEXT_INFO_DELETE_ATTRIBUTE_ENTRY_INTRO . '</p>' . "\n" .
+ ' <p><b>' . $paeInfo->products_options_values_name . '</b></p>' . "\n" .
+ ' <p align="center"><input type="button" value="' . IMAGE_DELETE . '" onClick="document.location.href=\'' . tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'page=' . $_GET['page'] . '&paID=' . $_GET['paID'] . '&action=list&entriesPage=' . $_GET['entriesPage'] . '&paeID=' . $paeInfo->products_options_values_id . '&entriesAction=deleteConfirm') . '\';" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'paeDefault\');" class="operationButton"></p>' . "\n";
+ }
+?>
+
+ </div>
+</div>
+
+<?php
+ }
+?>
</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