function display_links($max_page_links, $parameters = '') { global $request_type; $display_links_string = ''; if (xos_not_null($parameters) && substr($parameters, -1) != '&') { $parameters .= '&'; } // previous button if ($this->current_page_number > 1) { $display_links_string .= '<li><a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '" class="page-results" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' ">' . PREVNEXT_BUTTON_PREV . '</a></li>'; } elseif ($this->number_of_pages != 1) { $display_links_string .= '<li class="disabled"><span><span aria-hidden="true">' . PREVNEXT_BUTTON_PREV . '</span></span></li>'; } // check if number_of_pages > $max_page_links $cur_window_num = intval($this->current_page_number / $max_page_links); if ($this->current_page_number % $max_page_links) { $cur_window_num++; } $max_window_num = intval($this->number_of_pages / $max_page_links); if ($this->number_of_pages % $max_page_links) { $max_window_num++; } // previous window of pages if ($cur_window_num > 1) { $display_links_string .= '<li><a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $this->page_name . '=' . ($cur_window_num - 1) * $max_page_links, $request_type) . '" class="page-results" title=" ' . sprintf(PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a></li>'; } // page nn button for ($jump_to_page = 1 + ($cur_window_num - 1) * $max_page_links; $jump_to_page <= $cur_window_num * $max_page_links && $jump_to_page <= $this->number_of_pages; $jump_to_page++) { if ($jump_to_page == $this->current_page_number) { if ($this->number_of_pages > 1) { $display_links_string .= '<li class="active"><span>' . $jump_to_page . '<span class="sr-only">(current)</span></span></li>'; } } else { $display_links_string .= '<li><a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '" class="page-results" title=" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' ">' . $jump_to_page . '</a></li>'; } } // next window of pages if ($cur_window_num < $max_window_num) { $display_links_string .= '<li><a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $this->page_name . '=' . ($cur_window_num * $max_page_links + 1), $request_type) . '" class="page-results" title=" ' . sprintf(PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a></li>'; } // next button if ($this->current_page_number < $this->number_of_pages) { $display_links_string .= '<li><a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '" class="page-results" title=" ' . PREVNEXT_TITLE_NEXT_PAGE . ' ">' . PREVNEXT_BUTTON_NEXT . '</a></li>'; } elseif ($this->number_of_pages != 1) { $display_links_string .= '<li class="disabled"><span><span aria-hidden="true">' . PREVNEXT_BUTTON_NEXT . '</span></span></li>'; } return $display_links_string; }
function xos_redirect($url, $change_connection = true) { global $request_type; if (strstr($url, "\n") != false || strstr($url, "\r") != false) { xos_redirect(xos_href_link(FILENAME_DEFAULT, '', 'NONSSL', false)); } if (ENABLE_SSL == 'true' && $request_type == 'SSL' && $change_connection == true) { // We are loading an SSL page if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) { // NONSSL url $url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER)); // Change it to SSL } } $url = str_replace('&', '&', $url); header_remove(); header('Location: ' . $url); exit; }
function confirm() { $mail_addresses_query = xos_db_query("select s.subscriber_id, s.subscriber_email_address, c.customers_firstname, c.customers_lastname from " . TABLE_NEWSLETTER_SUBSCRIBERS . " s left join " . TABLE_CUSTOMERS . " c on s.customers_id = c.customers_id where s.newsletter_status = '1' " . ($this->language_id > 0 ? 'and s.subscriber_language_id = ' . $this->language_id : '') . " order by s.customers_id"); $count = 0; $costomers_array = array(); while ($mail_addresses = xos_db_fetch_array($mail_addresses_query)) { $count++; $costomers_array[] = array('id' => $mail_addresses['subscriber_id'], 'text' => '<' . $mail_addresses['subscriber_email_address'] . '> ' . $mail_addresses['customers_firstname'] . ' ' . $mail_addresses['customers_lastname']); } $cancel_button = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'document.write(\'<input type="button" value="' . BUTTON_CANCEL . '" style="width: 8em;" onclick="document.location=\\\'' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '\\\'" />\');' . "\n" . '/* ]]> */' . "\n" . '</script>'; $confirm_string = "\n" . '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'function mover(move) {' . "\n" . ' if (move == \'remove\') {' . "\n" . ' for (x=0; x<(document.notifications.costomers.length); x++) {' . "\n" . ' if (document.notifications.costomers.options[x].selected) {' . "\n" . ' with(document.notifications.elements[\'customers_chosen[]\']) {' . "\n" . ' options[options.length] = new Option(document.notifications.costomers.options[x].text,document.notifications.costomers.options[x].value);' . "\n" . ' }' . "\n" . ' document.notifications.costomers.options[x] = null;' . "\n" . ' x = -1;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' }' . "\n" . ' if (move == \'add\') {' . "\n" . ' for (x=0; x<(document.notifications.elements[\'customers_chosen[]\'].length); x++) {' . "\n" . ' if (document.notifications.elements[\'customers_chosen[]\'].options[x].selected) {' . "\n" . ' with(document.notifications.costomers) {' . "\n" . ' options[options.length] = new Option(document.notifications.elements[\'customers_chosen[]\'].options[x].text,document.notifications.elements[\'customers_chosen[]\'].options[x].value);' . "\n" . ' }' . "\n" . ' document.notifications.elements[\'customers_chosen[]\'].options[x] = null;' . "\n" . ' x = -1;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' }' . "\n" . ' return true;' . "\n" . '}' . "\n\n" . 'function selectAll(FormName, SelectBox) {' . "\n" . ' temp = "document." + FormName + ".elements[\'" + SelectBox + "\']";' . "\n" . ' Source = eval(temp);' . "\n\n" . ' for (x=0; x<(Source.length); x++) {' . "\n" . ' Source.options[x].selected = "true";' . "\n" . ' }' . "\n\n" . ' if (x<1) {' . "\n" . ' alert(\'' . JS_PLEASE_SELECT_CUSTOMERS . '\');' . "\n" . ' return false;' . "\n" . ' } else {' . "\n" . ' return true;' . "\n" . ' }' . "\n" . '}' . "\n" . '/* ]]> */' . "\n" . '</script>' . "\n"; $confirm_string .= '<table width="100%" border="0" cellspacing="0" cellpadding="2">' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td class="main"><b>' . sprintf(TEXT_COUNT_CUSTOMERS, $count) . '</b></td>' . "\n" . ' </tr>' . "\n" . ($count > 0 ? ' <tr class="dataTableRow">' . "\n" . ' <td>' . xos_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td>' . ' <form name="notifications" action="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send') . '" method="post" onsubmit="return selectAll(\'notifications\', \'customers_chosen[]\')"><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n" . ' <tr>' . "\n" . ' <td align="center" class="main"><b>' . TEXT_CUSTOMERS . '</b><br />' . xos_draw_pull_down_menu('costomers', $costomers_array, '', 'size="30" style="width: 30em; font-size:9px" multiple="multiple"') . '</td>' . "\n" . ' <td align="center" class="main"><input type="button" value="' . BUTTON_SELECT . '" style="width: 8em;" onclick="mover(\'remove\');" /><br /><br /><input type="button" value="' . htmlspecialchars(BUTTON_UNSELECT) . '" style="width: 8em;" onclick="mover(\'add\');" /><br /><br /><br /><br /><input type="submit" value="' . BUTTON_SEND . '" style="width: 8em;" /><br /><br />' . $cancel_button . '</td>' . "\n" . ' <td align="center" class="main"><b>' . TEXT_SELECTED_CUSTOMERS . '</b><br />' . xos_draw_pull_down_menu('customers_chosen[]', array(), '', 'size="30" style="width: 30em; font-size:9px" multiple="multiple"') . '</td>' . "\n" . ' </tr>' . "\n" . ' </table></form>' . ' </td>' . ' </tr>' . "\n" : ' <tr class="dataTableRow">' . "\n" . ' <td>' . xos_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td>' . ' <form name="notifications" action="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send') . '" method="post" onsubmit="return selectAll(\'notifications\', \'customers_chosen[]\')"><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n" . ' <tr>' . "\n" . ' <td align="center" class="main"><b>' . TEXT_CUSTOMERS . '</b><br />' . xos_draw_pull_down_menu('costomers', $costomers_array, '', 'size="30" style="width: 30em; font-size:9px" multiple="multiple"') . '</td>' . "\n" . ' <td align="center" class="main">' . $cancel_button . '</td>' . "\n" . ' <td align="center" class="main"><b>' . TEXT_SELECTED_CUSTOMERS . '</b><br />' . xos_draw_pull_down_menu('customers_chosen[]', array(), '', 'size="30" style="width: 30em; font-size:9px" multiple="multiple"') . '</td>' . "\n" . ' </tr>' . "\n" . ' </table></form>' . ' </td>' . ' </tr>' . "\n") . ' <tr class="dataTableRow">' . "\n" . ' <td>' . xos_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td class="main"><b>' . $this->title . '</b></td>' . "\n" . ' </tr>' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td>' . xos_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n"; if ($this->content_text_htlm != '' && EMAIL_USE_HTML == 'true') { $confirm_string .= ' <tr class="dataHeadingRow">' . "\n" . ' <td class="dataHeadingContent" valign="top">' . TEXT_TEXT . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . xos_draw_separator('pixel_black.gif', '100%', '1') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><pre>' . wordwrap($this->content_text_plain, 100) . '</pre></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . xos_draw_separator('pixel_black.gif', '100%', '1') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td>' . xos_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr class="dataHeadingRow">' . "\n" . ' <td class="dataHeadingContent" valign="top">' . TEXT_HTML . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . xos_draw_separator('pixel_black.gif', '100%', '1') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . $this->content_text_htlm . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . xos_draw_separator('pixel_black.gif', '100%', '1') . '</td>' . "\n" . ' </tr>' . "\n"; } else { $confirm_string .= ' <tr class="dataHeadingRow">' . "\n" . ' <td class="dataHeadingContent" valign="top">' . TEXT_TEXT . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . xos_draw_separator('pixel_black.gif', '100%', '1') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><pre>' . wordwrap($this->content_text_plain, 100) . '</pre></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . xos_draw_separator('pixel_black.gif', '100%', '1') . '</td>' . "\n" . ' </tr>' . "\n"; } $confirm_string .= '</table>'; return $confirm_string; }
<?php $menu_box_contents = array(); if ($_SESSION['selected_box'] == 'gv_admin' || EXPAND_MENUBOX_GV_ADMIN == 'true') { if (xos_admin_check_files(FILENAME_COUPON_ADMIN)) { $menu_box_contents[] = array('link' => xos_href_link(FILENAME_COUPON_ADMIN, 'selected_box=gv_admin'), 'selected' => $_SESSION['selected_box'] == 'gv_admin' && FILENAME_COUPON_ADMIN == basename($_SERVER['PHP_SELF']) ? true : false, 'name' => BOX_COUPON_ADMIN); } if (xos_admin_check_files(FILENAME_GV_QUEUE)) { $menu_box_contents[] = array('link' => xos_href_link(FILENAME_GV_QUEUE, 'selected_box=gv_admin'), 'selected' => $_SESSION['selected_box'] == 'gv_admin' && FILENAME_GV_QUEUE == basename($_SERVER['PHP_SELF']) ? true : false, 'name' => BOX_GV_ADMIN_QUEUE); } if (SEND_EMAILS == 'true' && xos_admin_check_files(FILENAME_GV_MAIL)) { $menu_box_contents[] = array('link' => xos_href_link(FILENAME_GV_MAIL, 'selected_box=gv_admin'), 'selected' => $_SESSION['selected_box'] == 'gv_admin' && FILENAME_GV_MAIL == basename($_SERVER['PHP_SELF']) ? true : false, 'name' => BOX_GV_ADMIN_MAIL); } if (xos_admin_check_files(FILENAME_GV_SENT)) { $menu_box_contents[] = array('link' => xos_href_link(FILENAME_GV_SENT, 'selected_box=gv_admin'), 'selected' => $_SESSION['selected_box'] == 'gv_admin' && FILENAME_GV_SENT == basename($_SERVER['PHP_SELF']) ? true : false, 'name' => BOX_GV_ADMIN_SENT); } $smarty->assign('menu_box_contents', $menu_box_contents); } $smarty->assign(array('menu_box_heading_link' => xos_href_link(FILENAME_COUPON_ADMIN, 'selected_box=gv_admin'), 'menu_box_selected' => $_SESSION['selected_box'] == 'gv_admin' ? true : false, 'menu_box_heading_name' => BOX_HEADING_GV_ADMIN)); $output_menubox_gv_admin = $smarty->fetch(ADMIN_TPL . '/includes/boxes/menubox_gv_admin.tpl'); $smarty->clearAssign(array('menu_box_contents', 'menu_box_heading_link', 'menu_box_selected', 'menu_box_heading_name')); $smarty->assign('menubox_gv_admin', $output_menubox_gv_admin); return 'overwrite_all';
<?php $menu_box_contents = array(); if ($_SESSION['selected_box'] == 'configuration' || EXPAND_MENUBOX_CONFIGURATION == 'true') { for ($i = 1; $i <= 17; $i++) { if ($i != 6) { $menu_box_contents[] = array('link' => xos_href_link(FILENAME_CONFIGURATION, 'gID=' . $i . '&selected_box=configuration'), 'selected' => $_SESSION['selected_box'] == 'configuration' && $i == $_GET['gID'] ? true : false, 'name' => constant(BOX_CONFIGURATION_ . $i)); } } $smarty->assign('menu_box_contents', $menu_box_contents); } $smarty->assign(array('menu_box_heading_link' => xos_href_link(FILENAME_CONFIGURATION, 'gID=1&selected_box=configuration'), 'menu_box_selected' => $_SESSION['selected_box'] == 'configuration' ? true : false, 'menu_box_heading_name' => BOX_HEADING_CONFIGURATION)); $output_menubox_configuration = $smarty->fetch(ADMIN_TPL . '/includes/boxes/menubox_configuration.tpl'); $smarty->clearAssign(array('menu_box_contents', 'menu_box_heading_link', 'menu_box_selected', 'menu_box_heading_name')); $smarty->assign('menubox_configuration', $output_menubox_configuration); return 'overwrite_all';
$contents[] = array('text' => TEXT_INFO_CURRENCY_VALUE . '<br /><div class="form-group">' . xos_draw_input_field('value', $cInfo->value, 'class="form-control"') . '</div>'); if (DEFAULT_CURRENCY != $cInfo->code) { $contents[] = array('text' => '<div class="checkbox"><label>' . xos_draw_checkbox_field('default') . ' ' . TEXT_INFO_SET_AS_DEFAULT . '</label></div>'); } $contents[] = array('text' => '<br /><a href="" onclick="currencies.submit(); return false" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_UPDATE . ' ">' . BUTTON_TEXT_UPDATE . '</a><a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a><br /> '); break; case 'delete': $heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_CURRENCY . '</b>'; $contents[] = array('text' => TEXT_INFO_DELETE_INTRO); $contents[] = array('text' => '<br /><b>' . $cInfo->title . '</b>'); $contents[] = array('text' => '<br />' . '<a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id) . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_CANCEL . ' ">' . BUTTON_TEXT_CANCEL . '</a>' . ($remove_currency ? '<a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=deleteconfirm') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>' : '') . '<br /> '); break; default: if (is_object($cInfo)) { $heading_title = '<b>' . $cInfo->title . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=edit') . '" class="btn btn-default btn-margin-infobox" title=" ' . BUTTON_TITLE_EDIT . ' ">' . BUTTON_TEXT_EDIT . '</a><a href="' . xos_href_link(FILENAME_CURRENCIES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->currencies_id . '&action=delete') . '" class="btn btn-danger btn-margin-infobox" title=" ' . BUTTON_TITLE_DELETE . ' ">' . BUTTON_TEXT_DELETE . '</a>'); $languages = xos_get_languages(); for ($i = 0, $n = sizeof($languages); $i < $n; $i++) { $currency_query = xos_db_query("select title, symbol_left, symbol_right, decimal_point, thousands_point from " . TABLE_CURRENCIES . " where currencies_id = '" . $cInfo->currencies_id . "' and language_id = '" . (int) $languages[$i]['id'] . "'"); $currency = xos_db_fetch_array($currency_query); $contents[] = array('text' => '<br /> <br />' . xos_image(DIR_WS_CATALOG_IMAGES . 'catalog/templates/' . DEFAULT_TPL . '/' . $languages[$i]['directory'] . '/' . $languages[$i]['image'], $languages[$i]['name'])); $contents[] = array('text' => TEXT_INFO_CURRENCY_TITLE . ' ' . $currency['title']); $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_SYMBOL_LEFT . ' ' . $currency['symbol_left']); $contents[] = array('text' => TEXT_INFO_CURRENCY_SYMBOL_RIGHT . ' ' . $currency['symbol_right']); $contents[] = array('text' => '<br />' . TEXT_INFO_CURRENCY_DECIMAL_POINT . ' ' . $currency['decimal_point']); $contents[] = array('text' => TEXT_INFO_CURRENCY_THOUSANDS_POINT . ' ' . $currency['thousands_point']); } $contents[] = array('text' => '<br /> <br /> <br />' . TEXT_INFO_CURRENCY_CODE . ' ' . $cInfo->code); $contents[] = array('text' => TEXT_INFO_CURRENCY_DECIMAL_PLACES . ' ' . $cInfo->decimal_places); $contents[] = array('text' => TEXT_INFO_CURRENCY_VALUE . ' ' . number_format($cInfo->value, 8)); $contents[] = array('text' => TEXT_INFO_CURRENCY_EXAMPLE . ' ' . $currencies->format('30') . ' = ' . $currencies->format('30', true, $cInfo->code));
} $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'; }
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>'; }
$contents = array(); switch ($action) { case 'edit': $heading_title = '<b>' . constant($cInfo->lang_key . '_TITLE') . '</b>'; if ($cInfo->set_function) { eval('$value_field = ' . $cInfo->set_function . '"' . $cInfo->configuration_value . '");'); } else { $value_field = xos_draw_input_field('configuration_value', $cInfo->configuration_value); } $form_tag = xos_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save'); $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => '<br /><b>' . constant($cInfo->lang_key . '_TITLE') . '</b><br />' . constant($cInfo->lang_key . '_DESCRIPTION') . '<br />' . $value_field); $contents[] = array('text' => '<br /><a href="" onclick="configuration.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_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_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 = '<b>' . constant($cInfo->lang_key . '_TITLE') . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a>'); $contents[] = array('text' => '<br />' . constant($cInfo->lang_key . '_DESCRIPTION')); $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_ADDED . ' ' . xos_date_short($cInfo->date_added)); if (xos_not_null($cInfo->last_modified)) { $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . xos_date_short($cInfo->last_modified)); } } break; } $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents)); $output_infobox_configuration = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_configuration.tpl'); $smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents')); $smarty->assign('infobox_configuration', $output_infobox_configuration); return 'overwrite_all';
$manufacturers_query_raw = "select m.manufacturers_id, m.manufacturers_image, m.date_added, m.last_modified, mi.manufacturers_name from " . TABLE_MANUFACTURERS . " m, " . TABLE_MANUFACTURERS_INFO . " mi where m.manufacturers_id = mi.manufacturers_id and mi.languages_id = '" . (int) $_SESSION['used_lng_id'] . "' order by mi.manufacturers_name"; $manufacturers_split = new splitPageResults($_GET['page'], MAX_DISPLAY_RESULTS, $manufacturers_query_raw, $manufacturers_query_numrows); $manufacturers_query = xos_db_query($manufacturers_query_raw); $manufacturers_array = array(); while ($manufacturers = xos_db_fetch_array($manufacturers_query)) { if ((!isset($_GET['mID']) || isset($_GET['mID']) && $_GET['mID'] == $manufacturers['manufacturers_id']) && !isset($mInfo) && substr($action, 0, 3) != 'new') { $manufacturer_products_query = xos_db_query("select count(*) as products_count from " . TABLE_PRODUCTS . " where manufacturers_id = '" . (int) $manufacturers['manufacturers_id'] . "'"); $manufacturer_products = xos_db_fetch_array($manufacturer_products_query); $mInfo_array = array_merge((array) $manufacturers, (array) $manufacturer_products); $mInfo = new objectInfo($mInfo_array); } $selected = false; if (isset($mInfo) && is_object($mInfo) && $manufacturers['manufacturers_id'] == $mInfo->manufacturers_id) { $selected = true; $link_filename_manufacturers = xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $manufacturers['manufacturers_id'] . '&action=edit'); } else { $link_filename_manufacturers = xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $manufacturers['manufacturers_id']); } $manufacturers_array[] = array('selected' => $selected, 'link_filename_manufacturers' => $link_filename_manufacturers, 'name' => $manufacturers['manufacturers_name']); } if (empty($action)) { $smarty->assign('link_filename_manufacturers_action_new', xos_href_link(FILENAME_MANUFACTURERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->manufacturers_id . '&action=new')); } $smarty->assign(array('BODY_TAG_PARAMS' => 'onload="SetFocus();"', 'manufacturers' => $manufacturers_array, 'nav_bar_number' => $manufacturers_split->display_count($manufacturers_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_MANUFACTURERS), 'nav_bar_result' => $manufacturers_split->display_links($manufacturers_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']))); require DIR_WS_BOXES . 'infobox_manufacturers.php'; $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'manufacturers'); $output_manufacturers = $smarty->fetch(ADMIN_TPL . '/manufacturers.tpl'); $smarty->assign('central_contents', $output_manufacturers); $smarty->display(ADMIN_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
$menu_box_contents = array(); if (xos_admin_check_files(FILENAME_CATEGORIES)) { $menu_box_contents[] = array('link' => xos_href_link(FILENAME_CATEGORIES, 'selected_box=catalog'), 'selected' => $_SESSION['selected_box'] == 'catalog' && FILENAME_CATEGORIES == basename($_SERVER['PHP_SELF']) ? true : false, 'name' => BOX_CATALOG_CATEGORIES_PRODUCTS); } if (xos_admin_check_files(FILENAME_PRODUCTS_ATTRIBUTES)) { $menu_box_contents[] = array('link' => xos_href_link(FILENAME_PRODUCTS_ATTRIBUTES, 'selected_box=catalog&first_entrance=1'), 'selected' => $_SESSION['selected_box'] == 'catalog' && FILENAME_PRODUCTS_ATTRIBUTES == basename($_SERVER['PHP_SELF']) ? true : false, 'name' => BOX_CATALOG_CATEGORIES_PRODUCTS_ATTRIBUTES); } if (xos_admin_check_files(FILENAME_MANUFACTURERS)) { $menu_box_contents[] = array('link' => xos_href_link(FILENAME_MANUFACTURERS, 'selected_box=catalog'), 'selected' => $_SESSION['selected_box'] == 'catalog' && FILENAME_MANUFACTURERS == basename($_SERVER['PHP_SELF']) ? true : false, 'name' => BOX_CATALOG_MANUFACTURERS); } if (xos_admin_check_files(FILENAME_DELIVERY_TIMES)) { $menu_box_contents[] = array('link' => xos_href_link(FILENAME_DELIVERY_TIMES, 'selected_box=catalog'), 'selected' => $_SESSION['selected_box'] == 'catalog' && FILENAME_DELIVERY_TIMES == basename($_SERVER['PHP_SELF']) ? true : false, 'name' => BOX_CATALOG_DELIVERY_TIMES); } if (xos_admin_check_files(FILENAME_REVIEWS)) { $menu_box_contents[] = array('link' => xos_href_link(FILENAME_REVIEWS, 'selected_box=catalog'), 'selected' => $_SESSION['selected_box'] == 'catalog' && FILENAME_REVIEWS == basename($_SERVER['PHP_SELF']) ? true : false, 'name' => BOX_CATALOG_REVIEWS); } if (xos_admin_check_files(FILENAME_UPDATE_PRODUCTS_PRICES)) { $menu_box_contents[] = array('link' => xos_href_link(FILENAME_UPDATE_PRODUCTS_PRICES, 'selected_box=catalog&first_entrance=1'), 'selected' => $_SESSION['selected_box'] == 'catalog' && FILENAME_UPDATE_PRODUCTS_PRICES == basename($_SERVER['PHP_SELF']) ? true : false, 'name' => BOX_CATALOG_UPDATE_PRODUCTS_PRICES); } if (xos_admin_check_files(FILENAME_XSELL_PRODUCTS)) { $menu_box_contents[] = array('link' => xos_href_link(FILENAME_XSELL_PRODUCTS, 'selected_box=catalog&first_entrance=1'), 'selected' => $_SESSION['selected_box'] == 'catalog' && FILENAME_XSELL_PRODUCTS == basename($_SERVER['PHP_SELF']) ? true : false, 'name' => BOX_CATALOG_XSELL_PRODUCTS); } if (xos_admin_check_files(FILENAME_PRODUCTS_EXPECTED)) { $menu_box_contents[] = array('link' => xos_href_link(FILENAME_PRODUCTS_EXPECTED, 'selected_box=catalog'), 'selected' => $_SESSION['selected_box'] == 'catalog' && FILENAME_PRODUCTS_EXPECTED == basename($_SERVER['PHP_SELF']) ? true : false, 'name' => BOX_CATALOG_PRODUCTS_EXPECTED); } $smarty->assign('menu_box_contents', $menu_box_contents); $smarty->assign(array('menu_box_heading_link' => xos_href_link(FILENAME_CATEGORIES, 'selected_box=catalog'), 'menu_box_selected' => $_SESSION['selected_box'] == 'catalog' ? true : false, 'menu_box_heading_name' => BOX_HEADING_CATALOG)); $output_menubox_catalog = $smarty->fetch(ADMIN_TPL . '/includes/boxes/menubox_catalog.tpl'); $smarty->clearAssign(array('menu_box_contents', 'menu_box_heading_link', 'menu_box_selected', 'menu_box_heading_name')); $smarty->assign('menubox_catalog', $output_menubox_catalog); }
// osCommerce, Open Source E-Commerce Solutions // http://www.oscommerce.com // Copyright (c) 2002 osCommerce // filename: search.php // // Released under the GNU General Public License //////////////////////////////////////////////////////////////////////////////// if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/includes/boxes/login_my_account.php') == 'overwrite_all')) { if (CACHE_LEVEL > 1 && !isset($_SESSION['customer_id']) && (isset($_COOKIE[session_name()]) && !isset($_GET[session_name()]) || SESSION_FORCE_COOKIE_USE == 'true')) { $smarty->caching = 1; $cache_id = 'L2|box_login_my_account|' . $_SESSION['language'] . '-' . $_GET['lnc'] . '-' . $_GET[session_name()] . '-' . $session_started . '-' . SELECTED_TPL . '-' . $_SESSION['currency']; } if (!$smarty->isCached(SELECTED_TPL . '/includes/boxes/login_my_account.tpl', $cache_id)) { if (isset($_SESSION['customer_first_name']) && isset($_SESSION['customer_id'])) { if (ACCOUNT_GENDER == 'true' && isset($_SESSION['customer_gender']) && $_SESSION['customer_gender'] != '') { $box_welcome_string = sprintf(BOX_TEXT_GREETING_PERSONAL, ($_SESSION['customer_gender'] == 'm' ? MALE_ADDRESS : FEMALE_ADDRESS) . '<br />' . xos_output_string_protected($_SESSION['customer_first_name']) . ' ' . xos_output_string_protected($_SESSION['customer_lastname'])); } else { $box_welcome_string = sprintf(BOX_TEXT_GREETING_PERSONAL, xos_output_string_protected($_SESSION['customer_first_name']) . ' ' . xos_output_string_protected($_SESSION['customer_lastname'])); } } else { $box_welcome_string = BOX_TEXT_GREETING_GUEST; } if (SEND_EMAILS == 'true') { $smarty->assign('box_login_my_account_link_filename_password_forgotten', xos_href_link(FILENAME_PASSWORD_FORGOTTEN, '', 'SSL')); } $smarty->assign(array('box_login_my_account_link_filename_create_account' => xos_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'), 'box_login_my_account_link_filename_account' => xos_href_link(FILENAME_ACCOUNT, '', 'SSL'), 'box_login_my_account_link_filename_account_edit' => xos_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'), 'box_login_my_account_link_filename_account_history' => xos_href_link(FILENAME_ACCOUNT_HISTORY, '', 'SSL'), 'box_login_my_account_link_filename_address_book' => xos_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'), 'box_login_my_account_link_filename_account_notifications' => PRODUCT_NOTIFICATION_ENABLED == 'true' ? xos_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') : '', 'box_login_my_account_link_filename_logoff' => xos_href_link(FILENAME_LOGOFF, '', 'SSL'), 'box_login_my_account_display_box_my_account' => isset($_SESSION['customer_id']) ? true : false, 'box_login_my_account_welcome_string' => $box_welcome_string, 'box_login_my_account_input_field_email_address' => xos_draw_input_field('email_address', '', 'class="form-control input-sm" id="box_login_email_address" size="10" maxlength="40" style="width: 130px"'), 'box_login_my_account_input_field_password' => xos_draw_password_field('password', '', 'class="form-control input-sm" id="box_login_password" size="10" style="width: 130px"'), 'box_login_my_account_form_begin' => xos_draw_form('box_login', xos_href_link(FILENAME_LOGIN, 'action=process', 'SSL'), 'post', '', true), 'box_login_my_account_form_end' => '</form>')); } $output_login_my_account = $smarty->fetch(SELECTED_TPL . '/includes/boxes/login_my_account.tpl', $cache_id); $smarty->caching = 0; $smarty->assign('box_login_my_account', $output_login_my_account); }
<?php $contents = array(); if (isset($pInfo) && is_object($pInfo)) { $heading_title = '<b>' . $pInfo->products_name . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_CATEGORIES, 'pID=' . $pInfo->products_id . '&action=new_product') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_EDIT . ' "><span>' . BUTTON_TEXT_EDIT . '</span></a>'); $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_EXPECTED . ' ' . xos_date_short($pInfo->products_date_available)); } $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_contents' => $contents)); $output_infobox_products_expected = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_products_expected.tpl'); $smarty->clearAssign(array('info_box_heading_title', 'info_box_contents')); $smarty->assign('infobox_products_expected', $output_infobox_products_expected); return 'overwrite_all';
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'; }
<?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';
$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); return 'overwrite_all';
// 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); } }
$keys_extra[$module_keys[$j]]['set_function'] = $key_value['set_function']; } } $module_info['keys'] = $keys_extra; $mInfo = new objectInfo($module_info); } $selected = false; $installed = false; if (isset($mInfo) && is_object($mInfo) && $class == $mInfo->code) { $selected = true; $link_filename_modules = xos_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class . '&action=edit'); if ($module->check() > 0) { $installed = true; } } else { $link_filename_modules = xos_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class); } if (is_numeric($module->sort_order)) { $sort_order = $module->sort_order; } else { $sort_order = ''; } $modules_array[] = array('selected' => $selected, 'installed' => $installed, 'link_filename_modules' => $link_filename_modules, 'title' => $module->title, 'sort_order' => $sort_order); } } ksort($installed_modules); $check_query = xos_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = '" . $module_key . "'"); if (xos_db_num_rows($check_query)) { $check = xos_db_fetch_array($check_query); if ($check['configuration_value'] != implode(';', $installed_modules)) { xos_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . implode(';', $installed_modules) . "', last_modified = now() where configuration_key = '" . $module_key . "'");
// XOS-Shop is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // 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: ssl_check.php // // Released under the GNU General Public License //////////////////////////////////////////////////////////////////////////////// require 'includes/application_top.php'; if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/' . FILENAME_SSL_CHECK) == 'overwrite_all')) { require DIR_FS_SMARTY . 'catalog/languages/' . $_SESSION['language'] . '/' . FILENAME_SSL_CHECK; $site_trail->add(NAVBAR_TITLE, xos_href_link(FILENAME_SSL_CHECK)); require DIR_WS_INCLUDES . 'html_header.php'; require DIR_WS_INCLUDES . 'boxes.php'; require DIR_WS_INCLUDES . 'header.php'; require DIR_WS_INCLUDES . 'footer.php'; $smarty->assign('link_filename_login', xos_href_link(FILENAME_LOGIN)); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'ssl_check'); $output_ssl_check = $smarty->fetch(SELECTED_TPL . '/ssl_check.tpl'); $smarty->assign('central_contents', $output_ssl_check); $smarty->display(SELECTED_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
$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'; $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_info = $smarty->fetch(SELECTED_TPL . '/product_info.tpl', $cache_id); $smarty->assign('central_contents', $output_product_info); $smarty->caching = 0; $smarty->display(SELECTED_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; return 'overwrite_all';
} require DIR_WS_INCLUDES . 'html_header.php'; require DIR_WS_INCLUDES . 'boxes.php'; require DIR_WS_INCLUDES . 'header.php'; require DIR_WS_INCLUDES . 'footer.php'; if ($messageStack->size('addressbook') > 0) { $smarty->assign('message_stack', $messageStack->output('addressbook')); $smarty->assign('message_stack_error', $messageStack->output('addressbook', 'error')); $smarty->assign('message_stack_warning', $messageStack->output('addressbook', 'warning')); $smarty->assign('message_stack_success', $messageStack->output('addressbook', 'success')); } if (isset($_GET['delete'])) { $smarty->assign(array('delete_address' => true, 'address_label' => xos_address_label($_SESSION['customer_id'], $_GET['delete'], true, ' ', '<br />'), 'link_filename_address_book' => xos_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'), 'link_filename_address_book_process_delete' => xos_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'delete=' . $_GET['delete'] . '&action=deleteconfirm&formid=' . md5($_SESSION['sessiontoken']), 'SSL'))); } elseif (isset($_GET['edit']) && is_numeric($_GET['edit'])) { $smarty->assign(array('edit_address' => true, 'form_begin' => xos_draw_form('addressbook', xos_href_link(FILENAME_ADDRESS_BOOK_PROCESS, isset($_GET['edit']) ? 'edit=' . $_GET['edit'] : '', 'SSL'), 'post', 'onsubmit="return true;"', true), 'link_filename_address_book' => xos_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'), 'hidden_field_update' => xos_draw_hidden_field('action', 'update'), 'hidden_field_edit' => xos_draw_hidden_field('edit', $_GET['edit']), 'form_end' => '</form>')); include DIR_WS_MODULES . 'address_book_details.php'; } else { if (sizeof($_SESSION['navigation']->snapshot) > 0) { $back_link = xos_href_link($_SESSION['navigation']->snapshot['page'], xos_array_to_query_string($_SESSION['navigation']->snapshot['get'], array(xos_session_name())), $_SESSION['navigation']->snapshot['mode']); } else { $back_link = xos_href_link(FILENAME_ADDRESS_BOOK, '', 'SSL'); } $smarty->assign(array('form_begin' => xos_draw_form('addressbook', xos_href_link(FILENAME_ADDRESS_BOOK_PROCESS, isset($_GET['edit']) ? 'edit=' . $_GET['edit'] : '', 'SSL'), 'post', 'onsubmit="return true;"', true), 'link_back' => $back_link, 'hidden_field_process' => xos_draw_hidden_field('action', 'process'), 'form_end' => '</form>')); include DIR_WS_MODULES . 'address_book_details.php'; } $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'address_book_process'); $output_address_book_process = $smarty->fetch(SELECTED_TPL . '/address_book_process.tpl'); $smarty->assign('central_contents', $output_address_book_process); $smarty->display(SELECTED_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
$male = $account['customers_gender'] == 'm' ? true : false; } $female = !$male; $smarty->assign(array('account_gender' => true, 'input_gender' => xos_draw_radio_field('gender', 'm', $male, 'id="gender_m"') . '<label class="control-label" for="gender_m"> ' . MALE . ' </label>' . xos_draw_radio_field('gender', 'f', $female, 'id="gender_f"') . '<label class="control-label" for="gender_f"> ' . FEMALE . ' </label>' . (xos_not_null(ENTRY_GENDER_TEXT) ? '<span class="input-requirement">' . ENTRY_GENDER_TEXT . '</span>' : ''))); } if (ACCOUNT_DOB == 'true') { $smarty->assign(array('account_dob' => true, 'input_dob' => xos_draw_input_field('dob', xos_date_short($account['customers_dob']), 'class="form-control" id="dob"') . ' ' . (xos_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="input-requirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>' : ''))); } reset($lng->catalog_languages); if (sizeof($lng->catalog_languages) > 1) { $lang_array = array(); $languages_selected = ''; while (list($key, $value) = each($lng->catalog_languages)) { $lang_array[] = array('id' => $value['id'], 'text' => $value['name']); if (!empty($language_id)) { $languages_selected = $language_id; } elseif ($value['id'] == $account['customers_language_id']) { $languages_selected = $account['customers_language_id']; } } $smarty->assign(array('languages' => true, 'pull_down_menu_languages' => xos_draw_pull_down_menu('languages', $lang_array, $languages_selected, 'class="form-control" id="languages"'))); } else { $smarty->assign('hidden_field_languages', xos_draw_hidden_field('languages', $account['customers_language_id'])); } $smarty->assign(array('form_begin' => xos_draw_form('account_edit', xos_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'), 'post', 'onsubmit="return true;"', true), 'hidden_field' => xos_draw_hidden_field('action', 'process'), 'link_filename_account' => xos_href_link(FILENAME_ACCOUNT, '', 'SSL'), 'c_id' => $account['customers_c_id'], 'input_firstname' => xos_draw_input_field('firstname', $account['customers_firstname'], 'class="form-control" id="firstname"') . ' ' . (xos_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="input-requirement">' . ENTRY_FIRST_NAME_TEXT . '</span>' : ''), 'input_lastname' => xos_draw_input_field('lastname', $account['customers_lastname'], 'class="form-control" id="lastname"') . ' ' . (xos_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="input-requirement">' . ENTRY_LAST_NAME_TEXT . '</span>' : ''), 'input_email_address' => xos_draw_input_field('email_address', $account['customers_email_address'], 'class="form-control" id="email_address"') . ' ' . (xos_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="input-requirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>' : ''), 'input_telephone' => xos_draw_input_field('telephone', $account['customers_telephone'], 'class="form-control" id="telephone"') . ' ' . (xos_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="input-requirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>' : ''), 'input_fax' => xos_draw_input_field('fax', $account['customers_fax'], 'class="form-control" id="fax"') . ' ' . (xos_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="input-requirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>' : ''), 'form_end' => '</form>')); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'account_edit'); $output_account_edit = $smarty->fetch(SELECTED_TPL . '/account_edit.tpl'); $smarty->assign('central_contents', $output_account_edit); $smarty->display(SELECTED_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
// Copyright (c) 2003 osCommerce // filename: stats_products_viewed.php // // Released under the GNU General Public License //////////////////////////////////////////////////////////////////////////////// require 'includes/application_top.php'; if (!(@(include DIR_FS_SMARTY . 'admin/templates/' . ADMIN_TPL . '/php/' . FILENAME_STATS_PRODUCTS_VIEWED) == 'overwrite_all')) { $javascript = '<script type="text/javascript" src="' . DIR_WS_ADMIN . 'includes/general.js"></script>' . "\n"; require DIR_WS_INCLUDES . 'html_header.php'; require DIR_WS_INCLUDES . 'header.php'; require DIR_WS_INCLUDES . 'column_left.php'; require DIR_WS_INCLUDES . 'footer.php'; isset($_GET['page']) && $_GET['page'] > 1 ? $rows = $_GET['page'] * MAX_DISPLAY_RESULTS - MAX_DISPLAY_RESULTS : ($rows = 0); $products_query_raw = "select p.products_id, pd.products_name, ps.products_viewed, l.name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_STATS . " ps, " . TABLE_LANGUAGES . " l where p.products_id = pd.products_id and p.products_id = ps.products_id and l.languages_id = pd.language_id and l.languages_id = ps.language_id order by ps.products_viewed DESC"; $products_split = new splitPageResults($_GET['page'], MAX_DISPLAY_RESULTS, $products_query_raw, $products_query_numrows); $products_query = xos_db_query($products_query_raw); $products_array = array(); while ($products = xos_db_fetch_array($products_query)) { $rows++; if (strlen($rows) < 2) { $rows = '0' . $rows; } $products_array[] = array('link_filename_categories_action_product_preview' => xos_href_link(FILENAME_CATEGORIES, 'action=product_preview&read=only&pID=' . $products['products_id'] . '&origin=' . FILENAME_STATS_PRODUCTS_VIEWED . '?page=' . $_GET['page']), 'rows' => $rows, 'products_name' => $products['products_name'], 'name' => $products['name'], 'viewed' => $products['products_viewed']); } $smarty->assign(array('products' => $products_array, 'nav_bar_number' => $products_split->display_count($products_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PRODUCTS), 'nav_bar_result' => $products_split->display_links($products_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']))); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'stats_products_viewed'); $output_stats_products_viewed = $smarty->fetch(ADMIN_TPL . '/stats_products_viewed.tpl'); $smarty->assign('central_contents', $output_stats_products_viewed); $smarty->display(ADMIN_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
// XOS-Shop is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // 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: cookie_usage.php // // Released under the GNU General Public License //////////////////////////////////////////////////////////////////////////////// require 'includes/application_top.php'; if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/' . FILENAME_COOKIE_USAGE) == 'overwrite_all')) { require DIR_FS_SMARTY . 'catalog/languages/' . $_SESSION['language'] . '/' . FILENAME_COOKIE_USAGE; $site_trail->add(NAVBAR_TITLE, xos_href_link(FILENAME_COOKIE_USAGE)); require DIR_WS_INCLUDES . 'html_header.php'; require DIR_WS_INCLUDES . 'boxes.php'; require DIR_WS_INCLUDES . 'header.php'; require DIR_WS_INCLUDES . 'footer.php'; $smarty->assign('link_filename_default', xos_href_link(FILENAME_DEFAULT)); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'cookie_usage'); $output_cookie_usage = $smarty->fetch(SELECTED_TPL . '/cookie_usage.tpl'); $smarty->assign('central_contents', $output_cookie_usage); $smarty->display(SELECTED_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
$onclick_link = 'info=' . urlencode($contents[$i]['name']); } if ($contents[$i]['is_dir']) { if ($contents[$i]['name'] == '..') { $icon = xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icons/previous_level.gif', ICON_TITLE_PREVIOUS_LEVEL); } else { $icon = isset($fInfo) && is_object($fInfo) && $contents[$i]['name'] == $fInfo->name ? xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icons/current_folder.gif', ICON_TITLE_CURRENT_FOLDER) : xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icons/folder.gif', ICON_TITLE_FOLDER); } $link = xos_href_link(FILENAME_FILE_MANAGER, 'goto=' . $goto_link); } else { $icon = $contents[$i]['is_image'] ? xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icons/image_download.gif', ICON_TITLE_FILE_DOWNLOAD) : xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icons/file_download.gif', ICON_TITLE_FILE_DOWNLOAD); $link = xos_href_link(FILENAME_FILE_MANAGER, 'action=download&filename=' . urlencode($contents[$i]['name'])); } if ($contents[$i]['name'] != '..') { $link_delete = xos_href_link(FILENAME_FILE_MANAGER, 'info=' . urlencode($contents[$i]['name']) . '&action=delete'); } $folders_and_files_array[] = array('selected' => $selected, 'link_onclick' => xos_href_link(FILENAME_FILE_MANAGER, $onclick_link), 'link' => $link, 'icon' => $icon, 'name' => $contents[$i]['name'], 'size' => $contents[$i]['is_dir'] ? ' ' : $contents[$i]['size'], 'permissions' => $contents[$i]['permissions'], 'user' => $contents[$i]['user'], 'group' => $contents[$i]['group'], 'last_modified' => $contents[$i]['last_modified'], 'link_delete' => $link_delete, 'link_filename_file_manager_info' => xos_href_link(FILENAME_FILE_MANAGER, 'info=' . urlencode($contents[$i]['name']))); } $smarty->assign(array('folders_and_files' => $folders_and_files_array, 'link_filename_file_manager_reset' => xos_href_link(FILENAME_FILE_MANAGER, 'action=reset'), 'link_filename_file_manager_upload' => xos_href_link(FILENAME_FILE_MANAGER, (isset($_GET['info']) ? 'info=' . urlencode($_GET['info']) . '&' : '') . 'action=upload'), 'link_filename_file_manager_new_file' => xos_href_link(FILENAME_FILE_MANAGER, (isset($_GET['info']) ? 'info=' . urlencode($_GET['info']) . '&' : '') . 'action=new_file'), 'link_filename_file_manager_new_folder' => xos_href_link(FILENAME_FILE_MANAGER, (isset($_GET['info']) ? 'info=' . urlencode($_GET['info']) . '&' : '') . 'action=new_folder'))); require DIR_WS_BOXES . 'infobox_file_manager.php'; } if (SESSID) { $smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id())); } $smarty->assign(array('form_begin_goto' => xos_draw_form('goto', FILENAME_FILE_MANAGER, '', 'get'), 'current_path' => $_SESSION['current_path'], 'pull_down_goto' => xos_draw_pull_down_menu('goto', $goto_array, $_SESSION['current_path'], 'onchange="this.form.submit();"'), 'form_end' => '</form>')); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'file_manager'); $output_file_manager = $smarty->fetch(ADMIN_TPL . '/file_manager.tpl'); $smarty->assign('central_contents', $output_file_manager); $smarty->display(ADMIN_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }
$decoded_send_extra_order_emails_to = html_entity_decode($send_extra_order_emails_to, ENT_QUOTES, 'UTF-8'); $recipients = explode(',', $decoded_send_extra_order_emails_to); for ($i = 0, $n = count($recipients); $i < $n; $i++) { $address = ''; $name = ''; $pieces = explode('<', $recipients[$i]); if (count($pieces) == 2) { $address = trim($pieces[1], " >"); $name = trim($pieces[0]); } elseif (count($pieces) == 1) { $pos = stripos($pieces[0], '@'); $address = $pos ? trim($pieces[0], " >") : ''; } $email_to_other_people = new mailer($name, $address, sprintf(EMAIL_TEXT_SUBJECT_OTHER, $insert_id, xos_date_format(DATE_FORMAT_SHORT)), $output_order_email_html, $output_order_email_text, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SHOP_LOGO); if (!$email_to_other_people->send()) { $messageStack->add_session('header', sprintf(ERROR_PHPMAILER, $email_to_other_people->ErrorInfo)); } } } } // load the after_process function from the payment modules $payment_modules->after_process(); $_SESSION['cart']->reset(true); // unregister session variables used during checkout unset($_SESSION['sendto']); unset($_SESSION['billto']); unset($_SESSION['shipping']); unset($_SESSION['payment']); unset($_SESSION['comments']); xos_redirect(xos_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL')); }
'price_break_special' => $products_prices[$customer_group_id]['special_status'] == 1 && $products_prices[$customer_group_id][$qty]['special'] > 0 ? $currencies->display_price($products_prices[$customer_group_id][$qty]['special'], $products_tax_rate) : ''); } } */ } else { $xsell_product_price = $currencies->display_price($products_prices[0][0]['regular'], $products_tax_rate); $products_prices[0]['special_status'] == 1 && $products_prices[0][0]['special'] > 0 ? $xsell_product_price_special = $currencies->display_price($products_prices[0][0]['special'], $products_tax_rate) : ($xsell_product_price_special = ''); $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]; $xsell_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) : ''); } } */ } $xsell_products_image = xos_get_product_images($xsell['products_image']); $xsell_products_array[] = array('link_filename_product_info' => xos_href_link(FILENAME_PRODUCT_INFO, 'p=' . $xsell['products_id']), 'image' => xos_image(DIR_WS_IMAGES . 'products/small/' . rawurlencode($xsell_products_image['name']), $xsell['products_name']), 'info' => $xsell['products_info'], 'price' => $xsell_product_price, 'price_special' => $xsell_product_price_special, 'price_breaks' => $xsell_price_breaks_array, 'tax_description' => xos_get_products_tax_description($xsell['products_tax_class_id'], $products_tax_rate), 'name' => $xsell['products_name']); } $smarty->assign('xsell_products', $xsell_products_array); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'xsell_products'); $output_xsell_products = $smarty->fetch(SELECTED_TPL . '/includes/modules/xsell_products.tpl'); $smarty->clearAssign('xsell_products'); $smarty->assign('xsell_products', $output_xsell_products); } } }
} break; case 'define_group': $heading_title = '<b>' . TEXT_INFO_HEADING_DEFINE . '</b>'; $contents[] = array('text' => sprintf(TEXT_INFO_DEFINE_INTRO, $group_name['admin_groups_name'])); if ($_GET['gPath'] == 1) { $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $_GET['gPath']) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_BACK . ' "><span>' . BUTTON_TEXT_BACK . '</span></a><br /> '); } break; default: if (is_object($mInfo)) { $heading_title = '<b>' . TEXT_INFO_HEADING_DEFAULT . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_ADMIN_MEMBERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->admin_id . '&action=edit_member') . '" 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_ADMIN_MEMBERS, 'page=' . $_GET['page'] . '&mID=' . $mInfo->admin_id . '&action=del_member') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a><br /> '); $contents[] = array('text' => '<b>' . TEXT_INFO_FULLNAME . '</b><br />' . $mInfo->admin_firstname . ' ' . $mInfo->admin_lastname); $contents[] = array('text' => '<b>' . TEXT_INFO_EMAIL . '</b><br />' . $mInfo->admin_email_address); $contents[] = array('text' => '<b>' . TEXT_INFO_GROUP . '</b><br />' . $mInfo->admin_groups_name); $contents[] = array('text' => '<b>' . TEXT_INFO_CREATED . '</b><br />' . $mInfo->admin_created); $contents[] = array('text' => '<b>' . TEXT_INFO_MODIFIED . '</b><br />' . $mInfo->admin_modified); $contents[] = array('text' => '<b>' . TEXT_INFO_LOGDATE . '</b><br />' . $mInfo->admin_logdate); $contents[] = array('text' => '<b>' . TEXT_INFO_LOGNUM . '</b><br />' . $mInfo->admin_lognum . '<br /> '); } elseif (is_object($gInfo)) { $heading_title = '<b>' . TEXT_INFO_HEADING_DEFAULT_GROUPS . '</b>'; $contents[] = array('text' => '<a href="' . xos_href_link(FILENAME_ADMIN_MEMBERS, 'gPath=' . $gInfo->admin_groups_id . '&action=define_group') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_FILE_PERMISSION . ' "><span>' . BUTTON_TEXT_FILE_PERMISSION . '</span></a><a href="' . xos_href_link(FILENAME_ADMIN_MEMBERS, 'gID=' . $gInfo->admin_groups_id . '&action=edit_group') . '" 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_ADMIN_MEMBERS, 'gID=' . $gInfo->admin_groups_id . '&action=del_group') . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a><br /> '); $contents[] = array('text' => TEXT_INFO_DEFAULT_GROUPS_INTRO . '<br /> '); } } $smarty->assign(array('info_box_heading_title' => $heading_title, 'info_box_form_tag' => $form_tag, 'info_box_contents' => $contents)); $output_infobox_admin_members = $smarty->fetch(ADMIN_TPL . '/includes/boxes/infobox_admin_members.tpl'); $smarty->clearAssign(array('info_box_heading_title', 'info_box_form_tag', 'info_box_contents')); $smarty->assign('infobox_admin_members', $output_infobox_admin_members); return 'overwrite_all';
function xos_session_start() { $sane_session_id = true; if (isset($_GET[xos_session_name()])) { if (preg_match('/^[a-zA-Z0-9,-]+$/', $_GET[xos_session_name()]) == false) { unset($_GET[xos_session_name()]); $sane_session_id = false; } } elseif (isset($_POST[xos_session_name()])) { if (preg_match('/^[a-zA-Z0-9,-]+$/', $_POST[xos_session_name()]) == false) { unset($_POST[xos_session_name()]); $sane_session_id = false; } } elseif (isset($_COOKIE[xos_session_name()])) { if (preg_match('/^[a-zA-Z0-9,-]+$/', $_COOKIE[xos_session_name()]) == false) { $session_data = session_get_cookie_params(); setcookie(xos_session_name(), '', time() - 42000, $session_data['path'], $session_data['domain']); unset($_COOKIE[xos_session_name()]); $sane_session_id = false; } } if ($sane_session_id == false) { xos_redirect(xos_href_link(FILENAME_DEFAULT, '', 'SSL', false)); } register_shutdown_function('session_write_close'); return session_start(); }
} if ($error == true) { unset($_SESSION['access_allowed']); $messageStack->add('offline', TEXT_OFFLINE_ERROR); } $site_trail->add(NAVBAR_TITLE, xos_href_link(FILENAME_OFFLINE, '', 'SSL')); require DIR_WS_INCLUDES . 'html_header.php'; // require(DIR_WS_INCLUDES . 'boxes.php'); // require(DIR_WS_INCLUDES . 'header.php'); // require(DIR_WS_INCLUDES . 'footer.php'); if ($messageStack->size('offline') > 0) { $smarty->assign('message_stack', $messageStack->output('offline')); $smarty->assign('message_stack_error', $messageStack->output('offline', 'error')); $smarty->assign('message_stack_warning', $messageStack->output('offline', 'warning')); $smarty->assign('message_stack_success', $messageStack->output('offline', 'success')); } $language_string = ''; reset($lng->catalog_languages); if (sizeof($lng->catalog_languages) > 1) { while (list($key, $value) = each($lng->catalog_languages)) { $language_str .= ' <a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('lnc', 'cur', 'tpl', 'dfrom', 'dto')) . 'lnc=' . $key, $request_type) . '">' . xos_image(DIR_WS_IMAGES . 'catalog/templates/' . SELECTED_TPL . '/' . $value['directory'] . '/' . $value['image'], $value['name']) . '</a> '; } $smarty->assign('language_str', $language_str); } $smarty->assign(array('form_begin' => xos_draw_form('offline', xos_href_link(FILENAME_OFFLINE, 'action=process', 'SSL')), 'input_field_email_address' => xos_draw_input_field('email_address', '', 'id="email_address"'), 'input_field_password' => xos_draw_password_field('password', '', 'id="password"'), 'form_end' => '</form>')); $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'offline'); $output_offline = $smarty->fetch(SELECTED_TPL . '/offline.tpl'); $smarty->assign('central_contents', $output_offline); $smarty->display(SELECTED_TPL . '/frame.tpl'); require DIR_WS_INCLUDES . 'application_bottom.php'; }