• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP tep_session_recreate函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: execute

 public function execute()
 {
     global $login_customer_id;
     $OSCOM_Db = Registry::get('Db');
     if (is_int($login_customer_id) && $login_customer_id > 0) {
         if (SESSION_RECREATE == 'True') {
             tep_session_recreate();
         }
         $Qcustomer = $OSCOM_Db->prepare('select c.customers_firstname, c.customers_default_address_id, ab.entry_country_id, ab.entry_zone_id from :table_customers c left join :table_address_book ab on (c.customers_id = ab.customers_id and c.customers_default_address_id = ab.address_book_id) where c.customers_id = :customers_id');
         $Qcustomer->bindInt(':customers_id', $login_customer_id);
         $Qcustomer->execute();
         $_SESSION['customer_id'] = $login_customer_id;
         $_SESSION['customer_default_address_id'] = $Qcustomer->valueInt('customers_default_address_id');
         $_SESSION['customer_first_name'] = $Qcustomer->value('customers_firstname');
         $_SESSION['customer_country_id'] = $Qcustomer->valueInt('entry_country_id');
         $_SESSION['customer_zone_id'] = $Qcustomer->valueInt('entry_zone_id');
         $Qupdate = $OSCOM_Db->prepare('update :table_customers_info set customers_info_date_of_last_logon = now(), customers_info_number_of_logons = customers_info_number_of_logons+1, password_reset_key = null, password_reset_date = null where customers_info_id = :customers_info_id');
         $Qupdate->bindInt(':customers_info_id', $_SESSION['customer_id']);
         $Qupdate->execute();
         // reset session token
         $_SESSION['sessiontoken'] = md5(tep_rand() . tep_rand() . tep_rand() . tep_rand());
         // restore cart contents
         $_SESSION['cart']->restore_contents();
         if (count($_SESSION['navigation']->snapshot) > 0) {
             $origin_href = OSCOM::link($_SESSION['navigation']->snapshot['page'], tep_array_to_string($_SESSION['navigation']->snapshot['get'], array(session_name())), $_SESSION['navigation']->snapshot['mode']);
             $_SESSION['navigation']->clear_snapshot();
             HTTP::redirect($origin_href);
         }
         OSCOM::redirect('index.php');
     }
 }
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:31,代码来源:Process.php


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


示例3: tep_db_perform

 }
 if (ACCOUNT_STATE == 'true') {
     if ($zone_id > 0) {
         $sql_data_array['entry_zone_id'] = $zone_id;
         $sql_data_array['entry_state'] = '';
     } else {
         $sql_data_array['entry_zone_id'] = '0';
         $sql_data_array['entry_state'] = $state;
     }
 }
 tep_db_perform(TABLE_ADDRESS_BOOK, $sql_data_array);
 $address_id = tep_db_insert_id();
 tep_db_query("update " . TABLE_CUSTOMERS . " set customers_default_address_id = '" . (int) $address_id . "' where customers_id = '" . (int) $customer_id . "'");
 tep_db_query("insert into " . TABLE_CUSTOMERS_INFO . " (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int) $customer_id . "', '0', now())");
 if (SESSION_RECREATE == 'True') {
     tep_session_recreate();
 }
 $customer_first_name = $firstname;
 $customer_default_address_id = $address_id;
 $customer_country_id = $country;
 $customer_zone_id = $zone_id;
 tep_session_register('customer_id');
 tep_session_register('customer_first_name');
 tep_session_register('customer_default_address_id');
 tep_session_register('customer_country_id');
 tep_session_register('customer_zone_id');
 // restore cart contents
 $cart->restore_contents();
 // build the message content
 $name = $firstname . ' ' . $lastname;
 if (ACCOUNT_GENDER == 'true') {
开发者ID:laiello,项目名称:hotel-os,代码行数:31,代码来源:create_account.php


示例4: log_customer_in

function log_customer_in($email_address = '', $password = '')
{
    global $cart;
    $error = false;
    $check_customer_query = tep_db_query("select customers_id, abo_id, customers_firstname, customers_password, customers_email_address, customers_username, customers_default_address_id, status, customers_group from customers where customers_email_address = '" . tep_db_input($email_address) . "' OR customers_username = '" . tep_db_input($email_address) . "'");
    if (!tep_db_num_rows($check_customer_query)) {
        $error = true;
    } else {
        $check_customer = tep_db_fetch_array($check_customer_query);
        if (!tep_validate_password($password, $check_customer['customers_password'])) {
            $error = true;
        } else {
            if ($check_customer['status'] == '0') {
                $active_error = true;
            } else {
                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 = '" . (int) $check_customer['customers_id'] . "' and address_book_id = '" . (int) $check_customer['customers_default_address_id'] . "'");
                $check_country = tep_db_fetch_array($check_country_query);
                global $customer_id, $abo_id, $customer_default_address_id, $customer_first_name, $customer_country_id, $customer_zone_id, $customer_group, $customers_email_address, $customers_username;
                $customer_id = $check_customer['customers_id'];
                $abo_id = $check_customer['abo_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'];
                $customer_group = $check_customer['customers_group'];
                $customers_email_address = $check_customer['customers_email_address'];
                $customers_username = $check_customer['customers_username'];
                tep_session_register('customer_id');
                tep_session_register('abo_id');
                tep_session_register('customer_default_address_id');
                tep_session_register('customer_first_name');
                tep_session_register('customer_country_id');
                tep_session_register('customer_zone_id');
                tep_session_register('customer_group');
                tep_session_register('customers_email_address');
                tep_session_register('customers_username');
                /*autologin*/
                $cookie_url_array = parse_url((ENABLE_SSL == true ? HTTPS_SERVER : HTTP_SERVER) . substr(DIR_WS_CATALOG, 0, -1));
                $cookie_path = $cookie_url_array['path'];
                if (ALLOW_AUTOLOGON == 'false' || $_POST['remember_me'] == '') {
                    setcookie("email_address", "", time() - 3600, $cookie_path);
                    // Delete email_address cookie
                    setcookie("password", "", time() - 3600, $cookie_path);
                    // Delete password cookie
                } else {
                    setcookie('email_address', $email_address, time() + 365 * 24 * 3600, $cookie_path, '', getenv('HTTPS') == 'on' ? 1 : 0);
                    setcookie('password', $check_customer['customers_password'], time() + 365 * 24 * 3600, $cookie_path, '', getenv('HTTPS') == 'on' ? 1 : 0);
                }
                /*autologin*/
                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();
                /*FORUM*/
                if (FORUM_ACTIVE == 'true' && FORUM_CROSS_LOGIN == 'true') {
                    $user->session_begin();
                    $auth->acl($user->data);
                    $get_forum_username_query = tep_db_query("SELECT username_clean FROM " . FORUM_DB_DATABASE . ".users WHERE user_email = '" . $_POST['email_address'] . "'");
                    $get_forum_username = tep_db_fetch_array($get_forum_username_query);
                    if ($_POST['remember_me'] == 'on') {
                        $remember = 'true';
                    } else {
                        $remember = 'false';
                    }
                    $auth->login($get_forum_username['username_clean'], $_POST['password'], $remember, 1, 0);
                }
                /*FORUM*/
            }
        }
    }
    if ($error == true) {
        return Translate('Fout: er kon niet ingelogd worden met het ingegeven e-mailadres en wachtwoord. Gelieve opnieuw te proberen');
    }
    if ($active_error == true) {
        return Translate('Uw account werd nog niet geactiveerd.');
    }
    return true;
}
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:79,代码来源:general.php


示例5: processAjaxLogin

 function processAjaxLogin($emailAddress, $password)
 {
     global $cart, $customer_id, $onepage, $customer_default_address_id, $customer_first_name, $customer_country_id, $customer_zone_id, $sendto, $billto;
     $error = false;
     $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($emailAddress) . "'");
     if (!tep_db_num_rows($check_customer_query)) {
         $error = true;
     } else {
         $check_customer = tep_db_fetch_array($check_customer_query);
         // Check that password is good
         if (!tep_validate_password($password, $check_customer['customers_password'])) {
             $error = true;
         } else {
             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 = '" . (int) $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'];
             $onepage['customer']['email_address'] = $check_customer['customers_email_address'];
             $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'];
             $onepage['createAccount'] = false;
             $sendto = $customer_default_address_id;
             $billto = $customer_default_address_id;
             $this->setDefaultSendTo();
             $this->setDefaultBillTo();
             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');
             }
             if (!tep_session_is_registered('sendto')) {
                 tep_session_register('sendto');
             }
             if (!tep_session_is_registered('billto')) {
                 tep_session_register('billto');
             }
             if (!tep_session_is_registered('customer_id')) {
                 tep_session_register('customer_id');
             }
             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 . "'");
             // restore cart contents
             $cart->restore_contents();
         }
     }
     $json = '';
     if ($error === false) {
         $json .= '{
       "success": "true",
       "msg": "Loading your account info"
     }';
     } else {
         $json .= '{
       "success": "false",
       "msg": "Authorization Failed"
     }';
     }
     return $json;
 }
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:69,代码来源:onepage_checkout.php


示例6: create_customer


//.........这里部分代码省略.........
             }
             tep_db_perform('customers', $sql_data_array);
             $customer_id = tep_db_insert_id();
             //Address book table
             $sql_data_array = array('customers_id' => $customer_id, 'entry_firstname' => $name, 'entry_lastname' => '', 'entry_street_address' => $street_address, 'entry_postcode' => $postcode, 'entry_city' => $city, 'entry_country_id' => $country);
             if (ACCOUNT_GENDER == 'true') {
                 $sql_data_array['entry_gender'] = $gender;
             }
             if (ACCOUNT_COMPANY == 'true') {
                 $sql_data_array['entry_company'] = $company;
             }
             if (ACCOUNT_COMPANY == 'true') {
                 $sql_data_array['billing_tva_intracom'] = $btwnr;
             }
             if (ACCOUNT_SUBURB == 'true') {
                 $sql_data_array['entry_suburb'] = $suburb;
             }
             if (ACCOUNT_STATE == 'true') {
                 if ($zone_id > 0) {
                     $sql_data_array['entry_zone_id'] = $zone_id;
                     $sql_data_array['entry_state'] = '';
                 } else {
                     $sql_data_array['entry_zone_id'] = '0';
                     $sql_data_array['entry_state'] = $state;
                 }
             }
             tep_db_perform('address_book', $sql_data_array);
             $address_id = tep_db_insert_id();
             tep_db_query("update customers set customers_default_address_id = '" . (int) $address_id . "' where customers_id = '" . (int) $customer_id . "'");
             //Customers info table
             tep_db_query("insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created) values ('" . (int) $customer_id . "', '0', now())");
             //Session
             if (SESSION_RECREATE == 'True') {
                 tep_session_recreate();
             }
             $customer_first_name = $name;
             $customer_default_address_id = $address_id;
             $customer_country_id = $country;
             $customer_zone_id = $zone_id;
             if ($this->options['create_account_mode'] == 'Direct access') {
                 /********************/
                 /*	Direct access	*/
                 /********************/
                 //Forum
                 if (FORUM_ACTIVE == 'true' && FORUM_SYNC_USERS == 'true' && !empty($forum_username)) {
                     /*add user*/
                     $sql_data_array = array('user_type' => '0', 'group_id' => '10', 'user_permissions' => '', 'user_ip' => $_SERVER['REMOTE_ADDR'], 'user_regdate' => time(), 'username' => $forum_username, 'username_clean' => strtolower($forum_username), 'user_password' => phpbb_hash($password), 'user_passchg' => time(), 'user_email' => strtolower($email_address), 'user_email_hash' => phpbb_email_hash(strtolower($email_address)), 'user_lastvisit' => time(), 'user_lastmark' => time(), 'user_lastpage' => FILENAME_CREATE_ACCOUNT, 'user_lang' => 'nl', 'user_timezone' => '1.00', 'user_dst' => '1', 'user_dateformat' => 'd M Y, H:i', 'user_style' => '3', 'user_form_salt' => unique_id(), 'user_new' => '1');
                     tep_db_perform(FORUM_DB_DATABASE . '.users', $sql_data_array, 'insert', false);
                     /*get user id*/
                     $get_forum_user_query = tep_db_query("SELECT user_id FROM " . FORUM_DB_DATABASE . ".users WHERE user_email = '" . $email_address . "'");
                     $get_forum_user = tep_db_fetch_array($get_forum_user_query);
                     $get_usergroup_query = tep_db_query("SELECT group_id FROM " . FORUM_DB_DATABASE . ".groups WHERE group_name = 'REGISTERED'");
                     $get_usergroup = tep_db_fetch_array($get_usergroup_query);
                     /*add user to groups*/
                     tep_db_query("INSERT INTO " . FORUM_DB_DATABASE . ".user_group (group_id, user_id, group_leader, user_pending) VALUES ('" . $get_usergroup['group_id'] . "','" . $get_forum_user['user_id'] . "','0','0')");
                     /*user is created, let's add session for autologin*/
                     if (FORUM_CROSS_LOGIN == 'true') {
                         $user->session_begin();
                         $auth->acl($user->data);
                         $auth->login(strtolower($forum_username), $password, false, 1, 0);
                     }
                 }
                 //Session
                 $_SESSION['customer_id'] = $customer_id;
                 $_SESSION['customer_first_name'] = $customer_first_name;
                 $_SESSION['customer_default_address_id'] = $customer_default_address_id;
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:67,代码来源:Customer.php


示例7: user_login

 function user_login($email_address)
 {
     global $order, $customer_id, $customer_default_address_id, $customer_first_name, $customer_country_id, $customer_zone_id;
     /*
     This allows the user to login with only a valid email (the email address sent back by PayPal)
     Their PayPal payerID is stored in the database, but I still don't know if that number changes.  If it doesn't, it could be used to
     help identify an existing customer who hasn't logged in.  Until I know for sure, the email address is enough
     */
     global $session_started, $language, $cart;
     if ($session_started == false) {
         tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
     }
     require DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN;
     $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id, customers_paypal_payerid from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
     $check_customer = tep_db_fetch_array($check_customer_query);
     if (!tep_db_num_rows($check_customer_query)) {
         $this->away_with_you(MODULE_PAYMENT_PAYPAL_DP_TEXT_BAD_LOGIN, true);
     } else {
         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 = '" . (int) $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'];
         tep_session_register('customer_id');
         tep_session_register('customer_default_address_id');
         tep_session_register('customer_first_name');
         tep_session_register('customer_country_id');
         tep_session_register('customer_zone_id');
         $order->customer['id'] = $customer_id;
         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();
         $this->away_with_you();
     }
 }
开发者ID:rrecurse,项目名称:IntenseCart,代码行数:39,代码来源:paypal_wpp.php


示例8: checkout_login

function checkout_login($email_address, $password, $pass_crypt)
{
    global $error, $cart, $wishList;
    global $customer_id;
    global $customer_default_address_id;
    global $customer_first_name;
    global $customer_password;
    global $customer_country_id;
    global $customer_zone_id;
    $email_address = tep_db_prepare_input($email_address);
    $password = tep_db_prepare_input($password);
    // Check if email exists
    $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
    if (!tep_db_num_rows($check_customer_query)) {
        $error = true;
    } else {
        $check_customer = tep_db_fetch_array($check_customer_query);
        // Check that password is good
        if (isset($pass_crypt) ? $pass_crypt != $check_customer['customers_password'] : !tep_validate_password($password, $check_customer['customers_password'])) {
            $error = true;
        } else {
            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 = '" . (int) $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_password = $password;
            $customer_country_id = $check_country['entry_country_id'];
            $customer_zone_id = $check_country['entry_zone_id'];
            tep_session_register('customer_id');
            tep_session_register('customer_default_address_id');
            tep_session_register('customer_first_name');
            tep_session_register('customer_password');
            tep_session_register('customer_country_id');
            tep_session_register('customer_zone_id');
            tep_session_unregister('referral_id');
            //rmh referral
            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();
            $wishList->restore_wishlist();
        }
    }
}
开发者ID:rrecurse,项目名称:IntenseCart,代码行数:46,代码来源:checkout.php


示例9: user_login

 function user_login($email_address)
 {
     global $order, $customer_id, $customer_default_address_id, $customer_first_name, $customer_country_id, $customer_zone_id;
     global $session_started, $language, $cart;
     if ($session_started == false) {
         tep_redirect(tep_href_link(FILENAME_COOKIE_USAGE));
     }
     require DIR_WS_LANGUAGES . $language . '/' . FILENAME_LOGIN;
     $check_customer_query = tep_db_query("select customers_id, customers_firstname, customers_password, customers_email_address, customers_default_address_id, customers_paypal_payerid from " . TABLE_CUSTOMERS . " where customers_email_address = '" . tep_db_input($email_address) . "'");
     $check_customer = tep_db_fetch_array($check_customer_query);
     if (!tep_db_num_rows($check_customer_query)) {
         $this->away_with_you(MODULE_PAYMENT_PAYPAL_DP_TEXT_BAD_LOGIN, true);
     } else {
         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 = '" . (int) $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'];
         tep_session_register('customer_id');
         tep_session_register('customer_default_address_id');
         tep_session_register('customer_first_name');
         tep_session_register('customer_country_id');
         tep_session_register('customer_zone_id');
         $order->customer['id'] = $customer_id;
         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();
         $this->set_ec_order_address();
         $this->away_with_you();
     }
 }
开发者ID:digideskio,项目名称:oscmax2,代码行数:35,代码来源:paypal_wpp.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP tep_session_register函数代码示例发布时间:2022-05-23
下一篇:
PHP tep_session_name函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap