当前位置: 首页>>代码示例>>PHP>>正文


PHP tep_session_unregister函数代码示例

本文整理汇总了PHP中tep_session_unregister函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_session_unregister函数的具体用法?PHP tep_session_unregister怎么用?PHP tep_session_unregister使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了tep_session_unregister函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: add_wishlist

 function add_wishlist($wishlist_id, $attributes_id)
 {
     global $customer_id;
     if (!$this->in_wishlist($wishlist_id)) {
         $wishlist_id = tep_get_uprid($wishlist_id, $attributes_id);
         // Insert into session
         $this->wishID[$wishlist_id] = array($wishlist_id);
         if (tep_session_is_registered('customer_id')) {
             // Insert into database
             tep_db_query("insert into " . TABLE_WISHLIST . " (customers_id, products_id) values ('" . $customer_id . "', '" . $wishlist_id . "')");
         }
         // Read array of options and values for attributes in id[]
         if (is_array($attributes_id)) {
             reset($attributes_id);
             while (list($option, $value) = each($attributes_id)) {
                 $this->wishID[$wishlist_id]['attributes'][$option] = $value;
                 // Add to customers_wishlist_attributes table
                 if (tep_session_is_registered('customer_id')) {
                     tep_db_query("insert into " . TABLE_WISHLIST_ATTRIBUTES . " (customers_id, products_id, products_options_id , products_options_value_id) values ('" . $customer_id . "', '" . $wishlist_id . "', '" . $option . "', '" . $value . "' )");
                 }
             }
             tep_session_unregister('attributes_id');
         }
     }
 }
开发者ID:digideskio,项目名称:oscmax2,代码行数:25,代码来源:wishlist.php

示例2: execute

 function execute()
 {
     global $cart, $new_products_id_in_cart, $currencies, $oscTemplate;
     $cart_contents_string = '';
     if ($cart->count_contents() > 0) {
         $cart_contents_string = '<ul class="shoppingCartList">';
         $products = $cart->get_products();
         for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
             $cart_contents_string .= '<li';
             if (tep_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
                 $cart_contents_string .= ' class="newItemInCart"';
             }
             $cart_contents_string .= '>';
             $cart_contents_string .= $products[$i]['quantity'] . '&nbsp;x&nbsp;';
             $cart_contents_string .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">';
             $cart_contents_string .= $products[$i]['name'];
             $cart_contents_string .= '</a></li>';
             if (tep_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
                 tep_session_unregister('new_products_id_in_cart');
             }
         }
         $cart_contents_string .= '<li class="text-right"><hr>' . $currencies->format($cart->show_total()) . '</li>' . '</ul>';
     } else {
         $cart_contents_string .= '<p>' . MODULE_BOXES_SHOPPING_CART_BOX_CART_EMPTY . '</p>';
     }
     $data = '<div class="panel panel-default">' . '  <div class="panel-heading"><a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . MODULE_BOXES_SHOPPING_CART_BOX_TITLE . '</a></div>' . '  <div class="panel-body">' . $cart_contents_string . '</div>' . '</div>';
     $oscTemplate->addBlock($data, $this->group);
 }
开发者ID:osc2nuke,项目名称:demobts,代码行数:28,代码来源:bm_shopping_cart.php

示例3: amSessionUnregister

function amSessionUnregister($strSessionVar)
{
    if (amSessionIsRegistered($strSessionVar)) {
        tep_session_unregister($strSessionVar);
    }
    unset($GLOBALS[$strSessionVar]);
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:7,代码来源:attributeManagerSessionFunctions.inc.php

示例4: execute

 function execute()
 {
     global $cart, $new_products_id_in_cart, $currencies, $oscTemplate;
     $cart_contents_string = '';
     if ($cart->count_contents() > 0) {
         $cart_contents_string = NULL;
         $products = $cart->get_products();
         for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
             $cart_contents_string .= '<li';
             if (tep_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
                 $cart_contents_string .= ' class="newItemInCart"';
             }
             $cart_contents_string .= '>';
             $cart_contents_string .= $products[$i]['quantity'] . '&nbsp;x&nbsp;';
             $cart_contents_string .= '<a href="' . tep_href_link('product_info.php', 'products_id=' . $products[$i]['id']) . '">';
             $cart_contents_string .= $products[$i]['name'];
             $cart_contents_string .= '</a></li>';
             if (tep_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
                 tep_session_unregister('new_products_id_in_cart');
             }
         }
         $cart_contents_string .= '<li class="text-right"><hr>' . $currencies->format($cart->show_total()) . '</li>';
     } else {
         $cart_contents_string .= '<p>' . MODULE_BOXES_SHOPPING_CART_BOX_CART_EMPTY . '</p>';
     }
     ob_start();
     include 'includes/modules/boxes/templates/shopping_cart.php';
     $data = ob_get_clean();
     $oscTemplate->addBlock($data, $this->group);
 }
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:30,代码来源:bm_shopping_cart.php

示例5: _unregisterSessionVars

function _unregisterSessionVars()
{
    // unregister session variables used during checkout
    tep_session_unregister('sendto');
    tep_session_unregister('billto');
    tep_session_unregister('shipping');
    tep_session_unregister('payment');
    tep_session_unregister('comments');
}
开发者ID:TodoPago,项目名称:Plugin-OsCommerce,代码行数:9,代码来源:second_step_todopago.php

示例6: messageStack

 function messageStack()
 {
     global $messageToStack;
     $this->messages = array();
     if (tep_session_is_registered('messageToStack')) {
         for ($i = 0, $n = sizeof($messageToStack); $i < $n; $i++) {
             $this->add($messageToStack[$i]['class'], $messageToStack[$i]['text'], $messageToStack[$i]['type']);
         }
         tep_session_unregister('messageToStack');
     }
 }
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:11,代码来源:message_stack.php

示例7: execute

 function execute()
 {
     global $customer_id, $cart, $new_products_id_in_cart, $currencies, $oscTemplate;
     /* ** Altered for CCGV **	  
           $cart_contents_string = '';
     */
     if (tep_session_is_registered('customer_id')) {
         $gv_query = tep_db_query("select amount from " . TABLE_COUPON_GV_CUSTOMER . " where customer_id = '" . (int) $customer_id . "'");
         $gv_result = tep_db_fetch_array($gv_query);
         if ($gv_result['amount'] > 0) {
             $gv_contents_string = '<div class="ui-widget-content infoBoxContents"><div style="float:left;">' . VOUCHER_BALANCE . '</div><div style="float:right;">' . $currencies->format($gv_result['amount']) . '</div><div style="clear:both;"></div>';
             $gv_contents_string .= '<div style="text-align:center; width:100%; margin:auto;"><a href="' . tep_href_link(FILENAME_GV_SEND) . '">' . BOX_SEND_TO_FRIEND . '</a></div></div>';
         }
     }
     if (tep_session_is_registered('gv_id')) {
         $gv_query = tep_db_query("select coupon_amount from " . TABLE_COUPONS . " where coupon_id = '" . $gv_id . "'");
         $coupon = tep_db_fetch_array($gv_query);
         $gv_contents_string = '<div style="text-align:center; width:100%; margin:auto;">' . VOUCHER_REDEEMED . '</td><td class="smalltext" align="right" valign="bottom">' . $currencies->format($coupon['coupon_amount']) . '</div>';
     }
     if (tep_session_is_registered('cc_id') && $cc_id) {
         $coupon_query = tep_db_query("select * from " . TABLE_COUPONS . " where coupon_id = '" . $cc_id . "'");
         $coupon = tep_db_fetch_array($coupon_query);
         $coupon_desc_query = tep_db_query("select * from " . TABLE_COUPONS_DESCRIPTION . " where coupon_id = '" . $cc_id . "' and language_id = '" . $languages_id . "'");
         $coupon_desc = tep_db_fetch_array($coupon_desc_query);
         $text_coupon_help = sprintf("%s", $coupon_desc['coupon_name']);
         $gv_contents_string = '<div style="text-align:center; width:100%; margin:auto;">' . CART_COUPON . $text_coupon_help . '<br>' . '</div>';
     }
     /* ** EOF alterations for CCGV ** */
     if ($cart->count_contents() > 0) {
         $cart_contents_string = NULL;
         $products = $cart->get_products();
         for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
             $cart_contents_string .= '<li';
             if (tep_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
                 $cart_contents_string .= ' class="newItemInCart"';
             }
             $cart_contents_string .= '>';
             $cart_contents_string .= $products[$i]['quantity'] . '&nbsp;x&nbsp;';
             $cart_contents_string .= '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">';
             $cart_contents_string .= $products[$i]['name'];
             $cart_contents_string .= '</a></li>';
             if (tep_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
                 tep_session_unregister('new_products_id_in_cart');
             }
         }
         $cart_contents_string .= '<li class="text-right"><hr>' . $currencies->format($cart->show_total()) . '</li>';
     } else {
         $cart_contents_string .= '<p>' . MODULE_BOXES_SHOPPING_CART_BOX_CART_EMPTY . '</p>';
     }
     ob_start();
     include DIR_WS_MODULES . 'boxes/templates/shopping_cart.php';
     $data = ob_get_clean();
     $oscTemplate->addBlock($data, $this->group);
 }
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:54,代码来源:bm_shopping_cart.php

示例8: 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

示例9: reset

 function reset($reset_database = false)
 {
     global $customer_id;
     $this->contents = array();
     $this->total = 0;
     $this->weight = 0;
     $this->content_type = false;
     if (tep_session_is_registered('customer_id') && $reset_database == true) {
         tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET . " where customers_id = '" . (int) $customer_id . "'");
         tep_db_query("delete from " . TABLE_CUSTOMERS_BASKET_ATTRIBUTES . " where customers_id = '" . (int) $customer_id . "'");
     }
     unset($this->cartID);
     if (tep_session_is_registered('cartID')) {
         tep_session_unregister('cartID');
     }
 }
开发者ID:Sibzsolutions,项目名称:Savostore,代码行数:16,代码来源:shopping_cart.php

示例10: 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

示例11: execute

 function execute()
 {
     global $cart, $new_products_id_in_cart, $currencies, $oscTemplate;
     $cart_contents_string = '';
     if ($cart->count_contents() > 0) {
         $cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0" class="ui-widget-content infoBoxContents">';
         $products = $cart->get_products();
         for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
             $cart_contents_string .= '<tr><td align="right" valign="top">';
             if (tep_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
                 $cart_contents_string .= '<span class="newItemInCart">';
             }
             $cart_contents_string .= $products[$i]['quantity'] . '&nbsp;x&nbsp;';
             if (tep_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
                 $cart_contents_string .= '</span>';
             }
             $cart_contents_string .= '</td><td valign="top"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">';
             if (tep_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
                 $cart_contents_string .= '<span class="newItemInCart">';
             }
             $cart_contents_string .= $products[$i]['name'];
             if (tep_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
                 $cart_contents_string .= '</span>';
             }
             $cart_contents_string .= '</a></td></tr>';
             if (tep_session_is_registered('new_products_id_in_cart') && $new_products_id_in_cart == $products[$i]['id']) {
                 tep_session_unregister('new_products_id_in_cart');
             }
         }
         $cart_contents_string .= '<tr><td colspan="2" style="padding-top: 5px; padding-bottom: 2px;">' . tep_draw_separator() . '</td></tr>' . '<tr><td colspan="2" align="right">' . $currencies->format($cart->show_total()) . '</td></tr>' . '</table>';
     } else {
         $cart_contents_string .= '<div class="ui-widget-content infoBoxContents">' . MODULE_BOXES_SHOPPING_CART_BOX_CART_EMPTY . '</div>';
     }
     $data = '<div class="ui-widget infoBoxContainer">' . '  <div class="ui-widget-header infoBoxHeading"><a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . MODULE_BOXES_SHOPPING_CART_BOX_TITLE . '</a></div>' . '  ' . $cart_contents_string . '</div>';
     $oscTemplate->addBlock($data, $this->group);
 }
开发者ID:Sibzsolutions,项目名称:Savostore,代码行数:36,代码来源:bm_shopping_cart.php

示例12: tep_session_unregister

<?php

tep_session_unregister('login_userid');
tep_session_unregister('login_account_number');
tep_session_unregister('login_useremail');
tep_session_unregister('navigation');
tep_session_unregister('login_main_account_info');
// delete the cookie
tep_setcookie("account_number", $account_number, time() - 1, HTTP_COOKIE_PATH, HTTP_COOKIE_DOMAIN);
tep_setcookie("password", $login_password, time() - 1, HTTP_COOKIE_PATH, HTTP_COOKIE_DOMAIN);
tep_redirect(get_href_link(PAGE_DEFAULT, '', 'SSL'));
开发者ID:rongandat,项目名称:ookcart-project,代码行数:11,代码来源:logout.php

示例13: strip_tags

for ($i = 0, $n = sizeof($order_totals); $i < $n; $i++) {
    $email_order .= strip_tags($order_totals[$i]['title']) . ' ' . strip_tags($order_totals[$i]['text']) . "\n";
}
if ($order->content_type != 'virtual') {
    $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $sendto, 0, '', "\n") . "\n";
}
$email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_label($customer_id, $billto, 0, '', "\n") . "\n\n";
if (is_object(${$payment})) {
    $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n";
    $payment_class = ${$payment};
    $email_order .= $payment_class->title . "\n\n";
    if ($payment_class->email_footer) {
        $email_order .= $payment_class->email_footer . "\n\n";
    }
}
tep_mail($order->customer['firstname'] . ' ' . $order->customer['lastname'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
// send emails to other people
if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
    tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
}
// load the after_process function from the payment modules
$payment_modules->after_process();
$cart->reset(true);
// unregister session variables used during checkout
tep_session_unregister('sendto');
tep_session_unregister('billto');
tep_session_unregister('shipping');
tep_session_unregister('payment');
tep_session_unregister('comments');
tep_redirect(tep_href_link(FILENAME_CHECKOUT_SUCCESS, '', 'SSL'));
require DIR_WS_INCLUDES . 'application_bottom.php';
开发者ID:jobw0110,项目名称:lascolinasobgyn,代码行数:31,代码来源:checkout_process.php

示例14: tep_session_register

                    $reset_shipping = true;
                }
            }
        } else {
            tep_session_register('sendto');
        }
        $sendto = $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) $sendto . "'");
        $check_address = tep_db_fetch_array($check_address_query);
        if ($check_address['total'] == '1') {
            if ($reset_shipping == true) {
                tep_session_unregister('shipping');
            }
            tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
        } else {
            tep_session_unregister('sendto');
        }
    } else {
        if (!tep_session_is_registered('sendto')) {
            tep_session_register('sendto');
        }
        $sendto = $customer_default_address_id;
        tep_redirect(tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
    }
}
// if no shipping destination address was selected, use their own address as default
if (!tep_session_is_registered('sendto')) {
    $sendto = $customer_default_address_id;
}
$breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2, tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL'));
开发者ID:laiello,项目名称:hotel-os,代码行数:31,代码来源:checkout_shipping_address.php

示例15: tep_session_unregister

                }
                if (isset($quote['error'])) {
                    tep_session_unregister('shipping');
                } else {
                    if (isset($quote[0]['methods'][0]['title']) && isset($quote[0]['methods'][0]['cost'])) {
                        $shipping = array('id' => $shipping, 'title' => $free_shipping == true ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')', 'cost' => $quote[0]['methods'][0]['cost']);
                        tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
                    }
                }
            } else {
                tep_session_unregister('shipping');
            }
        }
    } else {
        if (defined('SHIPPING_ALLOW_UNDEFINED_ZONES') && SHIPPING_ALLOW_UNDEFINED_ZONES == 'False') {
            tep_session_unregister('shipping');
        } else {
            $shipping = false;
            tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
        }
    }
}
// get all available shipping quotes
$quotes = $shipping_modules->quote();
// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
if (!tep_session_is_registered('shipping') || tep_session_is_registered('shipping') && $shipping == false && tep_count_shipping_modules() > 1) {
    $shipping = $shipping_modules->cheapest();
}
开发者ID:skarred,项目名称:Responsive-osCommerce,代码行数:31,代码来源:checkout_shipping.php


注:本文中的tep_session_unregister函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。