本文整理汇总了PHP中vamTemplate::assign方法的典型用法代码示例。如果您正苦于以下问题:PHP vamTemplate::assign方法的具体用法?PHP vamTemplate::assign怎么用?PHP vamTemplate::assign使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vamTemplate
的用法示例。
在下文中一共展示了vamTemplate::assign方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: updateBill
function updateBill($login, $password, $txn, $status)
{
//обработка возможных ошибок авторизации
if ($login != MODULE_PAYMENT_QIWI_ID) {
return 150;
}
if (!empty($password) && $password != strtoupper(md5($txn . strtoupper(md5(MODULE_PAYMENT_QIWI_SECRET_KEY))))) {
return 150;
}
// получаем номер заказа
$transaction = intval($txn);
// проверяем, есть ли такой заказ в базе
$order_query = vam_db_query("select count(*) as total from " . TABLE_ORDERS . " where orders_id = '" . (int) $transaction . "'");
$order_exists = vam_db_fetch_array($order_query);
if ($order_exists['total'] <= 0) {
return 210;
}
// меняем статус заказа при условии оплаты счёта
if ($status == 60) {
$sql_data_array = array('orders_status' => MODULE_PAYMENT_QIWI_ORDER_STATUS_ID);
vam_db_perform('orders', $sql_data_array, 'update', "orders_id='" . $transaction . "'");
$sql_data_arrax = array('orders_id' => $transaction, 'orders_status_id' => MODULE_PAYMENT_QIWI_ORDER_STATUS_ID, 'date_added' => 'now()', 'customer_notified' => '0', 'comments' => 'QIWI accepted this order payment');
vam_db_perform('orders_status_history', $sql_data_arrax);
// Отправляем письмо клиенту и админу о смене статуса заказа
require_once DIR_WS_CLASSES . 'order.php';
$order = new order($transaction);
$vamTemplate = new vamTemplate();
// assign language to template for caching
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = false;
$vamTemplate->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$vamTemplate->assign('logo_path', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/img/');
$vamTemplate->assign('NAME', $order->customer['firstname'] . ' ' . $order->customer['lastname']);
$vamTemplate->assign('ORDER_NR', $transaction);
$vamTemplate->assign('ORDER_LINK', vam_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'order_id=' . $transaction, 'SSL'));
$vamTemplate->assign('ORDER_DATE', vam_date_long($order->info['date_purchased']));
$lang_query = vam_db_query("select languages_id from " . TABLE_LANGUAGES . " where directory = '" . $_SESSION['language'] . "'");
$lang = vam_db_fetch_array($lang_query);
$lang = $lang['languages_id'];
if (!isset($lang)) {
$lang = $_SESSION['languages_id'];
}
$orders_status_array = array();
$orders_status_query = vam_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where language_id = '" . $lang . "'");
while ($orders_status = vam_db_fetch_array($orders_status_query)) {
$orders_statuses[] = array('id' => $orders_status['orders_status_id'], 'text' => $orders_status['orders_status_name']);
$orders_status_array[$orders_status['orders_status_id']] = $orders_status['orders_status_name'];
}
$vamTemplate->assign('ORDER_STATUS', $orders_status_array[MODULE_PAYMENT_QIWI_ORDER_STATUS_ID]);
$html_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/admin/mail/' . $_SESSION['language'] . '/change_order_mail.html');
$txt_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/admin/mail/' . $_SESSION['language'] . '/change_order_mail.txt');
include_once DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/payment/qiwi.php';
// create subject
$order_subject = str_replace('{$nr}', $transaction, MODULE_PAYMENT_QIWI_EMAIL_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);
}
}
示例2: while
$history_query = vam_db_query($history_split->sql_query);
while ($history = vam_db_fetch_array($history_query)) {
$products_query = vam_db_query("select count(*) as count from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . $history['orders_id'] . "'");
$products = vam_db_fetch_array($products_query);
if (vam_not_null($history['delivery_name'])) {
$order_type = TEXT_ORDER_SHIPPED_TO;
$order_name = $history['delivery_name'];
} else {
$order_type = TEXT_ORDER_BILLED_TO;
$order_name = $history['billing_name'];
}
$module_content[] = array('ORDER_ID' => $history['orders_id'], 'ORDER_STATUS' => $history['orders_status_name'], 'ORDER_DATE' => vam_date_long($history['date_purchased']), 'ORDER_PRODUCTS' => $products['count'], 'ORDER_TOTAL' => strip_tags($history['order_total']), 'ORDER_BUTTON' => '<a class="button" href="' . vam_href_link(FILENAME_ACCOUNT_HISTORY_INFO, 'page=' . (empty($_GET['page']) ? "1" : (int) $_GET['page']) . '&order_id=' . $history['orders_id'], 'SSL') . '">' . vam_image_button('view.png', SMALL_IMAGE_BUTTON_VIEW) . '</a>');
}
}
if ($orders_total > 0) {
$vamTemplate->assign('SPLIT_BAR', TEXT_RESULT_PAGE . ' ' . $history_split->display_links(MAX_DISPLAY_PAGE_LINKS, vam_get_all_get_params(array('page', 'info', 'x', 'y'))));
$vamTemplate->assign('SPLIT_BAR_PAGES', $history_split->display_count(TEXT_DISPLAY_NUMBER_OF_ORDERS));
}
$vamTemplate->assign('order_content', $module_content);
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->assign('BUTTON_BACK', '<a class="button" href="' . vam_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>');
$vamTemplate->caching = 0;
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/account_history.html');
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->assign('main_content', $main_content);
$vamTemplate->caching = 0;
if (!defined(RM)) {
$vamTemplate->load_filter('output', 'note');
}
$template = file_exists('templates/' . CURRENT_TEMPLATE . '/' . FILENAME_ACCOUNT_HISTORY . '.html') ? CURRENT_TEMPLATE . '/' . FILENAME_ACCOUNT_HISTORY . '.html' : CURRENT_TEMPLATE . '/index.html';
$vamTemplate->display($template);
示例3: stripslashes
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');
示例4: Copyright
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');
} else {
示例5: Project
-----------------------------------------------------------------------------------------
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'];
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/cookie_usage.html', $cache_id);
}
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->assign('main_content', $main_content);
$vamTemplate->caching = 0;
示例6: substr
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);
$breadcrumb->add(NAVBAR_TITLE_PRODUCT_REVIEWS, vam_href_link(FILENAME_PRODUCT_REVIEWS, $get_params));
vam_db_query("update " . TABLE_REVIEWS . " set reviews_read = reviews_read+1 where reviews_id = '" . $reviews['reviews_id'] . "'");
$reviews_text = vam_break_string(htmlspecialchars($reviews['reviews_text']), 60, '-<br />');
require DIR_WS_INCLUDES . 'header.php';
$vamTemplate->assign('PRODUCTS_NAME', $reviews['products_name']);
$vamTemplate->assign('AUTHOR', $reviews['customers_name']);
$vamTemplate->assign('DATE', vam_date_long($reviews['date_added']));
$vamTemplate->assign('REVIEWS_TEXT', nl2br($reviews_text));
$vamTemplate->assign('RATING', vam_image('templates/' . CURRENT_TEMPLATE . '/img/stars_' . $reviews['reviews_rating'] . '.gif', sprintf(TEXT_OF_5_STARS, $reviews['reviews_rating'])));
$vamTemplate->assign('PRODUCTS_LINK', vam_href_link(FILENAME_PRODUCT_INFO, vam_product_link($reviews['products_id'], $reviews['products_name'])));
$vamTemplate->assign('BUTTON_BACK', '<a class="button" href="' . vam_href_link(FILENAME_PRODUCT_REVIEWS, $get_params) . '">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>');
$vamTemplate->assign('BUTTON_BUY_NOW', '<a class="button" href="' . vam_href_link(FILENAME_DEFAULT, 'action=buy_now&BUYproducts_id=' . $reviews['products_id']) . '">' . vam_image_button('buy.png', IMAGE_BUTTON_IN_CART) . '</a>');
$products_image = DIR_WS_THUMBNAIL_IMAGES . $reviews['products_image'];
if (!is_file($products_image)) {
$products_image = DIR_WS_THUMBNAIL_IMAGES . '../noimage.gif';
}
$image = vam_image($products_image, $reviews['products_name'], '', '', 'hspace="5" vspace="5"');
$vamTemplate->assign('IMAGE', $image);
$vamTemplate->assign('language', $_SESSION['language']);
// set cache ID
示例7: Copyright
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;
while ($expected = vam_db_fetch_array($expected_query, true)) {
示例8: trim
}
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']);
$vamTemplate->assign('company_address', $company['address']);
$vamTemplate->assign('company_yur_address', $company['yur_address']);
$vamTemplate->assign('company_fakt_address', $company['fakt_address']);
$vamTemplate->assign('company_director', $company['name']);
$vamTemplate->assign('company_accountant', $company['accountant']);
示例9: MONTH
}
if (is_numeric($_GET['a_level'])) {
$a_level = vam_db_prepare_input($_GET['a_level']);
$level_clause = " AND a.affiliate_level = '" . $a_level . "'";
}
$affiliate_sales_raw = "select a.affiliate_payment, a.affiliate_date, a.affiliate_value, a.affiliate_percent,\n a.affiliate_payment, a.affiliate_level AS level,\n o.orders_status as orders_status_id, os.orders_status_name as orders_status, \n MONTH(aa.affiliate_date_account_created) as start_month, YEAR(aa.affiliate_date_account_created) as start_year\n from " . TABLE_AFFILIATE . " aa\n left join " . TABLE_AFFILIATE_SALES . " a on (aa.affiliate_id = a.affiliate_id )\n left join " . TABLE_ORDERS . " o on (a.affiliate_orders_id = o.orders_id) \n left join " . TABLE_ORDERS_STATUS . " os on (o.orders_status = os.orders_status_id and language_id = '" . $_SESSION['languages_id'] . "')\n where a.affiliate_id = '" . $_SESSION['affiliate_id'] . "' " . $period_clause . $status_clause . $level_clause . " \n group by aa.affiliate_date_account_created, o.orders_status, os.orders_status_name, \n a.affiliate_payment, a.affiliate_date, a.affiliate_value, a.affiliate_percent, \n o.orders_status, os.orders_status_name\n order by affiliate_date DESC";
$count_key = 'aa.affiliate_date_account_created, o.orders_status, os.orders_status_name, a.affiliate_payment, a.affiliate_date, a.affiliate_value, a.affiliate_percent, o.orders_status, os.orders_status_name';
$affiliate_sales_split = new splitPageResults($affiliate_sales_raw, $_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $count_key);
if ($affiliate_sales_split->number_of_rows > 0) {
$affiliate_sales_values = vam_db_query($affiliate_sales_split->sql_query);
$affiliate_sales = vam_db_fetch_array($affiliate_sales_values);
} else {
$affiliate_sales_values = vam_db_query("select MONTH(affiliate_date_account_created) as start_month,\n YEAR(affiliate_date_account_created) as start_year\n FROM " . TABLE_AFFILIATE . " WHERE affiliate_id = '" . $_SESSION['affiliate_id'] . "'");
$affiliate_sales = vam_db_fetch_array($affiliate_sales_values);
}
$vamTemplate->assign('period_selector', affiliate_period('a_period', $affiliate_sales['start_year'], $affiliate_sales['start_month'], true, vam_db_prepare_input($_GET['a_period']), 'onchange="this.form.submit();"'));
$vamTemplate->assign('status_selector', affiliate_get_status_list('a_status', vam_db_prepare_input($_GET['a_status']), 'onchange="this.form.submit();"'));
$vamTemplate->assign('level_selector', affiliate_get_level_list('a_level', vam_db_prepare_input($_GET['a_level']), 'onchange="this.form.submit();"'));
require DIR_WS_INCLUDES . 'header.php';
$vamTemplate->assign('affiliate_sales_split_numbers', $affiliate_sales_split->number_of_rows);
$vamTemplate->assign('FORM_ACTION', vam_draw_form('params', vam_href_link(FILENAME_AFFILIATE_SALES), 'get'));
$affiliate_sales_table = '';
if ($affiliate_sales_split->number_of_rows > 0) {
$number_of_sales = 0;
$sum_of_earnings = 0;
do {
$number_of_sales++;
if ($affiliate_sales['orders_status_id'] >= AFFILIATE_PAYMENT_ORDER_MIN_STATUS) {
$sum_of_earnings += $affiliate_sales['affiliate_payment'];
}
if ($number_of_sales / 2 == floor($number_of_sales / 2)) {
示例10: foreach
$comments = vam_db_prepare_input($_POST['comments']);
if ($status == '') {
// New status not selected
vam_redirect(vam_href_link(FILENAME_ORDERS), vam_get_all_get_params());
}
foreach ($_POST['multi_orders'] as $this_orderID) {
$order_updated = false;
$check_status_query = vam_db_query("select customers_name, customers_email_address, orders_status, date_purchased from " . TABLE_ORDERS . " where orders_id = '" . (int) $this_orderID . "'");
$check_status = vam_db_fetch_array($check_status_query);
if ($check_status['orders_status'] != $status) {
vam_db_query("update " . TABLE_ORDERS . " set orders_status = '" . vam_db_input($status) . "', last_modified = now() where orders_id = '" . (int) $this_orderID . "'");
$customer_notified = '0';
if (isset($_POST['notify'])) {
$notify_comments = '';
// assign language to template for caching
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = false;
$vamTemplate->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
$vamTemplate->assign('logo_path', HTTP_SERVER . DIR_WS_CATALOG . 'templates/' . CURRENT_TEMPLATE . '/img/');
$vamTemplate->assign('NAME', $check_status['customers_name']);
$vamTemplate->assign('ORDER_NR', $this_orderID);
$vamTemplate->assign('ORDER_LINK', vam_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $_POST['multi_orders'], 'SSL'));
$vamTemplate->assign('ORDER_DATE', vam_date_long($check_status['date_purchased']));
$vamTemplate->assign('ORDER_STATUS', $orders_status_array[$status]);
$html_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/admin/mail/' . $_SESSION['language'] . '/change_order_mail.html');
$txt_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/admin/mail/' . $_SESSION['language'] . '/change_order_mail.txt');
// create subject
$billing_subject = str_replace('{$nr}', $this_orderID, EMAIL_BILLING_SUBJECT);
vam_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $check_status['customers_email_address'], $check_status['customers_name'], '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, '', '', $billing_subject, $html_mail, $txt_mail);
$customer_notified = '1';
}
示例11: Copyright
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));
$box->assign('language', $_SESSION['language']);
示例12: where
$topic_depth = 'articles';
// topic has no articles, but display the 'no articles' message
}
}
}
if ($topic_depth == 'top' && !isset($_GET['authors_id'])) {
$breadcrumb->add(NAVBAR_TITLE_DEFAULT, vam_href_link(FILENAME_ARTICLES));
}
$topic_query = vam_db_query("select td.topics_name, td.topics_heading_title, td.topics_description from " . TABLE_TOPICS . " t, " . TABLE_TOPICS_DESCRIPTION . " td where t.topics_id = '" . (int) $current_topic_id . "' and td.topics_id = '" . (int) $current_topic_id . "' and td.language_id = '" . (int) $_SESSION['languages_id'] . "'");
$topic = vam_db_fetch_array($topic_query);
if (vam_not_null($topic['topics_name'])) {
$topic_name = $topic['topics_name'];
} else {
$topic_name = NAVBAR_TITLE_DEFAULT;
}
$vamTemplate->assign('HEADER_TEXT', $topic_name);
if (vam_not_null($topic['topics_heading_title'])) {
$vamTemplate->assign('TOPICS_HEADING_TITLE', $topic['topics_heading_title']);
}
if (vam_not_null($topic['topics_description'])) {
$vamTemplate->assign('TOPICS_DESCRIPTION', $topic['topics_description']);
}
require DIR_WS_INCLUDES . 'header.php';
if ($topic_depth == 'articles' || isset($_GET['authors_id'])) {
// show the articles of a specified author
if (isset($_GET['authors_id'])) {
$listing_sql = "select a.articles_id, a.articles_image, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_description, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES . " a left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and au.authors_id = '" . (int) $_GET['authors_id'] . "' and a.articles_id = a2t.articles_id and ad.articles_id = a2t.articles_id and ad.language_id = '" . (int) $_SESSION['languages_id'] . "' and td.language_id = '" . (int) $_SESSION['languages_id'] . "' order by a.sort_order, ad.articles_name";
} else {
$listing_sql = "select a.articles_id, a.articles_image, a.authors_id, a.articles_date_added, ad.articles_name, ad.articles_description, ad.articles_head_desc_tag, au.authors_name, td.topics_name, a2t.topics_id from " . TABLE_ARTICLES . " a left join " . TABLE_AUTHORS . " au on a.authors_id = au.authors_id, " . TABLE_ARTICLES_DESCRIPTION . " ad, " . TABLE_ARTICLES_TO_TOPICS . " a2t left join " . TABLE_TOPICS_DESCRIPTION . " td on a2t.topics_id = td.topics_id where (a.articles_date_available IS NULL or to_days(a.articles_date_available) <= to_days(now())) and a.articles_status = '1' and a.articles_id = a2t.articles_id and ad.articles_id = a2t.articles_id and ad.language_id = '" . (int) $_SESSION['languages_id'] . "' and td.language_id = '" . (int) $_SESSION['languages_id'] . "' and a2t.topics_id = '" . (int) $current_topic_id . "' order by a.sort_order, ad.articles_name";
}
} else {
示例13: on
// 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';
$vamTemplate->assign('affiliate_clickthroughs_split_number', $affiliate_clickthroughs_split->number_of_rows);
$affiliate_clickthrough_table = '';
if ($affiliate_clickthroughs_split->number_of_rows > 0) {
$affiliate_clickthroughs_values = vam_db_query($affiliate_clickthroughs_split->sql_query);
$number_of_clickthroughs = '0';
while ($affiliate_clickthroughs = vam_db_fetch_array($affiliate_clickthroughs_values)) {
$number_of_clickthroughs++;
if ($number_of_clickthroughs / 2 == floor($number_of_clickthroughs / 2)) {
$affiliate_clickthrough_table .= '<tr class="productListing-even">';
} else {
$affiliate_clickthrough_table .= '<tr class="productListing-odd">';
}
$affiliate_clickthrough_table .= '<td class="smallText">' . vam_date_short($affiliate_clickthroughs['affiliate_clientdate']) . '</td>';
if ($affiliate_clickthroughs['affiliate_products_id'] > 0) {
$link_to = '<a href="' . vam_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $affiliate_clickthroughs['affiliate_products_id']) . '" target="_blank">' . $affiliate_clickthroughs['products_name'] . '</a>';
} else {
示例14: Copyright
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 . ' '), 'm', $male, 'id="gender" checked="checked"'));
$module->assign('INPUT_FEMALE', vam_draw_radio_field(array('name' => 'gender', 'suffix' => FEMALE . ' ', 'text' => vam_not_null(ENTRY_GENDER_TEXT) ? '<span class="Requirement"> ' . ENTRY_GENDER_TEXT . '</span>' : ''), 'f', $female, 'id="gender"'));
}
$module->assign('INPUT_FIRSTNAME', vam_draw_input_fieldNote(array('name' => 'firstname', 'text' => ' ' . (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') {
$module->assign('secondname', '1');
示例15: vamTemplate
<?php
$vamTemplate = new vamTemplate();
if (!isset($_GET['kind']) && !vam_not_null($_GET['kind'])) {
die;
}
// выбрать данные в зависимости от типа
switch ($_GET['kind']) {
case 'best_sellers':
include 'templates/' . CURRENT_TEMPLATE . '/source/boxes/best_sellers.php';
break;
case 'news':
include 'templates/' . CURRENT_TEMPLATE . '/source/boxes/whats_new.php';
break;
case 'sale':
include 'templates/' . CURRENT_TEMPLATE . '/source/boxes/specials.php';
break;
case 'actions':
include 'templates/' . CURRENT_TEMPLATE . '/source/boxes/actions.php';
break;
default:
die;
break;
}
$vamTemplate->assign('top_kind', $_GET['kind']);
$vamTemplate->display(CURRENT_TEMPLATE . '/boxes/box_ajax_return_tops.html');