本文整理汇总了PHP中vamTemplate::fetch方法的典型用法代码示例。如果您正苦于以下问题:PHP vamTemplate::fetch方法的具体用法?PHP vamTemplate::fetch怎么用?PHP vamTemplate::fetch使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vamTemplate
的用法示例。
在下文中一共展示了vamTemplate::fetch方法的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: vamTemplate
<?php
// create conteiner for tops boxes , wich loaded by ajax
$box = new vamTemplate();
$box_content = '';
$flag = '';
$box->assign('tpl_path', 'templates/' . CURRENT_TEMPLATE . '/');
//$box_content = ;
if ($flag == true) {
define('SEARCH_ENGINE_FRIENDLY_URLS', true);
}
$box->assign('BOX_CONTENT', $box_content);
$box->caching = 0;
$box->assign('language', $_SESSION['language']);
$box_admin = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_tops.html');
$vamTemplate->assign('box_TOPS', $box_admin);
示例3:
$vamTemplate->assign('LINK_sort_name_desc', vam_href_link(basename($PHP_SELF), vam_get_all_get_params(array('page', 'sort', 'direction', 'info', 'x', 'y')) . 'sort=name&direction=desc'));
$vamTemplate->assign('LINK_sort_price_asc', vam_href_link(basename($PHP_SELF), vam_get_all_get_params(array('page', 'sort', 'direction', 'info', 'x', 'y')) . 'sort=price&direction=asc'));
$vamTemplate->assign('LINK_sort_price_desc', vam_href_link(basename($PHP_SELF), vam_get_all_get_params(array('page', 'sort', 'direction', 'info', 'x', 'y')) . 'sort=price&direction=desc'));
/* /sort, on page */
$vamTemplate->assign('section', 'featured');
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->assign('module_content', $module_content);
$vamTemplate->caching = 0;
//switch display mode
$listing_template = 'product_tops_list.html';
if (isset($_SESSION['listing_tops_template'])) {
$listing_template = $_SESSION['listing_tops_template'];
}
if ($listing_template == 'product_tops_list.html') {
$vamTemplate->assign('LISTING_TEMPLATE', 'product_tops_columns.html');
$vamTemplate->assign('LISTING_TEMPLATE_TEXT', 'плиткой');
} else {
$vamTemplate->assign('LISTING_TEMPLATE', 'product_tops_list.html');
$vamTemplate->assign('LISTING_TEMPLATE_TEXT', 'списком');
}
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/product_listing/' . $listing_template);
$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_FEATURED . '.html') ? CURRENT_TEMPLATE . '/' . FILENAME_FEATURED . '.html' : CURRENT_TEMPLATE . '/index.html';
$vamTemplate->assign('category_depth', true);
$vamTemplate->display($template);
include 'includes/application_bottom.php';
示例4: Copyright
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>';
}
//$box->assign('BOX_TITLE', BOX_HEADING_ADD_PRODUCT_ID);
$box->assign('BOX_CONTENT', $box_content);
$box->assign('language', $_SESSION['language']);
// set cache ID
$box->caching = 0;
$box_affiliate = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_affiliate.html');
$vamTemplate->assign('box_AFFILIATE', $box_affiliate);
示例5:
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');
// 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/');
// assign vars
$vamTemplate->assign('EMAIL', $check_customer['customers_email_address']);
$vamTemplate->assign('LINK', $link);
// dont allow cache
$vamTemplate->caching = false;
// create mails
$html_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/password_verification_mail.html');
$txt_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/password_verification_mail.txt');
if ($_POST['captcha'] == $_SESSION['vvcode']) {
if (!vam_db_num_rows($check_customer_query)) {
$case = wrong_mail;
$info_message = TEXT_EMAIL_ERROR;
} else {
$case = first_opt_in;
vam_db_query("update " . TABLE_CUSTOMERS . " set password_request_key = '" . $vlcode . "' where customers_id = '" . $check_customer['customers_id'] . "'");
vam_php_mail(EMAIL_SUPPORT_ADDRESS, EMAIL_SUPPORT_NAME, $check_customer['customers_email_address'], '', '', EMAIL_SUPPORT_REPLY_ADDRESS, EMAIL_SUPPORT_REPLY_ADDRESS_NAME, '', '', TEXT_EMAIL_PASSWORD_FORGOTTEN, $html_mail, $txt_mail);
}
} else {
$case = code_error;
$info_message = TEXT_CODE_ERROR;
}
}
示例6: Copyright
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');
}
$vamTemplate->display(CURRENT_TEMPLATE . '/index.html');
示例7: htmlspecialchars
if ($_SESSION['customers_status']['customers_status_max_order'] != 0) {
if ($total > $_SESSION['customers_status']['customers_status_max_order']) {
$_SESSION['allow_checkout'] = 'false';
$less_to_buy = $total - $_SESSION['customers_status']['customers_status_max_order'];
$max_order = $vamPrice->Format($_SESSION['customers_status']['customers_status_max_order'], true);
$order_amount = $vamPrice->Format($less_to_buy, true);
$vamTemplate->assign('info_message_1', MAXIMUM_ORDER_VALUE_REACHED_1);
$vamTemplate->assign('info_message_2', MAXIMUM_ORDER_VALUE_REACHED_2);
$vamTemplate->assign('order_amount', $order_amount);
$vamTemplate->assign('min_order', $max_order);
}
}
}
if ($_GET['info_message']) {
$vamTemplate->assign('info_message', str_replace('+', ' ', htmlspecialchars($_GET['info_message'])));
}
$vamTemplate->assign('BUTTON_RELOAD', vam_image_submit('update.png', IMAGE_BUTTON_UPDATE_CART));
$vamTemplate->assign('BUTTON_CHECKOUT', '<a class="button" href="' . vam_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . vam_image_button('', IMAGE_BUTTON_CHECKOUT) . '</a>');
} else {
// empty cart
$cart_empty = true;
if ($_GET['info_message']) {
$vamTemplate->assign('info_message', str_replace('+', ' ', htmlspecialchars($_GET['info_message'])));
}
$vamTemplate->assign('cart_empty', $cart_empty);
$vamTemplate->assign('BUTTON_CONTINUE', '<a class="button close" href="javascript:void(0);">' . vam_image_button('', IMAGE_BUTTON_CONTINUE) . '</a>');
}
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
echo $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/shopping_cart.html');
示例8:
unset($_SESSION['affiliate_id']);
if (isset($_SESSION['affiliate_id'])) {
$result = 0;
} else {
$result = 1;
}
//session_destroy();
if (!empty($old_user)) {
if ($result) {
// if they were logged in and are not logged out
$info = 0;
} else {
// they were logged in and could not be logged out
$info = 1;
}
} else {
// if they weren't logged in but came to this page somehow
$info = 2;
}
$vamTemplate->assign('info', $info);
$vamTemplate->assign('LINK_DEFAULT', '<a class="button" href="' . vam_href_link(FILENAME_DEFAULT) . '">' . 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_logout.html');
$vamTemplate->assign('main_content', $main_content);
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
if (!defined(RM)) {
$vamTemplate->load_filter('output', 'note');
}
$vamTemplate->display(CURRENT_TEMPLATE . '/index.html');
示例9: while
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);
include 'includes/application_bottom.php';
示例10: values
$gv_query = vam_db_query("insert into " . TABLE_COUPONS . " (coupon_type, coupon_code, date_created, coupon_amount) values ('G', '" . $id1 . "', NOW(), '" . str_replace(",", ".", vam_db_input($vamPrice->CalculateCurrEx($_POST['amount'], DEFAULT_CURRENCY))) . "')");
$insert_id = vam_db_insert_id($gv_query);
$gv_query = vam_db_query("insert into " . TABLE_COUPON_EMAIL_TRACK . " (coupon_id, customer_id_sent, sent_firstname, sent_lastname, emailed_to, date_sent) values ('" . $insert_id . "' ,'" . $_SESSION['customer_id'] . "', '" . addslashes($gv_customer['customers_firstname']) . "', '" . addslashes($gv_customer['customers_lastname']) . "', '" . vam_db_input($_POST['email']) . "', now())");
$gv_email_subject = sprintf(EMAIL_GV_TEXT_SUBJECT, stripslashes($_POST['send_name']));
$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('GIFT_LINK', vam_href_link(FILENAME_GV_REDEEM, 'gv_no=' . $id1, 'NONSSL', false));
$vamTemplate->assign('AMMOUNT', $vamPrice->Format(str_replace(",", ".", $_POST['amount']), true));
$vamTemplate->assign('GIFT_CODE', $id1);
$vamTemplate->assign('MESSAGE', $_POST['message']);
$vamTemplate->assign('NAME', $_POST['to_name']);
$vamTemplate->assign('FROM_NAME', $_POST['send_name']);
// dont allow cache
$vamTemplate->caching = false;
$html_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/send_gift_to_friend.html');
$txt_mail = $vamTemplate->fetch(CURRENT_TEMPLATE . '/mail/' . $_SESSION['language'] . '/send_gift_to_friend.txt');
// send mail
vam_php_mail(EMAIL_BILLING_ADDRESS, EMAIL_BILLING_NAME, $_POST['email'], $_POST['to_name'], '', EMAIL_BILLING_REPLY_ADDRESS, EMAIL_BILLING_REPLY_ADDRESS_NAME, '', '', $gv_email_subject, $html_mail, $txt_mail);
}
}
$breadcrumb->add(NAVBAR_GV_SEND);
require DIR_WS_INCLUDES . 'header.php';
if ($_GET['action'] == 'process') {
$vamTemplate->assign('action', 'process');
$vamTemplate->assign('LINK_DEFAULT', '<a class="button" href="' . vam_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . vam_image_button('submit.png', IMAGE_BUTTON_CONTINUE) . '</a>');
}
if ($_GET['action'] == 'send' && !$error) {
$vamTemplate->assign('action', 'send');
// validate entries
$gv_amount = (double) $gv_amount;
示例11: checkform
}
}
}
$breadcrumb->add(NAVBAR_TITLE_1_ACCOUNT_PASSWORD, vam_href_link(FILENAME_ACCOUNT, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2_ACCOUNT_PASSWORD, vam_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL'));
require DIR_WS_INCLUDES . 'header.php';
if ($messageStack->size('account_password') > 0) {
$vamTemplate->assign('error', $messageStack->output('account_password'));
}
$vamTemplate->assign('FORM_ACTION', vam_draw_form('account_password', vam_href_link(FILENAME_ACCOUNT_PASSWORD, '', 'SSL'), 'post', 'onsubmit="return checkform(this);"') . vam_draw_hidden_field('action', 'process') . vam_draw_hidden_field('required', 'password_current,password_new,password_confirmation', 'id="required"'));
$vamTemplate->assign('INPUT_ACTUAL', vam_draw_password_fieldNote(array('name' => 'password_current', 'text' => ' ' . (vam_not_null(ENTRY_PASSWORD_CURRENT_TEXT) ? '<span class="Requirement">' . ENTRY_PASSWORD_CURRENT_TEXT . '</span>' : '')), '', 'id="password_current"'));
$vamTemplate->assign('ENTRY_PASSWORD_CURRENT_ERROR', ENTRY_PASSWORD_CURRENT_ERROR);
$vamTemplate->assign('INPUT_NEW', vam_draw_password_fieldNote(array('name' => 'password_new', 'text' => ' ' . (vam_not_null(ENTRY_PASSWORD_NEW_TEXT) ? '<span class="Requirement">' . ENTRY_PASSWORD_NEW_TEXT . '</span>' : '')), '', 'id="password_new"'));
$vamTemplate->assign('ENTRY_PASSWORD_NEW_ERROR', ENTRY_PASSWORD_NEW_ERROR);
$vamTemplate->assign('INPUT_CONFIRM', vam_draw_password_fieldNote(array('name' => 'password_confirmation', 'text' => ' ' . (vam_not_null(ENTRY_PASSWORD_CONFIRMATION_TEXT) ? '<span class="Requirement">' . ENTRY_PASSWORD_CONFIRMATION_TEXT . '</span>' : '')), '', 'id="password_confirmation"'));
$vamTemplate->assign('ENTRY_PASSWORD_ERROR_NOT_MATCHING', ENTRY_PASSWORD_ERROR_NOT_MATCHING);
$vamTemplate->assign('BUTTON_BACK', '<a class="button" href="' . vam_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . vam_image_button('back.png', IMAGE_BUTTON_BACK) . '</a>');
$vamTemplate->assign('BUTTON_SUBMIT', vam_image_submit('submit.png', IMAGE_BUTTON_CONTINUE));
$vamTemplate->assign('FORM_END', '</form>');
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/account_password.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_PASSWORD . '.html') ? CURRENT_TEMPLATE . '/' . FILENAME_ACCOUNT_PASSWORD . '.html' : CURRENT_TEMPLATE . '/index.html';
$vamTemplate->display($template);
include 'includes/application_bottom.php';
示例12: IFNULL
$cache_id = $_SESSION['language'] . $current_category_id . '1111111';
}
//if (!$box->is_cached(CURRENT_TEMPLATE.'/boxes/box_best_sellers.html', $cache_id) || !$cache) {
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 ";
}
$wats_new_query = "SELECT distinct\n p.products_id,\n pd.products_name,\n p.products_fsk18,\n p.products_image,\n p.products_tax_class_id,\n p.products_vpe,\n p.products_vpe_status,\n p.products_vpe_value,\n p.products_price,\n IFNULL(cd3.categories_name, IFNULL(cd2.categories_name, IFNULL(cd1.categories_name, cd.categories_name))) as categories_name\n FROM " . TABLE_PRODUCTS . " p\n\t\t\t\t\t\tINNER JOIN " . TABLE_PRODUCTS_DESCRIPTION . " pd ON pd.products_id = p.products_id \n\t\t\t\t\t\t\tAND pd.language_id = '" . (int) $_SESSION['languages_id'] . "'\n\t\t\t\t\t\tINNER JOIN " . TABLE_PRODUCTS_TO_CATEGORIES . " ptc ON ptc.products_id = p.products_id\n\t\t\t\t\t\tINNER JOIN " . TABLE_CATEGORIES . " c ON c.categories_id = ptc.categories_id\n\t\t\t\t\t\tINNER JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd ON cd.categories_id = c.categories_id\n\t\t\t\t\t\tLEFT JOIN " . TABLE_CATEGORIES . " c1 ON c1.categories_id = c.parent_id\n\t\t\t\t\t\tLEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd1 ON cd1.categories_id = c1.categories_id\n\t\t\t\t\t\tLEFT JOIN " . TABLE_CATEGORIES . " c2 ON c2.categories_id = c1.parent_id\n\t\t\t\t\t\tLEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd2 ON cd2.categories_id = c2.categories_id\n\t\t\t\t\t\tLEFT JOIN " . TABLE_CATEGORIES . " c3 ON c3.categories_id = c2.parent_id\n\t\t\t\t\t\tLEFT JOIN " . TABLE_CATEGORIES_DESCRIPTION . " cd3 ON cd3.categories_id = c3.categories_id \n WHERE p.products_status=1\n\t\t\t\t\tAND p.products_startpage = 1\n\t\t\t\t\t" . $group_check . "\n\t\t\t\t\t" . $fsk_lock . "\n\t\t\t\t\tand c.categories_status=1";
$news_by_date = " ORDER BY p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS;
if ($cache) {
$box_whats_new = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_tops_list.html', $cache_id);
} else {
$wats_new_query = vamDBquery($wats_new_query . $news_by_date);
// если новинок нет выбрать те что отмечены "на главной"
if (vam_db_num_rows($wats_new_query, true) == 0) {
$news_by_marked = " AND p.products_startpage = 1 limit " . MAX_DISPLAY_NEW_PRODUCTS;
$wats_new_query = vamDBquery($wats_new_query . $news_by_marked);
}
if (vam_db_num_rows($wats_new_query, true) >= 0) {
$rows = 0;
$box_content = array();
while ($wats_new = vam_db_fetch_array($wats_new_query, true)) {
$rows++;
$wats_new = array_merge($wats_new, array('ID' => vam_row_number_format($rows)));
$box_content[] = $product->buildDataArray($wats_new);
}
示例13: values
}
}
} else {
vam_redirect(FILENAME_DEFAULT);
}
if (!$error && isset($_SESSION['customer_id'])) {
// Update redeem status
$gv_query = vam_db_query("insert into " . TABLE_COUPON_REDEEM_TRACK . " (coupon_id, customer_id, redeem_date, redeem_ip) values ('" . $coupon['coupon_id'] . "', '" . $_SESSION['customer_id'] . "', now(),'" . $REMOTE_ADDR . "')");
$gv_update = vam_db_query("update " . TABLE_COUPONS . " set coupon_active = 'N' where coupon_id = '" . $coupon['coupon_id'] . "'");
vam_gv_account_update($_SESSION['customer_id'], $_SESSION['gv_id']);
unset($_SESSION['gv_id']);
}
$breadcrumb->add(NAVBAR_GV_REDEEM);
$coupon_r = $vamPrice->CalculateCurr($coupon['coupon_amount']);
// if we get here then either the url gv_no was not set or it was invalid
// so output a message.
$vamTemplate->assign('coupon_amount', $vamPrice->Format($coupon_r, true));
$vamTemplate->assign('error', $error);
$vamTemplate->assign('LINK_DEFAULT', '<a class="button" href="' . vam_href_link(FILENAME_DEFAULT) . '">' . vam_image_button('submit.png', IMAGE_BUTTON_CONTINUE) . '</a>');
$vamTemplate->assign('language', $_SESSION['language']);
$vamTemplate->caching = 0;
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/gv_redeem.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_GV_REDEEM . '.html') ? CURRENT_TEMPLATE . '/' . FILENAME_GV_REDEEM . '.html' : CURRENT_TEMPLATE . '/index.html';
$vamTemplate->display($template);
include 'includes/application_bottom.php';
示例14:
$selection[$i]['selection'] = vam_draw_radio_field('payment', $selection[$i]['id'], $selection[$i]['id'] == $selection[0]['id'], 'id="' . $selection[$i]['id'] . '"');
} else {
$selection[$i]['selection'] = vam_draw_hidden_field('payment', $selection[$i]['id']);
}
$selection[$i]['id'] = $selection[$i]['id'];
if (isset($selection[$i]['error'])) {
} else {
$radio_buttons++;
}
}
$module->assign('module_content', $selection);
if (ACTIVATE_GIFT_SYSTEM == 'true') {
$vamTemplate->assign('module_gift', $order_total_modules->credit_selection());
}
$module->caching = 0;
$payment_block = $module->fetch(CURRENT_TEMPLATE . '/module/checkout_payment_block.html');
$vamTemplate->assign('COMMENTS', vam_draw_textarea_field('comments', 'soft', '60', '5', $_POST['comments']) . vam_draw_hidden_field('comments_added', 'YES'));
$vamTemplate->assign('conditions', 'false');
//check if display conditions on checkout page is true
if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
$vamTemplate->assign('conditions', 'true');
if (GROUP_CHECK == 'true') {
$group_check = "and group_ids LIKE '%c_" . $_SESSION['customers_status']['customers_status_id'] . "_group%'";
}
$shop_content_query = vam_db_query("SELECT\n\t content_title,\n\t content_heading,\n\t content_text,\n\t content_file\n\t FROM " . TABLE_CONTENT_MANAGER . "\n\t WHERE content_group='3' " . $group_check . "\n\t AND languages_id='" . $_SESSION['languages_id'] . "'");
$shop_content_data = vam_db_fetch_array($shop_content_query);
if ($shop_content_data['content_file'] != '') {
$conditions = '<iframe SRC="' . DIR_WS_CATALOG . 'media/content/' . $shop_content_data['content_file'] . '" width="100%" height="300">';
$conditions .= '</iframe>';
} else {
$conditions = '<textarea name="blabla" cols="60" rows="10" readonly="readonly">' . strip_tags(str_replace('<br />', "\n", $shop_content_data['content_text'])) . '</textarea>';
示例15: vamTemplate
-----------------------------------------------------------------------------------------
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
$box = new vamTemplate();
$box->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 ";
$module_content = array();
$query = vamDBquery($sql);
while ($one = vam_db_fetch_array($query, true)) {
$SEF_parameter = '';
if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
$SEF_parameter = '&headline=' . vam_cleanName($one['headline']);
}
$module_content[] = array('NEWS_HEADING' => $one['headline'], 'NEWS_CONTENT' => $one['content'], 'NEWS_ID' => $one['news_id'], 'NEWS_DATA' => vam_date_short($one['date_added']), 'NEWS_LINK_MORE' => vam_href_link(FILENAME_NEWS, 'news_id=' . $one['news_id'] . $SEF_parameter, 'NONSSL'));
}
if (sizeof($module_content) > 0) {
$box->assign('NEWS_LINK', vam_href_link(FILENAME_NEWS));
$box->assign('language', $_SESSION['language']);
$box->assign('module_content', $module_content);
// set cache ID
if (USE_CACHE == 'false') {
$box->caching = 0;
$module = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_latest_news.html');
} else {
$box->caching = 1;
$box->cache_lifetime = CACHE_LIFETIME;
$box->cache_modified_check = CACHE_CHECK;
$module = $box->fetch(CURRENT_TEMPLATE . '/boxes/box_latest_news.html', $cache_id);
}
$vamTemplate->assign('box_LATESTNEWS', $module);
}