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


PHP xos_not_null函数代码示例

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


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


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