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

PHP xos_not_null函数代码示例

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

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



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

示例1: __construct

 function __construct($module, $user_id = null, $user_name = null)
 {
     $module = xos_sanitize_string(str_replace(' ', '', $module));
     if (defined('MODULE_ACTION_RECORDER_INSTALLED') && xos_not_null(MODULE_ACTION_RECORDER_INSTALLED)) {
         if (xos_not_null($module) && in_array($module . '.' . substr(basename($_SERVER['PHP_SELF']), strrpos(basename($_SERVER['PHP_SELF']), '.') + 1), explode(';', MODULE_ACTION_RECORDER_INSTALLED))) {
             if (!class_exists($module)) {
                 if (file_exists(DIR_FS_CATALOG . 'includes/modules/action_recorder/' . $module . '.' . substr(basename($_SERVER['PHP_SELF']), strrpos(basename($_SERVER['PHP_SELF']), '.') + 1))) {
                     include DIR_FS_SMARTY . 'admin/languages/' . $_SESSION['language'] . '/modules/action_recorder/' . $module . '.' . substr(basename($_SERVER['PHP_SELF']), strrpos(basename($_SERVER['PHP_SELF']), '.') + 1);
                     include DIR_FS_CATALOG . 'includes/modules/action_recorder/' . $module . '.' . substr(basename($_SERVER['PHP_SELF']), strrpos(basename($_SERVER['PHP_SELF']), '.') + 1);
                 } else {
                     return false;
                 }
             }
         } else {
             return false;
         }
     } else {
         return false;
     }
     $this->_module = $module;
     if (!empty($user_id) && is_numeric($user_id)) {
         $this->_user_id = $user_id;
     }
     if (!empty($user_name)) {
         $this->_user_name = $user_name;
     }
     $GLOBALS[$this->_module] = new $module();
     $GLOBALS[$this->_module]->setIdentifier();
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:29,代码来源:action_recorder.php


示例2: buildBlocks

 function buildBlocks()
 {
     if (defined('TEMPLATE_BLOCK_GROUPS') && xos_not_null(TEMPLATE_BLOCK_GROUPS)) {
         $tbgroups_array = explode(';', TEMPLATE_BLOCK_GROUPS);
         foreach ($tbgroups_array as $group) {
             $module_key = 'MODULE_' . strtoupper($group) . '_INSTALLED';
             if (defined($module_key) && xos_not_null(constant($module_key))) {
                 $modules_array = explode(';', constant($module_key));
                 foreach ($modules_array as $module) {
                     $class = substr($module, 0, strrpos($module, '.'));
                     if (!class_exists($class)) {
                         if (file_exists(DIR_FS_SMARTY . 'catalog/languages/' . $_SESSION['language'] . '/modules/' . $group . '/' . $module)) {
                             include DIR_FS_SMARTY . 'catalog/languages/' . $_SESSION['language'] . '/modules/' . $group . '/' . $module;
                         }
                         if (file_exists(DIR_WS_MODULES . $group . '/' . $class . '.php')) {
                             include DIR_WS_MODULES . $group . '/' . $class . '.php';
                         }
                     }
                     if (class_exists($class)) {
                         $mb = new $class();
                         if ($mb->isEnabled()) {
                             $mb->execute();
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:29,代码来源:template_integration.php


示例3: set_language

 function set_language($language)
 {
     if (xos_not_null($language) && isset($this->catalog_languages[$language])) {
         $this->language = $this->catalog_languages[$language];
     } else {
         $this->language = $this->catalog_languages[DEFAULT_LANGUAGE];
     }
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:8,代码来源:language.php


示例4: is_set

 function is_set($code)
 {
     if (isset($this->currencies[$code]) && xos_not_null($this->currencies[$code])) {
         return true;
     } else {
         return false;
     }
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:8,代码来源:currencies.php


示例5: quote

 function quote($method = '')
 {
     global $order;
     $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FLAT_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_FLAT_TEXT_WAY, 'cost' => MODULE_SHIPPING_FLAT_COST)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = xos_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     if (xos_not_null($this->icon)) {
         $this->quotes['icon'] = xos_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:12,代码来源:flat.php


示例6: checkdnsrr

 function checkdnsrr($host, $type)
 {
     if (xos_not_null($host) && xos_not_null($type)) {
         @exec("nslookup -type=" . escapeshellarg($type) . " " . escapeshellarg($host), $output);
         reset($output);
         while (list($k, $line) = each($output)) {
             if (preg_match("/^{$host}/i", $line)) {
                 return true;
             }
         }
     }
     return false;
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:13,代码来源:compatibility.php


示例7: xos_validate_old_password

function xos_validate_old_password($plain, $encrypted)
{
    if (xos_not_null($plain) && xos_not_null($encrypted)) {
        // split apart the hash / salt
        $stack = explode(':', $encrypted);
        if (sizeof($stack) != 2) {
            return false;
        }
        if (md5($stack[1] . $plain) == $stack[0]) {
            return true;
        }
    }
    return false;
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:14,代码来源:password_funcs.php


示例8: breadcrumb_trail

 function breadcrumb_trail($separator = ' - ')
 {
     $trail_string = '';
     for ($i = 0, $n = sizeof($this->_trail); $i < $n; $i++) {
         if (isset($this->_trail[$i]['link']) && xos_not_null($this->_trail[$i]['link'])) {
             $trail_string .= '<a href="' . $this->_trail[$i]['link'] . '" class="header-navi">' . $this->_trail[$i]['title'] . '</a>';
         } else {
             $trail_string .= $this->_trail[$i]['title'];
         }
         if ($i + 1 < $n) {
             $trail_string .= $separator;
         }
     }
     return $trail_string;
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:15,代码来源:site_trail.php


示例9: display_links

 function display_links($max_page_links, $parameters = '')
 {
     global $request_type;
     $display_links_string = '';
     if (xos_not_null($parameters) && substr($parameters, -1) != '&') {
         $parameters .= '&';
     }
     // previous button
     if ($this->current_page_number > 1) {
         $display_links_string .= '<li><a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $this->page_name . '=' . ($this->current_page_number - 1), $request_type) . '" class="page-results" title=" ' . PREVNEXT_TITLE_PREVIOUS_PAGE . ' ">' . PREVNEXT_BUTTON_PREV . '</a></li>';
     } elseif ($this->number_of_pages != 1) {
         $display_links_string .= '<li class="disabled"><span><span aria-hidden="true">' . PREVNEXT_BUTTON_PREV . '</span></span></li>';
     }
     // check if number_of_pages > $max_page_links
     $cur_window_num = intval($this->current_page_number / $max_page_links);
     if ($this->current_page_number % $max_page_links) {
         $cur_window_num++;
     }
     $max_window_num = intval($this->number_of_pages / $max_page_links);
     if ($this->number_of_pages % $max_page_links) {
         $max_window_num++;
     }
     // previous window of pages
     if ($cur_window_num > 1) {
         $display_links_string .= '<li><a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $this->page_name . '=' . ($cur_window_num - 1) * $max_page_links, $request_type) . '" class="page-results" title=" ' . sprintf(PREVNEXT_TITLE_PREV_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a></li>';
     }
     // page nn button
     for ($jump_to_page = 1 + ($cur_window_num - 1) * $max_page_links; $jump_to_page <= $cur_window_num * $max_page_links && $jump_to_page <= $this->number_of_pages; $jump_to_page++) {
         if ($jump_to_page == $this->current_page_number) {
             if ($this->number_of_pages > 1) {
                 $display_links_string .= '<li class="active"><span>' . $jump_to_page . '<span class="sr-only">(current)</span></span></li>';
             }
         } else {
             $display_links_string .= '<li><a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $this->page_name . '=' . $jump_to_page, $request_type) . '" class="page-results" title=" ' . sprintf(PREVNEXT_TITLE_PAGE_NO, $jump_to_page) . ' ">' . $jump_to_page . '</a></li>';
         }
     }
     // next window of pages
     if ($cur_window_num < $max_window_num) {
         $display_links_string .= '<li><a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $this->page_name . '=' . ($cur_window_num * $max_page_links + 1), $request_type) . '" class="page-results" title=" ' . sprintf(PREVNEXT_TITLE_NEXT_SET_OF_NO_PAGE, $max_page_links) . ' ">...</a></li>';
     }
     // next button
     if ($this->current_page_number < $this->number_of_pages) {
         $display_links_string .= '<li><a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . 'page=' . ($this->current_page_number + 1), $request_type) . '" class="page-results" title=" ' . PREVNEXT_TITLE_NEXT_PAGE . ' ">' . PREVNEXT_BUTTON_NEXT . '</a></li>';
     } elseif ($this->number_of_pages != 1) {
         $display_links_string .= '<li class="disabled"><span><span aria-hidden="true">' . PREVNEXT_BUTTON_NEXT . '</span></span></li>';
     }
     return $display_links_string;
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:48,代码来源:product_listing.php


示例10: execute

 function execute()
 {
     global $templateIntegration;
     if (xos_not_null(MODULE_HEADER_TAGS_ROBOT_NOINDEX_PAGES)) {
         $pages_array = array();
         foreach (explode(';', MODULE_HEADER_TAGS_ROBOT_NOINDEX_PAGES) as $page) {
             $page = trim($page);
             if (!empty($page)) {
                 $pages_array[] = $page;
             }
         }
         if (in_array(basename($_SERVER['PHP_SELF']), $pages_array)) {
             $templateIntegration->addBlock('<meta name="robots" content="noindex,follow" />' . "\n", $this->group);
         }
     }
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:16,代码来源:ht_robot_noindex.php


示例11: xos_expire_banners

function xos_expire_banners()
{
    $banners_query = xos_db_query("select b.banners_id, b.expires_date, b.expires_impressions, sum(bh.banners_shown) as banners_shown from " . TABLE_BANNERS . " b, " . TABLE_BANNERS_HISTORY . " bh where b.status = '1' and b.banners_id = bh.banners_id group by b.banners_id");
    if (xos_db_num_rows($banners_query)) {
        while ($banners = xos_db_fetch_array($banners_query)) {
            if (xos_not_null($banners['expires_date'])) {
                if (date('Y-m-d H:i:s') >= $banners['expires_date']) {
                    xos_set_banner_status($banners['banners_id'], '0');
                }
            } elseif (xos_not_null($banners['expires_impressions'])) {
                if ($banners['expires_impressions'] > 0 && $banners['banners_shown'] >= $banners['expires_impressions']) {
                    xos_set_banner_status($banners['banners_id'], '0');
                }
            }
        }
    }
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:17,代码来源:banner.php


示例12: __construct

 function __construct($module = '')
 {
     global $customer_group_id;
     if (defined('MODULE_PAYMENT_INSTALLED') && xos_not_null(MODULE_PAYMENT_INSTALLED)) {
         $customer_payment_query = xos_db_query("select group_payment_allowed as payment_allowed from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id =  '" . $customer_group_id . "'");
         if ($customer_payment = xos_db_fetch_array($customer_payment_query)) {
             if (xos_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];
                     }
                 }
                 $this->modules = $payment_array;
             } else {
                 $this->modules = explode(';', MODULE_PAYMENT_INSTALLED);
             }
         } else {
             $this->modules = explode(';', MODULE_PAYMENT_INSTALLED);
         }
         $include_modules = array();
         if (xos_not_null($module) && in_array($module . '.' . substr(basename($_SERVER['PHP_SELF']), strrpos(basename($_SERVER['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_FS_SMARTY . 'catalog/languages/' . $_SESSION['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 (xos_count_payment_modules() == 1 && (!isset($_SESSION['payment']) || isset($_SESSION['payment']) && !is_object($_SESSION['payment']))) {
             $_SESSION['payment'] = $include_modules[0]['class'];
         }
         if (xos_not_null($module) && in_array($module, $this->modules) && isset($GLOBALS[$module]->form_action_url)) {
             $this->form_action_url = $GLOBALS[$module]->form_action_url;
         }
     }
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:46,代码来源:payment.php


示例13: process

 function process()
 {
     global $order, $currencies;
     if (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') {
         switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
             case 'national':
                 if ($order->delivery['country_id'] == STORE_COUNTRY) {
                     $pass = true;
                 }
                 break;
             case 'international':
                 if ($order->delivery['country_id'] != STORE_COUNTRY) {
                     $pass = true;
                 }
                 break;
             case 'both':
                 $pass = true;
                 break;
             default:
                 $pass = false;
                 break;
         }
         if ($pass == true && $_SESSION['cart']->get_content_type() != 'virtual' && $order->info['subtotal'] >= $currencies->currencies[$_SESSION['currency']]['value'] * MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) {
             $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
             //          $order->info['total'] -= $order->info['shipping_cost'];
             $order->info['shipping_cost'] = 0;
         }
     }
     $module = substr($_SESSION['shipping']['id'], 0, strpos($_SESSION['shipping']['id'], '_'));
     if (xos_not_null($order->info['shipping_method'])) {
         $order->info['shipping_cost'] = $order->info['currency_value'] * $order->info['shipping_cost'];
         //        if ($GLOBALS[$module]->tax_class > 0) {
         $shipping_tax = xos_get_tax_rate($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
         $shipping_tax_description = xos_get_tax_description($GLOBALS[$module]->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
         $shipping_tax_value = xos_calculate_tax($order->info['shipping_cost'], $shipping_tax);
         $order->info['tax'] += $order->info['shipping_tax'] = $shipping_tax_value;
         $order->info['tax_groups']["{$shipping_tax_description}"] += $shipping_tax_value;
         $order->info['total'] += $shipping_tax_value;
         if ($_SESSION['sppc_customer_group_show_tax'] == '1') {
             $order->info['shipping_cost'] += $shipping_tax_value;
         }
         //        }
         $this->output[] = array('title' => $order->info['shipping_method'] . ':', 'text' => $currencies->format($order->info['shipping_cost']), 'value' => $order->info['shipping_cost'], 'tax' => $order->info['shipping_method'] == FREE_SHIPPING_TITLE || strpos($order->info['shipping_method'], MODULE_SHIPPING_STORE_PICKUP_TEXT_TITLE) !== false && $order->info['shipping_cost'] == 0 ? -1 : xos_display_tax_value($shipping_tax));
     }
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:45,代码来源:ot_shipping.php


示例14: display_links

 function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
 {
     if (xos_not_null($parameters) && substr($parameters, -1) != '&') {
         $parameters .= '&';
     }
     // calculate number of pages needing links
     $num_pages = ceil($query_numrows / $max_rows_per_page);
     $pages_array = array();
     for ($i = 1; $i <= $num_pages; $i++) {
         $pages_array[] = array('id' => $i, 'text' => $i);
     }
     if ($num_pages > 1) {
         $display_links = xos_draw_form('pages', basename($_SERVER['PHP_SELF']), '', 'get');
         if ($current_page_number > 1) {
             $display_links .= '<a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number - 1)) . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a>&nbsp;&nbsp;';
         } else {
             $display_links .= PREVNEXT_BUTTON_PREV . '&nbsp;&nbsp;';
         }
         $display_links .= sprintf(TEXT_RESULT_PAGE, xos_draw_pull_down_menu($page_name, $pages_array, $current_page_number, 'onchange="this.form.submit();"'), $num_pages);
         if ($current_page_number < $num_pages && $num_pages != 1) {
             $display_links .= '&nbsp;&nbsp;<a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number + 1)) . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>';
         } else {
             $display_links .= '&nbsp;&nbsp;' . PREVNEXT_BUTTON_NEXT;
         }
         if ($parameters != '') {
             if (substr($parameters, -1) == '&') {
                 $parameters = substr($parameters, 0, -1);
             }
             $pairs = explode('&', $parameters);
             while (list(, $pair) = each($pairs)) {
                 list($key, $value) = explode('=', $pair);
                 $display_links .= xos_draw_hidden_field(rawurldecode($key), rawurldecode($value));
             }
         }
         if (SESSID) {
             $display_links .= xos_draw_hidden_field(xos_session_name(), xos_session_id());
         }
         $display_links .= '</form>';
     } else {
         $display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
     }
     return $display_links;
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:43,代码来源:split_page_results.php


示例15: process

 function process()
 {
     $order_total_array = array();
     if (is_array($this->modules)) {
         reset($this->modules);
         while (list(, $value) = each($this->modules)) {
             $class = substr($value, 0, strrpos($value, '.'));
             if ($GLOBALS[$class]->enabled) {
                 $GLOBALS[$class]->output = array();
                 $GLOBALS[$class]->process();
                 for ($i = 0, $n = sizeof($GLOBALS[$class]->output); $i < $n; $i++) {
                     if (xos_not_null($GLOBALS[$class]->output[$i]['title']) && xos_not_null($GLOBALS[$class]->output[$i]['text'])) {
                         $order_total_array[] = array('code' => $GLOBALS[$class]->code, 'title' => $GLOBALS[$class]->output[$i]['title'], 'text' => $GLOBALS[$class]->output[$i]['text'], 'value' => $GLOBALS[$class]->output[$i]['value'], 'tax' => $GLOBALS[$class]->output[$i]['tax'], 'sort_order' => $GLOBALS[$class]->sort_order);
                     }
                 }
             }
         }
     }
     return $order_total_array;
 }
开发者ID:bamper,项目名称:xos_shop_system,代码行数:20,代码来源:order_total.php


示例16: array

 $attributes_exist = '0';
 $attributes_options_values_price = false;
 if (isset($order->products[$i]['attributes'])) {
     $attributes_exist = '1';
     $order_attributes_array = array();
     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 = xos_db_query($attributes_query);
         } else {
             $attributes = xos_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 = xos_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' => $order->products[$i]['attributes'][$j]['price'], 'options_values_price_text' => $order->products[$i]['attributes'][$j]['price'] != 0 ? $order->products[$i]['attributes'][$j]['price_formated'] : '', 'price_prefix' => $attributes_values['price_prefix']);
         xos_db_perform(TABLE_ORDERS_PRODUCTS_ATTRIBUTES, $sql_data_array);
         if (DOWNLOAD_ENABLED == 'true' && isset($attributes_values['products_attributes_filename']) && xos_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']);
             xos_db_perform(TABLE_ORDERS_PRODUCTS_DOWNLOAD, $sql_data_array);
         }
         $options_values_price = '';
         if ($attributes_values['options_values_price'] != 0) {
             $attributes_options_values_price = true;
             $options_values_price = $order->products[$i]['attributes'][$j]['price_formated'];
         }
         $order_attributes_array[] = array('option_name' => $attributes_values['products_options_name'], 'option_value_name' => $attributes_values['products_options_values_name'], 'option_price' => $options_values_price, 'option_price_prefix' => $attributes_values['price_prefix']);
     }
 }
 //------insert customer choosen option eof ----
 $tax_rate = xos_display_tax_value($order->products[$i]['tax']);
 $order_products_array[] = array('qty' => $order->products[$i]['qty'], 'model' => $order->products[$i]['model'], 'name' => $order->products[$i]['name'], 'packaging_unit' => $order->products[$i]['packaging_unit'], 'tax_value' => $tax_rate, 'price' => $order->products[$i]['price_formated'], 'final_single_price' => $order->products[$i]['final_price_formated'], 'final_price' => $order->products[$i]['total_price_formated'], 'products_attributes_option_price' => $attributes_options_values_price, 'product_attributes' => $order_attributes_array);
 if (isset($tax_rate)) {
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:checkout_process.php


示例17: xos_draw_radio_field

            $male = $account['customers_gender'] == 'm' ? true : false;
        }
        $female = !$male;
        $smarty->assign(array('account_gender' => true, 'input_gender' => xos_draw_radio_field('gender', 'm', $male, 'id="gender_m"') . '<label class="control-label" for="gender_m">&nbsp;&nbsp;' . MALE . '&nbsp;&nbsp;</label>' . xos_draw_radio_field('gender', 'f', $female, 'id="gender_f"') . '<label class="control-label" for="gender_f">&nbsp;&nbsp;' . FEMALE . '&nbsp;</label>' . (xos_not_null(ENTRY_GENDER_TEXT) ? '<span class="input-requirement">' . ENTRY_GENDER_TEXT . '</span>' : '')));
    }
    if (ACCOUNT_DOB == 'true') {
        $smarty->assign(array('account_dob' => true, 'input_dob' => xos_draw_input_field('dob', xos_date_short($account['customers_dob']), 'class="form-control" id="dob"') . '&nbsp;' . (xos_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="input-requirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>' : '')));
    }
    reset($lng->catalog_languages);
    if (sizeof($lng->catalog_languages) > 1) {
        $lang_array = array();
        $languages_selected = '';
        while (list($key, $value) = each($lng->catalog_languages)) {
            $lang_array[] = array('id' => $value['id'], 'text' => $value['name']);
            if (!empty($language_id)) {
                $languages_selected = $language_id;
            } elseif ($value['id'] == $account['customers_language_id']) {
                $languages_selected = $account['customers_language_id'];
            }
        }
        $smarty->assign(array('languages' => true, 'pull_down_menu_languages' => xos_draw_pull_down_menu('languages', $lang_array, $languages_selected, 'class="form-control" id="languages"')));
    } else {
        $smarty->assign('hidden_field_languages', xos_draw_hidden_field('languages', $account['customers_language_id']));
    }
    $smarty->assign(array('form_begin' => xos_draw_form('account_edit', xos_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'), 'post', 'onsubmit="return true;"', true), 'hidden_field' => xos_draw_hidden_field('action', 'process'), 'link_filename_account' => xos_href_link(FILENAME_ACCOUNT, '', 'SSL'), 'c_id' => $account['customers_c_id'], 'input_firstname' => xos_draw_input_field('firstname', $account['customers_firstname'], 'class="form-control" id="firstname"') . '&nbsp;' . (xos_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="input-requirement">' . ENTRY_FIRST_NAME_TEXT . '</span>' : ''), 'input_lastname' => xos_draw_input_field('lastname', $account['customers_lastname'], 'class="form-control" id="lastname"') . '&nbsp;' . (xos_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="input-requirement">' . ENTRY_LAST_NAME_TEXT . '</span>' : ''), 'input_email_address' => xos_draw_input_field('email_address', $account['customers_email_address'], 'class="form-control" id="email_address"') . '&nbsp;' . (xos_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="input-requirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>' : ''), 'input_telephone' => xos_draw_input_field('telephone', $account['customers_telephone'], 'class="form-control" id="telephone"') . '&nbsp;' . (xos_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="input-requirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>' : ''), 'input_fax' => xos_draw_input_field('fax', $account['customers_fax'], 'class="form-control" id="fax"') . '&nbsp;' . (xos_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="input-requirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>' : ''), 'form_end' => '</form>'));
    $smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'account_edit');
    $output_account_edit = $smarty->fetch(SELECTED_TPL . '/account_edit.tpl');
    $smarty->assign('central_contents', $output_account_edit);
    $smarty->display(SELECTED_TPL . '/frame.tpl');
    require DIR_WS_INCLUDES . 'application_bottom.php';
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:account_edit.php


示例18: updateOptions

     $jscript_op = '<script type="text/javascript">' . "\n\n" . '    var http_request = false;' . "\n\n" . '    function updateOptions(url,serialized_attributes) {' . "\n\n" . '      var serialized_options = "";' . "\n\n" . '      if(typeof(serialized_attributes) == "undefined"){' . "\n" . '        for (var i = 0; i < document.getElementsByTagName("select").length; i++) {' . "\n" . '          if(document.getElementsByTagName("select")[i].form.name == "cart_quantity") {' . "\n" . '            option_name = document.getElementsByTagName("select")[i].name;' . "\n" . '            selected_options_value_id = document.getElementsByTagName("select")[i].options[document.getElementsByTagName("select")[i].selectedIndex].value;' . "\n" . '            serialized_options += option_name + "=" + selected_options_value_id + "&";' . "\n" . '          }' . "\n" . '        }' . "\n" . '      } else {' . "\n" . '        serialized_options = serialized_attributes;' . "\n" . '      }' . "\n\n" . '      http_request = false;' . "\n\n" . '      if (window.XMLHttpRequest) { // Mozilla, Safari,...' . "\n" . '        http_request = new XMLHttpRequest();' . "\n" . '        if (http_request.overrideMimeType) {' . "\n" . '          http_request.overrideMimeType("text/html");' . "\n" . '        }' . "\n" . '      } else if (window.ActiveXObject) { // IE' . "\n" . '        try {' . "\n" . '          http_request = new ActiveXObject("Msxml2.XMLHTTP");' . "\n" . '        } catch (e) {' . "\n" . '          try {' . "\n" . '            http_request = new ActiveXObject("Microsoft.XMLHTTP");' . "\n" . '          } catch (e) {}' . "\n" . '        }' . "\n" . '      }' . "\n\n" . '      if (!http_request) {' . "\n" . '        alert("Ende : Kann keine XMLHTTP-Instanz erzeugen");' . "\n" . '        return false;' . "\n" . '      }' . "\n" . '      http_request.onreadystatechange = response_processing;' . "\n" . '      http_request.open("POST", url, true);' . "\n" . '      http_request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");' . "\n" . '      http_request.send(encodeURI(serialized_options));' . "\n\n" . '    }' . "\n\n" . '    function response_processing() {' . "\n" . '      if (http_request.readyState == 1) {' . "\n" . '        document.getElementById("options").style.visibility = "hidden";' . "\n" . '        document.getElementById("loading").style.visibility = "visible";' . "\n" . '        document.getElementById("inc").style.visibility = "hidden";' . "\n" . '        document.getElementById("dec").style.visibility = "hidden";' . "\n" . '        document.getElementById("products_quantity").style.visibility = "hidden";' . "\n" . '        document.getElementById("add_to_cart").style.visibility = "hidden";' . "\n" . '      } else if (http_request.readyState == 4) {' . "\n" . '        if (http_request.status == 200) {' . "\n" . '          document.getElementById("options").innerHTML = http_request.responseText;' . "\n" . '          document.getElementById("options").style.visibility = "visible";' . "\n" . '          document.getElementById("loading").style.visibility = "hidden";' . "\n" . '          document.getElementById("inc").style.visibility = "visible";' . "\n" . '          document.getElementById("dec").style.visibility = "visible";' . "\n" . '          document.getElementById("products_quantity").style.visibility = "visible";' . "\n" . '          document.getElementById("add_to_cart").style.visibility = "visible";' . "\n" . '        } else {' . "\n" . '          alert("Bei dem Request ist ein Problem aufgetreten.");' . "\n" . '        }' . "\n" . '      }' . "\n" . '    }' . "\n\n" . '    function getOptionsList(url) {' . "\n\n" . '      if (typeof(isLoaded) != "undefined" && isLoaded == true) {' . "\n" . '          toggle("box_products_options_overview");' . "\n" . '      } else {' . "\n\n" . '        http_request = false;' . "\n\n" . '        if (window.XMLHttpRequest) { // Mozilla, Safari,...' . "\n" . '            http_request = new XMLHttpRequest();' . "\n" . '            if (http_request.overrideMimeType) {' . "\n" . '                http_request.overrideMimeType("text/html");' . "\n" . '            }' . "\n" . '        } else if (window.ActiveXObject) { // IE' . "\n" . '            try {' . "\n" . '                http_request = new ActiveXObject("Msxml2.XMLHTTP");' . "\n" . '            } catch (e) {' . "\n" . '                try {' . "\n" . '                    http_request = new ActiveXObject("Microsoft.XMLHTTP");' . "\n" . '                } catch (e) {}' . "\n" . '            }' . "\n" . '        }' . "\n\n" . '        if (!http_request) {' . "\n" . '            alert("Ende : Kann keine XMLHTTP-Instanz erzeugen");' . "\n" . '            return false;' . "\n" . '        }' . "\n" . '        http_request.onreadystatechange = response_processing_list;' . "\n" . '        http_request.open("GET", url, true);' . "\n" . '        http_request.send(null);' . "\n\n" . '      }' . "\n\n" . '    }' . "\n\n" . '    function response_processing_list() {' . "\n" . '      if (http_request.readyState == 1) {' . "\n" . '        $("#loading_list").show(1);' . "\n" . '      } else if (http_request.readyState == 4) {' . "\n" . '        if (http_request.status == 200) {' . "\n" . '          document.getElementById("box_products_options_overview").innerHTML = http_request.responseText;' . "\n" . '          document.getElementById("loading_list").style.display = "none";' . "\n" . '          isLoaded = true;' . "\n" . '          toggle("box_products_options_overview");' . "\n" . '        } else {' . "\n" . '          alert("Bei dem Request ist ein Problem aufgetreten.");' . "\n" . '        }' . "\n" . '      }' . "\n" . '    }' . "\n\n" . '    function getAbsoluteX (elm) {' . "\n" . '      var x = 0;' . "\n" . '      if (elm && typeof elm.offsetParent != "undefined") {' . "\n" . '        while (elm && typeof elm.offsetLeft == "number") {' . "\n" . '          x += elm.offsetLeft;' . "\n" . '          elm = elm.offsetParent;' . "\n" . '        }' . "\n" . '      }' . "\n" . '      return x;' . "\n" . '    }' . "\n\n" . '    function toggle(targetId) {' . "\n" . '      var elem = document.getElementById(targetId);' . "\n" . '      if (elem.style.display == "none"){' . "\n" . '        elem.style.display="block";' . "\n" . '        var x = getAbsoluteX(elem);' . "\n" . '        elem.style.display="none";' . "\n" . '        if (x < 0){' . "\n" . '          oldRightValue = elem.style.right;' . "\n" . '          $("#"+targetId).css({"right" : x+"px"}).show(1);' . "\n" . '        } else {' . "\n" . '          $("#"+targetId).show(1);' . "\n" . '        }' . "\n" . '      } else {' . "\n" . '        if(typeof(oldRightValue) != "undefined" && oldRightValue != ""){' . "\n" . '          elem.style.right=oldRightValue;' . "\n" . '        }' . "\n" . '        elem.style.display="none";' . "\n" . '      }' . "\n" . '    }' . "\n\n" . '    function toggleByClassName(targetClass) {' . "\n" . '      var allElems = document.getElementsByTagName("span");' . "\n" . '      for (var i = 0; i < allElems.length; i++) {' . "\n" . '        var thisElem = allElems[i];' . "\n" . '  

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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