Released under the GNU General Public License 
   --------------------------------------------------------------
   Third Party contributions:
   Customers Status v3.x  (c) 2002-2003 Copyright Elari elari@free.fr | www.unlockgsm.com/dload-osc/ | CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/elari/?sortby=date#dirlist

   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
$cart_empty = false;
require "includes/application_top.php";
if (isset($_SESSION['customer_id'])) {
    $_SESSION['nologin'] = false;
} else {
    $_SESSION['nologin'] = true;
}
// create template elements
$vamTemplate = new vamTemplate();
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
// include needed functions
require_once DIR_FS_INC . 'vam_array_to_string.inc.php';
require_once DIR_FS_INC . 'vam_image_submit.inc.php';
require_once DIR_FS_INC . 'vam_recalculate_price.inc.php';
require_once DIR_FS_INC . 'get_cross_sell_name.inc.php';
$breadcrumb->add(NAVBAR_TITLE_SHOPPING_CART, vam_href_link(FILENAME_SHOPPING_CART));
require DIR_WS_INCLUDES . 'header.php';
if (ACTIVATE_GIFT_SYSTEM == 'true') {
    include DIR_WS_MODULES . 'gift_cart.php';
}
if ($_SESSION['cart']->count_contents() > 0) {
    if ($_SESSION['error_cart_msg'] != 0) {
        $vamTemplate->assign('info_message', $_SESSION['error_cart_msg']);
    }
Exemple #2
0
   VaM Shop - open source ecommerce solution
   http://vamshop.ru
   http://vamshop.com

   Copyright (c) 2007 VaM Shop
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(search.php,v 1.22 2003/02/10); www.oscommerce.com 
   (c) 2003	 nextcommerce (search.php,v 1.9 2003/08/17); www.nextcommerce.org
   (c) 2004	 xt:Commerce (search.php,v 1.9 2003/08/13); xt-commerce.com 

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
$box = new vamTemplate();
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$box_content = '';
require_once DIR_FS_INC . 'vam_image_submit.inc.php';
require_once DIR_FS_INC . 'vam_hide_session_id.inc.php';
$box->assign('FORM_ACTION', vam_draw_form('quick_find', vam_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . vam_hide_session_id());
$box->assign('INPUT_SEARCH', vam_draw_input_field('keywords', '', 'id="quick_find_keyword"'));
$box->assign('BUTTON_SUBMIT', vam_image_submit('', IMAGE_BUTTON_SEARCH));
$box->assign('FORM_END', '</form>');
$box->assign('LINK_ADVANCED', vam_href_link(FILENAME_ADVANCED_SEARCH));
$box->assign('BOX_CONTENT', $box_content);
$box->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $box->caching = 0;
    $box_search = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_search.html');
require_once DIR_FS_INC . 'vam_random_charcode.inc.php';
require_once DIR_FS_INC . 'vam_render_vvcode.inc.php';
// create smarty elements
if (isset($_POST['firstname'])) {
    $firstname = $_POST['firstname'];
}
if (isset($_POST['phone'])) {
    $phone = $_POST['phone'];
}
if (isset($_POST['message_body'])) {
    $message_body = stripslashes($_POST['message_body']);
}
if (isset($_POST['phone'])) {
    $subject = $_POST['subject'];
    $txt_mail = 'tel: ' . $phone . " " . $message_body;
    // отправка данных
    vam_php_mail('', EMAIL_SUPPORT_NAME, EMAIL_SUPPORT_ADDRESS, STORE_NAME, EMAIL_SUPPORT_FORWARDING_STRING, '', $firstname, '', '', $subject, '', $txt_mail);
    die('Спасибо. Ваше сообщение отправлено. Вскоре мы Вам перезвоним.');
}
$vamTemplate = new vamTemplate();
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->assign('CAPTCHA_IMG', vam_image(HTTP_SERVER . DIR_WS_CATALOG . FILENAME_DISPLAY_CAPTCHA, 'captcha', '150', '', 'name="captcha" '));
$vamTemplate->assign('CAPTCHA_INPUT', vam_draw_input_field('captcha', '', 'size="6" maxlength="6"', 'text', false));
$vamTemplate->assign('FORM_ACTION', vam_draw_form('callback_form', '') . vam_draw_hidden_field('action', 'process') . vam_draw_hidden_field('products_id', $_GET['products_id']));
$vamTemplate->assign('INPUT_FIRSTNAME', vam_draw_input_field('firstname', $firstname, 'size="30" maxlength="100"', 'text', true));
$vamTemplate->assign('INPUT_LASTNAME', vam_draw_input_field('phone', $phone, 'size="30" maxlength="100"', 'text', true));
$vamTemplate->assign('INPUT_TEXT', vam_draw_textarea_field('message_body', 'soft', 30, 3, $message_body));
$vamTemplate->assign('FORM_END', '</form>');
$vamTemplate->assign('BUTTON_SUBMIT', '<a class="button" id="callback_send" href="javascript:void(0);">' . vam_image_button('submit.png', IMAGE_BUTTON_SEND) . '</a>');
$vamTemplate->assign('BUTTON_CONTINUE', '<a class="button" href="javascript:void(0);" onclick="$(\'#showCart\').dialog(\'close\');">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>');
$vamTemplate->display(CURRENT_TEMPLATE . '/module/callback_form.html');
   http://vamshop.ru
   http://vamshop.com

   Copyright (c) 2007 VaM Shop
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(product_reviews_info.php,v 1.47 2003/02/13); www.oscommerce.com
   (c) 2003	 nextcommerce (product_reviews_info.php,v 1.12 2003/08/17); www.nextcommerce.org 
   (c) 2004	 xt:Commerce (product_reviews_info.php,v 1.12 2003/08/17); xt-commerce.com 

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
include 'includes/application_top.php';
// create template elements
$vamTemplate = new vamTemplate();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
// include needed functions
require_once DIR_FS_INC . 'vam_break_string.inc.php';
require_once DIR_FS_INC . 'vam_date_long.inc.php';
// lets retrieve all $HTTP_GET_VARS keys and values..
$get_params = vam_get_all_get_params(array('reviews_id'));
$get_params = substr($get_params, 0, -1);
//remove trailing &
$reviews_query = "select rd.reviews_text, r.reviews_rating, r.reviews_id, r.products_id, r.customers_name, r.date_added, r.last_modified, r.reviews_read, p.products_id, pd.products_name, p.products_image from " . TABLE_REVIEWS . " r left join " . TABLE_PRODUCTS . " p on (r.products_id = p.products_id) left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (p.products_id = pd.products_id and pd.language_id = '" . (int) $_SESSION['languages_id'] . "'), " . TABLE_REVIEWS_DESCRIPTION . " rd where r.reviews_id = '" . (int) $_GET['reviews_id'] . "' and r.reviews_id = rd.reviews_id and p.products_status = '1'";
$reviews_query = vam_db_query($reviews_query);
if (!vam_db_num_rows($reviews_query)) {
    vam_redirect(vam_href_link(FILENAME_REVIEWS));
}
$reviews = vam_db_fetch_array($reviews_query);
   VaM Shop - open source ecommerce solution
   http://vamshop.ru
   http://vamshop.com

   Copyright (c) 2007 VaM Shop
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(cookie_usage.php,v 1.1 2003/03/10); www.oscommerce.com 
   (c) 2003	 nextcommerce (cookie_usage.php,v 1.9 2003/08/17); www.nextcommerce.org
   (c) 2004	 xt:Commerce (cookie_usage.php,v 1.9 2003/08/17); xt-commerce.com

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
include 'includes/application_top.php';
$vamTemplate = new vamTemplate();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
$breadcrumb->add(NAVBAR_TITLE_COOKIE_USAGE, vam_href_link(FILENAME_COOKIE_USAGE));
require DIR_WS_INCLUDES . 'header.php';
$vamTemplate->assign('BUTTON_CONTINUE', '<a class="button" href="' . vam_href_link(FILENAME_DEFAULT) . '">' . vam_image_button('submit.png', IMAGE_BUTTON_CONTINUE) . '</a>');
$vamTemplate->assign('language', $_SESSION['language']);
// set cache ID
if (!CacheCheck()) {
    $vamTemplate->caching = 0;
    $main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/cookie_usage.html');
} else {
    $vamTemplate->caching = 1;
    $vamTemplate->cache_lifetime = CACHE_LIFETIME;
    $vamTemplate->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'];
                if ($s0 > 0) {
                    $retval .= " " . $this->diw[0][$s0][0];
                    $nom = $this->diw[0][$s0][1];
                }
            }
        }
        if ($nom >= 0) {
            $retval .= " " . $this->nom[$nominal][$nom];
            if ($nominal == 1) {
                $this->out_rub = 1;
            }
        }
        return trim($retval);
    }
}
$vamTemplate = new vamTemplate();
$order_query_check = vam_db_query("SELECT\n  \t\t\t\t\tcustomers_id\n  \t\t\t\t\tFROM " . TABLE_ORDERS . "\n  \t\t\t\t\tWHERE orders_id='" . (int) $_GET['oID'] . "'");
$order_check = vam_db_fetch_array($order_query_check);
$company_query = vam_db_query("SELECT * FROM " . TABLE_COMPANIES . "\n  \t\t\t\t\tWHERE orders_id='" . (int) $_GET['oID'] . "'");
$company = vam_db_fetch_array($company_query);
$vamTemplate->assign('company_name', $company['name']);
$vamTemplate->assign('company_telephone', $company['telephone']);
$vamTemplate->assign('company_fax', $company['fax']);
$vamTemplate->assign('company_inn', $company['inn']);
$vamTemplate->assign('company_kpp', $company['kpp']);
$vamTemplate->assign('company_ogrn', $company['ogrn']);
$vamTemplate->assign('company_okpo', $company['okpo']);
$vamTemplate->assign('company_rs', $company['rs']);
$vamTemplate->assign('company_bank_name', $company['bank_name']);
$vamTemplate->assign('company_bik', $company['bik']);
$vamTemplate->assign('company_ks', $company['ks']);
   VaM Shop - open source ecommerce solution
   http://vamshop.ru
   http://vamshop.com

   Copyright (c) 2007 VaM Shop
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(upcoming_products.php,v 1.23 2003/02/12); www.oscommerce.com 
   (c) 2003	 nextcommerce (upcoming_products.php,v 1.7 2003/08/22); www.nextcommerce.org
   (c) 2004	 xt:Commerce (upcoming_products.php,v 1.7 2003/08/22); xt-commerce.com

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
$module = new vamTemplate();
$module->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
// include needed functions
require_once DIR_FS_INC . 'vam_date_short.inc.php';
$module_content = array();
//fsk18 lock
$fsk_lock = '';
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
    $fsk_lock = ' and p.products_fsk18!=1';
}
if (GROUP_CHECK == 'true') {
    $group_check = "and p.group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 ";
}
$expected_query = vamDBquery("select p.products_id,\n                                  pd.products_name,\n                                  products_date_available as date_expected from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd\n                                  where to_days(products_date_available) >= to_days(now())\n                                  and p.products_id = pd.products_id\n                                  " . $group_check . "\n                                  " . $fsk_lock . "\n                                  and pd.language_id = '" . (int) $_SESSION['languages_id'] . "'\n                                  order by " . EXPECTED_PRODUCTS_FIELD . " " . EXPECTED_PRODUCTS_SORT . "\n                                  limit " . MAX_DISPLAY_UPCOMING_PRODUCTS);
if (vam_db_num_rows($expected_query, true) > 0) {
    $row = 0;
   based on:
   (c) 2003 OSC-Affiliate (affiliate_sales.php, v 1.16 2003/09/22);
   http://oscaffiliate.sourceforge.net/

   Contribution based on:

   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2002 - 2003 osCommerce

   Released under the GNU General Public License
   ---------------------------------------------------------------------------*/
require 'includes/application_top.php';
// create smarty elements
$vamTemplate = new vamTemplate();
// include needed functions
require_once DIR_FS_INC . 'affiliate_period.inc.php';
require_once DIR_FS_INC . 'affiliate_get_status_list.inc.php';
require_once DIR_FS_INC . 'affiliate_get_status_array.inc.php';
require_once DIR_FS_INC . 'affiliate_get_level_list.inc.php';
require_once DIR_FS_INC . 'vam_date_short.inc.php';
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
if (!isset($_SESSION['affiliate_id'])) {
    vam_redirect(vam_href_link(FILENAME_AFFILIATE, '', 'SSL'));
}
$breadcrumb->add(NAVBAR_TITLE, vam_href_link(FILENAME_AFFILIATE, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_SALES, vam_href_link(FILENAME_AFFILIATE_SALES, '', 'SSL'));
if (!isset($_GET['page'])) {
    $_GET['page'] = 1;
   Copyright (c) Strider | Strider@oscworks.com
   Copyright (c  Nick Stanko of UkiDev.com, nick@ukidev.com
   Copyright (c) Andre ambidex@gmx.net
   Copyright (c) 2001,2002 Ian C Wilson http://www.phesis.org


   Released under the GNU General Public License
   ---------------------------------------------------------------------------------------*/
require 'includes/application_top.php';
require_once DIR_FS_INC . 'vam_wysiwyg_tiny.inc.php';
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
require_once DIR_FS_CATALOG . 'includes/external/phpmailer/class.phpmailer.php';
require_once DIR_FS_INC . 'vam_php_mail.inc.php';
// initiate template engine for mail
$vamTemplate = new vamTemplate();
if ($_GET['action'] == 'send_email_to_user' && ($_POST['customers_email_address'] || $_POST['email_to']) && !$_POST['back_x']) {
    switch ($_POST['customers_email_address']) {
        case '***':
            $mail_query = vam_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS);
            $mail_sent_to = TEXT_ALL_CUSTOMERS;
            break;
        case '**D':
            $mail_query = vam_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_newsletter = '1'");
            $mail_sent_to = TEXT_NEWSLETTER_CUSTOMERS;
            break;
        default:
            $customers_email_address = vam_db_prepare_input($_POST['customers_email_address']);
            $mail_query = vam_db_query("select customers_firstname, customers_lastname, customers_email_address from " . TABLE_CUSTOMERS . " where customers_email_address = '" . vam_db_input($customers_email_address) . "'");
            $mail_sent_to = $_POST['customers_email_address'];
            if ($_POST['email_to']) {
<?php

require_once DIR_FS_INC . 'vam_date_short.inc.php';
// reset var
$box = new vamTemplate();
$box_content = '';
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
// /downloads
if (isset($_SESSION['customer_id'])) {
    if (!strstr($_SERVER['SCRIPT_NAME'], FILENAME_ACCOUNT_HISTORY_INFO)) {
        // Get last order id for checkout_success
        $orders_query_raw = "SELECT orders_id FROM " . TABLE_ORDERS . " WHERE customers_id = '" . $_SESSION['customer_id'] . "' ORDER BY orders_id DESC LIMIT 1";
        $orders_query = vam_db_query($orders_query_raw);
        $orders_values = vam_db_fetch_array($orders_query);
        $last_order = $orders_values['orders_id'];
    } else {
        $last_order = $_GET['order_id'];
    }
    // Now get all downloadable products in that order
    $downloads_query_raw = "SELECT DATE_FORMAT(date_purchased, '%Y-%m-%d') as date_purchased_day, op.products_name, opd.orders_products_download_id, opd.orders_products_filename, opd.download_count, opd.download_maxdays, opd.download_pin_code,opd.download_is_pin\n                          FROM " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_ORDERS_PRODUCTS_DOWNLOAD . " opd\n                          WHERE customers_id = '" . (int) $_SESSION['customer_id'] . "'\n                          AND o.orders_id = '" . (int) $last_order . "'\n                          AND o.orders_status >= " . DOWNLOAD_MIN_ORDERS_STATUS . "\n                          AND op.orders_id = '" . $last_order . "'\n                          AND opd.orders_products_id=op.orders_products_id\n                          AND (opd.orders_products_filename != '' or opd.download_is_pin='1')";
    $downloads_query = vam_db_query($downloads_query_raw);
    // Don't display if there is no downloadable product
    if (vam_db_num_rows($downloads_query) > 0) {
        while ($downloads_values = vam_db_fetch_array($downloads_query)) {
            // MySQL 3.22 does not have INTERVAL
            list($dt_year, $dt_month, $dt_day) = explode('-', $downloads_values['date_purchased_day']);
            $download_timestamp = mktime(23, 59, 59, $dt_month, $dt_day + $downloads_values['download_maxdays'], $dt_year);
            $download_expiry = date('Y-m-d H:i:s', $download_timestamp);
            //PIN add
            if ($downloads_values['download_is_pin'] == 1) {
                //PIN processing
Exemple #11
0
   Customers Status v3.x  (c) 2002-2003 Copyright Elari elari@free.fr | www.unlockgsm.com/dload-osc/ | CVS : http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/elari/?sortby=date#dirlist

   credit card encryption functions for the catalog module
   BMC 2003 for the CC CVV Module

   Released under the GNU General Public License
   --------------------------------------------------------------*/
require 'includes/application_top.php';
require_once DIR_FS_CATALOG . 'includes/external/phpmailer/class.phpmailer.php';
require_once DIR_FS_INC . 'vam_php_mail.inc.php';
require_once DIR_FS_INC . 'vam_add_tax.inc.php';
require_once DIR_FS_INC . 'changedataout.inc.php';
require_once DIR_FS_INC . 'vam_validate_vatid_status.inc.php';
require_once DIR_FS_INC . 'vam_get_attributes_model.inc.php';
// initiate template engine for mail
$vamTemplate = new vamTemplate();
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
if (($_GET['action'] == 'edit' || $_GET['action'] == 'update_order') && $_GET['oID']) {
    $oID = vam_db_prepare_input($_GET['oID']);
    $orders_query = vam_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . vam_db_input($oID) . "'");
    $order_exists = true;
    if (!vam_db_num_rows($orders_query)) {
        $order_exists = false;
        $messageStack->add(sprintf(ERROR_ORDER_DOES_NOT_EXIST, $oID), 'error');
    }
}
require DIR_WS_CLASSES . 'order.php';
if (($_GET['action'] == 'edit' || $_GET['action'] == 'update_order') && $order_exists) {
    $order = new order($oID);
    $order_payment = $order->info['payment_class'];
   VaM Shop - open source ecommerce solution
   http://vamshop.ru
   http://vamshop.com

   Copyright (c) 2007 VaM Shop
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(specials.php,v 1.30 2003/02/10); www.oscommerce.com 
   (c) 2003	 nextcommerce (specials.php,v 1.10 2003/08/17); www.nextcommerce.org
   (c) 2004	 xt:Commerce (specials.php,v 1.10 2003/08/13); xt-commerce.com 

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
$box = new vamTemplate();
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$box_content = '';
// include needed functions
require_once DIR_FS_INC . 'vam_random_select.inc.php';
//fsk18 lock
$fsk_lock = '';
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
    $fsk_lock = ' and p.products_fsk18!=1';
}
if (GROUP_CHECK == 'true') {
    $group_check = " and p.group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 ";
}
if ($random_product = vam_random_select("select\n                                           p.products_id,\n                                           pd.products_name,\n                                           p.products_price,\n                                           p.products_tax_class_id,\n                                           p.products_image,\n                                           s.expires_date,\n                                           p.products_vpe,\n\t\t\t\t                           p.products_vpe_status,\n\t\t\t\t                           p.products_vpe_value,\n                                           s.specials_new_products_price\n                                           from " . TABLE_PRODUCTS . " p,\n                                           " . TABLE_PRODUCTS_DESCRIPTION . " pd,\n                                           " . TABLE_SPECIALS . " s where p.products_status = '1'\n                                           and p.products_id = s.products_id\n                                           and pd.products_id = s.products_id\n                                           and pd.language_id = '" . $_SESSION['languages_id'] . "'\n                                           and s.status = '1'\n                                           " . $group_check . "\n                                           " . $fsk_lock . "                                             \n                                           order by s.specials_date_added\n                                           desc limit " . MAX_RANDOM_SELECT_SPECIALS)) {
    $box->assign('box_content', $product->buildDataArray($random_product));
    $box->assign('SPECIALS_LINK', vam_href_link(FILENAME_SPECIALS));
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(products_new.php,v 1.25 2003/05/27); www.oscommerce.com 
   (c) 2003	 nextcommerce (products_new.php,v 1.16 2003/08/18); www.nextcommerce.org
   (c) 2004	 xt:Commerce (products_new.php,v 1.16 2003/08/18); xt-commerce.com

   Released under the GNU General Public License 
   -----------------------------------------------------------------------------------------
   Third Party contributions:
   Enable_Disable_Categories 1.3        	Autor: Mikel Williams | mikel@ladykatcostumes.com

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
include 'includes/application_top.php';
// create template elements
$vamTemplate = new vamTemplate();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
// include needed function
require_once DIR_FS_INC . 'vam_date_long.inc.php';
// the following tPath references come from application_top.php
$topic_depth = 'top';
if (isset($tPath) && vam_not_null($tPath)) {
    $topics_articles_query = "select count(*) as total from " . TABLE_ARTICLES_TO_TOPICS . " where topics_id = '" . (int) $current_topic_id . "'";
    $topics_articles_query = vamDBquery($topics_articles_query);
    $topics_articles = vam_db_fetch_array($topics_articles_query);
    if ($topics_articles['total'] > 0) {
        $topic_depth = 'articles';
        // display articles
    } else {
        $topic_parent_query = "select count(*) as total from " . TABLE_TOPICS . " where parent_id = '" . (int) $current_topic_id . "'";
   based on:
   (c) 2003 OSC-Affiliate (affiliate_clicks.php, v 1.12 2003/09/22);
   http://oscaffiliate.sourceforge.net/

   Contribution based on:

   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2002 - 2003 osCommerce

   Released under the GNU General Public License
   ---------------------------------------------------------------------------*/
require 'includes/application_top.php';
// create smarty elements
$vamTemplate = new vamTemplate();
// include needed functions
require_once DIR_FS_INC . 'vam_date_short.inc.php';
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
if (!isset($_SESSION['affiliate_id'])) {
    vam_redirect(vam_href_link(FILENAME_AFFILIATE, '', 'SSL'));
}
$breadcrumb->add(NAVBAR_TITLE, vam_href_link(FILENAME_AFFILIATE, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_CLICKS, vam_href_link(FILENAME_AFFILIATE_CLICKS, '', 'SSL'));
if (!isset($_GET['page'])) {
    $_GET['page'] = 1;
}
$affiliate_clickthroughs_raw = "select a.*, pd.products_name from " . TABLE_AFFILIATE_CLICKTHROUGHS . " a\n                                    left join " . TABLE_PRODUCTS . " p on (p.products_id = a.affiliate_products_id)\n                                    left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on (pd.products_id = p.products_id and pd.language_id = '" . $_SESSION['languages_id'] . "')\n                                    where a.affiliate_id = '" . $_SESSION['affiliate_id'] . "'  ORDER BY a.affiliate_clientdate desc";
$affiliate_clickthroughs_split = new splitPageResults($affiliate_clickthroughs_raw, $_GET['page'], MAX_DISPLAY_SEARCH_RESULTS);
require DIR_WS_INCLUDES . 'header.php';
Exemple #15
0
   VaM Shop - open source ecommerce solution
   http://vamshop.ru
   http://vamshop.com

   Copyright (c) 2007 VaM Shop
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(new_products.php,v 1.33 2003/02/12); www.oscommerce.com
   (c) 2003	 nextcommerce (new_products.php,v 1.9 2003/08/17); www.nextcommerce.org
   (c) 2004	 xt:Commerce (new_products.php,v 1.9 2003/08/17); www.xt-commerce.com

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
$module = new vamTemplate();
$module->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$sql = "\n    SELECT\n        news_id,\n        headline,\n        content,\n        date_added\n    FROM " . TABLE_LATEST_NEWS . "\n    WHERE\n         status = '1'\n         and language = '" . (int) $_SESSION['languages_id'] . "'\n    ORDER BY date_added DESC\n    LIMIT " . MAX_DISPLAY_LATEST_NEWS . "\n    ";
$row = 0;
$module_content = array();
$query = vamDBquery($sql);
while ($one = vam_db_fetch_array($query, true)) {
    //
    $qI = 0;
    $qIcon = '';
    if ($qI = strpos($one['content'], 'src="')) {
        $qI = $qI + 5;
        $qIcon = substr($one['content'], $qI);
        $qI = strpos($qIcon, '"');
        $qIcon = '<img class="newsImage" src="' . substr($qIcon, 0, $qI) . '" alt="Image" />';
    }
   http://vamshop.ru
   http://vamshop.com

   Copyright (c) 2007 VaM Shop
   --------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(recover_cart_sales.php,v 1.19 2003/02/06); www.oscommerce.com 

   Released under the GNU General Public License 
   --------------------------------------------------------------*/
require 'includes/application_top.php';
require_once DIR_FS_CATALOG . 'includes/external/phpmailer/class.phpmailer.php';
require_once DIR_FS_INC . 'vam_php_mail.inc.php';
// initiate template engine for mail
$vamTemplate = new vamTemplate();
require DIR_WS_CLASSES . 'currencies.php';
$currencies = new currencies();
$custid = $_POST['custid'];
// Delete Entry Begin
if ($_GET['action'] == 'delete') {
    $reset_query_raw = "delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id={$_GET['customer_id']}";
    vam_db_query($reset_query_raw);
    $reset_query_raw2 = "delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id={$_GET['customer_id']}";
    vam_db_query($reset_query_raw2);
    vam_redirect(vam_href_link(FILENAME_RECOVER_CART_SALES, 'delete=1&customer_id=' . $_GET['customer_id'] . '&tdate=' . $_GET['tdate']));
}
if ($_GET['delete']) {
    $messageStack->add(MESSAGE_STACK_CUSTOMER_ID . $_GET['customer_id'] . MESSAGE_STACK_DELETE_SUCCESS, 'success');
}
// Delete Entry End
   http://oscaffiliate.sourceforge.net/

   Contribution based on:

   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2002 - 2003 osCommerce

   Released under the GNU General Public License
   ---------------------------------------------------------------------------*/
require 'includes/application_top.php';
// include needed functions
require_once DIR_FS_INC . 'vam_image_button.inc.php';
// create smarty elements
$vamTemplate = new vamTemplate();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
$breadcrumb->add(NAVBAR_TITLE, vam_href_link(FILENAME_AFFILIATE, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_SIGNUP_OK);
require DIR_WS_INCLUDES . 'header.php';
$vamTemplate->assign('LINK_SUMMARY', '<a class="button" href="' . vam_href_link(FILENAME_AFFILIATE_SUMMARY, '', 'SSL') . '">' . vam_image_button('submit.png', IMAGE_BUTTON_CONTINUE) . '</a>');
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/affiliate_signup_ok.html');
$vamTemplate->assign('main_content', $main_content);
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
if (!defined(RM)) {
    $vamTemplate->load_filter('output', 'note');
}
Exemple #18
0
   VaM Shop - open source ecommerce solution
   http://vamshop.ru
   http://vamshop.com

   Copyright (c) 2007 VaM Shop
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(specials.php,v 1.30 2003/02/10); www.oscommerce.com 
   (c) 2003	 nextcommerce (specials.php,v 1.10 2003/08/17); www.nextcommerce.org
   (c) 2004	 xt:Commerce (featured.php,v 1.10 2003/08/13); xt-commerce.com 

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
$box = new vamTemplate();
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$box_content = '';
// include needed functions
require_once DIR_FS_INC . 'vam_random_select.inc.php';
require_once DIR_FS_INC . 'vam_row_number_format.inc.php';
//fsk18 lock
$fsk_lock = '';
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
    $fsk_lock = ' and p.products_fsk18!=1';
}
if (GROUP_CHECK == 'true') {
    $group_check = " and p.group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 ";
}
$random_product = "select\n                                           p.products_id,\n                                           pd.products_name,\n                                           p.products_price,\n                                           p.products_tax_class_id,\n                                           p.products_image,\n                                           f.expires_date,\n                                           p.products_vpe,\n\t\t\t\t                           p.products_vpe_status,\n\t\t\t\t                           p.products_vpe_value\n                                           from " . TABLE_PRODUCTS . " p,\n                                           " . TABLE_PRODUCTS_DESCRIPTION . " pd,\n                                           " . TABLE_FEATURED . " f where p.products_status = '1'\n                                           and p.products_id = f.products_id\n                                           and pd.products_id = f.products_id\n                                           and pd.language_id = '" . $_SESSION['languages_id'] . "'\n                                           and f.status = '1'\n                                           " . $group_check . "\n                                           " . $fsk_lock . "                                             \n                                           order by rand()\n                                           desc limit 3";
$feat_q = vamDBquery($random_product);
<?php

/*
 * BOX for outputing sliders. Setting in admin-area modules, 
 * slider_caption = slider_category
 */
$box = new vamTemplate();
$box->assign('language', $_SESSION['language']);
$q = "SELECT s.*, sc.categories_id \nFROM slider s\nLEFT JOIN slider_to_categories sc ON sc.slider_id = s.slider_id \nWHERE slider_status = 1 \nAND s.slider_caption = 'slider_category'\nAND sc.categories_id = {$current_category_id}\nORDER BY s.slider_id DESC LIMIT 1;";
$qr = vam_db_query($q);
$rows = array();
$current_slider_id == 'none';
while ($r = vam_db_fetch_array($qr)) {
    $rows[$r['slider_id']] = $r;
    $s1 = $r;
}
require_once DIR_WS_INCLUDES . 'external/slider/Slider.class.inc.php';
$s = new Slider();
$simages = $s->grepIMGfromHTML($s1['slider_config']);
if ($_GET['dbg'] == 1) {
    print_r($simages);
}
// set cache ID
if (!CacheCheck()) {
    $cache = false;
    $box->caching = 0;
} else {
    $cache = true;
    $box->caching = 1;
    $box->cache_lifetime = CACHE_LIFETIME;
    $box->cache_modified_check = CACHE_CHECK;
   http://vamshop.ru
   http://vamshop.com

   Copyright (c) 2007 VaM Shop
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(product_reviews.php,v 1.47 2003/02/13); www.oscommerce.com 
   (c) 2003	 nextcommerce (product_reviews.php,v 1.12 2003/08/17); www.nextcommerce.org
   (c) 2004	 xt:Commerce (product_reviews.php,v 1.12 2003/08/17); xt-commerce.com

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
include 'includes/application_top.php';
// create template elements
$vamTemplate = new vamTemplate();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
// include needed functions
require_once DIR_FS_INC . 'vam_row_number_format.inc.php';
require_once DIR_FS_INC . 'vam_date_short.inc.php';
// lets retrieve all $HTTP_GET_VARS keys and values..
$get_params = vam_get_all_get_params();
$get_params_back = vam_get_all_get_params(array('reviews_id'));
// for back button
$get_params = substr($get_params, 0, -1);
//remove trailing &
if (vam_not_null($get_params_back)) {
    $get_params_back = substr($get_params_back, 0, -1);
    //remove trailing &
} else {
   Copyright (c) 2007 VaM Shop
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce www.oscommerce.com 
   (c) 2003  nextcommerce www.nextcommerce.org
   (c) 2004  xt:Commerce xt-commerce.com

   XTC-NEWSLETTER_RECIPIENTS RC1 - Contribution for XT-Commerce http://www.xt-commerce.com
   by Matthias Hinsche http://www.gamesempire.de

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
require 'includes/application_top.php';
// create template elements
$vamTemplate = new vamTemplate();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
// include needed functions
require_once DIR_FS_INC . 'vam_random_charcode.inc.php';
require_once DIR_FS_INC . 'vam_encrypt_password.inc.php';
require_once DIR_FS_INC . 'vam_validate_password.inc.php';
require_once DIR_FS_INC . 'vam_rand.inc.php';
require_once DIR_FS_INC . 'vam_render_vvcode.inc.php';
$case = double_opt;
$info_message = TEXT_PASSWORD_FORGOTTEN;
if (isset($_GET['action']) && $_GET['action'] == 'first_opt_in') {
    $check_customer_query = vam_db_query("select customers_email_address, customers_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . vam_db_input($_POST['email']) . "'");
    $check_customer = vam_db_fetch_array($check_customer_query);
    $vlcode = vam_random_charcode(32);
    $link = vam_href_link(FILENAME_PASSWORD_DOUBLE_OPT, 'action=verified&customers_id=' . $check_customer['customers_id'] . '&key=' . $vlcode, 'NONSSL');
   based on:
   (c) 2003 OSC-Affiliate (affiliate_logout.php, v 1.3 2003/02/17);
   http://oscaffiliate.sourceforge.net/

   Contribution based on:

   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2002 - 2003 osCommerce

   Released under the GNU General Public License
   ---------------------------------------------------------------------------*/
require 'includes/application_top.php';
// create smarty elements
$vamTemplate = new vamTemplate();
// include needed functions
require_once DIR_FS_INC . 'vam_image_button.inc.php';
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
$breadcrumb->add(NAVBAR_TITLE, vam_href_link(FILENAME_AFFILIATE, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_LOGOUT);
require DIR_WS_INCLUDES . 'header.php';
$old_user = $_SESSION['affiliate_id'];
// store  to test if they *were* logged in
unset($_SESSION['affiliate_id']);
if (isset($_SESSION['affiliate_id'])) {
    $result = 0;
} else {
    $result = 1;
}
   Copyright (c) 2003 netz-designer
   -----------------------------------------------------------------------------
   based on:
   (c) 2003 OSC-Affiliate (affiliate.php, v 1.6 2003/02/22);
   http://oscaffiliate.sourceforge.net/

   Contribution based on:

   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2002 - 2003 osCommerce

   Released under the GNU General Public License
   ---------------------------------------------------------------------------*/
$box = new vamTemplate();
$box_content = '';
$box->assign('tpl_path', DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/');
if (isset($_SESSION['affiliate_id'])) {
    $box_content .= '<li><a href="' . vam_href_link(FILENAME_AFFILIATE_SUMMARY, '', 'SSL') . '">' . BOX_AFFILIATE_SUMMARY . '</a></li>';
    $box_content .= '<li><a href="' . vam_href_link(FILENAME_AFFILIATE_ACCOUNT, '', 'SSL') . '">' . BOX_AFFILIATE_ACCOUNT . '</a></li>';
    $box_content .= '<li><a href="' . vam_href_link(FILENAME_AFFILIATE_PAYMENT, '', 'SSL') . '">' . BOX_AFFILIATE_PAYMENT . '</a></li>';
    $box_content .= '<li><a href="' . vam_href_link(FILENAME_AFFILIATE_CLICKS, '', 'SSL') . '">' . BOX_AFFILIATE_CLICKRATE . '</a></li>';
    $box_content .= '<li><a href="' . vam_href_link(FILENAME_AFFILIATE_SALES, '', 'SSL') . '">' . BOX_AFFILIATE_SALES . '</a></li>';
    $box_content .= '<li><a href="' . vam_href_link(FILENAME_AFFILIATE_BANNERS) . '">' . BOX_AFFILIATE_BANNERS . '</a></li>';
    $box_content .= '<li><a href="' . vam_href_link(FILENAME_AFFILIATE_CONTACT) . '">' . BOX_AFFILIATE_CONTACT . '</a></li>';
    $box_content .= '<li><a href="' . vam_href_link(FILENAME_CONTENT, 'coID=11') . '">' . BOX_AFFILIATE_FAQ . '</a></li>';
    $box_content .= '<li><a href="' . vam_href_link(FILENAME_AFFILIATE_LOGOUT) . '">' . BOX_AFFILIATE_LOGOUT . '</a></li>';
} else {
    $box_content .= '<li><a href="' . vam_href_link(FILENAME_CONTENT, 'coID=10') . '">' . BOX_AFFILIATE_INFO . '</a></li>';
    $box_content .= '<li><a href="' . vam_href_link(FILENAME_AFFILIATE, '', 'SSL') . '">' . BOX_AFFILIATE_LOGIN . '</a></li>';
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(best_sellers.php,v 1.20 2003/02/10); www.oscommerce.com 
   (c) 2003	 nextcommerce (best_sellers.php,v 1.10 2003/08/17); www.nextcommerce.org
   (c) 2004	 xt:Commerce (best_sellers.php,v 1.10 2003/08/13); xt-commerce.com 

   Released under the GNU General Public License 
   -----------------------------------------------------------------------------------------
   Third Party contributions:
   Enable_Disable_Categories 1.3        	Autor: Mikel Williams | mikel@ladykatcostumes.com

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
// reset var
$box = new vamTemplate();
$box_content = '';
// set cache ID
if (!CacheCheck()) {
    $cache = false;
    $box->caching = 0;
} else {
    $cache = true;
    $box->caching = 1;
    $box->cache_lifetime = CACHE_LIFETIME;
    $box->cache_modified_check = CACHE_CHECK;
    $cache_id = $_SESSION['language'] . $current_category_id . '3333';
}
//if (!$box->is_cached(CURRENT_TEMPLATE.'/boxes/box_best_sellers.html', $cache_id) || !$cache) {
// include needed functions
require_once DIR_FS_INC . 'vam_row_number_format.inc.php';
   VaM Shop - open source ecommerce solution
   http://vamshop.ru
   http://vamshop.com

   Copyright (c) 2007 VaM Shop
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(specials.php,v 1.47 2003/05/27); www.oscommerce.com 
   (c) 2003	 nextcommerce (specials.php,v 1.12 2003/08/17); www.nextcommerce.org
   (c) 2004	 xt:Commerce (specials.php,v 1.12 2003/08/17); xt-commerce.com

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
include 'includes/application_top.php';
$vamTemplate = new vamTemplate();
// include boxes
require DIR_FS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/source/boxes.php';
require_once DIR_FS_INC . 'vam_get_short_description.inc.php';
$breadcrumb->add(NAVBAR_TITLE_FEATURED, vam_href_link(FILENAME_FEATURED));
require DIR_WS_INCLUDES . 'header.php';
//fsk18 lock
$fsk_lock = '';
if ($_SESSION['customers_status']['customers_fsk18_display'] == '0') {
    $fsk_lock = ' and p.products_fsk18!=1';
}
if (GROUP_CHECK == 'true') {
    $group_check = " and p.group_permission_" . $_SESSION['customers_status']['customers_status_id'] . "=1 ";
}
/* on page */
if (isset($_GET['on_page']) && is_numeric($_GET['on_page'])) {
<?php

if (isset($_SESSION['customer_id'])) {
    $_SESSION['nologin'] = false;
} else {
    $_SESSION['nologin'] = true;
}
// create template elements
$vamTemplate = new vamTemplate();
// include needed functions
require_once DIR_FS_INC . 'vam_array_to_string.inc.php';
require_once DIR_FS_INC . 'vam_image_submit.inc.php';
require_once DIR_FS_INC . 'vam_recalculate_price.inc.php';
require_once DIR_FS_INC . 'get_cross_sell_name.inc.php';
$breadcrumb->add(NAVBAR_TITLE_SHOPPING_CART, vam_href_link(FILENAME_SHOPPING_CART));
if ($_SESSION['cart']->count_contents() > 0) {
    if ($_SESSION['error_cart_msg'] != 0) {
        $vamTemplate->assign('info_message', $_SESSION['error_cart_msg']);
    }
    $vamTemplate->assign('FORM_ACTION', vam_draw_form('cart_quantity', vam_href_link(FILENAME_SHOPPING_CART, 'action=update_product')));
    $vamTemplate->assign('FORM_END', '</form>');
    $hidden_options = '';
    $_SESSION['any_out_of_stock'] = 0;
    $products = $_SESSION['cart']->get_products();
    $vamTemplate->assign('PRODUCTS_COUNT', sizeof($products));
    for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
        // Push all attributes information in an array
        if (isset($products[$i]['attributes'])) {
            while (list($option, $value) = each($products[$i]['attributes'])) {
                //$hidden_options .= vam_draw_hidden_field('id['.$products[$i]['id'].']['.$option.']', $value);
                $attributes = vam_db_query("select popt.products_options_name, popt.products_options_type, poval.products_options_values_name, pa.options_values_price, pa.price_prefix,pa.attributes_stock,pa.products_attributes_id,pa.attributes_model\n\t\t\t\t                                      from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa\n\t\t\t\t                                      where pa.products_id = '" . $products[$i]['id'] . "'\n\t\t\t\t                                       and pa.options_id = '" . $option . "'\n\t\t\t\t                                       and pa.options_id = popt.products_options_id\n\t\t\t\t                                       and pa.options_values_id = '" . $value . "'\n\t\t\t\t                                       and pa.options_values_id = poval.products_options_values_id\n\t\t\t\t                                       and popt.language_id = '" . (int) $_SESSION['languages_id'] . "'\n\t\t\t\t                                       and poval.language_id = '" . (int) $_SESSION['languages_id'] . "'");
Exemple #27
0
                if ($s0 > 0) {
                    $retval .= " " . $this->diw[0][$s0][0];
                    $nom = $this->diw[0][$s0][1];
                }
            }
        }
        if ($nom >= 0) {
            $retval .= " " . $this->nom[$nominal][$nom];
            if ($nominal == 1) {
                $this->out_rub = 1;
            }
        }
        return trim($retval);
    }
}
$vamTemplate = new vamTemplate();
// check if custmer is allowed to see this order!
$order_query_check = vam_db_query("SELECT\n  \t\t\t\t\tcustomers_id\n  \t\t\t\t\tFROM " . TABLE_ORDERS . "\n  \t\t\t\t\tWHERE orders_id='" . (int) $_GET['oID'] . "'");
$oID = (int) $_GET['oID'];
$order_check = vam_db_fetch_array($order_query_check);
$company_query = vam_db_query("SELECT * FROM " . TABLE_COMPANIES . "\n  \t\t\t\t\tWHERE orders_id='" . (int) $_GET['oID'] . "'");
$company = vam_db_fetch_array($company_query);
$vamTemplate->assign('company_name', $company['name']);
$vamTemplate->assign('company_telephone', $company['telephone']);
$vamTemplate->assign('company_fax', $company['fax']);
$vamTemplate->assign('company_inn', $company['inn']);
$vamTemplate->assign('company_kpp', $company['kpp']);
$vamTemplate->assign('company_ogrn', $company['ogrn']);
$vamTemplate->assign('company_okpo', $company['okpo']);
$vamTemplate->assign('company_rs', $company['rs']);
$vamTemplate->assign('company_bank_name', $company['bank_name']);
 function before_process()
 {
     global $customer_id, $order, $vamPrice, $order_totals, $sendto, $billto, $languages_id, $payment, $currencies, $cart;
     global ${$payment};
     $order_id = substr($_SESSION['cart_yandex_id'], strpos($_SESSION['cart_yandex_id'], '-') + 1);
     // initialized for the email confirmation
     $products_ordered = '';
     $subtotal = 0;
     $total_tax = 0;
     for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
         // Stock Update - Joao Correia
         if (STOCK_LIMITED == 'true') {
             if (DOWNLOAD_ENABLED == 'true') {
                 $stock_query_raw = "SELECT products_quantity, pad.products_attributes_filename, pad.products_attributes_is_pin \n                                FROM " . TABLE_PRODUCTS . " p\n                                LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES . " pa\n                                ON p.products_id=pa.products_id\n                                LEFT JOIN " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad\n                                ON pa.products_attributes_id=pad.products_attributes_id\n                                WHERE p.products_id = '" . vam_get_prid($order->products[$i]['id']) . "'";
                 // Will work with only one option for downloadable products
                 // otherwise, we have to build the query dynamically with a loop
                 $products_attributes = $order->products[$i]['attributes'];
                 if (is_array($products_attributes)) {
                     $stock_query_raw .= " AND pa.options_id = '" . $products_attributes[0]['option_id'] . "' AND pa.options_values_id = '" . $products_attributes[0]['value_id'] . "'";
                 }
                 $stock_query = vam_db_query($stock_query_raw);
             } else {
                 $stock_query = vam_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . vam_get_prid($order->products[$i]['id']) . "'");
             }
             if (vam_db_num_rows($stock_query) > 0) {
                 $stock_values = vam_db_fetch_array($stock_query);
                 // do not decrement quantities if products_attributes_filename exists
                 if (DOWNLOAD_ENABLED != 'true' || !$stock_values['products_attributes_filename'] || $stock_values['products_attributes_is_pin'] == 1) {
                     $stock_left = $stock_values['products_quantity'] - $order->products[$i]['qty'];
                 } else {
                     $stock_left = $stock_values['products_quantity'];
                 }
                 vam_db_query("update " . TABLE_PRODUCTS . " set products_quantity = '" . $stock_left . "' where products_id = '" . vam_get_prid($order->products[$i]['id']) . "'");
                 if ($stock_left < 1 && STOCK_ALLOW_CHECKOUT == 'false') {
                     vam_db_query("update " . TABLE_PRODUCTS . " set products_status = '0' where products_id = '" . vam_get_prid($order->products[$i]['id']) . "'");
                 }
             }
         }
         // Update products_ordered (for bestsellers list)
         vam_db_query("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $order->products[$i]['qty']) . " where products_id = '" . vam_get_prid($order->products[$i]['id']) . "'");
         //------insert customer choosen option to order--------
         $attributes_exist = '0';
         $products_ordered_attributes = '';
         if (isset($order->products[$i]['attributes'])) {
             $attributes_exist = '1';
             for ($j = 0, $n2 = sizeof($order->products[$i]['attributes']); $j < $n2; $j++) {
                 if (DOWNLOAD_ENABLED == 'true') {
                     $attributes_query = "select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix, pad.products_attributes_maxdays, pad.products_attributes_maxcount , pad.products_attributes_filename, pad.products_attributes_is_pin\n                                   from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa\n                                   left join " . TABLE_PRODUCTS_ATTRIBUTES_DOWNLOAD . " pad\n                                   on pa.products_attributes_id=pad.products_attributes_id\n                                   where pa.products_id = '" . $order->products[$i]['id'] . "'\n                                   and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "'\n                                   and pa.options_id = popt.products_options_id\n                                   and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "'\n                                   and pa.options_values_id = poval.products_options_values_id\n                                   and popt.language_id = '" . $_SESSION['languages_id'] . "'\n                                   and poval.language_id = '" . $_SESSION['languages_id'] . "'";
                     $attributes = vam_db_query($attributes_query);
                 } else {
                     $attributes = vam_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa where pa.products_id = '" . $order->products[$i]['id'] . "' and pa.options_id = '" . $order->products[$i]['attributes'][$j]['option_id'] . "' and pa.options_id = popt.products_options_id and pa.options_values_id = '" . $order->products[$i]['attributes'][$j]['value_id'] . "' and pa.options_values_id = poval.products_options_values_id and popt.language_id = '" . $_SESSION['languages_id'] . "' and poval.language_id = '" . $_SESSION['languages_id'] . "'");
                 }
                 $attributes_values = vam_db_fetch_array($attributes);
                 $products_ordered_attributes .= "\n\t" . $attributes_values['products_options_name'] . ' ' . $attributes_values['products_options_values_name'];
             }
         }
         //------insert customer choosen option eof ----
         $total_weight += $order->products[$i]['qty'] * $order->products[$i]['weight'];
         $total_tax += vam_calculate_tax($total_products_price, $products_tax) * $order->products[$i]['qty'];
         $total_cost += $total_products_price;
         $products_ordered .= $order->products[$i]['qty'] . ' x ' . $order->products[$i]['name'] . ' (' . $order->products[$i]['model'] . ') = ' . $vamPrice->Format($order->products[$i]['final_price'], true) . $products_ordered_attributes . "\n";
     }
     // initialize templates
     $vamTemplate = new vamTemplate();
     $vamTemplate->assign('address_label_customer', vam_address_format($order->customer['format_id'], $order->customer, 1, '', '<br />'));
     $vamTemplate->assign('address_label_shipping', vam_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br />'));
     if ($_SESSION['credit_covers'] != '1') {
         $vamTemplate->assign('address_label_payment', vam_address_format($order->billing['format_id'], $order->billing, 1, '', '<br />'));
     }
     $vamTemplate->assign('csID', $order->customer['csID']);
     $it = 0;
     $semextrfields = vamDBquery("select * from " . TABLE_EXTRA_FIELDS . " where fields_required_email = '1'");
     while ($dataexfes = vam_db_fetch_array($semextrfields, true)) {
         $cusextrfields = vamDBquery("select * from " . TABLE_CUSTOMERS_TO_EXTRA_FIELDS . " where customers_id = '" . (int) $_SESSION['customer_id'] . "' and fields_id = '" . $dataexfes['fields_id'] . "'");
         $rescusextrfields = vam_db_fetch_array($cusextrfields, true);
         $extrfieldsinf = vamDBquery("select fields_name from " . TABLE_EXTRA_FIELDS_INFO . " where fields_id = '" . $dataexfes['fields_id'] . "' and languages_id = '" . $_SESSION['languages_id'] . "'");
         $extrfieldsres = vam_db_fetch_array($extrfieldsinf, true);
         $extra_fields .= $extrfieldsres['fields_name'] . ' : ' . $rescusextrfields['value'] . "\n";
         $vamTemplate->assign('customer_extra_fields', $extra_fields);
     }
     $order_total = $order->getTotalData($order_id);
     $vamTemplate->assign('order_data', $order->getOrderData($order_id));
     $vamTemplate->assign('order_total', $order_total['data']);
     // assign language to template for caching
     $vamTemplate->assign('language', $_SESSION['language']);
     $vamTemplate->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
     $vamTemplate->assign('logo_path', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/img/');
     $vamTemplate->assign('oID', $order_id);
     if ($order->info['payment_method'] != '' && $order->info['payment_method'] != 'no_payment') {
         include DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/' . $order->info['payment_method'] . '.php';
         $payment_method = constant(strtoupper('MODULE_PAYMENT_' . $order->info['payment_method'] . '_TEXT_TITLE'));
     }
     $vamTemplate->assign('PAYMENT_METHOD', $payment_method);
     if ($order->info['shipping_method'] != '') {
         $shipping_method = $order->info['shipping_method'];
     }
     $vamTemplate->assign('SHIPPING_METHOD', $shipping_method);
     $vamTemplate->assign('DATE', vam_date_long($order->info['date_purchased']));
     $vamTemplate->assign('NAME', $order->customer['firstname'] . ' ' . $order->customer['lastname']);
     $vamTemplate->assign('COMMENTS', $order->info['comments']);
     $vamTemplate->assign('EMAIL', $order->customer['email_address']);
     $vamTemplate->assign('PHONE', $order->customer['telephone']);
     // dont allow cache
     $vamTemplate->caching = false;
     $html_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/order_mail.html');
     $txt_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/order_mail.txt');
     // create subject
     $order_subject = str_replace('{$nr}', $order_id, EMAIL_BILLING_SUBJECT_ORDER);
     $order_subject = str_replace('{$date}', strftime(DATE_FORMAT_LONG), $order_subject);
     $order_subject = str_replace('{$lastname}', $order->customer['lastname'], $order_subject);
     $order_subject = str_replace('{$firstname}', $order->customer['firstname'], $order_subject);
     // send mail to admin
     vam_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, EMAIL_BILLING_ADDRESS, STORE_NAME, EMAIL_BILLING_FORWARDING_STRING, $order->customer['email_address'], $order->customer['firstname'], '', '', $order_subject, $html_mail, $txt_mail);
     // send mail to customer
     vam_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $order->customer['email_address'], $order->customer['firstname'] . ' ' . $order->customer['lastname'], '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, '', '', $order_subject, $html_mail, $txt_mail);
     // load the after_process function from the payment modules
     $this->after_process();
     require_once DIR_WS_INCLUDES . 'affiliate_checkout_process.php';
     $_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']);
     unset($_SESSION['cart_yandex_id']);
     vam_redirect(vam_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));
 }
<?php

/*------------------------------------------------------------------------------
   $Id: affiliate_help4.php,v 1.1 2003/12/21 20:13:07 hubi74 Exp $

   XTC-Affiliate - Contribution for XT-Commerce http://www.xt-commerce.com
   modified by http://www.netz-designer.de

   Copyright (c) 2003 netz-designer
   -----------------------------------------------------------------------------
   based on:
   (c) 2003 OSC-Affiliate (affiliate_help4.php, v 1.4 2003/02/17);
   http://oscaffiliate.sourceforge.net/

   Contribution based on:

   osCommerce, Open Source E-Commerce Solutions
   http://www.oscommerce.com

   Copyright (c) 2002 - 2003 osCommerce

   Released under the GNU General Public License
   ---------------------------------------------------------------------------*/
require 'includes/application_top.php';
// create smarty elements
$vamTemplate = new vamTemplate();
$vamTemplate->assign(array('HTML_PARAMS' => HTML_PARAMS, 'HREF' => ($request_type == 'SSL' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG, 'TITLE' => TITLE));
$vamTemplate->assign('help_file', 'help4');
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
$vamTemplate->display(CURRENT_TEMPLATE . '/module/affiliate_help.html');
   VaM Shop - open source ecommerce solution
   http://vamshop.ru
   http://vamshop.com

   Copyright (c) 2007 VaM Shop
   -----------------------------------------------------------------------------------------
   based on: 
   (c) 2000-2001 The Exchange Project  (earlier name of osCommerce)
   (c) 2002-2003 osCommerce(address_book_details.php,v 1.9 2003/05/22); www.oscommerce.com 
   (c) 2003	 nextcommerce (address_book_details.php,v 1.9 2003/08/13); www.nextcommerce.org
   (c) 2004	 xt:Commerce (address_book_details.php,v 1.9 2003/08/13); xt-commerce.com

   Released under the GNU General Public License 
   ---------------------------------------------------------------------------------------*/
// include needed functions
$module = new vamTemplate();
$module->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
include_once DIR_FS_INC . 'vam_get_zone_name.inc.php';
include_once DIR_FS_INC . 'vam_get_country_list.inc.php';
if (!isset($process)) {
    $process = false;
}
if (ACCOUNT_GENDER == 'true') {
    $male = $entry['entry_gender'] == 'm' ? true : false;
    $female = $entry['entry_gender'] == 'f' ? true : false;
    $module->assign('gender', '1');
    $module->assign('INPUT_MALE', vam_draw_radio_field(array('name' => 'gender', 'suffix' => MALE . '&nbsp;'), 'm', $male, 'id="gender" checked="checked"'));
    $module->assign('INPUT_FEMALE', vam_draw_radio_field(array('name' => 'gender', 'suffix' => FEMALE . '&nbsp;', 'text' => vam_not_null(ENTRY_GENDER_TEXT) ? '<span class="Requirement">&nbsp;' . ENTRY_GENDER_TEXT . '</span>' : ''), 'f', $female, 'id="gender"'));
}
$module->assign('INPUT_FIRSTNAME', vam_draw_input_fieldNote(array('name' => 'firstname', 'text' => '&nbsp;' . (vam_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="Requirement">' . ENTRY_FIRST_NAME_TEXT . '</span>' : '')), $entry['entry_firstname'], 'id="firstname"'));
if (ACCOUNT_SECOND_NAME == 'true') {