本文整理汇总了PHP中tep_session_register函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_session_register函数的具体用法?PHP tep_session_register怎么用?PHP tep_session_register使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_session_register函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: dash_box_SERP_saturation
function dash_box_SERP_saturation()
{
$moduleset = tep_module('searchengine');
$this->mods = $moduleset->getModules();
$this->se = 'overall';
if (isset($_SESSION['SERP_se'])) {
$this->se = $_SESSION['SERP_se'];
}
if (isset($_GET['SERP_se'])) {
$this->se = $_GET['SERP_se'];
}
$this->se_values .= "<option value='overall'" . ($this->se == 'overall' ? ' selected' : '') . ">Overall</option>";
foreach ($this->mods as $mod) {
$selected = '';
if ($this->se == get_class($mod)) {
$this->se_mod = $mod;
$selected = " selected";
}
$this->se_values .= "<option value='" . get_class($mod) . "'{$selected}>" . $mod->getName() . "</option>";
}
if (!isset($_SESSION['SERP_compare_date'])) {
$this->compare_date = date("m-d-Y", mktime(0, 0, 0, date('m') - 1, date('d'), date('Y')));
} else {
$this->compare_date = $_SESSION['SERP_compare_date'];
}
if (isset($_GET['SERP_compare_date'])) {
$this->compare_date = $_GET['SERP_compare_date'];
}
list($month, $day, $year) = explode('-', $this->compare_date);
$this->compare_time = mktime(0, 0, 0, $month, $day, $year);
tep_session_register('SERP_compare_date');
tep_session_register('SERP_se');
$_SESSION['SERP_compare_date'] = $this->compare_date;
$_SESSION['SERP_se'] = $this->se;
}
开发者ID:rrecurse,项目名称:IntenseCart,代码行数:35,代码来源:dash_box_SERP_saturation.php
示例2: amSessionRegister
function amSessionRegister($strSessionVar, $value = '')
{
if (!amSessionIsRegistered($strSessionVar)) {
tep_session_register($strSessionVar);
$GLOBALS[$strSessionVar] = $value;
}
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:7,代码来源:attributeManagerSessionFunctions.inc.php
示例3: getSiteLanguage
function getSiteLanguage($get = null)
{
$default = array('dir' => 'dutch', 'id' => '1', 'code' => 'nl');
if (!tep_session_is_registered('language') || isset($_GET['language'])) {
if (!tep_session_is_registered('language')) {
tep_session_register('language');
tep_session_register('languages_id');
tep_session_register('languages_code');
}
include DIR_WS_CLASSES . 'language.php';
$lng = new language();
if (isset($_GET['language']) && tep_not_null($_GET['language'])) {
$lng->set_language($_GET['language']);
} else {
$lng->get_browser_language();
if (empty($lng)) {
$lng->set_language(DEFAULT_LANGUAGE);
}
}
$default = array('dir' => $lng->language['directory'], 'id' => $lng->language['id'], 'code' => $lng->language['code']);
}
if ($get && isset($default[$get])) {
return $default[$get];
}
return $default;
}
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:26,代码来源:functions.php
示例4: add_session
function add_session($class, $message, $type = 'error')
{
global $messageToStack;
if (!tep_session_is_registered('messageToStack')) {
tep_session_register('messageToStack');
$messageToStack = array();
}
$messageToStack[] = array('class' => $class, 'text' => $message, 'type' => $type);
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:9,代码来源:message_stack.php
示例5: pre_confirmation_check
function pre_confirmation_check()
{
global $cartID, $cart;
if (empty($cart->cartID)) {
$cartID = $cart->cartID = $cart->generate_cart_id();
}
if (!tep_session_is_registered('cartID')) {
tep_session_register('cartID');
}
}
开发者ID:phpsource,项目名称:gocoin-oscommerce,代码行数:10,代码来源:gocoinpay.php
示例6: tep_doautologin
function tep_doautologin()
{
global $HTTP_COOKIE_VARS, $cart, $cart_cs, $cart_fv, $cart_pr, $customer_id, $customer_default_address_id, $customer_first_name, $customer_country_id, $customer_zone_id;
global $navigation;
if (isset($HTTP_COOKIE_VARS['osC_AutoCookieLogin'])) {
$ip_address = tep_get_ip_address();
$check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_lastname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where md5(CONCAT(customers_id,customers_email_address,customers_password,'" . $ip_address . "'))= '" . $HTTP_COOKIE_VARS['osC_AutoCookieLogin'] . "'");
if (tep_db_num_rows($check_customer_query)) {
$check_customer = tep_db_fetch_array($check_customer_query);
if (SESSION_RECREATE == 'True') {
tep_session_recreate();
}
$check_country_query = tep_db_query("select entry_country_id, entry_zone_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $check_customer['customers_id'] . "' and address_book_id = '" . (int) $check_customer['customers_default_address_id'] . "'");
$check_country = tep_db_fetch_array($check_country_query);
$customer_id = $check_customer['customers_id'];
$customer_default_address_id = $check_customer['customers_default_address_id'];
$customer_first_name = $check_customer['customers_firstname'];
$customer_country_id = $check_country['entry_country_id'];
$customer_zone_id = $check_country['entry_zone_id'];
if (!tep_session_is_registered('customer_id')) {
tep_session_register('customer_id');
}
if (!tep_session_is_registered('customer_default_address_id')) {
tep_session_register('customer_default_address_id');
}
if (!tep_session_is_registered('customer_first_name')) {
tep_session_register('customer_first_name');
}
if (!tep_session_is_registered('customer_country_id')) {
tep_session_register('customer_country_id');
}
if (!tep_session_is_registered('customer_zone_id')) {
tep_session_register('customer_zone_id');
}
tep_autologincookie(true);
// Save cookie
tep_db_query("update " . TABLE_CUSTOMERS_INFO . " set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1 where customers_info_id = '" . (int) $customer_id . "'");
$cart->restore_contents();
// restore cart contents
$cart_cs->restore_contents();
$cart_fv->restore_contents();
$cart_pr->restore_contents();
if (sizeof($navigation->snapshot) > 0) {
$origin_href = tep_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
$navigation->clear_snapshot();
tep_redirect($origin_href);
} else {
// tep_redirect(tep_href_link(FILENAME_DEFAULT));
tep_redirect(substr(tep_href_link(getenv('REQUEST_URI')), strlen(HTTP_SERVER . DIR_WS_HTTP_CATALOG)));
}
}
}
}
开发者ID:rongandat,项目名称:scalaprj,代码行数:53,代码来源:autologin.php
示例7: after_process
function after_process()
{
global $customer_id, $insert_id, $zp_code, $order;
if (tep_session_is_registered('zp_code')) {
tep_session_unregister('zp_code');
}
tep_session_register('zp_code');
$code = md5(md5(microtime()) . md5(rand(0, 100000)));
$zp_code = base64_encode($code . '-' . $customer_id . '-' . $insert_id . '-' . $order->info['total']);
// echo $zp_code;
// die();
return false;
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:13,代码来源:zpayment.php
示例8: after_process
function after_process()
{
global $customer_id, $insert_id, $order_totals, $rx_code, $currency, $currencies;
if (tep_session_is_registered('op_code')) {
tep_session_unregister('op_code');
}
tep_session_register('op_code');
$ot_total_value = 0;
for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
if ($order_totals[$i]['code'] == 'ot_total') {
$ot_total_value = str_replace(',', '.', round($order_totals[$i]['value'], $currencies->get_decimal_places($currency)));
break;
}
}
$code = md5(md5(microtime()) . md5(rand(0, 100000)));
$op_code = base64_encode($code . '-' . $customer_id . '-' . $insert_id . '-' . $ot_total_value);
return false;
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:18,代码来源:onpay.php
示例9: add_cart
function add_cart($products_id, $qty = '')
{
global $new_products_id_in_cart, $customer_id;
if ($this->in_cart($products_id)) {
$this->update_quantity($products_id, $qty);
} else {
if ($qty == '') {
$qty = '1';
}
// if no quantity is supplied, then add '1' to the customers basket
$this->contents[] = array($products_id);
$this->contents[$products_id] = array('qty' => $qty);
// insert into database
if ($customer_id) {
tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('" . (int) $customer_id . "', '" . tep_db_input($products_id) . "', '" . tep_db_input($qty) . "', '" . date('Ymd') . "')");
}
$new_products_id_in_cart = $products_id;
tep_session_register('new_products_id_in_cart');
}
$this->cleanup();
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:21,代码来源:shopping_cart.php
示例10: add_cart
function add_cart($products_id, $qty = '1', $notify = true)
{
global $new_products_id_in_cart, $customer_id;
if ($notify == true) {
$new_products_id_in_cart = $products_id;
tep_session_register('new_products_id_in_cart');
}
if ($this->in_cart($products_id)) {
$this->update_quantity($products_id, $qty);
} else {
// $this->contents[] = array($products_id);
$this->contents[$products_id] = array('qty' => $qty);
// insert into database
if (tep_session_is_registered('customer_id')) {
tep_db_query("insert into " . TABLE_CUSTOMERS_BASKET . " (customers_id, products_id, customers_basket_quantity, customers_basket_date_added, customers_basket_type, shops_id) values ('" . (int) $customer_id . "', '" . tep_db_input($products_id) . "', '" . $qty . "', '" . date('Ymd') . "', '" . tep_db_input($this->basket_type) . "', '" . (int) SHOP_ID . "')");
}
}
$this->cleanup();
// assign a temporary unique ID to the order contents to prevent hack attempts during the checkout procedure
$this->cartID = $this->generate_cart_id();
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:21,代码来源:shopping_cart.php
示例11: isset
Released under the GNU General Public License
*/
require 'includes/application_top.php';
require 'includes/functions/password_funcs.php';
$action = isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '';
if (tep_not_null($action)) {
switch ($action) {
case 'process':
$username = tep_db_prepare_input($HTTP_POST_VARS['username']);
$password = tep_db_prepare_input($HTTP_POST_VARS['password']);
$check_query = tep_db_query("select id, user_name, user_password from " . TABLE_ADMINISTRATORS . " where user_name = '" . tep_db_input($username) . "'");
if (tep_db_num_rows($check_query) == 1) {
$check = tep_db_fetch_array($check_query);
if (tep_validate_password($password, $check['user_password'])) {
tep_session_register('admin');
$admin = array('id' => $check['id'], 'username' => $check['user_name']);
if (tep_session_is_registered('redirect_origin')) {
$page = $redirect_origin['page'];
$get_string = '';
if (function_exists('http_build_query')) {
$get_string = http_build_query($redirect_origin['get']);
}
tep_session_unregister('redirect_origin');
tep_redirect(tep_href_link($page, $get_string));
} else {
tep_redirect(tep_href_link(FILENAME_DEFAULT));
}
}
}
$messageStack->add(ERROR_INVALID_ADMINISTRATOR, 'error');
开发者ID:quangbt2005,项目名称:belamdep,代码行数:30,代码来源:login.php
示例12: _prepareOrder
function _prepareOrder()
{
global $cartID, $customer_id, $order, $order_total_modules;
$insert_order = false;
if (isset($_SESSION[$this->_mbcartID])) {
$order_id = substr($GLOBALS[$this->_mbcartID], strpos($GLOBALS[$this->_mbcartID], '-') + 1);
$curr_check = tep_db_query("select currency from " . TABLE_ORDERS . " where orders_id = '" . (int) $order_id . "'");
$curr = tep_db_fetch_array($curr_check);
if ($curr['currency'] != $order->info['currency'] || $cartID != substr($GLOBALS[$this->_mbcartID], 0, strlen($cartID))) {
$check_query = tep_db_query('select orders_id from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int) $order_id . '" limit 1');
if (tep_db_num_rows($check_query) < 1) {
tep_db_query('delete from ' . TABLE_ORDERS . ' where orders_id = "' . (int) $order_id . '"');
tep_db_query('delete from ' . TABLE_ORDERS_TOTAL . ' where orders_id = "' . (int) $order_id . '"');
tep_db_query('delete from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int) $order_id . '"');
tep_db_query('delete from ' . TABLE_ORDERS_PRODUCTS . ' where orders_id = "' . (int) $order_id . '"');
tep_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . ' where orders_id = "' . (int) $order_id . '"');
tep_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_DOWNLOAD . ' where orders_id = "' . (int) $order_id . '"');
}
$insert_order = true;
}
} else {
$insert_order = true;
}
if ($insert_order == true) {
$order_totals = array();
if (is_array($order_total_modules->modules)) {
reset($order_total_modules->modules);
while (list(, $value) = each($order_total_modules->modules)) {
$class = substr($value, 0, strrpos($value, '.'));
if ($GLOBALS[$class]->enabled) {
for ($i = 0, $n = sizeof($GLOBALS[$class]->output); $i < $n; $i++) {
if (tep_not_null($GLOBALS[$class]->output[$i]['title']) && tep_not_null($GLOBALS[$class]->output[$i]['text'])) {
$order_totals[] = array('code' => $GLOBALS[$class]->code, 'title' => $GLOBALS[$class]->output[$i]['title'], 'text' => $GLOBALS[$class]->output[$i]['text'], 'value' => $GLOBALS[$class]->output[$i]['value'], 'sort_order' => $GLOBALS[$class]->sort_order);
}
}
}
}
}
$sql_data_array = array('customers_id' => $customer_id, 'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'], 'customers_company' => $order->customer['company'], 'customers_street_address' => $order->customer['street_address'], 'customers_suburb' => $order->customer['suburb'], 'customers_city' => $order->customer['city'], 'customers_postcode' => $order->customer['postcode'], 'customers_state' => $order->customer['state'], 'customers_country' => $order->customer['country']['title'], 'customers_telephone' => $order->customer['telephone'], 'customers_email_address' => $order->customer['email_address'], 'customers_address_format_id' => $order->customer['format_id'], 'delivery_name' => $order->delivery['firstname'] . ' ' . $order->delivery['lastname'], 'delivery_company' => $order->delivery['company'], 'delivery_street_address' => $order->delivery['street_address'], 'delivery_suburb' => $order->delivery['suburb'], 'delivery_city' => $order->delivery['city'], 'delivery_postcode' => $order->delivery['postcode'], 'delivery_state' => $order->delivery['state'], 'delivery_country' => $order->delivery['country']['title'], 'delivery_address_format_id' => $order->delivery['format_id'], 'billing_name' => $order->billing['firstname'] . ' ' . $order->billing['lastname'], 'billing_company' => $order->billing['company'], 'billing_street_address' => $order->billing['street_address'], 'billing_suburb' => $order->billing['suburb'], 'billing_city' => $order->billing['city'], 'billing_postcode' => $order->billing['postcode'], 'billing_state' => $order->billing['state'], 'billing_country' => $order->billing['country']['title'], 'billing_address_format_id' => $order->billing['format_id'], 'payment_method' => $order->info['payment_method'], 'cc_type' => $order->info['cc_type'], 'cc_owner' => $order->info['cc_owner'], 'cc_number' => $order->info['cc_number'], 'cc_expires' => $order->info['cc_expires'], 'date_purchased' => 'now()', 'orders_status' => $order->info['order_status'], 'currency' => $order->info['currency'], 'currency_value' => $order->info['currency_value']);
tep_db_perform(TABLE_ORDERS, $sql_data_array);
$insert_id = tep_db_insert_id();
for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
$sql_data_array = array('orders_id' => $insert_id, 'title' => $order_totals[$i]['title'], 'text' => $order_totals[$i]['text'], 'value' => $order_totals[$i]['value'], 'class' => $order_totals[$i]['code'], 'sort_order' => $order_totals[$i]['sort_order']);
tep_db_perform(TABLE_ORDERS_TOTAL, $sql_data_array);
}
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
$sql_data_array = array('orders_id' => $insert_id, 'products_id' => tep_get_prid($order->products[$i]['id']), 'products_model' => $order->products[$i]['model'], 'products_name' => $order->products[$i]['name'], 'products_price' => $order->products[$i]['price'], 'final_price' => $order->products[$i]['final_price'], 'products_tax' => $order->products[$i]['tax'], 'products_quantity' => $order->products[$i]['qty']);
tep_db_perform(TABLE_ORDERS_PRODUCTS, $sql_data_array);
$order_products_id = tep_db_insert_id();
$attributes_exist = '0';
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\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 = tep_db_query($attributes_query);
} else {
$attributes = tep_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 = tep_db_fetch_array($attributes);
$sql_data_array = array('orders_id' => $insert_id, 'orders_products_id' => $order_products_id, 'products_options' => $attributes_values['products_options_name'], 'products_options_values' => $attributes_values['products_options_values_name'], 'options_values_price' => $attributes_values['options_values_price'], 'price_prefix' => $attributes_values['price_prefix']);
tep_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array);
if (DOWNLOAD_ENABLED == 'true' && isset($attributes_values['products_attributes_filename']) && tep_not_null($attributes_values['products_attributes_filename'])) {
$sql_data_array = array('orders_id' => $insert_id, 'orders_products_id' => $order_products_id, 'orders_products_filename' => $attributes_values['products_attributes_filename'], 'download_maxdays' => $attributes_values['products_attributes_maxdays'], 'download_count' => $attributes_values['products_attributes_maxcount']);
tep_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array);
}
}
}
}
$GLOBALS[$this->_mbcartID] = $cartID . '-' . $insert_id;
tep_session_register($this->_mbcartID);
}
}
开发者ID:atmediacom,项目名称:oscommerce2,代码行数:73,代码来源:moneybookers.php
示例13: tep_show_products_carousel
echo tep_show_products_carousel($carousel_products, $carousel_id, '', 'html');
}
}
tep_exit();
break;
case 'load_captcha':
header('Content-type: image/gif');
$image_width = 95;
$image_height = 18;
$font_size = 5;
$rand_number1 = rand(6, 20);
$rand_number2 = rand(1, 15);
$string = $rand_number1 . ($rand_number1 > $rand_number2 ? ' - ' : ' + ') . $rand_number2 . ' = ';
$captcha_value = $rand_number1 > $rand_number2 ? $rand_number1 - $rand_number2 : $rand_number1 + $rand_number2;
if (!tep_session_is_registered('captcha_value')) {
tep_session_register('captcha_value');
}
$string_width = imagefontwidth($font_size) * strlen($string);
$string_height = imagefontheight($font_size);
$image = imagecreate($image_width, $image_height);
$rand1 = rand(0, 255);
$rand2 = rand(0, 255);
$rand3 = rand(0, 255);
$color = imagecolorallocate($image, $rand1, $rand2, $rand3);
$diff = 55;
$rand_new1 = $rand1 > $diff ? $rand1 - $diff : $rand1 + $diff;
$rand_new2 = $rand2 > $diff ? $rand2 - $diff : $rand2 + $diff;
$rand_new3 = $rand3 > $diff ? $rand3 - $diff : $rand3 + $diff;
if ($rand1 + $rand2 + $rand3 > 380) {
$color1 = imagecolorallocate($image, $rand_new1, $rand_new2, $rand_new3);
} else {
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:loader.php
示例14: date
$empty_country_file = $empty_country_dir . date('Y-m-d');
$unknown_country_visitors_count = 1;
if (file_exists($empty_country_file)) {
if ($fp = fopen($empty_country_file, 'r')) {
stream_set_timeout($fp, 1);
$content = fread($fp, filesize($empty_country_file));
fclose($fp);
$unknown_country_visitors_count = (int) trim($content) + 1;
}
}
if ($fp = fopen($empty_country_file, 'w')) {
fwrite($fp, $unknown_country_visitors_count);
fclose($fp);
}
$session_country_shop = ':' . SHOP_ID;
tep_session_register('session_country_shop');
}
}
// }
/*
$country_code = $_SERVER['GEOIP_COUNTRY_CODE'];
$all_countries = tep_get_shops_countries(0, 1);
$available_domains = array();
$available_country_name = '';
reset($all_countries);
while (list(, $country_info) = each($all_countries)) {
if ($country_code==$country_info['country_code']) {
$available_domains[] = $country_info['shop_url'];
$available_country_name = $country_info['country_ru_name'];
}
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:31,代码来源:application_top.php
示例15: tep_db_query
// verify the selected billing address
if (is_array($billto) && empty($billto) || is_numeric($billto)) {
$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' and address_book_id = '" . (int) $billto . "'");
$check_address = tep_db_fetch_array($check_address_query);
if ($check_address['total'] != '1') {
$billto = $customer_default_address_id;
if (tep_session_is_registered('payment')) {
tep_session_unregister('payment');
}
}
}
}
require DIR_WS_CLASSES . 'order.php';
$order = new order();
if (!tep_session_is_registered('comments')) {
tep_session_register('comments');
}
if (isset($HTTP_POST_VARS['comments']) && tep_not_null($HTTP_POST_VARS['comments'])) {
$comments = tep_db_prepare_input($HTTP_POST_VARS['comments']);
}
$total_weight = $cart->show_weight();
$total_count = $cart->count_contents();
// load all enabled payment modules
require DIR_WS_CLASSES . 'payment.php';
$payment_modules = new payment();
require DIR_WS_LANGUAGES . $language . '/' . FILENAME_CHECKOUT_PAYMENT;
$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
require DIR_WS_INCLUDES . 'template_top.php';
?>
开发者ID:osc2nuke,项目名称:demobts,代码行数:30,代码来源:checkout_payment.php
示例16: tep_mail
tep_mail($user_info['firstname'] . ' ' . $user_info['lastname'], $user_info['email'], $msg_subject, $msg_content, SITE_NAME, SITE_CONTACT_EMAIL);
}
if (sizeof($navigation->snapshot) > 0) {
$origin_href = get_href_link($navigation->snapshot['page'], tep_array_to_string($navigation->snapshot['get'], array(tep_session_name())), $navigation->snapshot['mode']);
$navigation->clear_snapshot();
tep_redirect($origin_href, '', 'SSL');
} else {
tep_redirect(get_href_link(PAGE_LOGIN_CONFIRM, '', 'SSL'));
}
}
} else {
$validator->addError(ERROR_FIELD_LOGIN, ERROR_INVALID_ACCOUNT);
}
if (count($validator->errors) == 0) {
// create new user
} else {
postAssign($smarty);
$smarty->assign('validerrors', $validator->errors);
}
} else {
if (empty($error_log_login)) {
$error_log_login = 1;
tep_session_register('error_log_login');
} else {
$error_log_login++;
tep_session_register('error_log_login');
}
}
}
$smarty->assign('validerrors', $validator->errors);
$_html_main_content = $smarty->fetch('home/login.html');
开发者ID:rongandat,项目名称:ookcart-project,代码行数:31,代码来源:login.php
示例17: confirmUser
function confirmUser($login_email, $login_password)
{
global $login_userid, $login_username;
$user_query = db_query("SELECT user_id, user_username, user_password FROM " . _TABLE_USERS . " WHERE member_email='" . $login_email . "'");
if (db_num_rows($user_query) > 0) {
// email passed
// check password
$user_info = db_fetch_array($user_query);
if (!validate_password($login_password, $user_info['user_password'])) {
// wrong password
return false;
} else {
// password passed ==> correct account
$login_userid = $member_info['user_id'];
$login_username = $member_info['user_username'];
tep_session_register('login_userid');
tep_session_register('login_username');
return true;
}
} else {
return false;
}
}
开发者ID:rongandat,项目名称:ookcart-project,代码行数:23,代码来源:general.php
示例18: tep_session_register
// include the language translations
require DIR_WS_LANGUAGES . $language . '.php';
// currency
if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && LANGUAGE_CURRENCY != $currency) {
if (!tep_session_is_registered('currency')) {
tep_session_register('currency');
}
if (isset($HTTP_GET_VARS['currency']) && $currencies->is_set($HTTP_GET_VARS['currency'])) {
$currency = $HTTP_GET_VARS['currency'];
} else {
$currency = USE_DEFAULT_LANGUAGE_CURRENCY == 'true' && $currencies->is_set(LANGUAGE_CURRENCY) ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;
}
}
// navigation history
if (!tep_session_is_registered('navigation') || !is_object($navigation)) {
tep_session_register('navigation');
$navigation = new navigationHistory();
}
$navigation->add_current_page();
// action recorder
include 'includes/classes/action_recorder.php';
// Shopping cart actions
if (isset($HTTP_GET_VARS['action'])) {
// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled
if ($session_started == false) {
tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
}
if (DISPLAY_CART == 'true') {
$goto = FILENAME_SHOPPING_CART;
$parameters = array('action', 'cPath', 'products_id', 'pid');
} else {
开发者ID:grum1965,项目名称:Plaster-Ceiling-Roses,代码行数:31,代码来源:application_top.php
示例19: tep_db_query
}
$billto = $HTTP_POST_VARS['address'];
$check_address_query = tep_db_query("select count(*) as total from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' and address_book_id = '" . (int) $billto . "'");
$check_address = tep_db_fetch_array($check_address_query);
if ($check_address['total'] == '1') {
if ($reset_payment == true) {
tep_session_unregister('payment');
}
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
} else {
tep_session_unregister('billto');
}
// no addresses to select from - customer decided to keep the current assigned address
} else {
if (!tep_session_is_registered('billto')) {
tep_session_register('billto');
}
$billto = $customer_default_address_id;
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}
}
// if no billing destination address was selected, use their own address as default
if (!tep_session_is_registered('billto')) {
$billto = $customer_default_address_id;
}
$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'));
$addresses_count = tep_count_customer_address_book_entries();
require DIR_WS_INCLUDES . 'template_top.php';
?>
开发者ID:wrtcoder,项目名称:mini_isp,代码行数:30,代码来源:checkout_payment_address.php
示例20: tep_redirect
} else {
tep_redirect(tep_href_link(FILENAME_DEFAULT));
}
}
}
$messageStack->add(ERROR_INVALID_ADMINISTRATOR, 'error');
} else {
$messageStack->add(sprintf(ERROR_ACTION_RECORDER, defined('MODULE_ACTION_RECORDER_ADMIN_LOGIN_MINUTES') ? (int) MODULE_ACTION_RECORDER_ADMIN_LOGIN_MINUTES : 5));
}
$actionRecorder->record(false);
break;
case 'logoff':
tep_session_unregister('selected_box');
tep_session_unregister('admin');
if (isset($HTTP_SERVER_VARS['PHP_AUTH_USER']) && !empty($HTTP_SERVER_VARS['PHP_AUTH_USER']) && isset($HTTP_SERVER_VARS['PHP_AUTH_PW']) && !empty($HTTP_SERVER_VARS['PHP_AUTH_PW'])) {
tep_session_register('auth_ignore');
$auth_ignore = true;
}
tep_redirect(tep_href_link(FILENAME_DEFAULT));
break;
case 'create':
$check_query = tep_db_query("select id from " . TABLE_ADMINISTRATORS . " limit 1");
if (tep_db_num_rows($check_query) == 0) {
$username = tep_db_prepare_input($HTTP_POST_VARS['username']);
$password = tep_db_prepare_input($HTTP_POST_VARS['password']);
tep_db_query("insert into " . TABLE_ADMINISTRATORS . " (user_name, user_password) values ('" . tep_db_input($username) . "', '" . tep_db_input(tep_encrypt_password($password)) . "')");
}
tep_redirect(tep_href_link(FILENAME_LOGIN));
break;
}
}
开发者ID:wrtcoder,项目名称:mini_isp,代码行数:31,代码来源:login.php
注:本文中的tep_session_register函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论