本文整理汇总了PHP中xos_get_all_get_params函数的典型用法代码示例。如果您正苦于以下问题:PHP xos_get_all_get_params函数的具体用法?PHP xos_get_all_get_params怎么用?PHP xos_get_all_get_params使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xos_get_all_get_params函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$set = false;
for ($i = 10; $i <= 50; $i = $i + 10) {
if (MAX_DISPLAY_SEARCH_RESULTS <= $i && $set == false) {
$max_display_search_results_array[] = array('id' => xos_href_link(FILENAME_SEARCH_RESULT, xos_get_all_get_params(array('mdsr', 'page')) . 'mdsr=' . MAX_DISPLAY_SEARCH_RESULTS, 'NONSSL', true, true, false, false, false), 'text' => MAX_DISPLAY_SEARCH_RESULTS . TEXT_MAX_PRODUCTS);
$max_display_search_results_array_noscript[] = array('id' => MAX_DISPLAY_SEARCH_RESULTS, 'text' => MAX_DISPLAY_SEARCH_RESULTS . TEXT_MAX_PRODUCTS);
$set = true;
}
if (MAX_DISPLAY_SEARCH_RESULTS != $i) {
$max_display_search_results_array[] = array('id' => xos_href_link(FILENAME_SEARCH_RESULT, xos_get_all_get_params(array('mdsr', 'page')) . 'mdsr=' . $i, 'NONSSL', true, true, false, false, false), 'text' => $i . TEXT_MAX_PRODUCTS);
$max_display_search_results_array_noscript[] = array('id' => $i, 'text' => $i . TEXT_MAX_PRODUCTS);
}
}
if ($set == false) {
$max_display_search_results_array[] = array('id' => xos_href_link(FILENAME_SEARCH_RESULT, xos_get_all_get_params(array('mdsr', 'page')) . 'mdsr=' . MAX_DISPLAY_SEARCH_RESULTS, 'NONSSL', true, true, false, false, false), 'text' => MAX_DISPLAY_SEARCH_RESULTS . TEXT_MAX_PRODUCTS);
$max_display_search_results_array_noscript[] = array('id' => MAX_DISPLAY_SEARCH_RESULTS, 'text' => MAX_DISPLAY_SEARCH_RESULTS . TEXT_MAX_PRODUCTS);
}
$pull_down_menu_display_search_results .= xos_draw_pull_down_menu('mdsr', $max_display_search_results_array, xos_href_link(FILENAME_SEARCH_RESULT, xos_get_all_get_params(array('mdsr', 'page')) . 'mdsr=' . (isset($_SESSION['mdsr']) ? $_SESSION['mdsr'] : MAX_DISPLAY_SEARCH_RESULTS), 'NONSSL', true, true, false, false, false), 'class="form-control" id="mdsr" onchange="location = form.mdsr.options[form.mdsr.selectedIndex].value;"') . '</form>';
$pull_down_menu_display_search_results_noscript .= xos_draw_pull_down_menu('mdsr', $max_display_search_results_array_noscript, isset($_SESSION['mdsr']) ? $_SESSION['mdsr'] : MAX_DISPLAY_SEARCH_RESULTS, 'class="form-control" id="mdsr"');
$link_switch_search_results_view = xos_href_link(FILENAME_SEARCH_RESULT, xos_get_all_get_params(array('srv', 'sort', 'page')) . 'srv=' . ($product_list_b ? 'list' : 'grid'), 'NONSSL', true, true, false, false, false);
}
$smarty->assign(array('pull_down_menu_display_products' => $pull_down_menu_display_search_results, 'pull_down_menu_display_products_noscript_begin' => $pull_down_menu_display_search_results_noscript, 'pull_down_menu_display_products_noscript_end' => '</form>', 'label_for_max_display_products' => 'mdsr', 'link_switch_view' => $link_switch_search_results_view));
$listing_sql = $select_str . $from_str . $where_str . $order_str;
$max_display = isset($_SESSION['mdsr']) ? $_SESSION['mdsr'] : MAX_DISPLAY_SEARCH_RESULTS;
require DIR_WS_MODULES . FILENAME_PRODUCT_LISTING;
$smarty->assign('link_filename_advanced_search_and_results', xos_href_link(FILENAME_ADVANCED_SEARCH_AND_RESULTS, xos_get_all_get_params(array('sort', 'page')) . 'from_search_result=1'));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'search_result');
$output_search_result = $smarty->fetch(SELECTED_TPL . '/search_result.tpl');
$smarty->assign('central_contents', $output_search_result);
$smarty->display(SELECTED_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
示例2: getOutput
function getOutput()
{
return '<a href="http://twitter.com/home?status=' . urlencode(xos_href_link(FILENAME_PRODUCT_INFO, xos_get_all_get_params(array('p')) . 'p=' . (int) $_GET['p'], 'NONSSL', false, true, false, false, false)) . '" target="_blank"><img src="' . DIR_WS_CATALOG . DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/icons_social_bookmarks/' . $this->icon . '" class="icon-social-bookmarks" title="' . xos_output_string_protected($this->public_title) . '" alt="' . xos_output_string_protected($this->public_title) . '" /></a>';
}
示例3: array_shift
}
$popup_img = DIR_WS_IMAGES . 'products/large/' . $products_img_name['name'];
$pop_size = @GetImageSize("{$popup_img}");
if ($pop_size[0] > $pop_width) {
$pop_width = $pop_size[0];
}
if ($pop_size[1] > $pop_height) {
$pop_height = $pop_size[1];
}
}
if ($small_width_total > $pop_width) {
$pop_width = $small_width_total;
}
$product_image = array_shift($products_image_name);
$smarty->assign(array('box_width' => (int) ($pop_width + 50), 'box_height' => (int) ($pop_height + $small_height + 55), 'link_product_img' => xos_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'] . '&img_name=' . rawurlencode($product_image['name']), $request_type), 'link_product_img_noscript' => xos_href_link(FILENAME_IMAGES_WINDOW, 'pID=' . $product_info['products_id'], 'NONSSL', true, false, false, false, false), 'product_img' => xos_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($product_image['name']), addslashes($product_info['products_name']), '', '', 'style="margin: 5px;"')));
}
$back = sizeof($_SESSION['navigation']->path) - 2;
if (!empty($_SESSION['navigation']->path[$back])) {
$get_params_array = $_SESSION['navigation']->path[$back]['get'];
$get_params_array['rmp'] = '0';
$back_link = xos_href_link($_SESSION['navigation']->path[$back]['page'], xos_array_to_query_string($get_params_array, array('action', xos_session_name())), $_SESSION['navigation']->path[$back]['mode']);
} else {
$back_link = 'javascript:history.go(-1)';
}
$smarty->assign(array('form_begin' => xos_draw_form('product_reviews_write', xos_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, xos_get_all_get_params(array('lnc', 'cur', 'tpl', 'action')) . 'action=process', 'SSL'), 'post', 'onsubmit="return checkForm();"', true), 'form_end' => '</form>', 'radio_fields' => xos_draw_radio_field('rating', '1') . ' ' . xos_draw_radio_field('rating', '2') . ' ' . xos_draw_radio_field('rating', '3') . ' ' . xos_draw_radio_field('rating', '4') . ' ' . xos_draw_radio_field('rating', '5'), 'textarea_field' => xos_draw_textarea_field('review', '60', '15'), 'customers_name' => xos_output_string_protected($customer['customers_firstname'] . ' ' . $customer['customers_lastname']), 'products_name' => $product_info['products_name'], 'products_p_unit' => $product_info['products_p_unit'], 'products_model' => $product_info['products_model'], 'products_price' => $product_price, 'products_price_special' => $product_price_special, 'products_price_breaks' => $price_breaks_array, 'products_tax_description' => xos_get_products_tax_description($product_info['products_tax_class_id'], $products_tax_rate), 'td_width_img' => MEDIUM_PRODUCT_IMAGE_MAX_WIDTH + 10, 'link_back' => $back_link, 'link_buy_now' => xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('action')) . 'action=buy_now')));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'product_reviews_write');
$output_product_reviews_write = $smarty->fetch(SELECTED_TPL . '/product_reviews_write.tpl');
$smarty->assign('central_contents', $output_product_reviews_write);
$smarty->display(SELECTED_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
示例4: xos_db_fetch_array
$reviews = xos_db_fetch_array($reviews_query);
if ($reviews['count'] > 0) {
$smarty->assign('reviews_count', $reviews['count']);
}
if (xos_not_null($product_info['products_url'])) {
$smarty->assign('link_products_url', xos_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false));
}
if ($product_info['products_date_available'] > 0) {
$smarty->assign('products_date_available', xos_date_long($product_info['products_date_available']));
} else {
$smarty->assign('products_date_added', xos_date_long($product_info['products_date_added']));
}
if (PRODUCT_REVIEWS_ENABLED == 'true') {
$smarty->assign('link_filename_product_reviews', xos_href_link(FILENAME_PRODUCT_REVIEWS, xos_get_all_get_params(array('lnc', 'cur', 'tpl'))));
}
$smarty->assign(array('input_products_quantity' => xos_draw_input_field('products_quantity', '1', 'id="products_quantity" style="text-align: center; width: 60px;" class="form-control" maxlength="5"'), 'hidden_field_products_id' => xos_draw_hidden_field('p', $product_info['products_id']), 'javascript' => $jscript_op, 'form_begin' => xos_draw_form('cart_quantity', xos_href_link(FILENAME_PRODUCT_INFO, xos_get_all_get_params(array('action')) . 'action=add_product')), 'form_end' => '</form>'));
$smarty->caching = 0;
include DIR_WS_MODULES . FILENAME_XSELL_PRODUCTS;
include DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS;
if (CACHE_LEVEL > 2 && (isset($_COOKIE[session_name()]) && !isset($_GET[session_name()]) || SESSION_FORCE_COOKIE_USE == 'true') && !isset($_GET['noscript'])) {
$smarty->caching = 1;
}
}
$smarty->assign('link_filename_default', xos_href_link(FILENAME_DEFAULT));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'product_info');
}
// link_back will not be cached (nocache)
$back = sizeof($_SESSION['navigation']->path) - 2;
if (!empty($_SESSION['navigation']->path[$back])) {
$get_params_array = $_SESSION['navigation']->path[$back]['get'];
$get_params_array['rmp'] = '0';
示例5: array
} else {
$contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_NAME . '<br /><b>' . $cInfo->countries_name . '</b>' . xos_draw_hidden_field('zone_country_id', $cInfo->countries_id) . xos_draw_hidden_field('actual_zone_country_id', $cInfo->countries_id));
}
$contents[] = array('text' => '<br /><a href="" onclick="zones.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_UPDATE . ' "><span>' . BUTTON_TEXT_UPDATE . '</span></a><a href="' . xos_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> ');
break;
case 'delete':
$check_query = xos_db_query("select ab.entry_zone_id, zgz.zone_id from " . TABLE_ADDRESS_BOOK . " ab, " . TABLE_ZONES_TO_GEO_ZONES . " zgz where ab.entry_zone_id = '" . (int) $cInfo->zone_id . "' or zgz.zone_id = '" . (int) $cInfo->zone_id . "' LIMIT 1");
$heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_ZONE . '</b>';
if (!xos_db_num_rows($check_query) && STORE_ZONE != $cInfo->zone_id) {
$form_tag = xos_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=deleteconfirm');
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
$contents[] = array('text' => '<br /><b>' . $cInfo->zone_name . '</b>');
$contents[] = array('text' => '<br /><a href="" onclick="zones.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a><a href="' . xos_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> ');
} else {
$contents[] = array('text' => TEXT_INFO_DELETE_NOT_ALLOWED . '<br /><br />');
$contents[] = array('text' => '<br /><a href="' . xos_href_link(FILENAME_ZONES, xos_get_all_get_params(array('action'))) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_BACK . ' "><span>' . BUTTON_TEXT_BACK . '</span></a><br /> ');
}
break;
default:
if (isset($cInfo) && is_object($cInfo)) {
$heading_title = '<b>' . $cInfo->zone_name . '</b>';
$contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=edit') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a><a href="' . xos_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=delete') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a>');
$contents[] = array('text' => '<br />' . TEXT_INFO_ZONES_NAME . '<br />' . $cInfo->zone_name . ' (' . $cInfo->zone_code . ')');
$contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_NAME . ' ' . $cInfo->countries_name);
}
break;
}
$smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents));
$output_infobox_zones = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_zones.tpl');
$smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents'));
$smarty->assign('infobox_zones', $output_infobox_zones);
示例6: while
while ($orders = xos_db_fetch_array($orders_query)) {
$oder_total_query = xos_db_query("select text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $orders['orders_id'] . "' and class = 'ot_total' order by orders_total_id DESC limit 1");
$oder_total = xos_db_fetch_array($oder_total_query);
if ((!isset($_GET['oID']) || isset($_GET['oID']) && $_GET['oID'] == $orders['orders_id']) && !isset($oInfo)) {
$oInfo = new objectInfo($orders);
}
$selected = false;
if (isset($oInfo) && is_object($oInfo) && $orders['orders_id'] == $oInfo->orders_id) {
$selected = true;
$link_filename_orders = xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit');
} else {
$link_filename_orders = xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']);
}
$orders_array[] = array('selected' => $selected, 'link_filename_orders' => $link_filename_orders, 'link_filename_orders_action_edit' => xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit'), 'customers_name' => $orders['customers_name'], 'order_total' => strip_tags($oder_total['text']), 'date_purchased' => xos_datetime_short($orders['date_purchased']), 'order_status_name' => $orders['orders_status_name']);
}
if (SESSID) {
$smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
}
$smarty->assign(array('form_begin_orders' => xos_draw_form('orders', FILENAME_ORDERS, '', 'get'), 'input_oid' => xos_draw_input_field('oID', '', 'size="12"'), 'hidden_action' => xos_draw_hidden_field('action', 'edit'), 'form_begin_status' => xos_draw_form('new_status', FILENAME_ORDERS, '', 'get'), 'pull_down_status' => xos_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), (array) $orders_statuses), '', 'onchange="this.form.submit();"'), 'form_end' => '</form>', 'orders' => $orders_array, 'nav_bar_number' => $orders_split->display_count($orders_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_ORDERS), 'nav_bar_result' => $orders_split->display_links($orders_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xos_get_all_get_params(array('page', 'oID', 'action')))));
require DIR_WS_BOXES . 'infobox_orders.php';
}
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'orders');
$language_directory_query = xos_db_query("select directory from " . TABLE_LANGUAGES . " where use_in_id > '1' and directory = '" . $order->info['language_directory'] . "'");
if (xos_db_num_rows($language_directory_query)) {
$smarty->configLoad(DIR_FS_SMARTY . 'catalog/languages/' . $order->info['language_directory'] . '.conf', 'order_info');
}
$output_orders = $smarty->fetch(ADMIN_TPL . '/orders.tpl');
$smarty->assign('central_contents', $output_orders);
$smarty->display(ADMIN_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
示例7: objectInfo
if ((!isset($_GET['cID']) || isset($_GET['cID']) && $_GET['cID'] == $customers_groups['customers_group_id']) && !isset($cInfo)) {
$cInfo = new objectInfo($customers_groups);
}
$selected = false;
if (is_object($cInfo) && $customers_groups['customers_group_id'] == $cInfo->customers_group_id) {
$selected = true;
$link_filename_customers_groups = xos_href_link(FILENAME_CUSTOMERS_GROUPS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_group_id . '&action=edit');
} else {
$link_filename_customers_groups = xos_href_link(FILENAME_CUSTOMERS_GROUPS, xos_get_all_get_params(array('cID')) . 'cID=' . $customers_groups['customers_group_id']);
}
$customers_groups_array[] = array('selected' => $selected, 'link_filename_customers_groups' => $link_filename_customers_groups, 'group_name' => $customers_groups['customers_group_name']);
}
if (SESSID) {
$smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
}
$smarty->assign(array('form_begin_search' => xos_draw_form('search', FILENAME_CUSTOMERS_GROUPS, '', 'get'), 'input_search' => xos_draw_input_field('search'), 'form_end' => '</form>', 'link_filename_customers_groups_sort_asc' => xos_href_link(FILENAME_CUSTOMERS_GROUPS, 'listing=group'), 'text_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_NAME . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'link_filename_customers_groups_sort_desc' => xos_href_link(FILENAME_CUSTOMERS_GROUPS, 'listing=group-desc'), 'text_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_NAME . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'customers_groups' => $customers_groups_array, 'nav_bar_number' => $customers_groups_split->display_count($customers_groups_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CUSTOMERS_GROUPS), 'nav_bar_result' => $customers_groups_split->display_links($customers_groups_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xos_get_all_get_params(array('page', 'info', 'x', 'y', 'cID')))));
if (isset($_GET['search']) && xos_not_null($_GET['search'])) {
$smarty->assign('link_filename_customers_groups_reset', xos_href_link(FILENAME_CUSTOMERS_GROUPS));
} else {
$smarty->assign('link_filename_customers_groups_insert', xos_href_link(FILENAME_CUSTOMERS_GROUPS, 'page=' . $_GET['page'] . '&action=new'));
}
require DIR_WS_BOXES . 'infobox_customers_groups.php';
}
}
$smarty->assign('BODY_TAG_PARAMS', 'onload="SetFocus();"');
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'customers_groups');
$output_customers_groups = $smarty->fetch(ADMIN_TPL . '/customers_groups.tpl');
$smarty->assign('central_contents', $output_customers_groups);
$smarty->display(ADMIN_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
示例8: while
while ($reviews = xos_db_fetch_array($reviews_query)) {
$product_reviews_array[] = array('link_filename_product_reviews_info' => xos_href_link(FILENAME_PRODUCT_REVIEWS_INFO, xos_get_all_get_params(array('lnc', 'cur', 'tpl')) . 'r=' . $reviews['reviews_id']), 'date_added' => xos_date_long($reviews['date_added']), 'reviews_rating' => $reviews['reviews_rating'], 'review_text' => xos_break_string(xos_output_string_protected($reviews['reviews_text']), 60, '-<br />'), 'stars_image' => xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/stars_' . $reviews['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])), 'customers_name' => xos_output_string_protected($reviews['customers_name']));
}
if (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3') {
$smarty->assign('nav_bar_top', true);
}
if (PREV_NEXT_BAR_LOCATION == '2' || PREV_NEXT_BAR_LOCATION == '3') {
$smarty->assign('nav_bar_bottom', true);
}
$smarty->assign(array('product_reviews_array' => $product_reviews_array, 'product_reviews' => true));
}
$products_image_name = xos_get_product_images($product_info['products_image']);
if (xos_not_null($products_image_name)) {
$smarty->assign(array('product_img' => xos_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($products_image_name['name']), addslashes($product_info['products_name']), '', '', 'class="img-responsive"')));
}
$smarty->assign(array('products_name' => $product_info['products_name'], 'products_model' => $product_info['products_model'], 'link_filename_product_reviews_write' => xos_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, xos_get_all_get_params(array('lnc', 'cur', 'tpl', 'rmp')), 'SSL'), 'nav_bar_number' => $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS), 'nav_bar_result' => '<nav><ul class="pagination">' . $reviews_split->display_links(MAX_DISPLAY_PAGE_LINKS, xos_get_all_get_params(array('page', 'info', 'lnc', 'cur', 'tpl', 'x', 'y'))) . '</ul></nav>'));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'product_reviews');
}
// link_back will not be cached (nocache)
$back = sizeof($_SESSION['navigation']->path) - 2;
if (!empty($_SESSION['navigation']->path[$back])) {
$get_params_array = $_SESSION['navigation']->path[$back]['get'];
$get_params_array['rmp'] = '0';
$smarty->assign('link_back', xos_href_link($_SESSION['navigation']->path[$back]['page'], xos_array_to_query_string($get_params_array, array('action', xos_session_name())), $_SESSION['navigation']->path[$back]['mode']), true);
} else {
$smarty->assign('link_back', 'javascript:history.go(-1)', true);
}
$output_product_reviews = $smarty->fetch(SELECTED_TPL . '/product_reviews.tpl', $cache_id);
$smarty->assign('central_contents', $output_product_reviews);
$smarty->caching = 0;
$smarty->display(SELECTED_TPL . '/frame.tpl');
示例9: array
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'admin/templates/' . ADMIN_TPL . '/php/includes/boxes/infobox_customers.php') == 'overwrite_all')) {
$contents = array();
switch ($action) {
case 'confirm':
$heading_title = '' . xos_draw_separator('pixel_trans.gif', '11', '12') . ' <br /><b>' . TEXT_INFO_HEADING_DELETE_CUSTOMER . '</b>';
$form_tag = xos_draw_form('customers', FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=deleteconfirm');
$contents[] = array('text' => TEXT_DELETE_INTRO . '<br /><br /><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>');
if (isset($cInfo->number_of_reviews) && $cInfo->number_of_reviews > 0) {
$contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('delete_reviews', 'on', true) . ' ' . sprintf(TEXT_DELETE_REVIEWS, $cInfo->number_of_reviews) . '</label></div>');
}
$contents[] = array('text' => '<br /><a href="" onclick="customers.submit(); return false" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a><a href="' . xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br /> ');
break;
default:
if (isset($cInfo) && is_object($cInfo)) {
$heading_title = '' . xos_draw_separator('pixel_trans.gif', '11', '12') . ' <br /><b>' . $cInfo->customers_firstname . ' ' . $cInfo->customers_lastname . '</b>';
$contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a><a href="' . xos_href_link(FILENAME_ORDERS, 'cID=' . $cInfo->customers_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_ORDERS . ' ">' . BUTTON_TEXT_ORDERS . '</a><a href="' . xos_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EMAIL . ' ">' . BUTTON_TEXT_EMAIL . '</a>');
$contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_CREATED . ' ' . xos_date_short($cInfo->date_account_created));
$contents[] = array('text' => '<br />' . TEXT_DATE_ACCOUNT_LAST_MODIFIED . ' ' . xos_date_short($cInfo->date_account_last_modified));
$contents[] = array('text' => '<br />' . TEXT_INFO_DATE_LAST_LOGON . ' ' . xos_date_short($cInfo->date_last_logon));
$contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_LOGONS . ' ' . $cInfo->number_of_logons);
$contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY . ' ' . $cInfo->countries_name);
$contents[] = array('text' => '<br />' . TEXT_INFO_NUMBER_OF_REVIEWS . ' ' . $cInfo->number_of_reviews);
}
break;
}
$smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents));
$output_infobox_customers = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_customers.tpl');
$smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents'));
$smarty->assign('infobox_customers', $output_infobox_customers);
}
示例10: count
$sizeof = count($products_prices[0]);
if ($sizeof > 2) {
$array_keys = array_keys($products_prices[0]);
for ($count = 2, $n = $sizeof; $count < $n; $count++) {
$qty = $array_keys[$count];
$price_breaks_array[] = array('qty' => $qty, 'price_break' => $currencies->display_price($products_prices[0][$qty]['regular'], $products_tax_rate), 'price_break_special' => $products_prices[0]['special_status'] == 1 && $products_prices[0][$qty]['special'] > 0 ? $currencies->display_price($products_prices[0][$qty]['special'], $products_tax_rate) : '');
}
}
}
$product_image = xos_get_product_images($products_new['products_image']);
$popup_content_id = xos_get_delivery_times_values($products_new['products_delivery_time_id'], 'popup_content_id');
$products_new_array[] = array('link_filename_product_info' => xos_href_link(FILENAME_PRODUCT_INFO, 'p=' . $products_new['products_id']), 'href_buy_now' => xos_href_link(FILENAME_PRODUCTS_NEW, xos_get_all_get_params(array('action')) . 'action=buy_now&p=' . $products_new['products_id']), 'date_added' => xos_date_long($products_new['products_date_added']), 'image' => xos_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($product_image['name']), $products_new['products_name']), 'td_width_img' => SMALL_PRODUCT_IMAGE_MAX_WIDTH + 10, 'manufacturer' => $products_new['manufacturers_name'], 'tax_description' => xos_get_products_tax_description($products_new['products_tax_class_id'], $products_tax_rate), 'products_delivery_time' => xos_get_delivery_times_values($products_new['products_delivery_time_id']), 'link_filename_popup_content_products_delivery_time' => $popup_content_id > 0 ? xos_href_link(FILENAME_POPUP_CONTENT, 'co=' . $popup_content_id . '&p=' . $products_new['products_id'], $request_type) : '', 'price' => $product_price, 'price_special' => $product_price_special, 'price_breaks' => $price_breaks_array, 'info' => $products_new['products_info'], 'products_p_unit' => $products_new['products_p_unit'], 'products_model' => $products_new['products_model'], 'products_quantity' => $products_new['products_quantity'], 'name' => $products_new['products_name']);
unset($price_breaks_array);
}
if (PREV_NEXT_BAR_LOCATION == '1' || PREV_NEXT_BAR_LOCATION == '3') {
$smarty->assign('nav_bar_top', true);
}
if (PREV_NEXT_BAR_LOCATION == '2' || PREV_NEXT_BAR_LOCATION == '3') {
$smarty->assign('nav_bar_bottom', true);
}
$smarty->assign('new_products', true);
}
$smarty->assign(array('nav_bar_number' => $products_new_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS_NEW), 'nav_bar_result' => TEXT_RESULT_PAGE . ' ' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, xos_get_all_get_params(array('page', 'info', 'lnc', 'cur', 'tpl', 'x', 'y'))), 'nav_bar_result_in_pull_down_menu' => $products_new_split->display_links_in_pull_down_menu(MAX_DISPLAY_PAGE_LINKS, xos_get_all_get_params(array('page', 'info', 'lnc', 'cur', 'tpl', 'x', 'y'))), 'interval_days_back' => INTERVAL_DAYS_BACK, 'products_new' => $products_new_array));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'products_new');
}
$output_products_new = $smarty->fetch(SELECTED_TPL . '/products_new.tpl', $cache_id);
$smarty->assign('central_contents', $output_products_new);
$smarty->caching = 0;
$smarty->display(SELECTED_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
示例11: array
for ($i = 10; $i <= 50; $i = $i + 10) {
if (MAX_DISPLAY_SEARCH_RESULTS <= $i && $set == false) {
$max_display_search_results_array[] = array('id' => xos_href_link(FILENAME_ADVANCED_SEARCH_AND_RESULTS, xos_get_all_get_params(array('mdsr', 'page')) . 'mdsr=' . MAX_DISPLAY_SEARCH_RESULTS, 'NONSSL', true, true, false, false, false), 'text' => MAX_DISPLAY_SEARCH_RESULTS . TEXT_MAX_PRODUCTS);
$max_display_search_results_array_noscript[] = array('id' => MAX_DISPLAY_SEARCH_RESULTS, 'text' => MAX_DISPLAY_SEARCH_RESULTS . TEXT_MAX_PRODUCTS);
$set = true;
}
if (MAX_DISPLAY_SEARCH_RESULTS != $i) {
$max_display_search_results_array[] = array('id' => xos_href_link(FILENAME_ADVANCED_SEARCH_AND_RESULTS, xos_get_all_get_params(array('mdsr', 'page')) . 'mdsr=' . $i, 'NONSSL', true, true, false, false, false), 'text' => $i . TEXT_MAX_PRODUCTS);
$max_display_search_results_array_noscript[] = array('id' => $i, 'text' => $i . TEXT_MAX_PRODUCTS);
}
}
if ($set == false) {
$max_display_search_results_array[] = array('id' => xos_href_link(FILENAME_ADVANCED_SEARCH_AND_RESULTS, xos_get_all_get_params(array('mdsr', 'page')) . 'mdsr=' . MAX_DISPLAY_SEARCH_RESULTS, 'NONSSL', true, true, false, false, false), 'text' => MAX_DISPLAY_SEARCH_RESULTS . TEXT_MAX_PRODUCTS);
$max_display_search_results_array_noscript[] = array('id' => MAX_DISPLAY_SEARCH_RESULTS, 'text' => MAX_DISPLAY_SEARCH_RESULTS . TEXT_MAX_PRODUCTS);
}
$pull_down_menu_display_search_results .= xos_draw_pull_down_menu('mdsr', $max_display_search_results_array, xos_href_link(FILENAME_ADVANCED_SEARCH_AND_RESULTS, xos_get_all_get_params(array('mdsr', 'page')) . 'mdsr=' . (isset($_SESSION['mdsr']) ? $_SESSION['mdsr'] : MAX_DISPLAY_SEARCH_RESULTS), 'NONSSL', true, true, false, false, false), 'class="form-control" id="mdsr" onchange="location = form.mdsr.options[form.mdsr.selectedIndex].value;"') . '</form>';
$pull_down_menu_display_search_results_noscript .= xos_draw_pull_down_menu('mdsr', $max_display_search_results_array_noscript, isset($_SESSION['mdsr']) ? $_SESSION['mdsr'] : MAX_DISPLAY_SEARCH_RESULTS, 'class="form-control" id="mdsr"');
$link_switch_search_results_view = xos_href_link(FILENAME_ADVANCED_SEARCH_AND_RESULTS, xos_get_all_get_params(array('srv', 'sort', 'page')) . 'srv=' . ($product_list_b ? 'list' : 'grid'), 'NONSSL', true, true, false, false, false);
}
$smarty->assign(array('pull_down_menu_display_products' => $pull_down_menu_display_search_results, 'pull_down_menu_display_products_noscript_begin' => $pull_down_menu_display_search_results_noscript, 'pull_down_menu_display_products_noscript_end' => '</form>', 'label_for_max_display_products' => 'mdsr', 'link_switch_view' => $link_switch_search_results_view));
$listing_sql = $select_str . $from_str . $where_str . $order_str;
$max_display = isset($_SESSION['mdsr']) ? $_SESSION['mdsr'] : MAX_DISPLAY_SEARCH_RESULTS;
require DIR_WS_MODULES . FILENAME_PRODUCT_LISTING;
}
///////////////////////////////////////////////////////////
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'advanced_search_and_results');
$output_advanced_search_and_results = $smarty->fetch(SELECTED_TPL . '/advanced_search_and_results.tpl');
$smarty->assign('central_contents', $output_advanced_search_and_results);
$smarty->display(SELECTED_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
示例12: xos_count_customer_orders
require DIR_WS_INCLUDES . 'header.php';
require DIR_WS_INCLUDES . 'footer.php';
$orders_total = xos_count_customer_orders();
if ($orders_total > 0) {
$history_query_raw = "select o.orders_id, o.date_purchased, o.delivery_name, o.billing_name, s.orders_status_name from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot, " . TABLE_ORDERS_STATUS . " s where o.customers_id = '" . (int) $_SESSION['customer_id'] . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total' and o.orders_status = s.orders_status_id and s.language_id = '" . (int) $_SESSION['languages_id'] . "' and s.public_flag = '1' group by o.orders_id order by o.orders_id DESC";
$history_split = new splitPageResults($history_query_raw, MAX_DISPLAY_ORDER_HISTORY, 'o.orders_id');
$history_query = xos_db_query($history_split->sql_query);
$orders_array = array();
while ($history = xos_db_fetch_array($history_query)) {
$products_query = xos_db_query("select count(*) as count from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int) $history['orders_id'] . "'");
$products = xos_db_fetch_array($products_query);
$oder_total_query = xos_db_query("select text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $history['orders_id'] . "' and class = 'ot_total' order by orders_total_id DESC limit 1");
$oder_total = xos_db_fetch_array($oder_total_query);
if (xos_not_null($history['delivery_name'])) {
$order_type = 'shipped_to';
$order_name = $history['delivery_name'];
} else {
$order_type = 'billed_to';
$order_name = $history['billing_name'];
}
$orders_array[] = array('link_filename_account_history_info' => xos_href_link(FILENAME_ACCOUNT_HISTORY_INFO, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'order_id=' . $history['orders_id'], 'SSL'), 'order_id' => $history['orders_id'], 'order_status_name' => $history['orders_status_name'], 'date_purchased' => xos_date_long($history['date_purchased']), 'order_type' => $order_type, 'order_name' => xos_output_string_protected($order_name), 'products_count' => $products['count'], 'order_total' => strip_tags($oder_total['text']));
}
$smarty->assign(array('orders' => true, 'nav_bar_number' => $history_split->display_count(TEXT_DISPLAY_NUMBER_OF_ORDERS), 'nav_bar_result' => TEXT_RESULT_PAGE . ' ' . $history_split->display_links(MAX_DISPLAY_PAGE_LINKS, xos_get_all_get_params(array('page', 'info', 'lnc', 'cur', 'tpl', 'x', 'y'))), 'nav_bar_result_in_pull_down_menu' => $history_split->display_links_in_pull_down_menu(MAX_DISPLAY_PAGE_LINKS, xos_get_all_get_params(array('page', 'info', 'lnc', 'cur', 'tpl', 'x', 'y')))));
}
$smarty->assign(array('orders_array' => $orders_array, 'link_filename_account' => xos_href_link(FILENAME_ACCOUNT, '', 'SSL')));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'account_history');
$output_account_history = $smarty->fetch(SELECTED_TPL . '/account_history.tpl');
$smarty->assign('central_contents', $output_account_history);
$smarty->display(SELECTED_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
示例13: xos_db_query
$coupon_description_query = xos_db_query("select coupon_name from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $cc_list['coupon_id'] . "' and language_id = '" . $_SESSION['languages_id'] . "'");
$coupon_desc = xos_db_fetch_array($coupon_description_query);
if ($cc_list['coupon_type'] == 'P') {
// not floating point value, don't display decimal info
$coupon_amount = ($cc_list['coupon_amount'] == round($cc_list['coupon_amount']) ? number_format($cc_list['coupon_amount']) : number_format($cc_list['coupon_amount'], 2)) . '%';
} elseif ($cc_list['coupon_type'] == 'S') {
$coupon_amount = TEXT_FREE_SHIPPING;
} else {
$coupon_amount = $currencies->format($cc_list['coupon_amount']);
}
$redemptions = xos_db_num_rows($redeem_query);
$coupon_status = false;
if ($cc_list['coupon_active'] == 'Y') {
$coupon_status = true;
}
$cc_list_array[] = array('selected' => $selected, 'status' => $coupon_status, 'name' => $coupon_desc['coupon_name'], 'amount' => $coupon_amount, 'code' => $cc_list['coupon_code'], 'redemptions' => $redemptions, 'icon_status_green' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_green.gif', ICON_TITLE_STATUS_GREEN), 'icon_status_red' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_RED), 'icon_status_green_light' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_green_light.gif', ICON_TITLE_STATUS_GREEN_LIGHT), 'icon_status_red_light' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red_light.gif', ICON_TITLE_STATUS_RED_LIGHT), 'link_filename_coupon_admin_action_setflag_N' => xos_href_link(FILENAME_COUPON_ADMIN, 'action=setflag&flag=N&cid=' . $cc_list['coupon_id']), 'link_filename_coupon_admin_action_setflag_Y' => xos_href_link(FILENAME_COUPON_ADMIN, 'action=setflag&flag=Y&cid=' . $cc_list['coupon_id']), 'link_filename_coupon_admin' => xos_href_link(FILENAME_COUPON_ADMIN, xos_get_all_get_params(array('cid', 'action')) . 'cid=' . $cc_list['coupon_id']), 'link_filename_coupon_admin_edit' => $link_filename_coupon_admin_edit);
}
$smarty->assign('cc_list', $cc_list_array);
$status_array[] = array('id' => 'Y', 'text' => TEXT_COUPON_ACTIVE);
$status_array[] = array('id' => 'N', 'text' => TEXT_COUPON_INACTIVE);
$status_array[] = array('id' => 'R', 'text' => TEXT_COUPON_REDEEMED);
$status_array[] = array('id' => '*', 'text' => TEXT_COUPON_ALL);
if ($_GET['status']) {
$status = xos_db_prepare_input($_GET['status']);
} else {
// Changed from "Y" to "*" to see the Red Active and the Green Inactive status
$status = '*';
}
if (SESSID) {
$smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
}
示例14: array_shift
$popup_img = DIR_WS_IMAGES . 'products/large/' . $products_img_name['name'];
$pop_size = @GetImageSize("{$popup_img}");
if ($pop_size[0] > $pop_width) {
$pop_width = $pop_size[0];
}
if ($pop_size[1] > $pop_height) {
$pop_height = $pop_size[1];
}
}
if ($small_width_total > $pop_width) {
$pop_width = $small_width_total;
}
$product_image = array_shift($products_image_name);
$smarty->assign(array('box_width' => (int) ($pop_width + 50), 'box_height' => (int) ($pop_height + $small_height + 55), 'link_product_img' => xos_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $review['products_id'] . '&img_name=' . rawurlencode($product_image['name'])), 'link_product_img_noscript' => xos_href_link(FILENAME_IMAGES_WINDOW, 'pID=' . $review['products_id'], 'NONSSL', true, false, false, false, false), 'product_img' => xos_image(DIR_WS_IMAGES . 'products/medium/' . rawurlencode($product_image['name']), addslashes($review['products_name']), '', '', 'style="margin: 5px;"')));
}
$smarty->assign(array('date_added' => xos_date_long($review['date_added']), 'review_rating' => $review['reviews_rating'], 'review_text' => xos_break_string(nl2br(xos_output_string_protected($review['reviews_text'])), 60, '-<br />'), 'stars_image' => xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/stars_' . $review['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $review['reviews_rating'])), 'customers_name' => xos_output_string_protected($review['customers_name']), 'products_name' => $review['products_name'], 'products_p_unit' => $review['products_p_unit'], 'products_model' => $review['products_model'], 'products_quantity' => $review['products_quantity'], 'products_price' => $product_price, 'products_price_special' => $product_price_special, 'products_price_breaks' => $price_breaks_array, 'products_tax_description' => xos_get_products_tax_description($review['products_tax_class_id'], $products_tax_rate), 'td_width_img' => MEDIUM_PRODUCT_IMAGE_MAX_WIDTH + 10, 'link_filename_product_reviews_write' => xos_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, xos_get_all_get_params(array('lnc', 'cur', 'tpl', 'rmp')), 'SSL'), 'link_buy_now' => xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('action')) . 'action=buy_now')));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'product_reviews_info');
}
// link_back will not be cached (nocache)
$back = sizeof($_SESSION['navigation']->path) - 2;
if (!empty($_SESSION['navigation']->path[$back])) {
$get_params_array = $_SESSION['navigation']->path[$back]['get'];
$get_params_array['rmp'] = '0';
$smarty->assign('link_back', xos_href_link($_SESSION['navigation']->path[$back]['page'], xos_array_to_query_string($get_params_array, array('action', xos_session_name())), $_SESSION['navigation']->path[$back]['mode']), true);
} else {
$smarty->assign('link_back', 'javascript:history.go(-1)', true);
}
$output_product_reviews_info = $smarty->fetch(SELECTED_TPL . '/product_reviews_info.tpl', $cache_id);
$smarty->assign('central_contents', $output_product_reviews_info);
$smarty->caching = 0;
$smarty->display(SELECTED_TPL . '/frame.tpl');
示例15: while
while ($products = xos_db_fetch_array($products_query)) {
if ($products['products_status'] == '1') {
$products_status_image = xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_green.gif', ICON_TITLE_STATUS_GREEN);
} else {
$products_status_image = xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_RED);
}
$products_array[] = array('product_id' => $products['products_id'], 'product_model' => $products['products_model'], 'product_status_image' => $products_status_image, 'product_name' => $products['products_name']);
}
$smarty->assign(array('new_products' => true, 'nav_bar_number' => $products_split->display_count($products_query_numrows, $_GET['max_rows'], $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS), 'nav_bar_result' => $products_split->display_links($products_query_numrows, $_GET['max_rows'], MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xos_get_all_get_params(array('page', 'x', 'y'))), 'products' => $products_array));
}
if ($product['products_status'] == '1') {
$smarty->assign('product_status_image', xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_green.gif', ICON_TITLE_STATUS_GREEN));
} else {
$smarty->assign('product_status_image', xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_RED));
}
$smarty->assign(array('add_relating_products' => true, 'form_begin_add_relating_products' => xos_draw_form('runing_update', FILENAME_XSELL_PRODUCTS, xos_get_all_get_params()), 'hidden_field_run_update' => xos_draw_hidden_field('run_update', $_POST['run_update'] == true ? 'true' : 'false'), 'hidden_field_categories_or_pages_id' => xos_draw_hidden_field('categories_or_pages_id', $categories_or_pages_id), 'hidden_field_manufacturers_id' => xos_draw_hidden_field('manufacturers_id', $manufacturers_id), 'hidden_field_add_related_product_ID' => xos_draw_hidden_field('add_related_product_ID', $_GET['add_related_product_ID']), 'link_to_relating_products' => xos_href_link(FILENAME_XSELL_PRODUCTS, 'categories_or_pages_id=' . $categories_or_pages_id . '&manufacturers_id=' . $manufacturers_id . '&max_rows=' . $_GET['max_rows']), 'product_id' => $product['products_id'], 'product_name' => $product['products_name'], 'product_model' => $product['products_model'], 'product_image' => xos_info_image('products/small/' . $product_image['name'], $product['products_name'])));
}
//////////////////////////////////////////////////////////////////////////////////
if ($_GET['sort'] == 1 && !$_GET['first_entrance']) {
$product_query = xos_db_query("select a.products_id, a.products_status, b.products_name, a.products_model, a.products_image from " . TABLE_PRODUCTS . " a, " . TABLE_PRODUCTS_DESCRIPTION . " b where b.products_id = a.products_id and b.language_id = '" . (int) $_SESSION['used_lng_id'] . "' and a.products_id = '" . $_GET['add_related_product_ID'] . "'");
$product = xos_db_fetch_array($product_query);
$product_image = xos_get_product_images($product['products_image']);
// first lets take care of the DB update.
if ($_POST) {
foreach ($_POST as $key_a => $value_a) {
xos_db_connect();
$query = "UPDATE " . TABLE_PRODUCTS_XSELL . " SET sort_order = '" . $value_a . "' WHERE products_id ='" . $product['products_id'] . "' and xsell_id= '{$key_a}' ";
if ($value_a != 'Update') {
if (!xos_db_query($query)) {
exit('Could not UPDATE DB');
}