$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'; }
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>'; }
} $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'; }
$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';
} 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);
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'; }
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'; }
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');
//////////////////////////////////////////////////////////////////////////////// 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); }
$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'; }
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'; }
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'; }
$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())); }
$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');
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'); }
function getOutput() { return SEND_EMAILS == 'true' ? '<a href="' . xos_href_link(FILENAME_TELL_A_FRIEND, xos_get_all_get_params(array('p')) . 'p=' . (int) $_GET['p'], 'SSL') . '"><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>' : ''; }
if (CACHE_LEVEL > 2 && (isset($_COOKIE[session_name()]) && !isset($_GET[session_name()]) || SESSION_FORCE_COOKIE_USE == 'true')) { $smarty->caching = 1; $cache_id = 'L3|cc_reviews|' . $_SESSION['language'] . '-' . $_GET['lnc'] . '-' . $_GET[session_name()] . '-' . $session_started . '-' . SELECTED_TPL . '-' . $_SESSION['currency']; } if (!$smarty->isCached(SELECTED_TPL . '/reviews.tpl', $cache_id)) { $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, " . TABLE_CATEGORIES_OR_PAGES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where c.categories_or_pages_status = '1' and p.products_id = p2c.products_id and p2c.categories_or_pages_id = c.categories_or_pages_id and 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) $_SESSION['languages_id'] . "' and rd.languages_id = '" . (int) $_SESSION['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) { $reviews_query = xos_db_query($reviews_split->sql_query); $reviews_array = array(); while ($reviews = xos_db_fetch_array($reviews_query)) { $product_image = xos_get_product_images($reviews['products_image']); $reviews_array[] = array('link_filename_product_reviews_info' => xos_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'p=' . $reviews['products_id'] . '&r=' . $reviews['reviews_id']), 'date_added' => xos_date_long($reviews['date_added']), 'products_image' => xos_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($product_image['name']), $reviews['products_name']), 'td_width_img' => SMALL_PRODUCT_IMAGE_MAX_WIDTH + 10, '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']), 'products_name' => $reviews['products_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('reviews', true); } $smarty->assign(array('nav_bar_number' => $reviews_split->display_count(TEXT_DISPLAY_NUMBER_OF_REVIEWS), 'nav_bar_result' => TEXT_RESULT_PAGE . ' ' . $reviews_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' => $reviews_split->display_links_in_pull_down_menu(MAX_DISPLAY_PAGE_LINKS, xos_get_all_get_params(array('page', 'info', 'lnc', 'cur', 'tpl', 'x', 'y'))), 'reviews_array' => $reviews_array)); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'reviews'); } $output_reviews = $smarty->fetch(SELECTED_TPL . '/reviews.tpl', $cache_id); $smarty->assign('central_contents', $output_reviews); $smarty->caching = 0; $smarty->display(SELECTED_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
// // Released under the GNU General Public License //////////////////////////////////////////////////////////////////////////////// if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/includes/boxes/currencies.php') == 'overwrite_all')) { if (isset($currencies) && is_object($currencies)) { $currencies_content = ''; $currencies_content_string = ''; $currencies_content_noscript = ''; reset($currencies->currencies); if (sizeof($currencies->currencies) > 1) { $currencies_array = array(); while (list($key, $value) = each($currencies->currencies)) { $currencies_array[] = array('id' => xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('cur')) . 'cur=' . $key, $request_type, true, true, false, false, false), 'text' => $value['title']); if ($_SESSION['currency'] == $key) { $currencies_content_string .= '<span><b>' . $value['title'] . '</b></span>'; $currencies_content_noscript .= '<a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('cur')) . 'cur=' . $key, $request_type, true, true, false, false, false) . '">' . ' <b>' . $value['title'] . '</b></a><br />'; } else { $currencies_content_string .= '<a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('cur')) . 'cur=' . $key, $request_type, true, true, false, false, false) . '">' . $value['title'] . '</a>'; $currencies_content_noscript .= '<a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('cur')) . 'cur=' . $key, $request_type, true, true, false, false, false) . '">' . ' ' . $value['title'] . '</a><br />'; } } $currencies_content_noscript = substr($currencies_content_noscript, 0, -6); $currencies_content = xos_draw_form('currencies', xos_href_link(basename($_SERVER['PHP_SELF']), '', $request_type, false, true, false, false, false), 'get'); $currencies_content .= xos_draw_pull_down_menu('cur', $currencies_array, xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('cur')) . 'cur=' . $_SESSION['currency'], $request_type, true, true, false, false, false), 'class="form-control input-sm" onchange="location = form.cur.options[form.cur.selectedIndex].value;"'); $currencies_content .= '</form>'; $smarty->assign(array('box_currencies_currencies' => $currencies_content, 'box_currencies_currencies_string' => $currencies_content_string, 'box_currencies_currencies_noscript' => $currencies_content_noscript)); $output_currencies = $smarty->fetch(SELECTED_TPL . '/includes/boxes/currencies.tpl'); $smarty->assign('box_currencies', $output_currencies); } } }
<?php $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' => '<br />' . xos_draw_checkbox_field('delete_reviews', 'on', true) . ' ' . sprintf(TEXT_DELETE_REVIEWS, $cInfo->number_of_reviews)); } $contents[] = array('text' => '<br /><a href="" onclick="customers.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_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></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="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a><a href="' . xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=confirm') . '" 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_ORDERS, 'cID=' . $cInfo->customers_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_ORDERS . ' "><span>' . BUTTON_TEXT_ORDERS . '</span></a><a href="' . xos_href_link(FILENAME_MAIL, 'selected_box=tools&customer=' . $cInfo->customers_email_address) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EMAIL . ' "><span>' . BUTTON_TEXT_EMAIL . '</span></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); return 'overwrite_all';
require DIR_WS_INCLUDES . 'header.php'; require DIR_WS_INCLUDES . 'column_left.php'; require DIR_WS_INCLUDES . 'footer.php'; $whos_online_query = xos_db_query("select customer_id, full_name, ip_address, time_entry, time_last_click, last_page_url, session_id from " . TABLE_WHOS_ONLINE); $whos_online_array = array(); while ($whos_online = xos_db_fetch_array($whos_online_query)) { $time_online = time() - $whos_online['time_entry']; if ((!isset($_GET['info']) || isset($_GET['info']) && $_GET['info'] == $whos_online['session_id'] . $whos_online['ip_address']) && !isset($info)) { $info = $whos_online['session_id'] . $whos_online['ip_address']; } $selected = false; if ($whos_online['session_id'] . $whos_online['ip_address'] == $info) { $info = $whos_online['session_id']; $selected = true; } $last_page_url = ''; if (preg_match('/^(.*)XOSsid[=|\\/]+[a-z,0-9]+[&|\\/]?(.*)/i', $whos_online['last_page_url'], $array)) { $last_page_url = $array[1] . $array[2]; } else { $last_page_url = $whos_online['last_page_url']; } $whos_online_array[] = array('selected' => $selected, 'link_filename_whos_online' => xos_href_link(FILENAME_WHOS_ONLINE, xos_get_all_get_params(array('info', 'action')) . 'info=' . $whos_online['session_id'] . $whos_online['ip_address']), 'time_online' => gmdate('H:i:s', $time_online), 'customer_id' => $whos_online['customer_id'], 'full_name' => $whos_online['full_name'], 'ip_address' => $whos_online['ip_address'], 'time_entry' => date('H:i:s', $whos_online['time_entry']), 'time_last_click' => date('H:i:s', $whos_online['time_last_click']), 'last_page_url' => strlen($last_page_url) > 50 ? "<abbr title=\"" . htmlspecialchars($last_page_url) . "\">" . substr(htmlspecialchars($last_page_url), 0, 50) . " </abbr>" : htmlspecialchars($last_page_url)); } $smarty->assign(array('whos_online' => $whos_online_array, 'text_number_of_customers' => sprintf(TEXT_NUMBER_OF_CUSTOMERS, xos_db_num_rows($whos_online_query)))); require DIR_WS_BOXES . 'infobox_whos_online.php'; $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'whos_online'); $output_whos_online = $smarty->fetch(ADMIN_TPL . '/whos_online.tpl'); $smarty->assign('central_contents', $output_whos_online); $smarty->display(ADMIN_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
$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" size="3"'), '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';
$update_gross_string .= 'updateGross(\'value_price_' . $attributes_values['products_attributes_id'] . '\', \'value_price_gross_' . $attributes_values['products_attributes_id'] . '\');' . "\n"; $update_net_string .= 'updateNet(\'value_price_gross_' . $attributes_values['products_attributes_id'] . '\', \'value_price_' . $attributes_values['products_attributes_id'] . '\');' . "\n"; } } } $products_array[] = array('products_id' => $products['products_id'], 'products_model' => $products['products_model'], 'products_status_image' => $products_status_image, 'products_name' => $products['products_name'], 'products_tax_class' => $tax_class_array[$products['products_tax_class_id']]['text'], 'link_to_edit_related_product' => xos_href_link(FILENAME_UPDATE_PRODUCTS_PRICES, 'product_ID=' . $products['products_id'] . '&categories_or_pages_id=' . $categories_or_pages_id . '&manufacturers_id=' . $manufacturers_id . '&max_rows=' . $_GET['max_rows'] . '&page=' . $_GET['page'] . ($_GET['specials_only'] ? '&specials_only=' . $_GET['specials_only'] : '')), 'products_prices' => $customers_groups_array, 'attributes_values' => $attributes_values_array); unset($attributes_values_array); } $javascript = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'var tax_rates = new Array();' . "\n"; for ($i = 0, $n = sizeof($tax_rates_final_array); $i < $n; $i++) { if ($tax_rates_final_array[$i]['id'] > 0) { $javascript .= 'tax_rates["' . $tax_rates_final_array[$i]['id'] . '"] = ' . $tax_rates_final_array[$i]['value'] . ';' . "\n"; } } $javascript .= "\n" . 'function doRound(x, places) {' . "\n" . ' return Math.round(x * Math.pow(10, places)) / Math.pow(10, places);' . "\n" . '}' . "\n\n" . 'function getTaxRate() {' . "\n" . ' var selected_value = document.forms["' . $form_action . '"].tax_rates_final_id.selectedIndex;' . "\n" . ' var parameterVal = document.forms["' . $form_action . '"].tax_rates_final_id[selected_value].value;' . "\n\n" . ' if ( (parameterVal > 0) && (tax_rates[parameterVal] > 0) ) {' . "\n" . ' return tax_rates[parameterVal];' . "\n" . ' } else {' . "\n" . ' return 0;' . "\n" . ' }' . "\n" . '}' . "\n\n" . 'function updateGross(inField, setField) {' . "\n" . ' var taxRate = getTaxRate();' . "\n" . ' var grossValue = document.forms["' . $form_action . '"].elements[inField].value;' . "\n\n" . ' if (taxRate > 0) {' . "\n" . ' grossValue = grossValue * ((taxRate / 100) + 1);' . "\n" . ' }' . "\n\n" . ' document.forms["' . $form_action . '"].elements[setField].value = doRound(grossValue, 4);' . "\n" . '}' . "\n\n" . 'function updateNet(inField, setField) {' . "\n" . ' var taxRate = getTaxRate();' . "\n" . ' var netValue = document.forms["' . $form_action . '"].elements[inField].value;' . "\n\n" . ' if (taxRate > 0) {' . "\n" . ' netValue = netValue / ((taxRate / 100) + 1);' . "\n" . ' }' . "\n\n" . ' document.forms["' . $form_action . '"].elements[setField].value = doRound(netValue, 4);' . "\n" . '}' . "\n\n" . 'function updatePrices(net, gross) {' . "\n\n" . ' if (gross) {' . "\n" . ' ' . $update_gross_string . "\n" . ' }' . "\n\n" . ' if (net) {' . "\n" . ' ' . $update_net_string . "\n" . ' }' . "\n\n" . '}' . "\n\n" . '/* ]]> */' . "\n" . '</script>' . "\n"; $smarty->assign(array('info_prices' => 'yes', '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'))), 'form_begin' => '<form name="' . $form_action . '" action="">', 'pull_down_tax_rates' => xos_draw_pull_down_menu('tax_rates_final_id', $tax_rates_final_array, '', 'style="font-size : 9px; font-weight : normal;" onchange="updatePrices(false, true)"'), 'javascript' => $javascript, 'update_prices' => 'updatePrices(true, true)', 'products' => $products_array)); } else { $smarty->assign('info_prices', 'no_prices'); } } elseif (!$_GET['first_entrance']) { $form_action = 'update_prices'; $product_query = xos_db_query("select a.products_id, b.products_name, a.products_model, a.products_price, a.products_status, a.products_tax_class_id 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 = '" . (int) $_GET['product_ID'] . "'"); $product = xos_db_fetch_array($product_query); $customers_group_query = xos_db_query("select customers_group_id, customers_group_name from " . TABLE_CUSTOMERS_GROUPS . " order by customers_group_id"); $products_prices = xos_get_product_prices($product['products_price']); $update_gross_string = ''; $update_net_string = ''; $update_checked_string = ''; $customers_groups_array = array(); $error_groups = array(); if (isset($_GET['errGr'])) {
$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'], '', '', 'class="img-responsive"'), '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' => '<nav><ul class="pagination">' . $products_new_split->display_links(MAX_DISPLAY_PAGE_LINKS, xos_get_all_get_params(array('page', 'info', 'lnc', 'cur', 'tpl', 'x', 'y'))) . '</ul></nav>', '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'; return 'overwrite_all';
$reviews = xos_db_fetch_array($reviews_query); $customer_info = array_merge((array) $country, (array) $info, (array) $reviews); $cInfo_array = array_merge((array) $customers, (array) $customer_info); $cInfo = new objectInfo($cInfo_array); } $selected = false; if (isset($cInfo) && is_object($cInfo) && $customers['customers_id'] == $cInfo->customers_id) { $selected = true; $link_filename_customers = xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID', 'action')) . 'cID=' . $cInfo->customers_id . '&action=edit'); } else { $link_filename_customers = xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('cID')) . 'cID=' . $customers['customers_id']); } $customers_array[] = array('selected' => $selected, 'link_filename_customers' => $link_filename_customers, 'company' => strlen($customers['entry_company']) > 16 ? "<acronym title=\"" . $customers['entry_company'] . "\">" . substr($customers['entry_company'], 0, 16) . " </acronym>" : $customers['entry_company'], 'lastname' => strlen($customers['customers_lastname']) > 15 ? "<acronym title=\"" . $customers['customers_lastname'] . "\">" . substr($customers['customers_lastname'], 0, 15) . " </acronym>" : $customers['customers_lastname'], 'firstname' => strlen($customers['customers_firstname']) > 15 ? "<acronym title=\"" . $customers['customers_firstname'] . "\">" . substr($customers['customers_firstname'], 0, 15) . " </acronym>" : $customers['customers_firstname'], 'group_name' => strlen($customers['customers_group_name']) > 17 ? "<acronym title=\"" . $customers['customers_group_name'] . "\"> " . substr($customers['customers_group_name'], 0, 17) . " </acronym>" : $customers['customers_group_name'], 'date_account_created' => xos_date_short($info['date_account_created']), 'group_ra_status_image' => $customers['customers_group_ra'] == '1' ? xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_GREEN) : xos_draw_separator('pixel_trans.gif', '10', '10')); } $smarty->assign(array('link_self_company_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=company'), 'link_self_lastname_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=lastname'), 'link_self_firstname_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=firstname'), 'link_self_cg_name_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=cg_name'), 'link_self_id_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=id-asc'), 'link_self_ra_sort_asc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=ra'), 'link_self_company_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=company-desc'), 'link_self_lastname_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=lastname-desc'), 'link_self_firstname_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=firstname-desc'), 'link_self_cg_name_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=cg_name-desc'), 'link_self_id_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=id-desc'), 'link_self_ra_sort_desc' => xos_href_link(FILENAME_CUSTOMERS, 'listing=ra-desc'), 'text_company_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . ENTRY_COMPANY . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_lastname_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_LASTNAME . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_firstname_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_FIRSTNAME . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_cg_name_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_CUSTOMERS_GROUPS . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_id_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_ACCOUNT_CREATED . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_ra_sort_asc' => ICON_TITLE_IC_UP_TEXT_SORT . ' ' . TABLE_HEADING_REQUEST_AUTHENTICATION . ' ' . ICON_TITLE_IC_UP_TEXT_FROM_TOP_ABC, 'text_company_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . ENTRY_COMPANY . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_lastname_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_LASTNAME . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_firstname_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_FIRSTNAME . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_cg_name_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_CUSTOMERS_GROUPS . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_id_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_ACCOUNT_CREATED . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX, 'text_ra_sort_desc' => ICON_TITLE_IC_DOWN_TEXT_SORT . ' ' . TABLE_HEADING_REQUEST_AUTHENTICATION . ' ' . ICON_TITLE_IC_DOWN_TEXT_FROM_TOP_ZYX)); 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, '', 'get'), 'input_search' => xos_draw_input_field('search'), 'form_end' => '</form>', 'customers' => $customers_array, 'nav_bar_number' => $customers_split->display_count($customers_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_CUSTOMERS), 'nav_bar_result' => $customers_split->display_links($customers_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_reset', xos_href_link(FILENAME_CUSTOMERS)); } require DIR_WS_BOXES . 'infobox_customers.php'; } $smarty->assign('BODY_TAG_PARAMS', 'onload="SetFocus();"'); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'customers'); $output_customers = $smarty->fetch(ADMIN_TPL . '/customers.tpl'); $smarty->assign('central_contents', $output_customers); $smarty->display(ADMIN_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
// GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with XOS-Shop. If not, see <http://www.gnu.org/licenses/>. //------------------------------------------------------------------------------ // this file is based on: // osCommerce, Open Source E-Commerce Solutions // http://www.oscommerce.com // Copyright (c) 2003 osCommerce // filename: languages.php // // Released under the GNU General Public License //////////////////////////////////////////////////////////////////////////////// if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/includes/boxes/languages.php') == 'overwrite_all')) { $languages_string = ''; $languages_list = ''; reset($lng->catalog_languages); if (sizeof($lng->catalog_languages) > 1) { while (list($lang_code, $value) = each($lng->catalog_languages)) { $languages_string .= ' <a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('lnc', 'dfrom', 'dto')) . 'lnc=' . $lang_code, $request_type, true, true, false, false, false) . '">' . xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/' . $value['directory'] . '/' . $value['image'], $value['name']) . '</a> '; if ($value['id'] == $_SESSION['languages_id']) { $language_used .= '<span>' . xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/' . $value['directory'] . '/' . $value['image'], $value['name']) . '</span>'; } else { $languages_list .= '<a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('lnc', 'dfrom', 'dto')) . 'lnc=' . $lang_code, $request_type, true, true, false, false, false) . '">' . xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/' . $value['directory'] . '/' . $value['image'], $value['name']) . '</a>'; } } $smarty->assign(array('box_languages_language_used' => $language_used, 'box_languages_languages_string' => $languages_string, 'box_languages_languages_list' => $languages_list)); $output_languages = $smarty->fetch(SELECTED_TPL . '/includes/boxes/languages.tpl'); $smarty->assign('box_languages', $output_languages); } }
//------------------------------------------------------------------------------ // this file is based on: // osCommerce, Open Source E-Commerce Solutions // http://www.oscommerce.com // Copyright (c) 2003 osCommerce // filename: product_notifications.php // // Released under the GNU General Public License //////////////////////////////////////////////////////////////////////////////// if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/includes/boxes/product_notifications.php') == 'overwrite_all')) { if (isset($_GET['p'])) { $allowed_product_query = xos_db_query("select p.products_id total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES_OR_PAGES . " c where p.products_id = '" . (int) $_GET['p'] . "' and p.products_id = p2c.products_id and p2c.categories_or_pages_id = c.categories_or_pages_id and c.categories_or_pages_status = '1' and p.products_status = '1'"); if (xos_db_num_rows($allowed_product_query)) { if (isset($_SESSION['customer_id'])) { $check_query = xos_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int) $_GET['p'] . "' and customers_id = '" . (int) $_SESSION['customer_id'] . "'"); $check = xos_db_fetch_array($check_query); $notification_exists = $check['count'] > 0 ? true : false; } else { $notification_exists = false; } if ($notification_exists == true) { $smarty->assign(array('box_product_notifications_notification_exists' => true, 'box_product_notifications_link_notify_notify_remove' => xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('action', 'lnc', 'cur', 'tpl')) . 'action=notify_remove', $request_type), 'box_product_notifications_image' => xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/box_products_notifications_remove.gif', IMAGE_BUTTON_REMOVE_NOTIFICATIONS))); } else { $smarty->assign(array('box_product_notifications_notification_exists' => false, 'box_product_notifications_link_notify_notify_remove' => xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('action', 'lnc', 'cur', 'tpl')) . 'action=notify', $request_type), 'box_product_notifications_image' => xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/box_products_notifications.gif', IMAGE_BUTTON_NOTIFICATIONS))); } $smarty->assign(array('box_product_notifications_link_filename_account_notifications' => xos_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL'), 'box_product_notifications_product_name' => xos_get_products_name($_GET['p']))); $output_product_notifications = $smarty->fetch(SELECTED_TPL . '/includes/boxes/product_notifications.tpl'); $smarty->assign('box_product_notifications', $output_product_notifications); } } }
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 splitPageResultsBootstrap($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' => '<nav><ul class="pagination">' . $history_split->display_links(MAX_DISPLAY_PAGE_LINKS, xos_get_all_get_params(array('page', 'info', 'lnc', 'cur', 'tpl', 'x', 'y'))) . '</ul></nav>')); } $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'; return 'overwrite_all';
if (CACHE_LEVEL > 2 && (isset($_COOKIE[session_name()]) && !isset($_GET[session_name()]) || SESSION_FORCE_COOKIE_USE == 'true')) { $smarty->caching = 1; $cache_id = 'L3|cc_reviews|' . $_SESSION['language'] . '-' . $_GET['lnc'] . '-' . $_GET[session_name()] . '-' . $session_started . '-' . SELECTED_TPL . '-' . $_SESSION['currency']; } if (!$smarty->isCached(SELECTED_TPL . '/reviews.tpl', $cache_id)) { $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, " . TABLE_CATEGORIES_OR_PAGES . " c, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where c.categories_or_pages_status = '1' and p.products_id = p2c.products_id and p2c.categories_or_pages_id = c.categories_or_pages_id and 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) $_SESSION['languages_id'] . "' and rd.languages_id = '" . (int) $_SESSION['languages_id'] . "' order by r.reviews_id DESC"; $reviews_split = new splitPageResultsBootstrap($reviews_query_raw, MAX_DISPLAY_NEW_REVIEWS); if ($reviews_split->number_of_rows > 0) { $reviews_query = xos_db_query($reviews_split->sql_query); $reviews_array = array(); while ($reviews = xos_db_fetch_array($reviews_query)) { $product_image = xos_get_product_images($reviews['products_image']); $reviews_array[] = array('link_filename_product_reviews_info' => xos_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'p=' . $reviews['products_id'] . '&r=' . $reviews['reviews_id']), 'date_added' => xos_date_long($reviews['date_added']), 'products_image' => xos_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($product_image['name']), $reviews['products_name'], '', '', 'class="img-responsive"'), 'td_width_img' => SMALL_PRODUCT_IMAGE_MAX_WIDTH + 10, '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']), 'products_name' => $reviews['products_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('reviews', true); } $smarty->assign(array('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>', 'reviews_array' => $reviews_array)); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'reviews'); } $output_reviews = $smarty->fetch(SELECTED_TPL . '/reviews.tpl', $cache_id); $smarty->assign('central_contents', $output_reviews); $smarty->caching = 0; $smarty->display(SELECTED_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; return 'overwrite_all';
case 'PRODUCT_LIST_BUY_NOW': $table_inner_array[] = array('case' => 'buy_now', 'products_buy_form_begin' => xos_draw_form('cart_quantity_' . $rows, xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('action')) . 'action=add_product', $request_type)), 'form_name' => 'cart_quantity_' . $rows, 'form_end' => '</form>', 'label_for_products_input_quantity' => 'products_quantity_' . $listing['products_id'], 'products_input_quantity' => xos_draw_input_field('products_quantity', '1', 'id="products_quantity_' . $listing['products_id'] . '" class="form-control input-quantity" maxlength="5"'), 'products_hidden_field' => xos_draw_hidden_field('p', $listing['products_id'])); break; } } $table_outer_array[] = array('table_inner' => $table_inner_array); unset($price_breaks_array); unset($table_inner_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(array('listing' => true, 'selected_none' => $selected_none, 'table_heading' => $table_heading_array, 'table_heading_alt' => $table_heading_alt_array, 'nav_bar_number' => $listing_split->display_count(TEXT_DISPLAY_NUMBER_OF_PRODUCTS), 'nav_bar_result' => '<nav><ul class="pagination">' . $listing_split->display_links(MAX_DISPLAY_PAGE_LINKS, xos_get_all_get_params(array('page', 'info', 'lnc', 'cur', 'tpl', 'x', 'y'))) . '</ul></nav>', 'table_data_list' => $table_outer_array)); if ($product_list_b) { $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'product_listing_b'); $output_product_listing = $smarty->fetch(SELECTED_TPL . '/includes/modules/product_listing_b.tpl'); } else { // $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'product_listing_a'); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'product_listing_b'); $output_product_listing = $smarty->fetch(SELECTED_TPL . '/includes/modules/product_listing_a.tpl'); } $smarty->clearAssign(array('product_info', 'product_image', 'nav_bar_top', 'nav_bar_bottom', 'listing', 'selected_none', 'table_heading', 'nav_bar_number', 'nav_bar_result', 'table_data_list')); $smarty->assign('product_listing', $output_product_listing); } else { $smarty->assign('text_no_products', TEXT_NO_PRODUCTS); if ($product_list_b) { $output_product_listing = $smarty->fetch(SELECTED_TPL . '/includes/modules/product_listing_b.tpl'); } else {
} $contents[] = array('text' => '<br />' . TEXT_INFO_CLASS_TITLE . '<br /><div class="form-group">' . xos_draw_input_field('tax_class_title', isset($_GET['tax_class_title']) ? $_GET['tax_class_title'] : $tcInfo->tax_class_title, 'class="form-control"') . '</div>' . xos_draw_hidden_field('actual_tax_class_title', $tcInfo->tax_class_title)); $contents[] = array('text' => '<br />' . TEXT_INFO_CLASS_DESCRIPTION . '<br /><div class="form-group">' . xos_draw_input_field('tax_class_description', isset($_GET['tax_class_description']) ? $_GET['tax_class_description'] : $tcInfo->tax_class_description, 'class="form-control"') . '</div>'); $contents[] = array('text' => '<br /><a href="" onclick="classes.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_UPDATE . ' ">' . BUTTON_TEXT_UPDATE . '</a><a href="' . xos_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br /> '); break; case 'delete': $check_query = xos_db_query("select tax_class_id from " . TABLE_TAX_RATES . " where tax_class_id = '" . $tcInfo->tax_class_id . "' LIMIT 1"); $heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_TAX_CLASS . '</b>'; if (!xos_db_num_rows($check_query)) { $form_tag = xos_draw_form('classes', FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=deleteconfirm'); $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br /><b>' . $tcInfo->tax_class_title . '</b>'); $contents[] = array('text' => '<br /><a href="" onclick="classes.submit(); return false" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a><a href="' . xos_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br /> '); } else { $contents[] = array('text' => TEXT_INFO_DELETE_NOT_ALLOWED . '<br /><br />'); $contents[] = array('text' => '<br /><a href="' . xos_href_link(FILENAME_TAX_CLASSES, xos_get_all_get_params(array('action'))) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_BACK . ' ">' . BUTTON_TEXT_BACK . '</a><br /> '); } break; default: if (isset($tcInfo) && is_object($tcInfo)) { $heading_title = '<b>' . $tcInfo->tax_class_title . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=edit') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_TAX_CLASSES, 'page=' . $_GET['page'] . '&tID=' . $tcInfo->tax_class_id . '&action=delete') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>'); $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . xos_date_short($tcInfo->date_added)); $contents[] = array('text' => '' . TEXT_INFO_LAST_MODIFIED . ' ' . xos_date_short($tcInfo->last_modified)); $contents[] = array('text' => '<br />' . TEXT_INFO_CLASS_DESCRIPTION . '<br />' . $tcInfo->tax_class_description); } break; } $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents)); $output_infobox_tax_classes = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_tax_classes.tpl'); $smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents'));