function build_main_html() { global $db, $messageStack; // Build heading bar $output = '<table border="0" width="100%" cellspacing="0" cellpadding="1">' . chr(10); $output .= ' <tr class="dataTableHeadingRow" valign="top">' . chr(10); $heading_array = array('countries_name' => SETUP_INFO_COUNTRY_NAME, 'countries_iso_code_2' => SETUP_INFO_COUNTRY_CODE_2, 'countries_iso_code_3' => SETUP_INFO_COUNTRY_CODE_3); $result = html_heading_bar($heading_array, $_GET['list_order']); $output .= $result['html_code']; $disp_order = $result['disp_order']; $output .= ' </tr>' . chr(10); // Build field data $query_raw = "select countries_id, countries_name, countries_iso_code_2, countries_iso_code_3 \r\n from " . $this->db_table . " order by {$disp_order}"; $page_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $query_raw, $query_numrows); $result = $db->Execute($query_raw); while (!$result->EOF) { $output .= ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . chr(10); $output .= ' <td class="dataTableContent" onclick="loadPopUp(\'edit\', ' . $result->fields['countries_id'] . ')">' . htmlspecialchars($result->fields['countries_name']) . '</td>' . chr(10); $output .= ' <td class="dataTableContent" onclick="loadPopUp(\'edit\', ' . $result->fields['countries_id'] . ')">' . $result->fields['countries_iso_code_2'] . '</td>' . chr(10); $output .= ' <td class="dataTableContent" onclick="loadPopUp(\'edit\', ' . $result->fields['countries_id'] . ')">' . $result->fields['countries_iso_code_3'] . '</td>' . chr(10); $output .= ' <td class="dataTableContent" align="right">' . chr(10); if ($this->security_id > 1) { $output .= html_icon('actions/edit-find-replace.png', TEXT_EDIT, 'small', 'onclick="loadPopUp(\'edit\', ' . $result->fields['countries_id'] . ')"') . chr(10); } if ($this->security_id > 3) { $output .= html_icon('emblems/emblem-unreadable.png', TEXT_DELETE, 'small', 'onclick="if (confirm(\'' . SETUP_COUNTRY_DELETE_INTRO . '\')) submitSeq(' . $result->fields['countries_id'] . ', \'delete\')"') . chr(10); } $output .= ' </td>' . chr(10); $output .= ' </tr>' . chr(10); $result->MoveNext(); } $output .= '</table>' . chr(10); $output .= '<div class="page_count_right">' . $page_split->display_links($query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']) . '</div>' . chr(10); $output .= '<div class="page_count">' . $page_split->display_count($query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_COUNTRIES) . '</div>' . chr(10); return $output; }
?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_RELEASED; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php // $gv_query_raw = "select c.customers_firstname, c.customers_lastname, gv.unique_id, gv.date_created, gv.amount, gv.order_id from " . TABLE_CUSTOMERS . " c, " . TABLE_COUPON_GV_QUEUE . " gv where (gv.customer_id = c.customers_id and gv.release_flag = 'N')"; $gv_query_raw = "select c.customers_firstname, c.customers_lastname, gv.unique_id, gv.date_created, gv.amount, gv.order_id, gv.release_flag, gv.release_date from " . TABLE_CUSTOMERS . " c, " . TABLE_COUPON_GV_QUEUE . " gv where (gv.customer_id = c.customers_id " . $filter . ") order by gv.release_flag, gv.order_id"; $gv_query = tep_db_query($gv_query_raw); $gv_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $gv_query_raw, $gv_query_numrows); while ($gv_list = tep_db_fetch_array($gv_query)) { if ((!$_GET['gid'] || @$_GET['gid'] == $gv_list['unique_id']) && !$gInfo) { $gInfo = new objectInfo($gv_list); } if (is_object($gInfo) && $gv_list['unique_id'] == $gInfo->unique_id) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . tep_href_link('gv_queue.php', tep_get_all_get_params(array('gid', 'action')) . 'gid=' . $gInfo->unique_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . tep_href_link('gv_queue.php', tep_get_all_get_params(array('gid', 'action')) . 'gid=' . $gv_list['unique_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $gv_list['customers_firstname'] . ' ' . $gv_list['customers_lastname']; ?> </td> <td class="dataTableContent" align="center"><?php
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_COUNTRY_NAME; ?> </td> <td class="dataTableHeadingContent" align="center" colspan="2"><?php echo TABLE_HEADING_COUNTRY_CODES; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $countries_query_raw = "select countries_id, countries_name, countries_iso_code_2, countries_iso_code_3, address_format_id from " . TABLE_COUNTRIES . " order by countries_name"; $countries_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $countries_query_raw, $countries_query_numrows); $countries_query = tep_db_query($countries_query_raw); while ($countries = tep_db_fetch_array($countries_query)) { if ((!isset($HTTP_GET_VARS['cID']) || isset($HTTP_GET_VARS['cID']) && $HTTP_GET_VARS['cID'] == $countries['countries_id']) && !isset($cInfo) && substr($action, 0, 3) != 'new') { $cInfo = new objectInfo($countries); } if (isset($cInfo) && is_object($cInfo) && $countries['countries_id'] == $cInfo->countries_id) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link('countries.php', 'page=' . $HTTP_GET_VARS['page'] . '&cID=' . $cInfo->countries_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link('countries.php', 'page=' . $HTTP_GET_VARS['page'] . '&cID=' . $countries['countries_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $countries['countries_name']; ?> </td>
?> </td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DATE_EXPECTED; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $productstable = $oostable['products']; $products_descriptiontable = $oostable['products_description']; $products_result_raw = "SELECT pd.products_id, pd.products_name, p.products_date_available\n FROM {$products_descriptiontable} pd,\n {$productstable} p\n WHERE p.products_id = pd.products_id AND\n p.products_date_available != '' AND\n pd.products_languages_id = '" . intval($_SESSION['language_id']) . "'\n ORDER BY p.products_date_available DESC"; $products_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $products_result_raw, $products_result_numrows); $products_result = $dbconn->Execute($products_result_raw); while ($products = $products_result->fields) { if ((!isset($_GET['pID']) || isset($_GET['pID']) && $_GET['pID'] == $products['products_id']) && !isset($pInfo)) { $pInfo = new objectInfo($products); } if (isset($pInfo) && is_object($pInfo) && $products['products_id'] == $pInfo->products_id) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['categories'], 'pID=' . $products['products_id'] . '&action=new_product') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['products_expected'], 'page=' . $_GET['page'] . '&pID=' . $products['products_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $products['products_name']; ?> </td>
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NAME; ?> </td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_DIRECTORY; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $template_query_raw = "select * from " . TABLE_TEMPLATE_SELECT; $template_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $template_query_raw, $template_query_numrows); $templates = $db->Execute($template_query_raw); while (!$templates->EOF) { if ((!isset($_GET['tID']) || isset($_GET['tID']) && $_GET['tID'] == $templates->fields['template_id']) && !isset($tInfo) && substr($action, 0, 3) != 'new') { $tInfo = new objectInfo($templates->fields); } if (isset($tInfo) && is_object($tInfo) && $templates->fields['template_id'] == $tInfo->template_id) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_TEMPLATE_SELECT, 'page=' . $_GET['page'] . '&tID=' . $tInfo->template_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_TEMPLATE_SELECT, 'page=' . $_GET['page'] . '&tID=' . $templates->fields['template_id']) . '\'">' . "\n"; } if ($templates->fields['template_language'] == 0) { $template_language = "Default(All)"; } else { $ln = $db->Execute("select name\n from " . TABLE_LANGUAGES . "\n where languages_id = '" . $templates->fields['template_language'] . "'"); $template_language = $ln->fields['name'];
$where = array(); if (is_numeric($_SESSION['quick_updates']['products_status'])) { $where[] = "p.products_status = '" . (int) $_SESSION['quick_updates']['products_status'] . "'"; } if ($current_category_id > 0) { $where[] = "p2c.categories_id = '" . $current_category_id . "'"; } if ($manufacturer) { $where[] = "p.manufacturers_id = '" . (int) $manufacturer . "'"; } if (sizeof($where) > 0) { $products_query_raw .= " where " . implode(' and ', $where); } $products_query_raw .= " " . $sort_by; //// page splitter and display each products info $products_split = new splitPageResults($split_page, MAX_DISPLAY_ROW_BY_PAGE, $products_query_raw, $products_query_numrows); $products = $db->Execute($products_query_raw); // eof get products data from db // Let's start displaying page with forms ?> <!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
<?php /* $Id: product_listing.php,v 1.44 2003/06/09 22:49:59 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ ?> <?php $listing_split = new splitPageResults($listing_sql, MAX_DISPLAY_SEARCH_RESULTS, 'rt.room_type_categories'); $flag1 = 0; if ($listing_split->number_of_rows > 0 && (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '2')) { } $list_box_contents = array(); for ($col = 0, $n = sizeof($column_list); $col < $n; $col++) { switch ($column_list[$col]) { case 'PRODUCT_LIST_IMAGE': $lc_text = "Hình ảnh"; $lc_align = ''; break; case 'PRODUCT_LIST_NAME': $lc_text = 'Loại phòng'; $lc_align = ''; break; case 'PRODUCT_LIST_PRICE':
require 'includes/oos_system.php'; if (!isset($option)) { require 'includes/info_message.php'; require 'includes/oos_blocks.php'; } if (USE_CACHE == '1' && !SID) { $oSmarty->caching = 2; $oSmarty->cache_lifetime = 6 * 3600; } if (!$oSmarty->is_cached($aOption['template_main'], $contents_cache_id)) { $productstable = $oostable['products']; $specialsstable = $oostable['specials']; $manufacturersstable = $oostable['manufacturers']; $products_descriptiontable = $oostable['products_description']; $top_viewed_result_raw = "SELECT p.products_id, pd.products_name, p.products_image, p.products_price,\n p.products_base_price, p.products_base_unit, p.products_units_id,\n p.products_discount_allowed, p.products_tax_class_id, p.products_units_id,\n IF(s.status, s.specials_new_products_price, NULL) AS specials_new_products_price,\n p.products_date_added, m.manufacturers_name\n FROM {$productstable} p LEFT JOIN\n {$manufacturersstable} m ON p.manufacturers_id = m.manufacturers_id LEFT JOIN\n {$products_descriptiontable} pd ON p.products_id = pd.products_id AND pd.products_languages_id = '" . intval($nLanguageID) . "' LEFT JOIN\n {$specialsstable} s ON p.products_id = s.products_id\n WHERE p.products_status >= '1'\n AND (p.products_access = '0' OR p.products_access = '" . intval($nGroupID) . "')\n ORDER BY p.products_date_added DESC, pd.products_name"; $top_viewed_split = new splitPageResults($nCurrentPageNumber, MAX_DISPLAY_PRODUCTS_NEW, $top_viewed_result_raw, $top_viewed_numrows); $top_viewed_result = $dbconn->Execute($top_viewed_result_raw); $top_viewed_array = array(); while ($top_viewed = $top_viewed_result->fields) { $new_product_price = ''; $new_product_special_price = ''; $new_max_product_discount = 0; $new_special_price = ''; $new_product_discount_price = ''; $new_base_product_price = ''; $new_base_product_special_price = ''; $new_product_units = UNITS_DELIMITER . $products_units[$top_viewed['products_units_id']]; $new_product_price = $oCurrencies->display_price($top_viewed['products_price'], oos_get_tax_rate($top_viewed['products_tax_class_id'])); if (isset($top_viewed['specials_new_products_price'])) { $new_special_price = $top_viewed['specials_new_products_price']; $new_product_special_price = $oCurrencies->display_price($new_special_price, oos_get_tax_rate($top_viewed['products_tax_class_id']));
based on: (c) 2000-2001 The Exchange Project (earlier name of osCommerce) (c) 2002-2003 osCommerce(reviews.php,v 1.48 2003/05/27); www.oscommerce.com (c) 2003 nextcommerce (reviews.php,v 1.12 2003/08/17); www.nextcommerce.org (c) 2004 XT - Commerce; www.xt-commerce.com Released under the GNU General Public License ---------------------------------------------------------------------------------------*/ include 'includes/application_top.php'; // include needed functions require_once DIR_FS_INC . 'olc_word_count.inc.php'; require_once DIR_FS_INC . 'olc_date_long.inc.php'; $breadcrumb->add(NAVBAR_TITLE_REVIEWS, olc_href_link(FILENAME_REVIEWS)); require DIR_WS_INCLUDES . 'header.php'; $reviews_query_raw = "\nselect r.reviews_id,\nleft(rd.reviews_text, 250) as reviews_text,\nr.reviews_rating,\nr.date_added,\np.products_id,\npd.products_name,\np.products_image,\nr.customers_name\nfrom " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd\nwhere\np.products_status = 1 and\np.products_id = r.products_id and\nr.reviews_id = rd.reviews_id and\np.products_id = pd.products_id and\npd.language_id = " . SESSION_LANGUAGE_ID . " and\nrd.languages_id = " . SESSION_LANGUAGE_ID . "\norder by r.reviews_id DESC"; $reviews_split = new splitPageResults($reviews_query_raw, $_GET['page'], MAX_DISPLAY_NEW_REVIEWS); if ($reviews_split->number_of_rows > 0 && (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3')) { $smarty->assign('NAVBAR', ' <table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText">' . $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS) . '</td> <td align="right" class="smallText">' . TEXT_RESULT_PAGE . BLANK . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, olc_get_all_get_params(array('page', 'info', 'x', 'y'))) . '</td> </tr> </table> '); } $module_data = array(); if ($reviews_split->number_of_rows > 0) { $reviews_query = olc_db_query($reviews_split->sql_query); while ($reviews = olc_db_fetch_array($reviews_query)) { $module_data[] = array('PRODUCTS_IMAGE' => DIR_WS_THUMBNAIL_IMAGES . $reviews['products_image'], $reviews['products_name'], 'PRODUCTS_LINK' => olc_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $reviews['products_id'] . '&reviews_id=' . $reviews['reviews_id']), 'PRODUCTS_NAME' => $reviews['products_name'], 'AUTHOR' => $reviews['customers_name'], 'TEXT' => sprintf(TEXT_REVIEW_WORD_COUNT, olc_word_count($reviews['reviews_text'], BLANK)) . ')<br/>' . htmlspecialchars($reviews['reviews_text']) . '..', 'RATING' => olc_image(DIR_WS_IMAGES . 'stars_' . $reviews['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $reviews['reviews_rating'])));
<td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_BLACKLIST; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $blacklist_query_raw = "select blacklist_id, blacklist_card_number, date_added, last_modified from " . TABLE_BLACKLIST . " order by blacklist_id"; $blacklist_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $blacklist_query_raw, $blacklist_query_numrows); $blacklist_query = olc_db_query($blacklist_query_raw); while ($blacklist = olc_db_fetch_array($blacklist_query)) { if ((!$_GET['bID'] || @$_GET['bID'] == $blacklist['blacklist_id']) && !$bInfo && substr($_GET['action'], 0, 3) != 'new') { $blacklist_numbers_query = olc_db_query("select count(*) as blacklist_count from " . TABLE_BLACKLIST . " where blacklist_id = '" . $blacklist['blacklist_id'] . APOS); $blacklist_numbers = olc_db_fetch_array($blacklist_numbers_query); $bInfo_array = olc_array_merge($blacklist, $blacklist_numbers); $bInfo = new objectInfo($bInfo_array); } if (is_object($bInfo) && $blacklist['blacklist_id'] == $bInfo->blacklist_id) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="javascript:' . olc_onclick_link(FILENAME_BLACKLIST, 'page=' . $_GET['page'] . '&bID=' . $blacklist['blacklist_id'] . '&action=edit') . '">' . NEW_LINE; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="javascript:' . olc_onclick_link(FILENAME_BLACKLIST, 'page=' . $_GET['page'] . '&bID=' . $blacklist['blacklist_id']) . '">' . NEW_LINE; } ?> <td class="dataTableContent"><?php
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?> </td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_VIEWED; ?> </td> </tr> <?php if (isset($_GET['page']) && $_GET['page'] > 1) { $rows = $_GET['page'] * MAX_DISPLAY_SEARCH_RESULTS_REPORTS - MAX_DISPLAY_SEARCH_RESULTS_REPORTS; } $rows = 0; $products_query_raw = "select p.`products_id`, pd.`products_name`, p.`products_quantity`, p.`products_type` from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.`products_id` = pd.`products_id` and pd.`language_id`='" . $_SESSION['languages_id'] . "' order by p.`products_quantity`, pd.`products_name`"; $products_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_REPORTS, $products_query_raw, $products_query_numrows); $products = $gBitDb->Execute($products_query_raw); while (!$products->EOF) { // only show low stock on products that can be added to the cart if ($zc_products->get_allow_add_to_cart($products->fields['products_id']) == 'Y') { $rows++; if (strlen($rows) < 2) { $rows = '0' . $rows; } $type_handler = $zc_products->get_admin_handler($products->fields['products_type']); $cPath = zen_get_product_path($products->fields['products_id']); ?> <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='<?php echo zen_href_link_admin($type_handler, '&product_type=' . $products->fields['products_type'] . '&cPath=' . $cPath . '&pID=' . $products->fields['products_id'] . '&action=new_product'); ?> '">
<td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_TAX_CLASSES; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $classes_query_raw = "select tax_class_id, tax_class_title, tax_class_description, last_modified, date_added from " . TABLE_TAX_CLASS . " order by tax_class_title"; $classes_split = new splitPageResults($_GET['page'], '20', $classes_query_raw, $classes_query_numrows); $classes_query = xtc_db_query($classes_query_raw); while ($classes = xtc_db_fetch_array($classes_query)) { if ((!$_GET['tID'] || @$_GET['tID'] == $classes['tax_class_id']) && !$tcInfo && substr($_GET['action'], 0, 3) != 'new') { $tcInfo = new objectInfo($classes); } if (is_object($tcInfo) && $classes['tax_class_id'] == $tcInfo->tax_class_id) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'pointer\'" onclick="document.location.href=\'' . xtc_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'pointer\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . xtc_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $classes['tax_class_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $classes['tax_class_title']; ?> </td>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_RATING; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_DATE_ADDED; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $reviews_query_raw = "select reviews_id, products_id, date_added, last_modified, reviews_rating from " . TABLE_REVIEWS . " where store_id = '" . $store_id . "' order by date_added DESC"; $reviews_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $reviews_query_raw, $reviews_query_numrows); $reviews_query = smn_db_query($reviews_query_raw); while ($reviews = smn_db_fetch_array($reviews_query)) { if ((!isset($_GET['rID']) || isset($_GET['rID']) && $_GET['rID'] == $reviews['reviews_id']) && !isset($rInfo)) { $reviews_text_query = smn_db_query("select r.reviews_read, r.customers_name, length(rd.reviews_text) as reviews_text_size from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int) $reviews['reviews_id'] . "' and r.reviews_id = rd.reviews_id and r.store_id = rd.store_id"); $reviews_text = smn_db_fetch_array($reviews_text_query); $products_image_query = smn_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int) $reviews['products_id'] . "'"); $products_image = smn_db_fetch_array($products_image_query); $products_name_query = smn_db_query("select products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int) $reviews['products_id'] . "' and language_id = '" . (int) $languages_id . "'"); $products_name = smn_db_fetch_array($products_name_query); $reviews_average_query = smn_db_query("select (avg(reviews_rating) / 5 * 100) as average_rating from " . TABLE_REVIEWS . " where products_id = '" . (int) $reviews['products_id'] . "'"); $reviews_average = smn_db_fetch_array($reviews_average_query); $review_info = array_merge($reviews_text, $reviews_average, $products_name); $rInfo_array = array_merge($reviews, $review_info, $products_image); $rInfo = new objectInfo($rInfo_array); }
</td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php if (isset($_GET['page']) && $_GET['page'] > 1) { $rows = $_GET['page'] * 20 - 20; } if ($status != '*') { $cc_result_raw = "SELECT\n coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,\n coupon_expire_date, uses_per_user, uses_per_coupon, restrict_to_products,\n restrict_to_categories, date_created,date_modified\n FROM\n " . $oostable['coupons'] . "\n WHERE\n coupon_active='" . oos_db_input($status) . "' AND\n coupon_type != 'G'"; } else { $cc_result_raw = "SELECT\n coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,\n coupon_expire_date, uses_per_user, uses_per_coupon, restrict_to_products,\n restrict_to_categories, date_created,date_modified\n FROM\n " . $oostable['coupons'] . "\n WHERE\n coupon_type != 'G'"; } $cc_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $cc_result_raw, $cc_result_numrows); $cc_result = $dbconn->Execute($cc_result_raw); while ($cc_list = $cc_result->fields) { $rows++; if (strlen($rows) < 2) { $rows = '0' . $rows; } if ((!isset($_GET['cID']) || isset($_GET['cID']) && $_GET['cID'] == $cc_list['coupon_id']) && !isset($cInfo)) { $cInfo = new objectInfo($cc_list); } if (isset($cInfo) && is_object($cInfo) && $cc_list['coupon_id'] == $cInfo->coupon_id) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['coupon_admin'], oos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->coupon_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['coupon_admin'], oos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cc_list['coupon_id']) . '\'">' . "\n"; } $coupon_description_result = $dbconn->Execute("SELECT coupon_name\n FROM " . $oostable['coupons_description'] . "\n WHERE coupon_id = '" . $cc_list['coupon_id'] . "'\n AND coupon_languages_id = '" . intval($_SESSION['language_id']) . "'");
$check_count = 1; if ($check_page->RecordCount() > MAX_DISPLAY_SEARCH_RESULTS_CUSTOMER) { while (!$check_page->EOF) { if ($check_page->fields['customers_id'] == $_GET['cID']) { break; } $check_count++; $check_page->MoveNext(); } $_GET['page'] = round($check_count / MAX_DISPLAY_SEARCH_RESULTS_CUSTOMER + (fmod($check_count, MAX_DISPLAY_SEARCH_RESULTS_CUSTOMER) != 0 ? 0.5 : 0), 0); // zen_redirect(zen_href_link(FILENAME_LINKPOINT_REVIEW, 'cID=' . $_GET['cID'] . (isset($_GET['page']) ? '&page=' . $_GET['page'] : ''), 'NONSSL')); } else { $_GET['page'] = 1; } } $customers_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_CUSTOMER, $customers_query_raw, $customers_query_numrows); $customers = $db->Execute($customers_query_raw); while (!$customers->EOF) { $info = $db->Execute("select customers_info_date_account_created as date_account_created,\n customers_info_date_account_last_modified as date_account_last_modified,\n customers_info_date_of_last_logon as date_last_logon,\n customers_info_number_of_logons as number_of_logons\n from " . TABLE_CUSTOMERS_INFO . "\n where customers_info_id = '" . $customers->fields['customers_id'] . "'"); if ((!isset($_GET['cID']) || isset($_GET['cID']) && $_GET['cID'] == $customers->fields['customers_id']) && !isset($cInfo)) { $country = $db->Execute("select countries_name\n from " . TABLE_COUNTRIES . "\n where countries_id = '" . (int) $customers->fields['entry_country_id'] . "'"); if (!is_array($country->fields)) { $country->fields = array(); } $customer_info = array_merge($country->fields, $info->fields); $cInfo_array = array_merge($customers->fields, $customer_info); $cInfo = new objectInfo($cInfo_array); } $group_query = $db->Execute("select group_name, group_percentage from " . TABLE_GROUP_PRICING . " where\n group_id = '" . $customers->fields['customers_group_pricing'] . "'"); if ($group_query->RecordCount() < 1) { $group_name_entry = TEXT_NONE;
</table></td> </tr> <tr> <?php if ($action == 'update_attribute') { $form_action = 'update_product_attribute'; } else { $form_action = 'add_product_attributes'; } ?> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="smallText" align="right"> <?php $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"; $attributes_split = new splitPageResults($attribute_page, MAX_ROW_LISTS_OPTIONS, $attributes, $attributes_query_numrows); echo $attributes_split->display_links($attributes_query_numrows, MAX_ROW_LISTS_OPTIONS, MAX_DISPLAY_PAGE_LINKS, $attribute_page, 'option_page=' . $option_page . '&value_page=' . $value_page, 'attribute_page'); ?> </td> </tr> </table> <form name="attributes" action="<?php echo tep_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'action=' . $form_action . '&' . $page_info); ?> " method="post"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td colspan="7"><?php echo tep_black_line(); ?> </td> </tr>
<td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_QTY_LEFT; ?> </td> </tr> <?php if (isset($_GET['page']) && ($_GET['page'] > 1)) $rows = $_GET['page'] * MAX_DISPLAY_SEARCH_RESULTS - MAX_DISPLAY_SEARCH_RESULTS; $productstable = $oostable['products']; $products_descriptiontable = $oostable['products_description']; $products_result_raw = "SELECT p.products_id, p.products_quantity, p.products_reorder_level, pd.products_name FROM $productstable p, $products_descriptiontable pd WHERE p.products_id = pd.products_id AND pd.products_languages_id = '" . intval($_SESSION['language_id']). "' AND p.products_quantity <= p.products_reorder_level GROUP BY pd.products_id ORDER BY pd.products_name ASC"; $products_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $products_result_raw, $products_result_numrows); $products_result = $dbconn->Execute($products_result_raw); while ($products = $products_result->fields) { $rows++; if (strlen($rows) < 2) { $rows = '0' . $rows; } ?> <tr class="datatableRow" onmouseover="this.className='datatableRowOver';this.style.cursor='hand'" onmouseout="this.className='datatableRow'" onclick="document.location.href='<?php echo oos_href_link_admin($aFilename['products'], 'action=new_product_preview&read=only&pID=' . $products['products_id'] . '&origin=' . $aFilename['stats_products_viewed'] . '?page=' . $_GET['page'], 'NONSSL'); ?>'"> <td align="left" class="smallText"> <?php echo $rows; ?>. </td> <td class="smallText"> <?php echo '<a href="' . oos_href_link_admin($aFilename['products'], 'action=new_product_preview&read=only&pID=' . $products['products_id'] . '&origin=' . $aFilename['stats_low_stock'] . '?page=' . $_GET['page'], 'NONSSL') . '" class="blacklink">' . $products['products_name'] . '</a>'; ?> </td> <td align="right" class="smallText"> <?php echo $products['products_quantity']; ?> </td> </tr> <?php // Move that ADOdb pointer!
$check_count = 1; if ($check_page->RecordCount() > MAX_DISPLAY_SEARCH_RESULTS) { while (!$check_page->EOF) { if ($check_page->fields['banners_id'] == $_GET['bID']) { break; } $check_count++; $check_page->MoveNext(); } $_GET['page'] = round($check_count / MAX_DISPLAY_SEARCH_RESULTS + (fmod_round($check_count, MAX_DISPLAY_SEARCH_RESULTS) != 0 ? 0.5 : 0), 0); } else { $_GET['page'] = 1; } } $banners_query_raw = "select banners_id, banners_title, banners_image, banners_group, status, expires_date, expires_impressions, date_status_change, date_scheduled, date_added, banners_open_new_windows, banners_on_ssl, banners_sort_order from " . TABLE_BANNERS . " order by banners_title, banners_group"; $banners_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $banners_query_raw, $banners_query_numrows); $banners = $db->Execute($banners_query_raw); while (!$banners->EOF) { $info = $db->Execute("select sum(banners_shown) as banners_shown,\n sum(banners_clicked) as banners_clicked\n from " . TABLE_BANNERS_HISTORY . "\n where banners_id = '" . (int) $banners->fields['banners_id'] . "'"); if ((!isset($_GET['bID']) || isset($_GET['bID']) && $_GET['bID'] == $banners->fields['banners_id']) && !isset($bInfo) && substr($action, 0, 3) != 'new') { $bInfo_array = array_merge($banners->fields, $info->fields); $bInfo = new objectInfo($bInfo_array); } $banners_shown = $info->fields['banners_shown'] != '' ? $info->fields['banners_shown'] : '0'; $banners_clicked = $info->fields['banners_clicked'] != '' ? $info->fields['banners_clicked'] : '0'; if (isset($bInfo) && is_object($bInfo) && $banners->fields['banners_id'] == $bInfo->banners_id) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $bInfo->banners_id . '&action=new') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_BANNER_MANAGER, 'page=' . $_GET['page'] . '&bID=' . $banners->fields['banners_id']) . '\'">' . "\n"; } ?>
</td> <td class="dataTableHeadingContent"> </td> </tr> <?php // create search filter $search = ''; if (isset($_GET['search']) && zen_not_null($_GET['search'])) { $keywords = zen_db_input(zen_db_prepare_input($_GET['search'])); $search = " and pd.products_name like '%" . $keywords . "%' or pad.products_attributes_filename like '%" . $keywords . "%' or pd.products_description like '%" . $keywords . "%' or p.products_model like '%" . $keywords . "%'"; } // order of display $order_by = " order by pd.products_name "; // create split page control $products_downloads_query_raw = "select pad.*, pa.*, pd.*, p.* from " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad left join " . TABLE_PRODUCTS_ATTRIBUTES . " pa on pad.products_attributes_id = pa.products_attributes_id left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on pa.products_id = pd.products_id and pd.language_id ='" . (int) $_SESSION['languages_id'] . "' left join " . TABLE_PRODUCTS . " p on p.products_id= pd.products_id " . " where pa.products_attributes_id = pad.products_attributes_id" . $search . $order_by; $products_downloads_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_DOWNLOADS_MANAGER, $products_downloads_query_raw, $products_downloads_query_numrows); $products_downloads_query = $db->Execute($products_downloads_query_raw); while (!$products_downloads_query->EOF) { if ((!isset($_GET['padID']) || isset($_GET['padID']) && $_GET['padID'] == $products_downloads_query->fields['products_attributes_id']) && !isset($padInfo)) { $padInfo_array = $products_downloads_query->fields; $padInfo = new objectInfo($padInfo_array); } // Moved to /admin/includes/configure.php if (!defined('DIR_FS_DOWNLOAD')) { define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); } $filename_is_missing = ''; if (!file_exists(DIR_FS_DOWNLOAD . $products_downloads_query->fields['products_attributes_filename'])) { $filename_is_missing = zen_image(DIR_WS_IMAGES . 'icon_status_red.gif'); } else { $filename_is_missing = zen_image(DIR_WS_IMAGES . 'icon_status_green.gif');
if (isset($_GET['search']) && zen_not_null($_GET['search'])) { $keywords = zen_db_input(zen_db_prepare_input($_GET['search'])); $search = " and (o.customers_city like '%" . $keywords . "%' or o.customers_postcode like '%" . $keywords . "%' or o.date_purchased like '%" . $keywords . "%' or o.billing_name like '%" . $keywords . "%' or o.billing_company like '%" . $keywords . "%' or o.billing_street_address like '%" . $keywords . "%' or o.delivery_city like '%" . $keywords . "%' or o.delivery_postcode like '%" . $keywords . "%' or o.delivery_name like '%" . $keywords . "%' or o.delivery_company like '%" . $keywords . "%' or o.delivery_street_address like '%" . $keywords . "%' or o.billing_city like '%" . $keywords . "%' or o.billing_postcode like '%" . $keywords . "%' or o.customers_email_address like '%" . $keywords . "%' or o.customers_name like '%" . $keywords . "%' or o.customers_company like '%" . $keywords . "%' or o.customers_street_address like '%" . $keywords . "%' or o.customers_telephone like '%" . $keywords . "%' or o.ip_address like '%" . $keywords . "%')"; } $new_fields = ", o.customers_street_address, o.delivery_name, o.delivery_street_address, o.billing_name, o.billing_street_address, o.payment_module_code, o.shipping_module_code, o.ip_address "; if (isset($_GET['cID'])) { $cID = zen_db_prepare_input($_GET['cID']); $orders_query_raw = "select o.orders_id, o.customers_id, o.customers_name, o.customers_id, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" . $new_fields . " from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total'), " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int) $cID . "' and o.orders_status = s.orders_status_id and s.language_id = '" . (int) $_SESSION['languages_id'] . "' order by orders_id DESC"; } elseif ($_GET['status'] != '') { $status = zen_db_prepare_input($_GET['status']); $orders_query_raw = "select o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" . $new_fields . " from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total'), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int) $_SESSION['languages_id'] . "' and s.orders_status_id = '" . (int) $status . "' " . $search . " order by o.orders_id DESC"; } else { $orders_query_raw = "select o.orders_id, o.customers_id, o.customers_name, o.payment_method, o.shipping_method, o.date_purchased, o.last_modified, o.currency, o.currency_value, s.orders_status_name, ot.text as order_total" . $new_fields . " from " . TABLE_ORDERS . " o left join " . TABLE_ORDERS_TOTAL . " ot on (o.orders_id = ot.orders_id and ot.class = 'ot_total'), " . TABLE_ORDERS_STATUS . " s where o.orders_status = s.orders_status_id and s.language_id = '" . (int) $_SESSION['languages_id'] . "' " . $search . " order by o.orders_id DESC"; } $orders_query_numrows = ''; $orders_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_ORDERS, $orders_query_raw, $orders_query_numrows); $orders = $db->Execute($orders_query_raw); while (!$orders->EOF) { if ((!isset($_GET['oID']) || isset($_GET['oID']) && $_GET['oID'] == $orders->fields['orders_id']) && !isset($oInfo)) { $oInfo = new objectInfo($orders->fields); } // format shipping method to remove () $clean_shipping = explode(" (", $oInfo->shipping_method, 2); $clean_shipping = rtrim($clean_shipping[0], ":"); $shipping_method = $clean_shipping; if (isset($oInfo) && is_object($oInfo) && $orders->fields['orders_id'] == $oInfo->orders_id) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_SUPER_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit', $request_type) . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_SUPER_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders->fields['orders_id'], $request_type) . '\'">' . "\n"; } //_TODO add new warning to diff between =! name and =! address
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CURRENCY_CODES; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_CURRENCY_VALUE; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $currency_result_raw = "SELECT currencies_id, title, code, symbol_left, symbol_right, decimal_point,\n thousands_point, decimal_places, last_updated, value\n FROM " . $oostable['currencies'] . "\n ORDER BY title"; $currency_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $currency_result_raw, $currency_result_numrows); $currency_result = $dbconn->Execute($currency_result_raw); while ($currency = $currency_result->fields) { if ((!isset($_GET['cID']) || isset($_GET['cID']) && $_GET['cID'] == $currency['currencies_id']) && !isset($cInfo) && substr($action, 0, 3) != 'new') { $cInfo = new objectInfo($currency); } if (isset($cInfo) && is_object($cInfo) && $currency['currencies_id'] == $cInfo->currencies_id) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['currencies'], 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['currencies'], 'page=' . $_GET['page'] . '&cID=' . $currency['currencies_id']) . '\'">' . "\n"; } if (DEFAULT_CURRENCY == $currency['code']) { echo ' <td class="dataTableContent"><b>' . $currency['title'] . ' (' . TEXT_DEFAULT . ')</b></td>' . "\n"; } else { echo ' <td class="dataTableContent">' . $currency['title'] . '</td>' . "\n"; }
$historytable = $oostable['specials']; $order_history_raw = "SELECT pd.products_name, p.products_id, p.products_quantity, p.products_image, p.products_price, p.products_base_price, p.products_base_unit, p.products_discount_allowed, p.products_tax_class_id, p.products_sort_order, IF(s.status, s.specials_new_products_price, NULL) AS specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) AS final_price FROM $products_descriptiontable pd, $productstable p LEFT JOIN $manufacturerstable m ON p.manufacturers_id = m.manufacturers_id LEFT JOIN $historytable s ON p.products_id = s.products_id WHERE p.products_status >= '1' AND p.products_id = pd.products_id AND pd.products_id IN ($product_ids) AND pd.products_languages_id = '" . intval($nLanguageID) . "'"; $order_history_split = new splitPageResults($nCurrentPageNumber, MAX_DISPLAY_PRODUCTS_NEW, $order_history_raw, $order_history_numrows); $order_history_result = $dbconn->Execute($order_history_raw); $order_history_array = array(); while ($order_history = $order_history_result->fields) { $new_product_price = ''; $new_product_special_price = ''; $new_max_product_discount = 0; $new_special_price = ''; $new_product_discount_price = ''; $new_base_product_price = ''; $new_base_product_special_price = ''; $new_product_price = $oCurrencies->display_price($order_history['products_price'], oos_get_tax_rate($order_history['products_tax_class_id']));
<tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_MANUFACTURERS; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $manufacturerstable = $oostable['manufacturers']; $manufacturers_result_raw = "SELECT manufacturers_id, manufacturers_name, manufacturers_image, date_added, last_modified\n FROM {$manufacturerstable}\n ORDER BY manufacturers_name"; $manufacturers_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $manufacturers_result_raw, $manufacturers_result_numrows); $manufacturers_result = $dbconn->Execute($manufacturers_result_raw); while ($manufacturers = $manufacturers_result->fields) { if ((!isset($_GET['mID']) || isset($_GET['mID']) && $_GET['mID'] == $manufacturers['manufacturers_id']) && !isset($mInfo) && substr($action, 0, 3) != 'new') { $manufacturer_products_result = $dbconn->Execute("SELECT COUNT(*) AS products_count FROM " . $oostable['products'] . " WHERE manufacturers_id = '" . $manufacturers['manufacturers_id'] . "'"); $manufacturer_products = $manufacturer_products_result->fields; $mInfo_array = array_merge($manufacturers, $manufacturer_products); $mInfo = new objectInfo($mInfo_array); } if (isset($mInfo) && is_object($mInfo) && $manufacturers['manufacturers_id'] == $mInfo->manufacturers_id) { echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['manufacturers'], 'page=' . $_GET['page'] . '&mID=' . $manufacturers['manufacturers_id'] . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['manufacturers'], 'page=' . $_GET['page'] . '&mID=' . $manufacturers['manufacturers_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php
</td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $filter = array(); if (isset($HTTP_GET_VARS['module']) && in_array($HTTP_GET_VARS['module'], $modules_array)) { $filter[] = " module = '" . tep_db_input($HTTP_GET_VARS['module']) . "' "; } if (isset($HTTP_GET_VARS['search']) && !empty($HTTP_GET_VARS['search'])) { $filter[] = " identifier like '%" . tep_db_input($HTTP_GET_VARS['search']) . "%' "; } $actions_query_raw = "select * from " . TABLE_ACTION_RECORDER . (!empty($filter) ? " where " . implode(" and ", $filter) : "") . " order by date_added desc"; $actions_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $actions_query_raw, $actions_query_numrows); $actions_query = tep_db_query($actions_query_raw); while ($actions = tep_db_fetch_array($actions_query)) { $module = $actions['module']; $module_title = $actions['module']; if (is_object(${$module})) { $module_title = ${$module}->title; } if ((!isset($HTTP_GET_VARS['aID']) || isset($HTTP_GET_VARS['aID']) && $HTTP_GET_VARS['aID'] == $actions['id']) && !isset($aInfo)) { $actions_extra_query = tep_db_query("select identifier from " . TABLE_ACTION_RECORDER . " where id = '" . (int) $actions['id'] . "'"); $actions_extra = tep_db_fetch_array($actions_extra_query); $aInfo_array = array_merge($actions, $actions_extra, array('module' => $module_title)); $aInfo = new objectInfo($aInfo_array); } if (isset($aInfo) && is_object($aInfo) && $actions['id'] == $aInfo->id) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "\n";
<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_GROUP_NAME; ?> </td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_GROUP_AMOUNT; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $groups_query_raw = "select * from " . TABLE_GROUP_PRICING; $groups_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $groups_query_raw, $groups_query_numrows); $groups = $db->Execute($groups_query_raw); while (!$groups->EOF) { if ((!isset($_GET['gID']) || isset($_GET['gID']) && $_GET['gID'] == $groups->fields['group_id']) && !isset($gInfo) && substr($action, 0, 3) != 'new') { $group_customers = $db->Execute("select count(*) as customer_count from " . TABLE_CUSTOMERS . " where customers_group_pricing = '" . (int) $groups->fields['group_id'] . "'"); $gInfo_array = array_merge($groups->fields, $group_customers->fields); $gInfo = new objectInfo($gInfo_array); } if (isset($gInfo) && is_object($gInfo) && $groups->fields['group_id'] == $gInfo->group_id) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_GROUP_PRICING, 'page=' . $_GET['page'] . '&gID=' . $groups->fields['group_id'] . '&action=edit') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_GROUP_PRICING, 'page=' . $_GET['page'] . '&gID=' . $groups->fields['group_id'] . '&action=edit') . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo $groups->fields['group_id'];
require 'includes/application_top.php'; require DIR_WS_LANGUAGES . $language . '/' . FILENAME_REVIEWS; $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_REVIEWS)); require DIR_WS_INCLUDES . 'template_top.php'; ?> <h1><?php echo HEADING_TITLE; ?> </h1> <div class="contentContainer"> <?php $reviews_query_raw = "select r.reviews_id, left(rd.reviews_text, 100) as reviews_text, r.reviews_rating, r.date_added, p.products_id, pd.products_name, p.products_image, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "' and rd.languages_id = '" . (int) $languages_id . "' order by r.reviews_id DESC"; $reviews_split = new splitPageResults($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS); if ($reviews_split->number_of_rows > 0) { if (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3') { ?> <div class="contentText"> <p style="float: right;"><?php echo TEXT_RESULT_PAGE . ' ' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, tep_get_all_get_params(array('page', 'info'))); ?> </p> <p><?php echo $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS); ?> </p> </div>
$contents_cache_id = $sTheme . '|info|' . $sGroup . '|spezials|' . $nPage . '|' . $sLanguage; require 'includes/oos_system.php'; if (!isset($option)) { require 'includes/info_message.php'; require 'includes/oos_blocks.php'; } if (USE_CACHE == '1' && !SID) { $oSmarty->caching = 2; $oSmarty->cache_lifetime = 12 * 3600; } if (!$oSmarty->is_cached($aOption['template_main'], $contents_cache_id)) { $productstable = $oostable['products']; $specialstable = $oostable['specials']; $products_descriptiontable = $oostable['products_description']; $specials_result_raw = "SELECT p.products_id, pd.products_name, p.products_image, p.products_price,\n p.products_base_price, p.products_base_unit, p.products_tax_class_id,\n p.products_units_id, p.products_image, s.specials_new_products_price,\n substring(pd.products_description, 1, 150) AS products_description\n FROM {$productstable} p,\n {$products_descriptiontable} pd,\n {$specialstable} s\n WHERE p.products_status >= '1'\n AND (p.products_access = '0' OR p.products_access = '" . intval($nGroupID) . "')\n AND s.products_id = p.products_id\n AND p.products_id = pd.products_id\n AND pd.products_languages_id = '" . intval($nLanguageID) . "'\n AND s.status = '1'\n ORDER BY s.specials_date_added DESC"; $specials_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SPECIAL_PRODUCTS, $specials_result_raw, $specials_numrows); $specials_result = $dbconn->Execute($specials_result_raw); $aSpecials = array(); while ($specials = $specials_result->fields) { $specials_base_product_price = ''; $specials_base_product_special_price = ''; $specials_product_price = $oCurrencies->display_price($specials['products_price'], oos_get_tax_rate($specials['products_tax_class_id'])); $specials_product_special_price = $oCurrencies->display_price($specials['specials_new_products_price'], oos_get_tax_rate($specials['products_tax_class_id'])); if ($specials['products_base_price'] != 1) { $specials_base_product_price = $oCurrencies->display_price($specials['products_price'] * $specials['products_base_price'], oos_get_tax_rate($specials['products_tax_class_id'])); $specials_base_product_special_price = $oCurrencies->display_price($specials['specials_new_products_price'] * $specials['products_base_price'], oos_get_tax_rate($specials['products_tax_class_id'])); } $aSpecials[] = array('products_id' => $specials['products_id'], 'products_image' => $specials['products_image'], 'products_name' => $specials['products_name'], 'products_description' => $specials['products_description'], 'products_base_unit' => $specials['products_base_unit'], 'products_base_price' => $specials['products_base_price'], 'products_price' => $specials_product_price, 'products_special_price' => $specials_product_special_price, 'base_product_price' => $specials_base_product_price, 'base_product_special_price' => $specials_base_product_special_price); $specials_result->MoveNext(); } // links breadcrumb
?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_SIZE; ?> </td> <td class="dataTableHeadingContent" align="center" width="300">Статус</td> <td class="dataTableHeadingContent" align="center">Состояние</td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $newsletters_query_raw = "select newsletters_id, title, length(content) as content_length, module, date_added, date_sent, status, locked from " . TABLE_NEWSLETTERS . " order by date_added desc"; $newsletters_split = new splitPageResults($HTTP_GET_VARS['page'], MAX_DISPLAY_SEARCH_RESULTS, $newsletters_query_raw, $newsletters_query_numrows); $newsletters_query = tep_db_query($newsletters_query_raw); while ($newsletters = tep_db_fetch_array($newsletters_query)) { if ((!isset($HTTP_GET_VARS['nID']) || isset($HTTP_GET_VARS['nID']) && $HTTP_GET_VARS['nID'] == $newsletters['newsletters_id']) && !isset($nInfo) && substr($action, 0, 3) != 'new') { $nInfo = new objectInfo($newsletters); } if (isset($nInfo) && is_object($nInfo) && $newsletters['newsletters_id'] == $nInfo->newsletters_id) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $nInfo->newsletters_id . '&action=preview') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $newsletters['newsletters_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_NEWSLETTERS, 'page=' . $HTTP_GET_VARS['page'] . '&nID=' . $newsletters['newsletters_id'] . '&action=preview') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $newsletters['title']; ?> </td>
<td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_SENT; ?> </td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_STATUS; ?> </td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $affiliate_newsletters_query_raw = "select affiliate_newsletters_id, title, length(content) as content_length, module, date_added, date_sent, status, locked from " . TABLE_AFFILIATE_NEWSLETTERS . " order by date_added desc"; $affiliate_newsletters_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $affiliate_newsletters_query_raw, $affiliate_newsletters_query_numrows); $affiliate_newsletters_query = tep_db_query($affiliate_newsletters_query_raw); while ($affiliate_newsletters = tep_db_fetch_array($affiliate_newsletters_query)) { if ((!isset($_GET['nID']) || isset($_GET['nID']) && $_GET['nID'] == $affiliate_newsletters['affiliate_newsletters_id']) && !isset($nInfo) && substr($action, 0, 3) != 'new') { $nInfo = new objectInfo($affiliate_newsletters); } if (isset($nInfo) && is_object($nInfo) && $affiliate_newsletters['affiliate_newsletters_id'] == $nInfo->affiliate_newsletters_id) { echo ' <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_AFFILIATE_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $nInfo->affiliate_newsletters_id . '&action=preview') . '\'">' . "\n"; } else { echo ' <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_AFFILIATE_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $affiliate_newsletters['affiliate_newsletters_id']) . '\'">' . "\n"; } ?> <td class="dataTableContent"><?php echo '<a href="' . tep_href_link(FILENAME_AFFILIATE_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $affiliate_newsletters['affiliate_newsletters_id'] . '&action=preview') . '">' . tep_image(DIR_WS_ICONS . 'preview.gif', ICON_PREVIEW) . '</a> ' . $affiliate_newsletters['title']; ?> </td>
</td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_PRODUCTS; ?> </td> <td class="dataTableHeadingContent" align="center"><?php echo TABLE_HEADING_PURCHASED; ?> </td> </tr> <?php if ($_GET['page'] > 1) { $rows = $_GET['page'] * '20' - '20'; } $products_query_raw = "select p.products_id, p.products_ordered, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . $_SESSION['languages_id'] . "' and p.products_ordered > 0 group by pd.products_id order by p.products_ordered DESC, pd.products_name"; $products_split = new splitPageResults($_GET['page'], MAX_DISPLAY_ADMIN_PAGE, $products_query_raw, $products_query_numrows); $products_query = vam_db_query($products_query_raw); while ($products = vam_db_fetch_array($products_query)) { $rows++; if (strlen($rows) < 2) { $rows = '0' . $rows; } ?> <tr class="dataTableRow" onmouseover="this.className='dataTableRowOver';this.style.cursor='hand'" onmouseout="this.className='dataTableRow'" onclick="document.location.href='<?php echo vam_href_link(FILENAME_CATEGORIES, 'action=new_product_preview&read=only&pID=' . $products['products_id'] . '&origin=' . FILENAME_STATS_PRODUCTS_PURCHASED . '?page=' . $_GET['page'], 'NONSSL'); ?> '"> <td class="dataTableContent"><?php echo $rows; ?> .</td>