コード例 #1
0
        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;
    }
}
require DIR_FS_SMARTY . 'catalog/languages/' . $_SESSION['language'] . '/' . FILENAME_ACCOUNT_HISTORY;
$site_trail->add(NAVBAR_TITLE_1, xos_href_link(FILENAME_ACCOUNT, '', 'SSL'));
$site_trail->add(NAVBAR_TITLE_2, xos_href_link(FILENAME_ACCOUNT_HISTORY, '', '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';
$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';
コード例 #2
0
ファイル: account.php プロジェクト: bamper/xos_shop_system
if (!$is_shop) {
    xos_redirect(xos_href_link(FILENAME_DEFAULT), false);
} elseif (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/' . FILENAME_ACCOUNT) == 'overwrite_all')) {
    if (!isset($_SESSION['customer_id'])) {
        $_SESSION['navigation']->remove_current_page();
        $_SESSION['navigation']->set_snapshot();
        xos_redirect(xos_href_link(FILENAME_LOGIN, '', 'SSL'));
    }
    require DIR_FS_SMARTY . 'catalog/languages/' . $_SESSION['language'] . '/' . FILENAME_ACCOUNT;
    $site_trail->add(NAVBAR_TITLE, xos_href_link(FILENAME_ACCOUNT, '', 'SSL'));
    $add_header = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'function rowOverEffect(object) {' . "\n" . '  if (object.className == "module-row") object.className = "module-row-over";' . "\n" . '}' . "\n\n" . 'function rowOutEffect(object) {' . "\n" . '  if (object.className == "module-row-over") object.className = "module-row";' . "\n" . '}' . "\n" . '/* ]]> */' . "\n" . '</script> ' . "\n";
    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 (xos_count_customer_orders() > 0) {
        $orders_query = xos_db_query("select o.orders_id, o.date_purchased, o.delivery_name, o.delivery_country, o.billing_name, o.billing_country, 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 limit 3");
        $orders_array = array();
        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 (xos_not_null($orders['delivery_name'])) {
                $order_name = $orders['delivery_name'];
                $order_country = $orders['delivery_country'];
            } else {
                $order_name = $orders['billing_name'];
                $order_country = $orders['billing_country'];
            }
            $orders_array[] = array('link_filename_account_history_info' => xos_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $orders['orders_id'], 'SSL'), 'date_purchased' => xos_date_short($orders['date_purchased']), 'order_id' => $orders['orders_id'], 'order_name' => xos_output_string_protected($order_name), 'order_country' => $order_country, 'order_status_name' => $orders['orders_status_name'], 'order_total' => strip_tags($oder_total['text']));
        }
        $smarty->assign('customer_orders', true);