本文整理汇总了PHP中vam_href_link函数的典型用法代码示例。如果您正苦于以下问题:PHP vam_href_link函数的具体用法?PHP vam_href_link怎么用?PHP vam_href_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vam_href_link函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_category_tree
function get_category_tree($parent_id = '0', $spacing = '', $exclude = '', $category_tree_array = '', $include_itself = false, $cPath = '')
{
if ($parent_id == 0) {
$cPath = '';
} else {
$cPath .= $parent_id . '_';
}
if (!is_array($category_tree_array)) {
$category_tree_array = array();
}
if (sizeof($category_tree_array) < 1 && $exclude != '0') {
$category_tree_array[] = array('id' => '0', 'text' => TEXT_TOP);
}
if ($include_itself) {
$category_query = "select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.language_id = '" . $_SESSION['languages_id'] . "' and c.categories_status = '1' and cd.categories_id = '" . $parent_id . "'";
$category_query = vamDBquery($category_query);
$category = vam_db_fetch_array($category_query, true);
$category_tree_array[] = array('id' => $parent_id, 'text' => $category['categories_name']);
}
$categories_query = "select c.categories_id, cd.categories_name, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = cd.categories_id and cd.language_id = '" . $_SESSION['languages_id'] . "' and c.parent_id = '" . $parent_id . "' and c.categories_status = '1' order by c.sort_order, cd.categories_name";
$categories_query = vamDBquery($categories_query);
while ($categories = vam_db_fetch_array($categories_query, true)) {
$SEF_link = vam_href_link(FILENAME_DEFAULT, vam_category_link($categories['categories_id'], $categories['categories_name']));
if ($exclude != $categories['categories_id']) {
$category_tree_array[] = array('id' => $categories['categories_id'], 'text' => $spacing . $categories['categories_name'], 'link' => $SEF_link);
}
$category_tree_array = get_category_tree($categories['categories_id'], $spacing . ' ', $exclude, $category_tree_array, false, $cPath);
}
return $category_tree_array;
}
示例2: 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);
}
}
示例3: vam_display_banner
function vam_display_banner($action, $identifier)
{
if ($action == 'dynamic') {
$banners_query = vam_db_query("select count(*) as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
$banners = vam_db_fetch_array($banners_query);
if ($banners['count'] > 0) {
$banner = vam_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
} else {
return '<b>VaM Shop ERROR! (vam_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</b>';
}
} elseif ($action == 'static') {
if (is_array($identifier)) {
$banner = $identifier;
} else {
$banner_query = vam_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . $identifier . "'");
if (vam_db_num_rows($banner_query)) {
$banner = vam_db_fetch_array($banner_query);
} else {
return '<b>VaM Shop ERROR! (vam_display_banner(' . $action . ', ' . $identifier . ') -> Banner with ID \'' . $identifier . '\' not found, or status inactive</b>';
}
}
} else {
return '<b>VaM Shop ERROR! (vam_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\'</b>';
}
if (vam_not_null($banner['banners_html_text'])) {
$banner_string = $banner['banners_html_text'];
} else {
$banner_string = '<a href="' . vam_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" onclick="window.open(this.href); return false;">' . vam_image(DIR_WS_IMAGES . 'banner/' . $banner['banners_image'], $banner['banners_title']) . '</a>';
}
vam_update_banner_display_count($banner['banners_id']);
return $banner_string;
}
示例4: vam_show_category
function vam_show_category($counter)
{
global $foo, $categories_string, $id;
$categories_string .= '<li class="CatLevel' . $foo[$counter]['level'] . '';
if ($id && in_array($counter, $id)) {
$categories_string .= ' Current">';
} else {
$categories_string .= '">';
}
$categories_string .= '<a href="';
$cPath_new = vam_category_link($counter, $foo[$counter]['name']);
$categories_string .= vam_href_link(FILENAME_DEFAULT, $cPath_new);
$categories_string .= '">';
// display category name
$categories_string .= $foo[$counter]['name'];
if (SHOW_COUNTS == 'true') {
$products_in_category = vam_count_products_in_category($counter);
if ($products_in_category > 0) {
$categories_string .= ' (' . $products_in_category . ')';
}
}
$categories_string .= '</a></li>';
if ($foo[$counter]['next_id']) {
vam_show_category($foo[$counter]['next_id']);
} else {
$categories_string .= '';
}
}
示例5: vam_create_sort_heading
function vam_create_sort_heading($sortby, $colnum, $heading)
{
$sort_prefix = '';
$sort_suffix = '';
if ($sortby) {
$sort_prefix = '<a href="' . vam_href_link(basename($_SERVER['PHP_SELF']), vam_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading . '" class="productListing-heading">';
$sort_suffix = (substr($sortby, 0, 1) == $colnum ? substr($sortby, 1, 1) == 'a' ? '+' : '-' : '') . '</a>';
}
return $sort_prefix . $heading . $sort_suffix;
}
示例6: process_button
function process_button()
{
global $order, $vamPrice;
if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) {
$total = $order->info['total'] + $order->info['tax'];
} else {
$total = $order->info['total'];
}
$process_button_string = vam_draw_hidden_field('cmd', '_xclick') . vam_draw_hidden_field('email', MODULE_PAYMENT_NOCHEX_ID) . vam_draw_hidden_field('amount', round($vamPrice->CalculateCurrEx($total, 'GBP'), $vamPrice->get_decimal_places('GBP'))) . vam_draw_hidden_field('ordernumber', $_SESSION['customer_id'] . '-' . date('Ymdhis')) . vam_draw_hidden_field('returnurl', vam_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL')) . vam_draw_hidden_field('cancel_return', vam_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
return $process_button_string;
}
示例7: display_links
function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
{
if (vam_not_null($parameters) && substr($parameters, -1) != '&') {
$parameters .= '&';
}
// calculate number of pages needing links
$num_pages = ceil($query_numrows / $max_rows_per_page);
$pages_array = array();
for ($i = 1; $i <= $num_pages; $i++) {
$pages_array[] = array('id' => $i, 'text' => $i);
}
if ($num_pages > 1) {
$display_links = vam_draw_form('pages', basename($_SERVER['PHP_SELF']), '', 'get');
if ($current_page_number > 1) {
$display_links .= '<a href="' . vam_href_link(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number - 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a> ';
} else {
$display_links .= PREVNEXT_BUTTON_PREV . ' ';
}
$display_links .= sprintf(TEXT_RESULT_PAGE, vam_draw_pull_down_menu($page_name, $pages_array, $current_page_number, 'onChange="this.form.submit();"'), $num_pages);
if ($current_page_number < $num_pages && $num_pages != 1) {
$display_links .= ' <a href="' . vam_href_link(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number + 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>';
} else {
$display_links .= ' ' . PREVNEXT_BUTTON_NEXT;
}
if ($parameters != '') {
if (substr($parameters, -1) == '&') {
$parameters = substr($parameters, 0, -1);
}
$pairs = explode('&', $parameters);
while (list(, $pair) = each($pairs)) {
list($key, $value) = explode('=', $pair);
$display_links .= vam_draw_hidden_field(rawurldecode($key), rawurldecode($value));
}
}
if (SID) {
$display_links .= vam_draw_hidden_field(session_name(), session_id());
}
$display_links .= '</form>';
} else {
$display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
}
return $display_links;
}
示例8: vam_customer_greeting
function vam_customer_greeting()
{
if (isset($_SESSION['customer_last_name']) && isset($_SESSION['customer_id'])) {
if (!isset($_SESSION['customer_gender'])) {
$check_customer_query = "select customers_gender FROM " . TABLE_CUSTOMERS . " where customers_id = '" . $_SESSION['customer_id'] . "'";
$check_customer_query = vamDBquery($check_customer_query);
$check_customer_data = vam_db_fetch_array($check_customer_query, true);
$_SESSION['customer_gender'] = $check_customer_data['customers_gender'];
}
if ($_SESSION['customer_gender'] == 'f') {
$greeting_string = sprintf(TEXT_GREETING_PERSONAL, FEMALE . ' ' . $_SESSION['customer_first_name'] . ' ' . $_SESSION['customer_last_name'], vam_href_link(FILENAME_PRODUCTS_NEW));
} else {
$greeting_string = sprintf(TEXT_GREETING_PERSONAL, MALE . ' ' . $_SESSION['customer_first_name'] . ' ' . $_SESSION['customer_last_name'], vam_href_link(FILENAME_PRODUCTS_NEW));
}
} else {
$greeting_string = sprintf(TEXT_GREETING_GUEST, vam_href_link(FILENAME_LOGIN, '', 'SSL'), vam_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
}
return $greeting_string;
}
示例9: vam_show_topic
function vam_show_topic($counter)
{
global $tree, $topics_string, $tPath_array;
for ($i = 0; $i < $tree[$counter]['level']; $i++) {
$topics_string .= " ";
}
$topics_string .= '<a href="';
if ($tree[$counter]['parent'] == 0) {
$tPath_new = 'tPath=' . $counter;
} else {
$tPath_new = 'tPath=' . $tree[$counter]['path'];
}
$SEF_parameter_cat = '';
if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
$SEF_parameter_cat = '&category=' . vam_cleanName($tree[$counter]['name']);
}
$topics_string .= vam_href_link(FILENAME_ARTICLES, $tPath_new . $SEF_parameter_cat) . '">';
if (isset($tPath_array) && in_array($counter, $tPath_array)) {
$topics_string .= '<b>';
}
// display topic name
$topics_string .= $tree[$counter]['name'];
if (isset($tPath_array) && in_array($counter, $tPath_array)) {
$topics_string .= '</b>';
}
if (vam_has_topic_subtopics($counter)) {
$topics_string .= ' ->';
}
$topics_string .= '</a>';
if (SHOW_ARTICLE_COUNTS == 'true') {
$articles_in_topic = vam_count_articles_in_topic($counter);
if ($articles_in_topic > 0) {
$topics_string .= ' (' . $articles_in_topic . ')';
}
}
$topics_string .= '<br />' . "\n";
if ($tree[$counter]['next_id'] != false) {
vam_show_topic($tree[$counter]['next_id']);
}
}
示例10: vam_redirect
function vam_redirect($url)
{
if (AJAX_CART == 'true') {
global $_GET, $PHP_SELF, $_RESULT;
if (strpos(basename($PHP_SELF), 'ajax_shopping_cart.php') !== FALSE) {
if ($url == vam_href_link(FILENAME_SSL_CHECK) || $url == vam_href_link(FILENAME_LOGIN) || $url == vam_href_link(FILENAME_COOKIE_USAGE) || $_GET['action'] === 'buy_now' && vam_has_product_attributes($_GET['BUYproducts_id'])) {
$_RESULT['ajax_redirect'] = $url;
// vam_exit();
}
return;
}
}
if (ENABLE_SSL == true && (getenv('HTTPS') == 'on' || getenv('HTTPS') == '1')) {
// We are loading an SSL page
if (substr($url, 0, strlen(HTTP_SERVER)) == HTTP_SERVER) {
// NONSSL url
$url = HTTPS_SERVER . substr($url, strlen(HTTP_SERVER));
// Change it to SSL
}
}
header('Location: ' . preg_replace("/[\r\n]+(.*)\$/i", "", $url));
vam_exit();
}
示例11: vam_show_category_content
function vam_show_category_content($counter)
{
global $foo, $categories_string, $id;
for ($a = 0; $a < $foo[$counter]['level']; $a++) {
$categories_string .= " ";
}
$categories_string .= '<a href="';
if ($foo[$counter]['parent'] == 0) {
$cPath_new = 'cPath=' . $counter;
} else {
$cPath_new = 'cPath=' . $foo[$counter]['path'];
}
$categories_string .= vam_href_link(FILENAME_DEFAULT, $cPath_new);
$categories_string .= '">';
if ($id && in_array($counter, $id)) {
$categories_string .= '<b>';
}
// display category name
$categories_string .= $foo[$counter]['name'];
if ($id && in_array($counter, $id)) {
$categories_string .= '</b>';
}
if (vam_has_category_subcategories($counter)) {
$categories_string .= '->';
}
$categories_string .= '</a>';
//if (SHOW_COUNTS == 'true') {
// $products_in_category = vam_count_products_in_category($counter);
// if ($products_in_category > 0) {
// $categories_string .= ' (' . $products_in_category . ')';
// }
//}
$categories_string .= '<br />';
if ($foo[$counter]['next_id']) {
vam_show_category_content($foo[$counter]['next_id']);
}
}
示例12: 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;
示例13: 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);
示例14: vam_href_link
</tr></table>
</div>
</div>
</div>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
<li class="level1"><a href="<?php
echo HTTP_SERVER . DIR_WS_CATALOG;
?>
" target="_blank"><b><?php
echo HEADER_TITLE_ONLINE_CATALOG;
?>
</b></a></li>
<li class="level1"><a href="<?php
echo vam_href_link(FILENAME_LOGOUT, '', 'NONSSL');
?>
"><b><?php
echo BOX_HEADING_LOGOFF;
?>
</b></a></li>
</ul>
</div>
</div>
<div class="clear">
</td>
</tr>
</table>
示例15: vam_redirect
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
if (!CacheCheck()) {
$vamTemplate->caching = 0;
$main_content = $vamTemplate->fetch(CURRENT_TEMPLATE . '/module/product_reviews_info.html');
} else {
$vamTemplate->caching = 1;
$vamTemplate->cache_lifetime = CACHE_LIFETIME;
$vamTemplate->cache_modified_check = CACHE_CHECK;