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

PHP tep_session_is_registered函数代码示例

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

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



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

示例1: payment

 function payment($module = '')
 {
     global $payment, $language, $PHP_SELF;
     if (defined('MODULE_PAYMENT_INSTALLED') && tep_not_null(MODULE_PAYMENT_INSTALLED)) {
         // BOF Separate Pricing Per Customer, next line original code
         //       $this->modules = explode(';', MODULE_PAYMENT_INSTALLED);
         global $sppc_customer_group_id, $customer_id;
         if (!tep_session_is_registered('sppc_customer_group_id')) {
             $customer_group_id = '0';
         } else {
             $customer_group_id = $sppc_customer_group_id;
         }
         $customer_payment_query = tep_db_query("select IF(c.customers_payment_allowed <> '', c.customers_payment_allowed, cg.group_payment_allowed) as payment_allowed from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_GROUPS . " cg where c.customers_id = '" . $customer_id . "' and cg.customers_group_id =  '" . $customer_group_id . "'");
         if ($customer_payment = tep_db_fetch_array($customer_payment_query)) {
             if (tep_not_null($customer_payment['payment_allowed'])) {
                 $temp_payment_array = explode(';', $customer_payment['payment_allowed']);
                 $installed_modules = explode(';', MODULE_PAYMENT_INSTALLED);
                 for ($n = 0; $n < sizeof($installed_modules); $n++) {
                     // check to see if a payment method is not de-installed
                     if (in_array($installed_modules[$n], $temp_payment_array)) {
                         $payment_array[] = $installed_modules[$n];
                     }
                 }
                 // end for loop
                 $this->modules = $payment_array;
             } else {
                 $this->modules = explode(';', MODULE_PAYMENT_INSTALLED);
             }
         } else {
             // default
             $this->modules = explode(';', MODULE_PAYMENT_INSTALLED);
         }
         // EOF Separate Pricing Per Customer
         $include_modules = array();
         if (tep_not_null($module) && in_array($module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1), $this->modules)) {
             $this->selected_module = $module;
             $include_modules[] = array('class' => $module, 'file' => $module . '.php');
         } else {
             reset($this->modules);
             while (list(, $value) = each($this->modules)) {
                 $class = substr($value, 0, strrpos($value, '.'));
                 $include_modules[] = array('class' => $class, 'file' => $value);
             }
         }
         for ($i = 0, $n = sizeof($include_modules); $i < $n; $i++) {
             include DIR_WS_LANGUAGES . $language . '/modules/payment/' . $include_modules[$i]['file'];
             include DIR_WS_MODULES . 'payment/' . $include_modules[$i]['file'];
             $GLOBALS[$include_modules[$i]['class']] = new $include_modules[$i]['class']();
         }
         // if there is only one payment method, select it as default because in
         // checkout_confirmation.php the $payment variable is being assigned the
         // $_POST['payment'] value which will be empty (no radio button selection possible)
         if (tep_count_payment_modules() == 1 && (!isset($GLOBALS[$payment]) || isset($GLOBALS[$payment]) && !is_object($GLOBALS[$payment]))) {
             $payment = $include_modules[0]['class'];
         }
         if (tep_not_null($module) && in_array($module, $this->modules) && isset($GLOBALS[$module]->form_action_url)) {
             $this->form_action_url = $GLOBALS[$module]->form_action_url;
         }
     }
 }
开发者ID:eosc,项目名称:EosC-2.3,代码行数:60,代码来源:payment.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 = 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


示例3: getTaxRate

 function getTaxRate($class_id, $country_id = -1, $zone_id = -1)
 {
     // LINE ADDED: Bugfix 0000036
     global $customer_zone_id, $customer_country_id;
     if ($country_id == -1 && $zone_id == -1) {
         if (!tep_session_is_registered('customer_id')) {
             $country_id = STORE_COUNTRY;
             $zone_id = STORE_ZONE;
         } else {
             $country_id = $customer_country_id;
             $zone_id = $customer_zone_id;
         }
     }
     if (isset($this->tax_rates[$class_id][$country_id][$zone_id]['rate']) == false) {
         $tax_query = tep_db_query("select sum(tax_rate) as tax_rate from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . (int) $country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . (int) $zone_id . "') and tr.tax_class_id = '" . (int) $class_id . "' group by tr.tax_priority");
         if (tep_db_num_rows($tax_query)) {
             $tax_multiplier = 1.0;
             while ($tax = tep_db_fetch_array($tax_query)) {
                 $tax_multiplier *= 1.0 + $tax['tax_rate'] / 100;
             }
             $tax_rate = ($tax_multiplier - 1.0) * 100;
         } else {
             $tax_rate = 0;
         }
         $this->tax_rates[$class_id][$country_id][$zone_id]['rate'] = $tax_rate;
     }
     return $this->tax_rates[$class_id][$country_id][$zone_id]['rate'];
 }
开发者ID:digideskio,项目名称:oscmax2,代码行数:28,代码来源:tax.php


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


示例5: execute

 function execute()
 {
     global $HTTP_GET_VARS, $HTTP_POST_VARS, $oscTemplate, $customer_id, $order_id;
     if (tep_session_is_registered('customer_id')) {
         $global_query = tep_db_query("select global_product_notifications from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int) $customer_id . "'");
         $global = tep_db_fetch_array($global_query);
         if ($global['global_product_notifications'] != '1') {
             if (isset($HTTP_GET_VARS['action']) && $HTTP_GET_VARS['action'] == 'update') {
                 if (isset($HTTP_POST_VARS['notify']) && is_array($HTTP_POST_VARS['notify']) && !empty($HTTP_POST_VARS['notify'])) {
                     $notify = array_unique($HTTP_POST_VARS['notify']);
                     foreach ($notify as $n) {
                         if (is_numeric($n) && $n > 0) {
                             $check_query = tep_db_query("select products_id from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int) $n . "' and customers_id = '" . (int) $customer_id . "' limit 1");
                             if (!tep_db_num_rows($check_query)) {
                                 tep_db_query("insert into " . TABLE_PRODUCTS_NOTIFICATIONS . " (products_id, customers_id, date_added) values ('" . (int) $n . "', '" . (int) $customer_id . "', now())");
                             }
                         }
                     }
                 }
             }
             $products_displayed = array();
             $products_query = tep_db_query("select products_id, products_name from " . TABLE_ORDERS_PRODUCTS . " where orders_id = '" . (int) $order_id . "' order by products_name");
             while ($products = tep_db_fetch_array($products_query)) {
                 if (!isset($products_displayed[$products['products_id']])) {
                     $products_displayed[$products['products_id']] = tep_draw_checkbox_field('notify[]', $products['products_id']) . ' ' . $products['products_name'];
                 }
             }
             $products_notifications = implode('<br />', $products_displayed);
             ob_start();
             include DIR_WS_MODULES . 'content/' . $this->group . '/templates/product_notifications.php';
             $template = ob_get_clean();
             $oscTemplate->addContent($template, $this->group);
         }
     }
 }
开发者ID:Sibzsolutions,项目名称:Savostore,代码行数:35,代码来源:cm_cs_product_notifications.php


示例6: output

 public function output($step = 0)
 {
     global $temp_orders_id, $currencies;
     $html = '';
     if (tep_session_is_registered('customer_id')) {
         $amount = $this->calculate_amount();
         if ($amount > 0) {
             if (!empty($temp_orders_id)) {
                 $selected_query = tep_db_query('SELECT value FROM temp_orders_total WHERE class="' . $this->type . '" AND orders_id = "' . $temp_orders_id . '"');
                 $selected = tep_db_fetch_array($selected_query);
             }
             if ($this->config['status'] == 'true') {
                 $html .= '<label class="control-label" for="' . $this->type . '" style="display:block;">';
                 $html .= '<div class="' . $this->type . '_item clearfix">';
                 $html .= '<input type="checkbox" name="' . $this->type . '" value="' . $id . '" id="' . $this->type . '"' . (isset($selected['value']) ? ' checked=checked' : '') . ' />';
                 $html .= '<div class="' . $this->type . '_title">&nbsp; ' . $currencies->format($amount) . ' ' . Translate($this->config['title']) . '</div>';
                 if (!empty($this->config['description'])) {
                     $html .= '<div class="' . $this->type . '_description">&nbsp; ' . Translate($this->config['description']) . '</div>';
                 }
                 $html .= '</div>';
                 $html .= '</label>';
             }
         }
     }
     return $html;
 }
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:26,代码来源:Cadeaubon_module.php


示例7: execute

 function execute()
 {
     global $customer_id, $languages_id, $PHP_SELF, $oscTemplate;
     if (tep_session_is_registered('customer_id')) {
         // retreive the last x products purchased
         $orders_query = tep_db_query("select distinct op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_PRODUCTS . " p where o.customers_id = '" . (int) $customer_id . "' and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = '1' group by products_id order by o.date_purchased desc limit " . MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX);
         if (tep_db_num_rows($orders_query)) {
             $product_ids = '';
             while ($orders = tep_db_fetch_array($orders_query)) {
                 $product_ids .= (int) $orders['products_id'] . ',';
             }
             $product_ids = substr($product_ids, 0, -1);
             $customer_orders_string = '<ul class="list-unstyled">';
             $products_query = tep_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id in (" . $product_ids . ") and language_id = '" . (int) $languages_id . "' order by products_name");
             while ($products = tep_db_fetch_array($products_query)) {
                 $customer_orders_string .= '<li><span class="pull-right"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $products['products_id']) . '"><span class="glyphicon glyphicon-shopping-cart"></span></a></span><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . $products['products_name'] . '</a></li>';
             }
             $customer_orders_string .= '</ul>';
             if ($this->group == 'boxes_footer') {
                 $data = '<div class="col-sm-3 col-lg-2">' . '  <div class="footerbox order-history">' . '    <h2>' . MODULE_BOXES_ORDER_HISTORY_BOX_TITLE . '</h2>';
             } else {
                 $data = '<div class="panel panel-default">' . '  <div class="panel-heading">' . MODULE_BOXES_ORDER_HISTORY_BOX_TITLE . '</div>';
             }
             $data .= '  <div class="panel-body">' . $customer_orders_string . '</div>';
             $data .= '</div>';
             if ($this->group == 'boxes_footer') {
                 $data .= '</div>';
             }
             $oscTemplate->addBlock($data, $this->group);
         }
     }
 }
开发者ID:osc2nuke,项目名称:demobts,代码行数:32,代码来源:bm_order_history.php


示例8: RequireLoginValidForPage

function RequireLoginValidForPage($aRetPage)
{
    global $PHP_SELF, $in_login, $login_id, $aADMPages;
    $aThisPage = basename($PHP_SELF);
    //print( "$login_id<br>" );
    $aRetPage = str_replace($aThisPage, 'default.php', $aRetPage);
    if (empty($in_login)) {
        if (!tep_session_is_registered('login_id')) {
            header('Location: login.php?in_login=yes&retpage=' . urlencode($aRetPage) . "\n");
        } else {
            $aSQL = "select allowed_pages from administrators where ( administrator_id = '{$login_id}' )";
            $aRes = tep_db_query($aSQL);
            if ($aVal = tep_db_fetch_array($aRes)) {
                $aPages = $aVal['allowed_pages'];
                if (trim($aPages != '*')) {
                    $aAllowedPages = explode('|', $aPages);
                    $aCurrentPageBox = $aADMPages[$aThisPage];
                    //print( "$aThisPage, $aCurrentPageBox<br>" );
                    if ($aCurrentPageBox != '*') {
                        if (!in_array($aCurrentPageBox, $aAllowedPages)) {
                            header('Location: login.php?' . urlencode($aRetPage) . "\n");
                        }
                    }
                }
            }
        }
    }
}
开发者ID:BackupTheBerlios,项目名称:osiswebprinter,代码行数:28,代码来源:owp_administrators.php


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


示例10: isEnabled

 function isEnabled()
 {
     global $cart;
     if (!tep_session_is_registered('customer_id') && $cart->count_contents() > 0 && MODULE_CONTENT_PWA_LOGIN_STATUS == 'True') {
         return $this->enabled;
     }
 }
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:7,代码来源:cm_pwa_login.php


示例11: execute

 function execute()
 {
     global $HTTP_GET_VARS, $customer_id, $PHP_SELF, $request_type, $oscTemplate;
     if (isset($HTTP_GET_VARS['products_id'])) {
         if (tep_session_is_registered('customer_id')) {
             $check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . (int) $customer_id . "'");
             $check = tep_db_fetch_array($check_query);
             $notification_exists = $check['count'] > 0 ? true : false;
         } else {
             $notification_exists = false;
         }
         $notif_contents = '';
         if ($notification_exists == true) {
             $notif_contents = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '"><span class="glyphicon glyphicon-remove"></span> ' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY_REMOVE, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a>';
         } else {
             $notif_contents = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '"><span class="glyphicon glyphicon-envelope"></span> ' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a>';
         }
         $data = NULL;
         if ($this->group == 'boxes_product_page') {
             $data .= '<div class="col-sm-4 product_box">';
         }
         $data .= '<div class="panel panel-default">' . '  <div class="panel-heading">' . '<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') . '">' . MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_TITLE . '</a></div>' . '  <div class="panel-body">' . $notif_contents . '</div>' . '</div>';
         if ($this->group == 'boxes_product_page') {
             $data .= '</div>';
         }
         $oscTemplate->addBlock($data, $this->group);
     }
 }
开发者ID:osc2nuke,项目名称:demobts,代码行数:28,代码来源:bm_product_notifications.php


示例12: tep_update_whos_online

function tep_update_whos_online()
{
    global $customer_id;
    if (tep_session_is_registered('customer_id')) {
        $wo_customer_id = $customer_id;
        $customer_query = tep_db_query("select customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . " where customers_id = '" . (int) $customer_id . "'");
        $customer = tep_db_fetch_array($customer_query);
        $wo_full_name = $customer['customers_firstname'] . ' ' . $customer['customers_lastname'];
    } else {
        $wo_customer_id = '';
        $wo_full_name = 'Guest';
    }
    $wo_session_id = tep_session_id();
    $wo_ip_address = tep_get_ip_address();
    $wo_last_page_url = tep_db_prepare_input(getenv('REQUEST_URI'));
    $current_time = time();
    $xx_mins_ago = $current_time - 900;
    // remove entries that have expired
    tep_db_query("delete from " . TABLE_WHOS_ONLINE . " where time_last_click < '" . $xx_mins_ago . "'");
    $stored_customer_query = tep_db_query("select session_id from " . TABLE_WHOS_ONLINE . " where session_id = '" . tep_db_input($wo_session_id) . "' limit 1");
    if (tep_db_num_rows($stored_customer_query) > 0) {
        tep_db_query("update " . TABLE_WHOS_ONLINE . " set customer_id = '" . (int) $wo_customer_id . "', full_name = '" . tep_db_input($wo_full_name) . "', ip_address = '" . tep_db_input($wo_ip_address) . "', time_last_click = '" . tep_db_input($current_time) . "', last_page_url = '" . tep_db_input($wo_last_page_url) . "' where session_id = '" . tep_db_input($wo_session_id) . "'");
    } else {
        tep_db_query("insert into " . TABLE_WHOS_ONLINE . " (customer_id, full_name, session_id, ip_address, time_entry, time_last_click, last_page_url) values ('" . (int) $wo_customer_id . "', '" . tep_db_input($wo_full_name) . "', '" . tep_db_input($wo_session_id) . "', '" . tep_db_input($wo_ip_address) . "', '" . tep_db_input($current_time) . "', '" . tep_db_input($current_time) . "', '" . tep_db_input($wo_last_page_url) . "')");
    }
}
开发者ID:othreed,项目名称:osCommerce-234-bootstrap-wADDONS,代码行数:26,代码来源:whos_online.php


示例13: userLoginCheck

function userLoginCheck()
{
    global $navigation, $login_account_number;
    if (!tep_session_is_registered('login_account_number') || !tep_not_null($login_account_number)) {
        $navigation->set_snapshot();
        tep_redirect(get_href_link(PAGE_LOGIN, '', 'SSL'));
    }
}
开发者ID:rongandat,项目名称:e-global-cya,代码行数:8,代码来源:security.php


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


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


示例16: check

 function check()
 {
     global $customer_id;
     $check_query = tep_db_query("select date_added from " . TABLE_ACTION_RECORDER . " where module = 'ar_contact_us' and (" . (tep_session_is_registered('customer_id') ? "customer_id = '" . (int) $customer_id . "' or " : "") . " identifier = '" . tep_db_input($this->_identifier) . "') and date_added >= date_sub(now(), interval " . (int) $this->_min_minutes . " minute) and success = 1 order by date_added desc limit 1");
     if (tep_db_num_rows($check_query)) {
         return false;
     } else {
         return true;
     }
 }
开发者ID:neomobil,项目名称:neomobil.hu,代码行数:10,代码来源:ar_contact_us.php


示例17: execute

    function execute()
    {
        global $PHP_SELF, $oscTemplate, $customer_id;
        if (tep_not_null(MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_ID)) {
            if (MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_JS_PLACEMENT != 'Header') {
                $this->group = 'footer_scripts';
            }
            $header = '<script type="text/javascript">
  var _gaq = _gaq || [];
  _gaq.push([\'_setAccount\', \'' . tep_output_string(MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_ID) . '\']);
  _gaq.push([\'_trackPageview\']);' . "\n";
            if (MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_EC_TRACKING == 'True' && basename($PHP_SELF) == FILENAME_CHECKOUT_SUCCESS && tep_session_is_registered('customer_id')) {
                $order_query = tep_db_query("select orders_id, billing_city, billing_state, billing_country from " . TABLE_ORDERS . " where customers_id = '" . (int) $customer_id . "' order by date_purchased desc limit 1");
                if (tep_db_num_rows($order_query) == 1) {
                    $order = tep_db_fetch_array($order_query);
                    $totals = array();
                    $order_totals_query = tep_db_query("select value, class from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $order['orders_id'] . "'");
                    while ($order_totals = tep_db_fetch_array($order_totals_query)) {
                        $totals[$order_totals['class']] = $order_totals['value'];
                    }
                    $header .= '  _gaq.push([\'_addTrans\',
    \'' . (int) $order['orders_id'] . '\', // order ID - required
    \'' . tep_output_string(STORE_NAME) . '\', // store name
    \'' . (isset($totals['ot_total']) ? $this->format_raw($totals['ot_total'], DEFAULT_CURRENCY) : 0) . '\', // total - required
    \'' . (isset($totals['ot_tax']) ? $this->format_raw($totals['ot_tax'], DEFAULT_CURRENCY) : 0) . '\', // tax
    \'' . (isset($totals['ot_shipping']) ? $this->format_raw($totals['ot_shipping'], DEFAULT_CURRENCY) : 0) . '\', // shipping
    \'' . tep_output_string_protected($order['billing_city']) . '\', // city
    \'' . tep_output_string_protected($order['billing_state']) . '\', // state or province
    \'' . tep_output_string_protected($order['billing_country']) . '\' // country
  ]);' . "\n";
                    $order_products_query = tep_db_query("select op.products_id, pd.products_name, op.final_price, op.products_quantity from " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_LANGUAGES . " l where op.orders_id = '" . (int) $order['orders_id'] . "' and op.products_id = pd.products_id and l.code = '" . tep_db_input(DEFAULT_LANGUAGE) . "' and l.languages_id = pd.language_id");
                    while ($order_products = tep_db_fetch_array($order_products_query)) {
                        $category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_LANGUAGES . " l where p2c.products_id = '" . (int) $order_products['products_id'] . "' and p2c.categories_id = cd.categories_id and l.code = '" . tep_db_input(DEFAULT_LANGUAGE) . "' and l.languages_id = cd.language_id limit 1");
                        $category = tep_db_fetch_array($category_query);
                        $header .= '  _gaq.push([\'_addItem\',
    \'' . (int) $order['orders_id'] . '\', // order ID - required
    \'' . (int) $order_products['products_id'] . '\', // SKU/code - required
    \'' . tep_output_string($order_products['products_name']) . '\', // product name
    \'' . tep_output_string($category['categories_name']) . '\', // category
    \'' . $this->format_raw($order_products['final_price']) . '\', // unit price - required
    \'' . (int) $order_products['products_quantity'] . '\' // quantity - required
  ]);' . "\n";
                    }
                    $header .= '  _gaq.push([\'_trackTrans\']); //submits transaction to the Analytics servers' . "\n";
                }
            }
            $header .= '  (function() {
    var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true;
    ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\';
    var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s);
  })();
</script>' . "\n";
            $oscTemplate->addBlock($header, $this->group);
        }
    }
开发者ID:Sibzsolutions,项目名称:Savostore,代码行数:55,代码来源:ht_google_analytics.php


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


示例19: pre_confirmation_check

 function pre_confirmation_check()
 {
     global $cartID, $cart, $order_total_modules, $order_totals, $order;
     if (empty($cart->cartID)) {
         $cartID = $cart->cartID = $cart->generate_cart_id();
     }
     if (!tep_session_is_registered('cartID')) {
         tep_session_register('cartID');
     }
     order_process($send_mail = false, $status = $this->order_status);
 }
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:11,代码来源:paypal_ipn.php


示例20: 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_in 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP tep_session_name函数代码示例发布时间:2022-05-23
下一篇:
PHP tep_session_id函数代码示例发布时间: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