[TEP-COMMIT] [CVS admin] standards updates
anonymous-OfajU3CKLf1/[email protected] 22 Jul 2004 23:33:07 -0000
| Newsgroups | gmane.comp.web.oscommerce.cvs |
|---|---|
| Message-ID | <[email protected]> |
Commit in admin/admin on MAIN
backup.php +2 1.61 -> 1.62
banner_manager.php +2 1.73 -> 1.74
banner_statistics.php +2 1.5 -> 1.6
cache.php +2 1.25 -> 1.26
define_language.php +2 1.16 -> 1.17
file_manager.php +2 1.43 -> 1.44
index.php +61 -50 1.20 -> 1.21
invoice.php +27 -28 1.6 -> 1.7
mail.php +2 1.31 -> 1.32
newsletters.php +2 1.17 -> 1.18
packingslip.php +19 -19 1.7 -> 1.8
popup_image.php +2 1.7 -> 1.8
products_attributes.php +18 -15 1.53 -> 1.54
server_info.php +3 -1 1.6 -> 1.7
tax_rates.php +2 1.30 -> 1.31
whos_online.php +2 1.36 -> 1.37
+150 -113
16 modified files
standards updates
----------
admin /admin
backup.php 1.61 -> 1.62
diff -u -r1.61 -r1.62
--- backup.php 2004/02/14 18:00:34 1.61
+++ backup.php 2004/07/22 23:33:00 1.62
@@ -12,6 +12,8 @@
require('includes/application_top.php');
+ $selected_box = 'tools';
+
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
if (tep_not_null($action)) {
----------
admin /admin
banner_manager.php 1.73 -> 1.74
diff -u -r1.73 -r1.74
--- banner_manager.php 2003/06/29 22:50:51 1.73
+++ banner_manager.php 2004/07/22 23:33:00 1.74
@@ -12,6 +12,8 @@
require('includes/application_top.php');
+ $selected_box = 'tools';
+
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
$banner_extension = tep_banner_image_extension();
----------
admin /admin
banner_statistics.php 1.5 -> 1.6
diff -u -r1.5 -r1.6
--- banner_statistics.php 2003/06/20 00:30:15 1.5
+++ banner_statistics.php 2004/07/22 23:33:00 1.6
@@ -12,6 +12,8 @@
require('includes/application_top.php');
+ $selected_box = 'tools';
+
$type = (isset($HTTP_GET_VARS['type']) ? $HTTP_GET_VARS['type'] : '');
$banner_extension = tep_banner_image_extension();
----------
admin /admin
cache.php 1.25 -> 1.26
diff -u -r1.25 -r1.26
--- cache.php 2004/04/09 02:06:45 1.25
+++ cache.php 2004/07/22 23:33:00 1.26
@@ -12,6 +12,8 @@
require('includes/application_top.php');
+ $selected_box = 'tools';
+
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
if (tep_not_null($action)) {
----------
admin /admin
define_language.php 1.16 -> 1.17
diff -u -r1.16 -r1.17
--- define_language.php 2003/07/30 08:14:30 1.16
+++ define_language.php 2004/07/22 23:33:00 1.17
@@ -12,6 +12,8 @@
require('includes/application_top.php');
+ $selected_box = 'tools';
+
if (!isset($HTTP_GET_VARS['lngdir'])) $HTTP_GET_VARS['lngdir'] = $language;
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
----------
admin /admin
file_manager.php 1.43 -> 1.44
diff -u -r1.43 -r1.44
--- file_manager.php 2003/09/10 17:39:24 1.43
+++ file_manager.php 2004/07/22 23:33:00 1.44
@@ -12,6 +12,8 @@
require('includes/application_top.php');
+ $selected_box = 'tools';
+
if (!tep_session_is_registered('current_path')) {
$current_path = DIR_FS_DOCUMENT_ROOT;
tep_session_register('current_path');
----------
admin /admin
index.php 1.20 -> 1.21
diff -u -r1.20 -r1.21
--- index.php 2004/04/08 02:42:56 1.20
+++ index.php 2004/07/22 23:33:00 1.21
@@ -5,7 +5,7 @@
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
- Copyright (c) 2003 osCommerce
+ Copyright (c) 2004 osCommerce
Released under the GNU General Public License
*/
@@ -14,54 +14,54 @@
$cat = array(array('title' => BOX_HEADING_CONFIGURATION,
'image' => 'configuration.gif',
- 'href' => tep_href_link(FILENAME_CONFIGURATION, 'selected_box=configuration&gID=1'),
- 'children' => array(array('title' => BOX_CONFIGURATION_MYSTORE, 'link' => tep_href_link(FILENAME_CONFIGURATION, 'selected_box=configuration&gID=1')),
- array('title' => BOX_CONFIGURATION_LOGGING, 'link' => tep_href_link(FILENAME_CONFIGURATION, 'selected_box=configuration&gID=10')),
- array('title' => BOX_CONFIGURATION_CACHE, 'link' => tep_href_link(FILENAME_CONFIGURATION, 'selected_box=configuration&gID=11')))),
+ 'href' => tep_href_link(FILENAME_CONFIGURATION, 'gID=1'),
+ 'children' => array(array('title' => BOX_CONFIGURATION_MYSTORE, 'link' => tep_href_link(FILENAME_CONFIGURATION, 'gID=1')),
+ array('title' => BOX_CONFIGURATION_LOGGING, 'link' => tep_href_link(FILENAME_CONFIGURATION, 'gID=10')),
+ array('title' => BOX_CONFIGURATION_CACHE, 'link' => tep_href_link(FILENAME_CONFIGURATION, 'gID=11')))),
array('title' => BOX_HEADING_MODULES,
'image' => 'modules.gif',
- 'href' => tep_href_link(FILENAME_MODULES, 'selected_box=modules&set=payment'),
- 'children' => array(array('title' => BOX_MODULES_PAYMENT, 'link' => tep_href_link(FILENAME_MODULES, 'selected_box=modules&set=payment')),
- array('title' => BOX_MODULES_SHIPPING, 'link' => tep_href_link(FILENAME_MODULES, 'selected_box=modules&set=shipping')))),
+ 'href' => tep_href_link(FILENAME_MODULES, 'set=payment'),
+ 'children' => array(array('title' => BOX_MODULES_PAYMENT, 'link' => tep_href_link(FILENAME_MODULES, 'set=payment')),
+ array('title' => BOX_MODULES_SHIPPING, 'link' => tep_href_link(FILENAME_MODULES, 'set=shipping')))),
array('title' => BOX_HEADING_CATALOG,
'image' => 'catalog.gif',
- 'href' => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog'),
- 'children' => array(array('title' => CATALOG_CONTENTS, 'link' => tep_href_link(FILENAME_CATEGORIES, 'selected_box=catalog')),
- array('title' => BOX_CATALOG_MANUFACTURERS, 'link' => tep_href_link(FILENAME_MANUFACTURERS, 'selected_box=catalog')))),
+ 'href' => tep_href_link(FILENAME_CATEGORIES),
+ 'children' => array(array('title' => CATALOG_CONTENTS, 'link' => tep_href_link(FILENAME_CATEGORIES)),
+ array('title' => BOX_CATALOG_MANUFACTURERS, 'link' => tep_href_link(FILENAME_MANUFACTURERS)))),
array('title' => BOX_HEADING_LOCATION_AND_TAXES,
'image' => 'location.gif',
- 'href' => tep_href_link(FILENAME_COUNTRIES, 'selected_box=taxes'),
- 'children' => array(array('title' => BOX_TAXES_COUNTRIES, 'link' => tep_href_link(FILENAME_COUNTRIES, 'selected_box=taxes')),
- array('title' => BOX_TAXES_GEO_ZONES, 'link' => tep_href_link(FILENAME_GEO_ZONES, 'selected_box=taxes')))),
+ 'href' => tep_href_link(FILENAME_COUNTRIES),
+ 'children' => array(array('title' => BOX_TAXES_COUNTRIES, 'link' => tep_href_link(FILENAME_COUNTRIES)),
+ array('title' => BOX_TAXES_GEO_ZONES, 'link' => tep_href_link(FILENAME_GEO_ZONES)))),
array('title' => BOX_HEADING_CUSTOMERS,
'image' => 'customers.gif',
- 'href' => tep_href_link(FILENAME_CUSTOMERS, 'selected_box=customers'),
- 'children' => array(array('title' => BOX_CUSTOMERS_CUSTOMERS, 'link' => tep_href_link(FILENAME_CUSTOMERS, 'selected_box=customers')),
- array('title' => BOX_CUSTOMERS_ORDERS, 'link' => tep_href_link(FILENAME_ORDERS, 'selected_box=customers')))),
+ 'href' => tep_href_link(FILENAME_CUSTOMERS),
+ 'children' => array(array('title' => BOX_CUSTOMERS_CUSTOMERS, 'link' => tep_href_link(FILENAME_CUSTOMERS)),
+ array('title' => BOX_CUSTOMERS_ORDERS, 'link' => tep_href_link(FILENAME_ORDERS)))),
array('title' => BOX_HEADING_LOCALIZATION,
'image' => 'localization.gif',
- 'href' => tep_href_link(FILENAME_CURRENCIES, 'selected_box=localization'),
- 'children' => array(array('title' => BOX_LOCALIZATION_CURRENCIES, 'link' => tep_href_link(FILENAME_CURRENCIES, 'selected_box=localization')),
- array('title' => BOX_LOCALIZATION_LANGUAGES, 'link' => tep_href_link(FILENAME_LANGUAGES, 'selected_box=localization')))),
+ 'href' => tep_href_link(FILENAME_CURRENCIES),
+ 'children' => array(array('title' => BOX_LOCALIZATION_CURRENCIES, 'link' => tep_href_link(FILENAME_CURRENCIES)),
+ array('title' => BOX_LOCALIZATION_LANGUAGES, 'link' => tep_href_link(FILENAME_LANGUAGES)))),
array('title' => BOX_HEADING_REPORTS,
'image' => 'reports.gif',
- 'href' => tep_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, 'selected_box=reports'),
- 'children' => array(array('title' => REPORTS_PRODUCTS, 'link' => tep_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, 'selected_box=reports')),
- array('title' => REPORTS_ORDERS, 'link' => tep_href_link(FILENAME_STATS_CUSTOMERS, 'selected_box=reports')))),
+ 'href' => tep_href_link(FILENAME_STATISTICS),
+ 'children' => array(array('title' => BOX_REPORTS_STATISTICS, 'link' => tep_href_link(FILENAME_STATISTICS)))),
array('title' => BOX_HEADING_TOOLS,
'image' => 'tools.gif',
- 'href' => tep_href_link(FILENAME_BACKUP, 'selected_box=tools'),
- 'children' => array(array('title' => TOOLS_BACKUP, 'link' => tep_href_link(FILENAME_BACKUP, 'selected_box=tools')),
- array('title' => TOOLS_BANNERS, 'link' => tep_href_link(FILENAME_BANNER_MANAGER, 'selected_box=tools')),
- array('title' => TOOLS_FILES, 'link' => tep_href_link(FILENAME_FILE_MANAGER, 'selected_box=tools')))));
+ 'href' => tep_href_link(FILENAME_BACKUP),
+ 'children' => array(array('title' => TOOLS_BACKUP, 'link' => tep_href_link(FILENAME_BACKUP)),
+ array('title' => TOOLS_BANNERS, 'link' => tep_href_link(FILENAME_BANNER_MANAGER)),
+ array('title' => TOOLS_FILES, 'link' => tep_href_link(FILENAME_FILE_MANAGER)))));
$languages = tep_get_languages();
$languages_array = array();
$languages_selected = DEFAULT_LANGUAGE;
- for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
+ for ($i=0, $n=sizeof($languages); $i<$n; $i++) {
$languages_array[] = array('id' => $languages[$i]['code'],
'text' => $languages[$i]['name']);
- if ($languages[$i]['directory'] == $language) {
+
+ if ($languages[$i]['directory'] == $osC_Session->value('language')) {
$languages_selected = $languages[$i]['code'];
}
}
@@ -127,11 +127,18 @@
echo '<br>';
$orders_contents = '';
- $orders_status_query = tep_db_query("select orders_status_name, orders_status_id from " . TABLE_ORDERS_STATUS . " where language_id = '" . $languages_id . "'");
- while ($orders_status = tep_db_fetch_array($orders_status_query)) {
- $orders_pending_query = tep_db_query("select count(*) as count from " . TABLE_ORDERS . " where orders_status = '" . $orders_status['orders_status_id'] . "'");
- $orders_pending = tep_db_fetch_array($orders_pending_query);
- $orders_contents .= '<a href="' . tep_href_link(FILENAME_ORDERS, 'selected_box=customers&status=' . $orders_status['orders_status_id']) . '">' . $orders_status['orders_status_name'] . '</a>: ' . $orders_pending['count'] . '<br>';
+ $Qos = $osC_Database->query('select orders_status_name, orders_status_id from :table_orders_status where language_id = :language_id');
+ $Qos->bindRaw(':table_orders_status', TABLE_ORDERS_STATUS);
+ $Qos->bindInt(':language_id', $osC_Session->value('languages_id'));
+ $Qos->execute();
+
+ while ($Qos->next()) {
+ $Qop = $osC_Database->query('select count(*) as count from :table_orders where orders_status = :orders_status');
+ $Qop->bindRaw(':table_orders', TABLE_ORDERS);
+ $Qop->bindInt(':orders_status', $Qos->valueInt('orders_status_id'));
+ $Qop->execute();
+
+ $orders_contents .= '<a href="' . tep_href_link(FILENAME_ORDERS, 'status=' . $Qos->valueInt('orders_status_id')) . '">' . $Qos->value('orders_status_name') . '</a>: ' . $Qop->value('count') . '<br>';
}
$orders_contents = substr($orders_contents, 0, -4);
@@ -149,12 +156,17 @@
echo '<br>';
- $customers_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS);
- $customers = tep_db_fetch_array($customers_query);
- $products_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS . " where products_status = '1'");
- $products = tep_db_fetch_array($products_query);
- $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS);
- $reviews = tep_db_fetch_array($reviews_query);
+ $Qcustomers = $osC_Database->query('select count(*) as count from :table_customers');
+ $Qcustomers->bindRaw(':table_customers', TABLE_CUSTOMERS);
+ $Qcustomers->execute();
+
+ $Qproducts = $osC_Database->query('select count(*) as count from :table_products');
+ $Qproducts->bindRaw(':table_products', TABLE_PRODUCTS);
+ $Qproducts->execute();
+
+ $Qreviews = $osC_Database->query('select count(*) as count from :table_reviews');
+ $Qreviews->bindRaw(':table_reviews', TABLE_REVIEWS);
+ $Qreviews->execute();
$heading = array();
$contents = array();
@@ -163,9 +175,9 @@
'text' => BOX_TITLE_STATISTICS);
$contents[] = array('params' => 'class="infoBox"',
- 'text' => BOX_ENTRY_CUSTOMERS . ' ' . $customers['count'] . '<br>' .
- BOX_ENTRY_PRODUCTS . ' ' . $products['count'] . '<br>' .
- BOX_ENTRY_REVIEWS . ' ' . $reviews['count']);
+ 'text' => '<a href="' . tep_href_link(FILENAME_CUSTOMERS) . '">' . BOX_ENTRY_CUSTOMERS . '</a>: ' . $Qcustomers->value('count') . '<br>' .
+ '<a href="' . tep_href_link(FILENAME_CATEGORIES) . '">' . BOX_ENTRY_PRODUCTS . '</a>: ' . $Qproducts->value('count') . '<br>' .
+ '<a href="' . tep_href_link(FILENAME_REVIEWS) . '">' . BOX_ENTRY_REVIEWS . '</a>: ' . $Qreviews->value('count'));
$box = new box;
echo $box->menuBox($heading, $contents);
@@ -174,10 +186,9 @@
$contents = array();
- if (getenv('HTTPS') == 'on') {
- $size = ((getenv('SSL_CIPHER_ALGKEYSIZE')) ? getenv('SSL_CIPHER_ALGKEYSIZE') . '-bit' : '<i>' . BOX_CONNECTION_UNKNOWN . '</i>');
+ if ($request_type == 'SSL') {
$contents[] = array('params' => 'class="infoBox"',
- 'text' => tep_image(DIR_WS_ICONS . 'locked.gif', ICON_LOCKED, '', '', 'align="right"') . sprintf(BOX_CONNECTION_PROTECTED, $size));
+ 'text' => tep_image(DIR_WS_ICONS . 'locked.gif', ICON_LOCKED, '', '', 'align="right"') . sprintf(BOX_CONNECTION_PROTECTED, (isset($_SERVER['SSL_CIPHER_ALGKEYSIZE']) ? $_SERVER['SSL_CIPHER_ALGKEYSIZE'] . '-bit' : '<i>' . BOX_CONNECTION_UNKNOWN . '</i>')));
} else {
$contents[] = array('params' => 'class="infoBox"',
'text' => tep_image(DIR_WS_ICONS . 'unlocked.gif', ICON_UNLOCKED, '', '', 'align="right"') . BOX_CONNECTION_UNPROTECTED);
@@ -207,10 +218,10 @@
echo ' <tr>' . "\n";
}
- echo ' <td><table border="0" cellspacing="0" cellpadding="2">' . "\n" .
+ echo ' <td valign="top"><table border="0" cellspacing="0" cellpadding="2">' . "\n" .
' <tr>' . "\n" .
- ' <td><a href="' . $cat[$i]['href'] . '">' . tep_image(DIR_WS_IMAGES . 'categories/' . $cat[$i]['image'], $cat[$i]['title'], '32', '32') . '</a></td>' . "\n" .
- ' <td><table border="0" cellspacing="0" cellpadding="2">' . "\n" .
+ ' <td valign="top"><a href="' . $cat[$i]['href'] . '">' . tep_image(DIR_WS_IMAGES . 'categories/' . $cat[$i]['image'], $cat[$i]['title'], '32', '32') . '</a></td>' . "\n" .
+ ' <td valign="top"><table border="0" cellspacing="0" cellpadding="2">' . "\n" .
' <tr>' . "\n" .
' <td class="main"><a href="' . $cat[$i]['href'] . '" class="main">' . $cat[$i]['title'] . '</a></td>' . "\n" .
' </tr>' . "\n" .
@@ -242,7 +253,7 @@
</table></td>
</tr>
<tr>
- <td><?php require(DIR_WS_INCLUDES . 'footer.php'); ?></td>
+ <td><?php require('includes/footer.php'); ?></td>
</tr>
</table></td>
</tr>
----------
admin /admin
invoice.php 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- invoice.php 2003/06/20 00:37:30 1.6
+++ invoice.php 2004/07/22 23:33:00 1.7
@@ -5,21 +5,20 @@
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
- Copyright (c) 2003 osCommerce
+ Copyright (c) 2004 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
- require(DIR_WS_CLASSES . 'currencies.php');
- $currencies = new currencies();
+ $selected_box = 'customers';
- $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
- $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");
+ require('../includes/classes/currencies.php');
+ $osC_Currencies = new osC_Currencies();
- include(DIR_WS_CLASSES . 'order.php');
- $order = new order($oID);
+ require('includes/classes/order.php');
+ $osC_Order = new osC_Order($_GET['oID']);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
@@ -51,16 +50,16 @@
<td class="main"><b><?php echo ENTRY_SOLD_TO; ?></b></td>
</tr>
<tr>
- <td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td>
+ <td class="main"><?php echo tep_address_format($osC_Order->getBilling('format_id'), $osC_Order->getBilling(), 1, '', '<br>'); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
</tr>
<tr>
- <td class="main"><?php echo $order->customer['telephone']; ?></td>
+ <td class="main"><?php echo $osC_Order->getCustomer('telephone'); ?></td>
</tr>
<tr>
- <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></td>
+ <td class="main"><?php echo '<a href="mailto:' . $osC_Order->getCustomer('email_address') . '"><u>' . $osC_Order->getCustomer('email_address') . '</u></a>'; ?></td>
</tr>
</table></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
@@ -68,7 +67,7 @@
<td class="main"><b><?php echo ENTRY_SHIP_TO; ?></b></td>
</tr>
<tr>
- <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?></td>
+ <td class="main"><?php echo tep_address_format($osC_Order->getDelivery('format_id'), $osC_Order->getDelivery(), 1, '', '<br>'); ?></td>
</tr>
</table></td>
</tr>
@@ -81,7 +80,7 @@
<td><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
- <td class="main"><?php echo $order->info['payment_method']; ?></td>
+ <td class="main"><?php echo $osC_Order->getPaymentMethod(); ?></td>
</tr>
</table></td>
</tr>
@@ -100,36 +99,36 @@
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_TOTAL_INCLUDING_TAX; ?></td>
</tr>
<?php
- for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
+ foreach ($osC_Order->getProducts() as $product) {
echo ' <tr class="dataTableRow">' . "\n" .
- ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
- ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
+ ' <td class="dataTableContent" valign="top" align="right">' . $product['quantity'] . ' x</td>' . "\n" .
+ ' <td class="dataTableContent" valign="top">' . $product['name'];
- if (isset($order->products[$i]['attributes']) && (($k = sizeof($order->products[$i]['attributes'])) > 0)) {
- for ($j = 0; $j < $k; $j++) {
- echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
- if ($order->products[$i]['attributes'][$j]['price'] != '0') echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
+ if (isset($product['attributes']) && (sizeof($product['attributes']) > 0)) {
+ foreach ($product['attributes'] as $attribute) {
+ echo '<br><nobr><small> <i> - ' . $attribute['option'] . ': ' . $attribute['value'];
+ if ($attribute['price'] != '0') echo ' (' . $attribute['prefix'] . $osC_Currencies->format($attribute['price'] * $product['quantity'], true, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . ')';
echo '</i></small></nobr>';
}
}
echo ' </td>' . "\n" .
- ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
- echo ' <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" .
- ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
- ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
- ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n" .
- ' <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(tep_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . '</b></td>' . "\n";
+ ' <td class="dataTableContent" valign="top">' . $product['model'] . '</td>' . "\n";
+ echo ' <td class="dataTableContent" align="right" valign="top">' . tep_display_tax_value($product['tax']) . '%</td>' . "\n" .
+ ' <td class="dataTableContent" align="right" valign="top"><b>' . $osC_Currencies->format($product['final_price'], true, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n" .
+ ' <td class="dataTableContent" align="right" valign="top"><b>' . $osC_Currencies->format(tep_add_tax($product['final_price'], $product['tax']), true, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n" .
+ ' <td class="dataTableContent" align="right" valign="top"><b>' . $osC_Currencies->format($product['final_price'] * $product['quantity'], true, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n" .
+ ' <td class="dataTableContent" align="right" valign="top"><b>' . $osC_Currencies->format(tep_add_tax($product['final_price'], $product['tax']) * $product['quantity'], true, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . '</b></td>' . "\n";
echo ' </tr>' . "\n";
}
?>
<tr>
<td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2">
<?php
- for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
+ foreach ($osC_Order->getTotals() as $total) {
echo ' <tr>' . "\n" .
- ' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
- ' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
+ ' <td align="right" class="smallText">' . $total['title'] . '</td>' . "\n" .
+ ' <td align="right" class="smallText">' . $total['text'] . '</td>' . "\n" .
' </tr>' . "\n";
}
?>
----------
admin /admin
mail.php 1.31 -> 1.32
diff -u -r1.31 -r1.32
--- mail.php 2003/06/20 00:37:51 1.31
+++ mail.php 2004/07/22 23:33:00 1.32
@@ -12,6 +12,8 @@
require('includes/application_top.php');
+ $selected_box = 'tools';
+
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
if ( ($action == 'send_email_to_user') && isset($HTTP_POST_VARS['customers_email_address']) && !isset($HTTP_POST_VARS['back_x']) ) {
----------
admin /admin
newsletters.php 1.17 -> 1.18
diff -u -r1.17 -r1.18
--- newsletters.php 2003/06/29 22:50:52 1.17
+++ newsletters.php 2004/07/22 23:33:00 1.18
@@ -12,6 +12,8 @@
require('includes/application_top.php');
+ $selected_box = 'tools';
+
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
if (tep_not_null($action)) {
----------
admin /admin
packingslip.php 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- packingslip.php 2003/06/20 00:40:10 1.7
+++ packingslip.php 2004/07/22 23:33:00 1.8
@@ -5,21 +5,20 @@
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
- Copyright (c) 2003 osCommerce
+ Copyright (c) 2004 osCommerce
Released under the GNU General Public License
*/
require('includes/application_top.php');
- require(DIR_WS_CLASSES . 'currencies.php');
- $currencies = new currencies();
+ $selected_box = 'customers';
- $oID = tep_db_prepare_input($HTTP_GET_VARS['oID']);
- $orders_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$oID . "'");
+ require('../includes/classes/currencies.php');
+ $osC_Currencies = new osC_Currencies();
- include(DIR_WS_CLASSES . 'order.php');
- $order = new order($oID);
+ include('includes/classes/order.php');
+ $osC_Order = new osC_Order($_GET['oID']);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
@@ -50,16 +49,16 @@
<td class="main"><b><?php echo ENTRY_SOLD_TO; ?></b></td>
</tr>
<tr>
- <td class="main"><?php echo tep_address_format($order->customer['format_id'], $order->customer, 1, '', '<br>'); ?></td>
+ <td class="main"><?php echo tep_address_format($osC_Order->getBilling('format_id'), $osC_Order->getBilling(), 1, '', '<br>'); ?></td>
</tr>
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '5'); ?></td>
</tr>
<tr>
- <td class="main"><?php echo $order->customer['telephone']; ?></td>
+ <td class="main"><?php echo $osC_Order->getCustomer('telephone'); ?></td>
</tr>
<tr>
- <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></td>
+ <td class="main"><?php echo '<a href="mailto:' . $osC_Order->getCustomer('email_address') . '"><u>' . $osC_Order->getCustomer('email_address') . '</u></a>'; ?></td>
</tr>
</table></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
@@ -67,7 +66,7 @@
<td class="main"><b><?php echo ENTRY_SHIP_TO; ?></b></td>
</tr>
<tr>
- <td class="main"><?php echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'); ?></td>
+ <td class="main"><?php echo tep_address_format($osC_Order->getDelivery('format_id'), $osC_Order->getDelivery(), 1, '', '<br>'); ?></td>
</tr>
</table></td>
</tr>
@@ -80,7 +79,7 @@
<td><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><b><?php echo ENTRY_PAYMENT_METHOD; ?></b></td>
- <td class="main"><?php echo $order->info['payment_method']; ?></td>
+ <td class="main"><?php echo $osC_Order->getPaymentMethod(); ?></td>
</tr>
</table></td>
</tr>
@@ -94,20 +93,21 @@
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS_MODEL; ?></td>
</tr>
<?php
- for ($i=0, $n=sizeof($order->products); $i<$n; $i++) {
+ foreach ($osC_Order->getProducts() as $product) {
echo ' <tr class="dataTableRow">' . "\n" .
- ' <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . ' x</td>' . "\n" .
- ' <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
+ ' <td class="dataTableContent" valign="top" align="right">' . $product['quantity'] . ' x</td>' . "\n" .
+ ' <td class="dataTableContent" valign="top">' . $product['name'];
- if (isset($order->products[$i]['attributes']) && (sizeof($order->products[$i]['attributes']) > 0)) {
- for ($j=0, $k=sizeof($order->products[$i]['attributes']); $j<$k; $j++) {
- echo '<br><nobr><small> <i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . $order->products[$i]['attributes'][$j]['value'];
+ if (isset($product['attributes']) && (sizeof($product['attributes']) > 0)) {
+ foreach ($product['attributes'] as $attribute) {
+ echo '<br><nobr><small> <i> - ' . $attribute['option'] . ': ' . $attribute['value'];
+ if ($attribute['price'] != '0') echo ' (' . $attribute['prefix'] . $osC_Currencies->format($attribute['price'] * $product['quantity'], true, $osC_Order->getCurrency(), $osC_Order->getCurrencyValue()) . ')';
echo '</i></small></nobr>';
}
}
echo ' </td>' . "\n" .
- ' <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n" .
+ ' <td class="dataTableContent" valign="top">' . $product['model'] . '</td>' . "\n";
' </tr>' . "\n";
}
?>
----------
admin /admin
popup_image.php 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- popup_image.php 2003/06/20 00:40:23 1.7
+++ popup_image.php 2004/07/22 23:33:00 1.8
@@ -12,6 +12,8 @@
require('includes/application_top.php');
+ $selected_box = 'tools';
+
reset($HTTP_GET_VARS);
while (list($key, ) = each($HTTP_GET_VARS)) {
switch ($key) {
----------
admin /admin
products_attributes.php 1.53 -> 1.54
diff -u -r1.53 -r1.54
--- products_attributes.php 2004/02/14 19:32:58 1.53
+++ products_attributes.php 2004/07/22 23:33:00 1.54
@@ -11,6 +11,9 @@
*/
require('includes/application_top.php');
+
+ $selected_box = 'catalog';
+
$languages = tep_get_languages();
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
@@ -447,7 +450,7 @@
<?php
}
?>
- </table></td>
+ </table></td>
</tr>
<?php
} else {
@@ -541,11 +544,11 @@
$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']) {
+ if ($values_values['products_options_id'] == $options_values['products_options_id']) {
echo ' selected';
}
echo '>' . $options_values['products_options_name'] . '</option>';
- }
+ }
?>
</select> </td>
<td class="smallText"><?php echo $inputs; ?></td>
@@ -607,8 +610,8 @@
</tr>
</table></td>
<!-- option value eof //-->
- </tr>
-<!-- products_attributes //-->
+ </tr>
+<!-- products_attributes //-->
<tr>
<td width="100%"><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
@@ -711,7 +714,7 @@
} else {
echo "\n" . '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '">' . $products_values['products_name'] . '</option>';
}
- }
+ }
?>
</select> </td>
<td class="smallText"> <select name="options_id">
@@ -723,7 +726,7 @@
} else {
echo "\n" . '<option name="' . $options_values['products_options_name'] . '" value="' . $options_values['products_options_id'] . '">' . $options_values['products_options_name'] . '</option>';
}
- }
+ }
?>
</select> </td>
<td class="smallText"> <select name="values_id">
@@ -735,16 +738,16 @@
} 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> </td>
<td align="right" class="smallText"> <input type="text" name="value_price" value="<?php echo $attributes_values['options_values_price']; ?>" size="6"> </td>
<td align="center" class="smallText"> <input type="text" name="price_prefix" value="<?php echo $attributes_values['price_prefix']; ?>" size="2"> </td>
<td align="center" class="smallText"> <?php echo tep_image_submit('button_update.gif', IMAGE_UPDATE); ?> <?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> </td>
<?php
if (DOWNLOAD_ENABLED == 'true') {
- $download_query_raw ="select products_attributes_filename, products_attributes_maxdays, products_attributes_maxcount
- from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . "
+ $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) {
@@ -810,12 +813,12 @@
</tr>
<tr class="<?php echo (floor($rows/2) == ($rows/2) ? 'attributes-even' : 'attributes-odd'); ?>">
<td class="smallText"> <?php echo $next_id; ?> </td>
- <td class="smallText"> <select name="products_id">
+ <td class="smallText"> <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)) {
echo '<option name="' . $products_values['products_name'] . '" value="' . $products_values['products_id'] . '">' . $products_values['products_name'] . '</option>';
- }
+ }
?>
</select> </td>
<td class="smallText"> <select name="options_id">
@@ -823,7 +826,7 @@
$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)) {
echo '<option name="' . $options_values['products_options_name'] . '" value="' . $options_values['products_options_id'] . '">' . $options_values['products_options_name'] . '</option>';
- }
+ }
?>
</select> </td>
<td class="smallText"> <select name="values_id">
@@ -831,7 +834,7 @@
$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)) {
echo '<option name="' . $values_values['products_options_values_name'] . '" value="' . $values_values['products_options_values_id'] . '">' . $values_values['products_options_values_name'] . '</option>';
- }
+ }
?>
</select> </td>
<td align="right" class="smallText"> <input type="text" name="value_price" size="6"> </td>
----------
admin /admin
server_info.php 1.6 -> 1.7
diff -u -r1.6 -r1.7
--- server_info.php 2003/06/30 13:13:49 1.6
+++ server_info.php 2004/07/22 23:33:00 1.7
@@ -12,6 +12,8 @@
require('includes/application_top.php');
+ $selected_box = 'tools';
+
$system = tep_get_system_information();
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
@@ -111,7 +113,7 @@
$phpinfo = str_replace('border: 1px', '', $phpinfo);
ereg('<body>(.*)</body>', $phpinfo, $regs);
echo '<table border="1" cellpadding="3" width="600" style="border: 0px; border-color: #000000;">' .
- ' <tr><td><a href="http://www.oscommerce.com"><img border="0" src="images/oscommerce.gif" alt=" osCommerce " /></a><h1 class="p"> ' . PROJECT_VERSION . '</h1></td>' .
+ ' <tr><td><a href="http://www.oscommerce.com"><img border="0" src="images/oscommerce.gif" alt=" osCommerce " /></a><h1 class="p"> ' . PROJECT_VERSION . '</h1></td>' .
' </tr>' .
'</table>';
echo $regs[1];
----------
admin /admin
tax_rates.php 1.30 -> 1.31
diff -u -r1.30 -r1.31
--- tax_rates.php 2003/06/29 22:50:52 1.30
+++ tax_rates.php 2004/07/22 23:33:00 1.31
@@ -12,6 +12,8 @@
require('includes/application_top.php');
+ $selected_box = 'taxes';
+
$action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');
if (tep_not_null($action)) {
----------
admin /admin
whos_online.php 1.36 -> 1.37
diff -u -r1.36 -r1.37
--- whos_online.php 2004/04/08 06:18:33 1.36
+++ whos_online.php 2004/07/22 23:33:00 1.37
@@ -14,6 +14,8 @@
require('includes/application_top.php');
+ $selected_box = 'tools';
+
require(DIR_WS_CLASSES . 'currencies.php');
$currencies = new currencies();
CVSspam 0.2.8
-------------------------------------------------------
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=4721&alloc_id=10040&op=click