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

PHP tep_not_null函数代码示例

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

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



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

示例1: is_set

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


示例2: quote

 function quote($method = '')
 {
     global $order, $cart, $shipping_weight, $shipping_num_boxes;
     if (MODULE_SHIPPING_TABLE4_MODE == 'price') {
         $order_total = $cart->show_total();
     } else {
         $order_total = $shipping_weight;
     }
     $table4_cost = preg_split("/[:,]/", MODULE_SHIPPING_TABLE4_COST);
     $size = sizeof($table4_cost);
     for ($i = 0, $n = $size; $i < $n; $i += 2) {
         if ($order_total <= $table4_cost[$i]) {
             $shipping = $table4_cost[$i + 1];
             break;
         }
     }
     if (MODULE_SHIPPING_TABLE4_MODE == 'weight') {
         $shipping = $shipping * $shipping_num_boxes;
     }
     $this->quotes = array('id' => $this->code, 'module' => Translate('table4 titel'), 'methods' => array(array('id' => $this->code, 'title' => Translate('table4 omschrijving'), 'cost' => $shipping + MODULE_SHIPPING_TABLE4_HANDLING)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     if (tep_not_null($this->icon)) {
         $this->quotes['icon'] = tep_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:28,代码来源:table4.php


示例3: buildBlocks

 function buildBlocks()
 {
     if (defined('TEMPLATE_BLOCK_GROUPS') && tep_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) && tep_not_null(constant($module_key))) {
                 $modules_array = explode(';', constant($module_key));
                 foreach ($modules_array as $module) {
                     $class = basename($module, '.php');
                     if (!class_exists($class)) {
                         if (file_exists(DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/' . $group . '/' . $module)) {
                             include DIR_WS_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:atmediacom,项目名称:oscommerce2,代码行数:29,代码来源:osc_template.php


示例4: buildLink

 public function buildLink($page, $valuepair, &$url, &$added_qs, $parameters)
 {
     if (false === array_key_exists(1, $valuepair) || $valuepair[0] != $this->dependency || false !== strpos(urldecode($valuepair[1]), '{') || !tep_not_null($valuepair[1])) {
         return false;
     }
     if (!isset(usu::$registry->vars[$valuepair[0]][$valuepair[1]])) {
         if (false === $this->acquire($valuepair[1], $fullpath = false)) {
             return false;
         }
     } else {
         usu::$performance['queries_saved']++;
     }
     $reg_item = usu::$registry->vars[$valuepair[0]][$valuepair[1]];
     switch (true) {
         case $page == FILENAME_PRODUCT_INFO && false === strpos($valuepair[1], '{'):
             $url = $this->linkCreate(FILENAME_PRODUCT_INFO, $reg_item['link_text'], '-p-', $valuepair[1]);
             break;
         case $page == FILENAME_PRODUCT_REVIEWS:
             $url = $this->linkCreate(FILENAME_PRODUCT_REVIEWS, $reg_item['link_text'], '-pr-', $valuepair[1]);
             break;
         case $page == FILENAME_PRODUCT_REVIEWS_INFO:
             $url = $this->linkCreate(FILENAME_PRODUCT_REVIEWS_INFO, $reg_item['link_text'], '-pri-', $valuepair[1]);
             break;
         default:
             $added_qs[filter_var($valuepair[0], FILTER_SANITIZE_STRING)] = usu::cleanse($valuepair[1]);
             break;
     }
     # end switch
 }
开发者ID:digideskio,项目名称:oscmax2,代码行数:29,代码来源:Usu_Products.php


示例5: tep_display_banner

function tep_display_banner($action, $identifier)
{
    if ($action == 'dynamic') {
        $banners_query = tep_db_query("select count(*) as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
        $banners = tep_db_fetch_array($banners_query);
        if ($banners['count'] > 0) {
            $banner = tep_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
        } else {
            return '<strong>TEP ERROR! (tep_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</strong>';
        }
    } elseif ($action == 'static') {
        if (is_array($identifier)) {
            $banner = $identifier;
        } else {
            $banner_query = tep_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . (int) $identifier . "'");
            if (tep_db_num_rows($banner_query)) {
                $banner = tep_db_fetch_array($banner_query);
            } else {
                return '<strong>TEP ERROR! (tep_display_banner(' . $action . ', ' . $identifier . ') -> Banner with ID \'' . $identifier . '\' not found, or status inactive</strong>';
            }
        }
    } else {
        return '<strong>TEP ERROR! (tep_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\'</strong>';
    }
    if (tep_not_null($banner['banners_html_text'])) {
        $banner_string = $banner['banners_html_text'];
    } else {
        $banner_string = '<a href="' . tep_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $banner['banners_image'], $banner['banners_title']) . '</a>';
    }
    tep_update_banner_display_count($banner['banners_id']);
    return $banner_string;
}
开发者ID:vakondweb,项目名称:oscommerce2,代码行数:32,代码来源:banner.php


示例6: execute

    function execute()
    {
        global $PHP_SELF, $oscTemplate;
        if (tep_not_null(MODULE_HEADER_TAGS_DIV_EQUAL_HEIGHTS_PAGES)) {
            $pages_array = array();
            foreach (explode(';', MODULE_HEADER_TAGS_DIV_EQUAL_HEIGHTS_PAGES) as $page) {
                $page = trim($page);
                if (!empty($page)) {
                    $pages_array[] = $page;
                }
            }
            $output = <<<EOD
<script>
<!--
\$(window).load(function() {
var maxHeight = 0;
\$(".equal-height").each(function() {
if (\$(this).height() > maxHeight) {
maxHeight = \$(this).height();
}
});
\$(".equal-height").height(maxHeight);
});
//-->
</script>
EOD;
            if (in_array(basename($PHP_SELF), $pages_array)) {
                $oscTemplate->addBlock($output, $this->group);
            }
        }
    }
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:31,代码来源:ht_div_equal_heights.php


示例7: quote

 function quote($method = '')
 {
     global $osC_Tax, $order, $cart, $shipping_weight, $shipping_num_boxes, $osC_Weight;
     if (MODULE_SHIPPING_TABLE_MODE == 'price') {
         $order_total = $cart->show_total();
     } else {
         $order_total = $shipping_weight = $osC_Weight->convert($shipping_weight, SHIPPING_WEIGHT_UNIT, MODULE_SHIPPING_TABLE_WEIGHT_UNIT);
     }
     $table_cost = split("[:,]", MODULE_SHIPPING_TABLE_COST);
     $size = sizeof($table_cost);
     for ($i = 0, $n = $size; $i < $n; $i += 2) {
         if ($order_total <= $table_cost[$i]) {
             $shipping = $table_cost[$i + 1];
             break;
         }
     }
     if (MODULE_SHIPPING_TABLE_MODE == 'weight') {
         $shipping = $shipping * $shipping_num_boxes;
     }
     $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_TABLE_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_TABLE_TEXT_WAY, 'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING)), 'tax' => 0);
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = $osC_Tax->getTaxRate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     if (tep_not_null($this->icon)) {
         $this->quotes['icon'] = tep_image($this->icon, $this->title);
     }
     return $this->quotes;
 }
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:28,代码来源:table.php


示例8: __construct

 public function __construct($id = 0, $employees_id = 0, $period = null)
 {
     $database = $_SESSION['database'];
     $this->id = $id;
     $this->listing = array();
     $this->isempty = true;
     if ($this->id != 0) {
         // Retrieve benefit by id
         $this->id = $database->prepare_input($this->id);
         $benefits_query = $database->query("select benefits_id, benefits_start_date, benefits_end_date, benefits_credit, benefits_granted, benefits_comment, employees_id, roles_id from " . TABLE_BENEFITS . " where benefits_id = '" . (int) $this->id . "'");
     } else {
         if ($employees_id != 0 && tep_not_null($period)) {
             // Benefit might exist but we do not know the id
             // Try to retrieve the benefit for the given employee and period
             $this->employees_id = $database->prepare_input($employees_id);
             $benefits_query = $database->query("SELECT * FROM " . VIEW_BENEFITS . " WHERE benefits_start_date <= '" . tep_periodenddate($period) . "'" . " AND benefits_end_date >= '" . tep_periodstartdate($period) . "'" . " AND employees_id = " . $employees_id . " AND roles_id = " . BENEFITS_LEAVE_ROLE . ";");
         } else {
             // We probably created an empty benefit object to retrieve the entire benefit listing
             $this->listing = $this->get_array($employees_id);
         }
     }
     if ($this->id != 0 || $employees_id != 0 && tep_not_null($period)) {
         $benefits_result = $database->fetch_array($benefits_query);
         if (tep_not_null($benefits_result)) {
             // Benefit exists
             $this->id = $benefits_result['benefits_id'];
             $this->fill(tep_datetouts(DATE_FORMAT_DATABASE, $benefits_result['benefits_start_date']), $benefits_result['benefits_end_date'] != '2099-12-31' ? tep_datetouts(DATE_FORMAT_DATABASE, $benefits_result['benefits_end_date']) : 0, $benefits_result['benefits_credit'], $benefits_result['benefits_granted'], $benefits_result['benefits_used'], $benefits_result['benefits_comment'], $benefits_result['employees_id'], $benefits_result['roles_id']);
             $this->isempty = false;
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:bitts-svn,代码行数:31,代码来源:benefit.php


示例9: execute

 function execute()
 {
     global $oscTemplate;
     if (isset($_GET['products_id']) && defined('MODULE_SOCIAL_BOOKMARKS_INSTALLED') && tep_not_null(MODULE_SOCIAL_BOOKMARKS_INSTALLED)) {
         $sbm_array = explode(';', MODULE_SOCIAL_BOOKMARKS_INSTALLED);
         $social_bookmarks = array();
         foreach ($sbm_array as $sbm) {
             $class = basename($sbm, '.php');
             if (!class_exists($class)) {
                 include DIR_WS_LANGUAGES . $_SESSION['language'] . '/modules/social_bookmarks/' . $sbm;
                 include 'includes/modules/social_bookmarks/' . $class . '.php';
             }
             $sb = new $class();
             if ($sb->isEnabled()) {
                 $social_bookmarks[] = $sb->getOutput();
             }
         }
         if (!empty($social_bookmarks)) {
             ob_start();
             include 'includes/modules/boxes/templates/product_social_bookmarks.php';
             $data = ob_get_clean();
             $oscTemplate->addBlock($data, $this->group);
         }
     }
 }
开发者ID:Akofelaz,项目名称:oscommerce2,代码行数:25,代码来源:bm_product_social_bookmarks.php


示例10: loadProduct

 function loadProduct($product_id, $products_price, $products_tax_class_id, $qtyBlocks = 1, $price_breaks_array = NULL, $min_order_qty = 1)
 {
     // Collect required data (show for retail only)
     // in a preview read=only no data for the price break available
     if (!tep_not_null($price_breaks_array)) {
         $price_breaks_array = array();
         $price_breaks_query = tep_db_query("select products_price, products_qty from " . TABLE_PRODUCTS_PRICE_BREAK . " where products_id = '" . (int) $product_id . "' and customers_group_id = '0' order by products_qty");
         while ($price_break = tep_db_fetch_array($price_breaks_query)) {
             $price_breaks_array[] = $price_break;
         }
     }
     //Assign members
     $this->thePrice = $products_price;
     $this->taxClass = $products_tax_class_id;
     $this->qtyBlocks = $qtyBlocks < 1 ? 1 : $qtyBlocks;
     $this->price_breaks = $price_breaks_array;
     $this->products_min_order_qty = $min_order_qty < 1 ? 1 : $min_order_qty;
     //Custom
     $this->hasQuantityPrice = false;
     $this->hiPrice = $this->thePrice;
     $this->lowPrice = $this->thePrice;
     if (count($this->price_breaks) > 0) {
         $this->hasQuantityPrice = true;
         foreach ($this->price_breaks as $price_break) {
             $this->hiPrice = max($this->hiPrice, $price_break['products_price']);
             $this->lowPrice = min($this->lowPrice, $price_break['products_price']);
         }
     }
 }
开发者ID:digideskio,项目名称:oscmax2,代码行数:29,代码来源:PriceFormatterAdmin.php


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


示例12: __construct

 function __construct($module, $user_id = null, $user_name = null)
 {
     global $PHP_SELF;
     $this->lang = Registry::get('Language');
     $module = HTML::sanitize(str_replace(' ', '', $module));
     if (defined('MODULE_ACTION_RECORDER_INSTALLED') && tep_not_null(MODULE_ACTION_RECORDER_INSTALLED)) {
         if (tep_not_null($module) && in_array($module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1), explode(';', MODULE_ACTION_RECORDER_INSTALLED))) {
             if (!class_exists($module)) {
                 if (is_file(OSCOM::getConfig('dir_root', 'Shop') . 'includes/modules/action_recorder/' . $module . '.' . substr($PHP_SELF, strrpos($PHP_SELF, '.') + 1))) {
                     $this->lang->loadDefinitions('Shop/modules/action_recorder/' . $module);
                     include OSCOM::getConfig('dir_root', 'Shop') . 'includes/modules/action_recorder/' . $module . '.' . substr($PHP_SELF, strrpos($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:haraldpdl,项目名称:oscommerce2,代码行数:31,代码来源:action_recorder.php


示例13: execute

 function execute()
 {
     global $currencies, $oscTemplate;
     if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {
         $random_product['products_name'] = tep_get_products_name($random_product['products_id']);
         $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']);
         if (tep_not_null($random_product['specials_new_products_price'])) {
             $whats_new_price = '<del>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br />';
             $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
         } else {
             $whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
         }
         if ($this->group == 'boxes_footer') {
             $data = '<div class="col-sm-3 col-lg-2">' . '  <div class="footerbox best-sellers">' . '    <h2><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . MODULE_BOXES_WHATS_NEW_BOX_TITLE . '</a></h2>';
         } else {
             $data = '<div class="panel panel-default">' . '  <div class="panel-heading"><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . MODULE_BOXES_WHATS_NEW_BOX_TITLE . '</a></div>';
         }
         $data .= '  <div class="panel-body text-center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br />' . $whats_new_price . '</div>';
         $data .= '</div>';
         if ($this->group == 'boxes_footer') {
             $data .= '</div>';
         }
         $oscTemplate->addBlock($data, $this->group);
     }
 }
开发者ID:osc2nuke,项目名称:demobts,代码行数:25,代码来源:bm_whats_new.php


示例14: sbs_get_countries

function sbs_get_countries($countries_id = '', $with_iso_codes = false)
{
    $countries_array = array();
    if (tep_not_null($countries_id)) {
        if ($with_iso_codes == true) {
            // Ajax Country-state selector
            //$countries = tep_db_query("select countries_name, countries_iso_code_2, countries_iso_code_3 from " . TABLE_COUNTRIES . " where countries_id = '" . (int)$countries_id . "' order by countries_name");
            $countries = tep_db_query("select countries_name, countries_iso_code_2, countries_iso_code_3 from " . TABLE_COUNTRIES . " where countries_id = '" . (int) $countries_id . "' and active = 1 order by countries_name");
            $countries_values = tep_db_fetch_array($countries);
            $countries_array = array('countries_name' => $countries_values['countries_name'], 'countries_iso_code_2' => $countries_values['countries_iso_code_2'], 'countries_iso_code_3' => $countries_values['countries_iso_code_3']);
        } else {
            $countries = tep_db_query("select countries_name from " . TABLE_COUNTRIES . " where countries_id = '" . (int) $countries_id . "'");
            $countries_values = tep_db_fetch_array($countries);
            $countries_array = array('countries_name' => $countries_values['countries_name']);
        }
    } else {
        // Ajax Country-state selector
        //$countries = tep_db_query("select countries_id, countries_name from " . TABLE_COUNTRIES . " order by countries_name");
        $countries = tep_db_query("select countries_id, countries_name from " . TABLE_COUNTRIES . " where active = 1 order by countries_name");
        while ($countries_values = tep_db_fetch_array($countries)) {
            $countries_array[] = array('countries_id' => $countries_values['countries_id'], 'countries_name' => $countries_values['countries_name']);
        }
    }
    return $countries_array;
}
开发者ID:digideskio,项目名称:oscmax2,代码行数:25,代码来源:account_details.php


示例15: execute

 function execute()
 {
     global $PHP_SELF, $oscTemplate, $languages_id, $currencies, $currency;
     if ($PHP_SELF == 'product_info.php' && isset($_GET['products_id'])) {
         $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_image from products p, products_description pd where p.products_id = '" . (int) $_GET['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "'");
         if (tep_db_num_rows($product_info_query) === 1) {
             $product_info = tep_db_fetch_array($product_info_query);
             $data = array('card' => MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TYPE, 'title' => $product_info['products_name']);
             if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID)) {
                 $data['site'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID;
             }
             if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID)) {
                 $data['creator'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID;
             }
             $product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($product_info['products_description']))), 0, 197);
             if (strlen($product_description) == 197) {
                 $product_description .= ' ..';
             }
             $data['description'] = $product_description;
             $products_image = $product_info['products_image'];
             $pi_query = tep_db_query("select image from products_images where products_id = '" . (int) $product_info['products_id'] . "' order by sort_order limit 1");
             if (tep_db_num_rows($pi_query) === 1) {
                 $pi = tep_db_fetch_array($pi_query);
                 $products_image = $pi['image'];
             }
             $data['image'] = tep_href_link('images/' . $products_image, '', 'NONSSL', false, false);
             $result = '';
             foreach ($data as $key => $value) {
                 $result .= '<meta name="twitter:' . tep_output_string_protected($key) . '" content="' . tep_output_string_protected($value) . '" />' . "\n";
             }
             $oscTemplate->addBlock($result, $this->group);
         }
     }
 }
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:34,代码来源:ht_twitter_product_card.php


示例16: execute

 function execute()
 {
     global $PHP_SELF, $oscTemplate;
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     if (basename($PHP_SELF) == 'index.php') {
         if (isset($_GET['manufacturers_id']) && is_numeric($_GET['manufacturers_id'])) {
             $Qmanufacturer = $OSCOM_Db->prepare('select
                                              m.manufacturers_name,
                                              mi.manufacturers_seo_title
                                            from
                                              :table_manufacturers m,
                                              :table_manufacturers_info mi
                                            where
                                              m.manufacturers_id = mi.manufacturers_id
                                              and m.manufacturers_id = :manufacturers_id
                                              and mi.languages_id = :languages_id');
             $Qmanufacturer->bindInt(':manufacturers_id', $_GET['manufacturers_id']);
             $Qmanufacturer->bindInt(':languages_id', $OSCOM_Language->getId());
             $Qmanufacturer->execute();
             if ($Qmanufacturer->fetch() !== false) {
                 if (tep_not_null($Qmanufacturer->value('manufacturers_seo_title')) && MODULE_HEADER_TAGS_MANUFACTURER_TITLE_SEO_TITLE_OVERRIDE == 'True') {
                     $oscTemplate->setTitle($Qmanufacturer->value('manufacturers_seo_title') . OSCOM::getDef('module_header_tags_manufacturer_seo_separator') . $oscTemplate->getTitle());
                 } else {
                     $oscTemplate->setTitle($Qmanufacturer->value('manufacturers_name') . OSCOM::getDef('module_header_tags_manufacturer_seo_separator') . $oscTemplate->getTitle());
                 }
             }
         }
     }
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:30,代码来源:ht_manufacturer_title.php


示例17: get_help

 function get_help()
 {
     extract(tep_load('defs', 'database', 'sessions'));
     $result = false;
     $zone_script = '';
     if (isset($_GET['zID']) && tep_not_null($_GET['zID'])) {
         $zone_query = $db->query("select seo_types_class from " . TABLE_SEO_TYPES . " where seo_types_id = '" . (int) $_GET['zID'] . "'");
         if ($db->num_rows($zone_query)) {
             $zone_array = $db->fetch_array($zone_query);
             $zone_script = $zone_array['seo_types_class'];
         }
     }
     if (!empty($zone_script)) {
         $file = DIR_FS_STRINGS . 'help/' . $zone_script . '.php';
     } else {
         $file = DIR_FS_STRINGS . 'help/' . $cDefs->script;
     }
     $result = tep_read_contents($file, $contents);
     if (!$result) {
         return $result;
     }
     echo $contents;
     $cSessions->close();
     return true;
 }
开发者ID:enigma1,项目名称:i-metrics-cms,代码行数:25,代码来源:admin_seo_zones.php


示例18: cheapest

 function cheapest()
 {
     if (is_array($this->modules)) {
         $rates = array();
         foreach ($this->modules as $value) {
             $class = substr($value, 0, strrpos($value, '.'));
             if ($GLOBALS[$class]->enabled) {
                 $quotes = $GLOBALS[$class]->quotes;
                 for ($i = 0, $n = sizeof($quotes['methods']); $i < $n; $i++) {
                     if (isset($quotes['methods'][$i]['cost']) && tep_not_null($quotes['methods'][$i]['cost'])) {
                         $rates[] = array('id' => $quotes['id'] . '_' . $quotes['methods'][$i]['id'], 'title' => $quotes['module'] . ' (' . $quotes['methods'][$i]['title'] . ')', 'cost' => $quotes['methods'][$i]['cost']);
                     }
                 }
             }
         }
         $cheapest = false;
         for ($i = 0, $n = sizeof($rates); $i < $n; $i++) {
             if (is_array($cheapest)) {
                 if ($rates[$i]['cost'] < $cheapest['cost']) {
                     $cheapest = $rates[$i];
                 }
             } else {
                 $cheapest = $rates[$i];
             }
         }
         return $cheapest;
     }
 }
开发者ID:atmediacom,项目名称:oscommerce2,代码行数:28,代码来源:shipping.php


示例19: execute

    function execute()
    {
        global $PHP_SELF, $oscTemplate;
        $OSCOM_Db = Registry::get('Db');
        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>
  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) == 'checkout_success.php' && isset($_SESSION['customer_id'])) {
                $Qorder = $OSCOM_Db->get('orders', ['orders_id', 'billing_city', 'billing_state', 'billing_country'], ['customers_id' => $_SESSION['customer_id']], 'date_purchased desc', 1);
                if ($Qorder->fetch() !== false) {
                    $totals = array();
                    $Qtotals = $OSCOM_Db->get('orders_total', ['value', 'class'], ['orders_id' => $Qorder->valueInt('orders_id')]);
                    while ($Qtotals->fetch()) {
                        $totals[$Qtotals->value('class')] = $Qtotals->value('value');
                    }
                    $header .= '  _gaq.push([\'_addTrans\',
    \'' . $Qorder->valueInt('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
    \'' . $Qorder->valueProtected('billing_city') . '\', // city
    \'' . $Qorder->valueProtected('billing_state') . '\', // state or province
    \'' . $Qorder->valueProtected('billing_country') . '\' // country
  ]);' . "\n";
                    $Qproducts = $OSCOM_Db->prepare('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 = :orders_id and op.products_id = pd.products_id and pd.language_id = l.languages_id and l.code = :code');
                    $Qproducts->bindInt(':orders_id', $Qorder->valueInt('orders_id'));
                    $Qproducts->bindValue(':code', DEFAULT_LANGUAGE);
                    $Qproducts->execute();
                    while ($Qproducts->fetch()) {
                        $Qcategory = $OSCOM_Db->prepare('select cd.categories_name from :table_categories_description cd, :table_products_to_categories p2c, :table_languages l where p2c.products_id = :products_id and p2c.categories_id = cd.categories_id and cd.language_id = l.languages_id and l.code = :code');
                        $Qcategory->bindInt(':products_id', $Qproducts->valueInt('products_id'));
                        $Qcategory->bindValue(':code', DEFAULT_LANGUAGE);
                        $Qcategory->execute();
                        $header .= '  _gaq.push([\'_addItem\',
    \'' . $Qorder->valueInt('orders_id') . '\', // order ID - required
    \'' . $Qproducts->valueInt('products_id') . '\', // SKU/code - required
    \'' . $Qproducts->valueProtected('products_name') . '\', // product name
    \'' . $Qcategory->valueProtected('categories_name') . '\', // category
    \'' . $this->format_raw($Qproducts->value('final_price')) . '\', // unit price - required
    \'' . $Qproducts->valueInt('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:tiansiyuan,项目名称:oscommerce2,代码行数:60,代码来源:ht_google_analytics.php


示例20: execute

 function execute()
 {
     global $PHP_SELF, $oscTemplate, $categories, $current_category_id;
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     if (basename($PHP_SELF) == 'index.php' && $current_category_id > 0) {
         $Qmeta = $OSCOM_Db->prepare('select
                                    categories_seo_description, categories_seo_keywords
                                  from
                                    :table_categories_description
                                  where
                                    categories_id = :categories_id
                                    and language_id = :language_id');
         $Qmeta->bindInt(':categories_id', $current_category_id);
         $Qmeta->bindInt(':language_id', $OSCOM_Language->getId());
         $Qmeta->execute();
         $meta = $Qmeta->fetch();
         if (tep_not_null($meta['categories_seo_description'])) {
             $oscTemplate->addBlock('<meta name="description" content="' . HTML::output($meta['categories_seo_description']) . '" />' . PHP_EOL, $this->group);
         }
         if (tep_not_null($meta['categories_seo_keywords']) && MODULE_HEADER_TAGS_CATEGORY_SEO_KEYWORDS_STATUS == 'True') {
             $oscTemplate->addBlock('<meta name="keywords" content="' . HTML::output($meta['categories_seo_keywords']) . '" />' . PHP_EOL, $this->group);
         }
     }
 }
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:25,代码来源:ht_category_seo.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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