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


PHP osc_empty函数代码示例

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


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

示例1: listConfigurations

 function listConfigurations()
 {
     global $toC_Json, $osC_Database;
     $Qcfg = $osC_Database->query('select configuration_id, configuration_key, configuration_title, configuration_description, configuration_value, use_function, set_function from :table_configuration where configuration_group_id = :configuration_group_id order by sort_order');
     $Qcfg->bindTable(':table_configuration', TABLE_CONFIGURATION);
     $Qcfg->bindInt(':configuration_group_id', $_REQUEST['gID']);
     $Qcfg->execute();
     $keys = array();
     while ($Qcfg->next()) {
         $cfgValue = $Qcfg->value('configuration_value');
         if (!osc_empty($Qcfg->value('use_function'))) {
             $cfgValue = osc_call_user_func($Qcfg->value('use_function'), $Qcfg->value('configuration_value'));
         }
         $control = array();
         if (!osc_empty($Qcfg->value('set_function'))) {
             $control = osc_call_user_func($Qcfg->value('set_function'), $Qcfg->value('configuration_value'), $Qcfg->value('configuration_key'));
         } else {
             $control['type'] = 'textfield';
             $control['name'] = $Qcfg->value('configuration_key');
         }
         $control['id'] = $Qcfg->value('configuration_id');
         $control['title'] = $Qcfg->value('configuration_title');
         $control['value'] = $cfgValue;
         $keys[] = $control;
     }
     echo $toC_Json->encode($keys);
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:27,代码来源:configuration.php

示例2: getConfigurationOptions

 function getConfigurationOptions()
 {
     global $osC_Language, $osC_Database, $toC_Json;
     include '../includes/modules/' . $_REQUEST['set'] . '/' . $_REQUEST['code'] . '.php';
     $module = 'osC_' . ucfirst($_REQUEST['set']) . '_' . $_REQUEST['code'];
     $module = new $module();
     $keys = array();
     foreach ($module->getKeys() as $key) {
         $Qkey = $osC_Database->query('select configuration_id, configuration_key, configuration_title, configuration_value, configuration_description, use_function, set_function from :table_configuration where configuration_key = :configuration_key');
         $Qkey->bindTable(':table_configuration', TABLE_CONFIGURATION);
         $Qkey->bindValue(':configuration_key', $key);
         $Qkey->execute();
         $control = array();
         if (!osc_empty($Qkey->value('set_function'))) {
             $control = osc_call_user_func($Qkey->value('set_function'), $Qkey->value('configuration_value'), $key);
             $field['title'] = $Qkey->value('configuration_title');
         } else {
             $control['type'] = 'textfield';
             $control['name'] = 'configuration[' . $key . ']';
         }
         $control['id'] = $Qkey->value('configuration_id');
         $control['title'] = $Qkey->value('configuration_title');
         $control['value'] = $Qkey->value('configuration_value');
         $control['description'] = $Qkey->value('configuration_description');
         $keys[] = $control;
     }
     echo $toC_Json->encode($keys);
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:28,代码来源:templates_modules.php

示例3: initialize

 function initialize()
 {
     global $osC_Database, $osC_Language, $osC_Currencies;
     $Qupcoming = $osC_Database->query('select p.products_id, p.products_price, p.products_tax_class_id, p.products_date_available as date_expected, pd.products_name, pd.products_keyword, s.specials_new_products_price, i.image from :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag) left join :table_specials s on (p.products_id = s.products_id and s.status = 1), :table_products_description pd where to_days(p.products_date_available) >= to_days(now()) and p.products_status = :products_status and p.products_id = pd.products_id and pd.language_id = :language_id order by p.products_date_available limit :max_display_upcoming_products');
     $Qupcoming->bindTable(':table_products', TABLE_PRODUCTS);
     $Qupcoming->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES);
     $Qupcoming->bindTable(':table_specials', TABLE_SPECIALS);
     $Qupcoming->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
     $Qupcoming->bindInt(':default_flag', 1);
     $Qupcoming->bindInt(':products_status', 1);
     $Qupcoming->bindInt(':language_id', $osC_Language->getID());
     $Qupcoming->bindInt(':max_display_upcoming_products', MODULE_CONTENT_UPCOMING_PRODUCTS_MAX_DISPLAY);
     if (MODULE_CONTENT_UPCOMING_PRODUCTS_CACHE > 0) {
         $Qupcoming->setCache('upcoming_products-' . $osC_Language->getCode() . '-' . $osC_Currencies->getCode(), MODULE_CONTENT_UPCOMING_PRODUCTS_CACHE);
     }
     $Qupcoming->execute();
     if ($Qupcoming->numberOfRows() > 0) {
         $this->_content = '<ol style="list-style: none;">';
         while ($Qupcoming->next()) {
             $this->_content .= '<li>' . osC_DateTime::getLong($Qupcoming->value('date_expected')) . ': ' . osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qupcoming->value('products_id')), $Qupcoming->value('products_name')) . ' ';
             if (osc_empty($Qupcoming->value('specials_new_products_price'))) {
                 $this->_content .= '(' . $osC_Currencies->displayPrice($Qupcoming->value('products_price'), $Qupcoming->valueInt('products_tax_class_id')) . ')';
             } else {
                 $this->_content .= '(<s>' . $osC_Currencies->displayPrice($Qupcoming->value('products_price'), $Qupcoming->valueInt('products_tax_class_id')) . '</s> <span class="productSpecialPrice">' . $osC_Currencies->displayPrice($Qupcoming->value('specials_new_products_price'), $Qupcoming->valueInt('products_tax_class_id')) . '</span>)';
             }
             $this->_content .= '</li>';
         }
         $this->_content .= '</ol>';
     }
     $Qupcoming->freeResult();
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:31,代码来源:upcoming_products.php

示例4: initialize

 function initialize()
 {
     global $osC_Database, $osC_Language, $osC_Product, $osC_Image;
     if (isset($osC_Product)) {
         $Qorders = $osC_Database->query('select p.products_id, pd.products_name, pd.products_keyword, i.image from :table_orders_products opa, :table_orders_products opb, :table_orders o, :table_products p left join :table_products_images i on (p.products_id = i.products_id and i.default_flag = :default_flag), :table_products_description pd where opa.products_id = :products_id and opa.orders_id = opb.orders_id and opb.products_id != :products_id and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id group by p.products_id order by o.date_purchased desc limit :limit');
         $Qorders->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
         $Qorders->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS);
         $Qorders->bindTable(':table_orders', TABLE_ORDERS);
         $Qorders->bindTable(':table_products', TABLE_PRODUCTS);
         $Qorders->bindTable(':table_products_images', TABLE_PRODUCTS_IMAGES);
         $Qorders->bindTable(':table_products_description', TABLE_PRODUCTS_DESCRIPTION);
         $Qorders->bindInt(':default_flag', 1);
         $Qorders->bindInt(':products_id', $osC_Product->getID());
         $Qorders->bindInt(':products_id', $osC_Product->getID());
         $Qorders->bindInt(':language_id', $osC_Language->getID());
         $Qorders->bindInt(':limit', MODULE_CONTENT_ALSO_PURCHASED_MAX_DISPLAY);
         if (MODULE_CONTENT_ALSO_PURCHASED_PRODUCTS_CACHE > 0) {
             $Qorders->setCache('also_purchased-' . $osC_Product->getID(), MODULE_CONTENT_ALSO_PURCHASED_PRODUCTS_CACHE);
         }
         $Qorders->execute();
         if ($Qorders->numberOfRows() >= MODULE_CONTENT_ALSO_PURCHASED_MIN_DISPLAY) {
             $this->_content = '<div style="overflow: auto;">';
             while ($Qorders->next()) {
                 $this->_content .= '<span style="width: 33%; float: left; text-align: center;">';
                 if (osc_empty($Qorders->value('image')) === false) {
                     $this->_content .= osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qorders->value('products_id')), $osC_Image->show($Qorders->value('image'), $Qorders->value('products_name'))) . '<br />';
                 }
                 $this->_content .= osc_link_object(osc_href_link(FILENAME_PRODUCTS, $Qorders->value('products_id')), $Qorders->value('products_name')) . '</span>';
             }
             $this->_content .= '</div>';
         }
         $Qorders->freeResult();
     }
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:34,代码来源:also_purchased_products.php

示例5: initialize

 function initialize()
 {
     global $osC_Database, $osC_Language, $osC_Product;
     if (isset($osC_Product) && is_a($osC_Product, 'osC_Product')) {
         $Qmanufacturer = $osC_Database->query('select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from :table_manufacturers m left join :table_manufacturers_info mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = :languages_id), :table_products p  where p.products_id = :products_id and p.manufacturers_id = m.manufacturers_id');
         $Qmanufacturer->bindTable(':table_manufacturers', TABLE_MANUFACTURERS);
         $Qmanufacturer->bindTable(':table_manufacturers_info', TABLE_MANUFACTURERS_INFO);
         $Qmanufacturer->bindTable(':table_products', TABLE_PRODUCTS);
         $Qmanufacturer->bindInt(':languages_id', $osC_Language->getID());
         $Qmanufacturer->bindInt(':products_id', $osC_Product->getID());
         $Qmanufacturer->execute();
         if ($Qmanufacturer->numberOfRows()) {
             $this->_content = '';
             if (!osc_empty($Qmanufacturer->value('manufacturers_image'))) {
                 $this->_content .= '<div style="text-align: center;">' . osc_link_object(osc_href_link(FILENAME_DEFAULT, 'manufacturers=' . $Qmanufacturer->valueInt('manufacturers_id')), osc_image(DIR_WS_IMAGES . 'manufacturers/' . $Qmanufacturer->value('manufacturers_image'), $Qmanufacturer->value('manufacturers_name'))) . '</div>';
             }
             $this->_content .= '<ol style="list-style: none; margin: 0; padding: 0;">';
             if (!osc_empty($Qmanufacturer->value('manufacturers_url'))) {
                 $this->_content .= '<li>' . osc_link_object(osc_href_link(FILENAME_REDIRECT, 'action=manufacturer&manufacturers_id=' . $Qmanufacturer->valueInt('manufacturers_id')), sprintf($osC_Language->get('box_manufacturer_info_website'), $Qmanufacturer->value('manufacturers_name')), 'target="_blank"') . '</li>';
             }
             $this->_content .= '<li>' . osc_link_object(osc_href_link(FILENAME_DEFAULT, 'manufacturers=' . $Qmanufacturer->valueInt('manufacturers_id')), $osC_Language->get('box_manufacturer_info_products')) . '</li>';
             $this->_content .= '</ol>';
         }
     }
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:25,代码来源:manufacturer_info.php

示例6: getJavascriptBlock

 function getJavascriptBlock()
 {
     global $osC_Language, $osC_CreditCard;
     $osC_CreditCard = new osC_CreditCard();
     $js = '  if (payment_value == "' . $this->_code . '") {' . "\n" . '    var saferpay_cc_owner = document.checkout_payment.saferpay_cc_owner.value;' . "\n" . '    var saferpay_cc_number = document.checkout_payment.saferpay_cc_number.value;' . "\n" . '    saferpay_cc_number = saferpay_cc_number.replace(/[^\\d]/gi, "");' . "\n";
     if (MODULE_PAYMENT_SAFERPAY_CC_VERIFY_WITH_CVC == '1') {
         $js .= '    var saferpay_cc_cvc = document.checkout_payment.saferpay_cc_cvc.value;' . "\n";
     }
     if (CFG_CREDIT_CARDS_VERIFY_WITH_JS == '1') {
         $js .= '    var saferpay_cc_type_match = false;' . "\n";
     }
     $js .= '    if (saferpay_cc_owner == "" || saferpay_cc_owner.length < ' . (int) CC_OWNER_MIN_LENGTH . ') {' . "\n" . '      error_message = error_message + "' . sprintf($osC_Language->get('payment_saferpay_cc_js_credit_card_owner'), (int) CC_OWNER_MIN_LENGTH) . '\\n";' . "\n" . '      error = 1;' . "\n" . '    }' . "\n";
     $has_type_patterns = false;
     if (CFG_CREDIT_CARDS_VERIFY_WITH_JS == '1' && osc_empty(MODULE_PAYMENT_SAFERPAY_CC_ACCEPTED_TYPES) === false) {
         foreach (explode(',', MODULE_PAYMENT_SAFERPAY_CC_ACCEPTED_TYPES) as $type_id) {
             if ($osC_CreditCard->typeExists($type_id)) {
                 $has_type_patterns = true;
                 $js .= '    if ( (saferpay_cc_type_match == false) && (saferpay_cc_number.match(' . $osC_CreditCard->getTypePattern($type_id) . ') != null) ) { ' . "\n" . '      saferpay_cc_type_match = true;' . "\n" . '    }' . "\n";
             }
         }
     }
     if ($has_type_patterns === true) {
         $js .= '    if ((saferpay_cc_type_match == false) || (mod10(saferpay_cc_number) == false)) {' . "\n" . '      error_message = error_message + "' . $osC_Language->get('payment_saferpay_cc_js_credit_card_not_accepted') . '\\n";' . "\n" . '      error = 1;' . "\n" . '    }' . "\n";
     } else {
         $js .= '    if (saferpay_cc_number == "" || saferpay_cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "\n" . '      error_message = error_message + "' . sprintf($osC_Language->get('payment_saferpay_cc_js_credit_card_number'), CC_NUMBER_MIN_LENGTH) . '\\n";' . "\n" . '      error = 1;' . "\n" . '    }' . "\n";
     }
     if (MODULE_PAYMENT_SAFERPAY_CC_VERIFY_WITH_CVC == '1') {
         $js .= '    if (saferpay_cc_cvc == "" || saferpay_cc_cvc.length < 3) {' . "\n" . '      error_message = error_message + "' . sprintf($osC_Language->get('payment_saferpay_cc_js_credit_card_cvc'), 3) . '\\n";' . "\n" . '      error = 1;' . "\n" . '    }' . "\n";
     }
     $js .= '  }' . "\n";
     return $js;
 }
开发者ID:heshuai64,项目名称:gamestore,代码行数:32,代码来源:saferpay_cc.php

示例7: resize

 function resize($image, $group_id)
 {
     if (osc_empty(CFG_APP_IMAGEMAGICK_CONVERT) || !file_exists(CFG_APP_IMAGEMAGICK_CONVERT)) {
         return $this->resizeWithGD($image, $group_id);
     }
     if (!file_exists(DIR_FS_CATALOG . DIR_WS_IMAGES . 'products/' . $this->_groups[$group_id]['code'])) {
         mkdir(DIR_FS_CATALOG . DIR_WS_IMAGES . 'products/' . $this->_groups[$group_id]['code']);
         @chmod(DIR_FS_CATALOG . DIR_WS_IMAGES . 'products/' . $this->_groups[$group_id]['code'], 0777);
     }
     exec(escapeshellarg(CFG_APP_IMAGEMAGICK_CONVERT) . ' -resize ' . (int) $this->_groups[$group_id]['size_width'] . 'x' . (int) $this->_groups[$group_id]['size_height'] . ($this->_groups[$group_id]['force_size'] == '1' ? '!' : '') . ' ' . escapeshellarg(DIR_FS_CATALOG . DIR_WS_IMAGES . 'products/' . $this->_groups[1]['code'] . '/' . $image) . ' ' . escapeshellarg(DIR_FS_CATALOG . DIR_WS_IMAGES . 'products/' . $this->_groups[$group_id]['code'] . '/' . $image));
     @chmod(DIR_FS_CATALOG . DIR_WS_IMAGES . 'products/' . $this->_groups[$group_id]['code'] . '/' . $image, 0777);
 }
开发者ID:heshuai64,项目名称:gamestore,代码行数:12,代码来源:image.php

示例8: load

 function load()
 {
     global $osC_Language;
     if (defined('MODULE_DEFAULT_GEOIP') && !osc_empty(MODULE_DEFAULT_GEOIP) && file_exists('includes/modules/geoip/' . MODULE_DEFAULT_GEOIP . '.php')) {
         $osC_Language->loadIniFile('modules/geoip/' . MODULE_DEFAULT_GEOIP . '.php');
         include 'includes/modules/geoip/' . MODULE_DEFAULT_GEOIP . '.php';
         $module = 'osC_GeoIP_' . MODULE_DEFAULT_GEOIP;
         return new $module();
     } else {
         return new osC_GeoIP_Admin();
     }
 }
开发者ID:sajad1441,项目名称:TomatoShop-v1,代码行数:12,代码来源:geoip.php

示例9: simpleQuery

 function simpleQuery($query, $debug = false)
 {
     global $osC_MessageStack, $osC_Services;
     if ($this->isConnected()) {
         $this->number_of_queries++;
         if ($debug === false && $this->debug === true) {
             $debug = true;
         }
         if (isset($osC_Services) && $osC_Services->isStarted('debug')) {
             if ($debug === false && SERVICE_DEBUG_OUTPUT_DB_QUERIES == '1') {
                 $debug = true;
             }
             if (!osc_empty(SERVICE_DEBUG_EXECUTION_TIME_LOG) && SERVICE_DEBUG_LOG_DB_QUERIES == '1') {
                 @error_log('QUERY ' . $query . "\n", 3, SERVICE_DEBUG_EXECUTION_TIME_LOG);
             }
         } elseif ($debug === true) {
             $debug = false;
         }
         if ($debug === true) {
             $time_start = $this->getMicroTime();
         }
         $resource = @mysqli_query($this->link, $query);
         if ($debug === true) {
             $time_end = $this->getMicroTime();
             $query_time = number_format($time_end - $time_start, 5);
             if ($this->debug === true) {
                 $this->time_of_queries += $query_time;
             }
             echo '<div style="font-family: Verdana, Arial, sans-serif; font-size: 7px; font-weight: bold;">[<a href="#query' . $this->number_of_queries . '">#' . $this->number_of_queries . '</a>]</div>';
             $osC_MessageStack->add('debug', '<a name=\'query' . $this->number_of_queries . '\'></a>[#' . $this->number_of_queries . ' - ' . $query_time . 's] ' . $query, 'warning');
         }
         if ($resource !== false) {
             $this->error = false;
             $this->error_number = null;
             $this->error_query = null;
             if (mysqli_warning_count($this->link) > 0) {
                 $warning_query = @mysqli_query($this->link, 'show warnings');
                 while ($warning = mysqli_fetch_row($warning_query)) {
                     trigger_error(sprintf('[MYSQL] %s (%d): %s [QUERY] ' . $query, $warning[0], $warning[1], $warning[2]), E_USER_WARNING);
                 }
                 mysqli_free_result($warning_query);
             }
             return $resource;
         } else {
             $this->setError(mysqli_error($this->link), mysqli_errno($this->link), $query);
             return false;
         }
     } else {
         return false;
     }
 }
开发者ID:heshuai64,项目名称:gamestore,代码行数:51,代码来源:mysqli.php

示例10: osC_Account_Login

 function osC_Account_Login()
 {
     global $osC_Language, $osC_Services, $breadcrumb;
     // redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
     if (osc_empty(session_id())) {
         osc_redirect(osc_href_link(FILENAME_INFO, 'cookie', 'AUTO'));
     }
     $this->_page_title = $osC_Language->get('sign_in_heading');
     if ($osC_Services->isStarted('breadcrumb')) {
         $breadcrumb->add($osC_Language->get('breadcrumb_sign_in'), osc_href_link(FILENAME_ACCOUNT, $this->_module, 'SSL'));
     }
     if ($_GET[$this->_module] == 'process') {
         $this->_process();
     }
 }
开发者ID:Doluci,项目名称:tomatocart,代码行数:15,代码来源:login.php

示例11: getValue

 public static function getValue($value)
 {
     global $osC_Database, $osC_Language;
     $string = '';
     $Qstatus = $osC_Database->query('select title, css_key from :table_shipping_availability where id = :id and languages_id = :languages_id');
     $Qstatus->bindTable(':table_shipping_availability', TABLE_SHIPPING_AVAILABILITY);
     $Qstatus->bindInt(':id', $value);
     $Qstatus->bindInt(':languages_id', $osC_Language->getID());
     $Qstatus->execute();
     if ($Qstatus->numberOfRows() === 1) {
         $string = $Qstatus->value('title');
         if (!osc_empty($Qstatus->value('css_key'))) {
             $string = '<span class="' . $Qstatus->value('css_key') . '">' . $string . '</span>';
         }
     }
     return $string;
 }
开发者ID:Jon86,项目名称:oscommerce,代码行数:17,代码来源:shipping_availability.php

示例12: execute

 function execute()
 {
     global $osC_Session, $toC_Wishlist, $osC_Product;
     $id = false;
     foreach ($_GET as $key => $value) {
         if ((ereg('^[0-9]+(_?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$', $key) || ereg('^[a-zA-Z0-9 -_]*$', $key)) && $key != $osC_Session->getName()) {
             $id = $key;
         }
         break;
     }
     //change the variants in the product info page, then attach the wid param to represent the variant product
     if (isset($_GET['wid']) && preg_match('/^[0-9]+(_?([0-9]+:?[0-9]+)+(;?([0-9]+:?[0-9]+)+)*)*$/', $_GET['wid'])) {
         $id = $_GET['wid'];
     }
     if (strpos($id, '_') !== false) {
         $id = str_replace('_', '#', $id);
     }
     if ($id !== false && osC_Product::checkEntry($id)) {
         $osC_Product = new osC_Product($id);
     }
     if (isset($osC_Product)) {
         $variants = null;
         if (isset($_POST['variants']) && is_array($_POST['variants'])) {
             $variants = $_POST['variants'];
         } else {
             if (isset($_GET['variants']) && !empty($_GET['variants'])) {
                 $variants = osc_parse_variants_string($_GET['variants']);
             } else {
                 if (strpos($id, '#') !== false) {
                     $variants = osc_parse_variants_from_id_string($id);
                 }
             }
         }
         if (!osc_empty($variants)) {
             $toC_Wishlist->add($osC_Product->getID(), $variants);
         } else {
             $toC_Wishlist->add($osC_Product->getID());
         }
     }
     osc_redirect(osc_href_link(FILENAME_ACCOUNT, 'wishlist'));
 }
开发者ID:4DvAnCeBoY,项目名称:tomatocart-shoppingcart,代码行数:41,代码来源:wishlist_add.php

示例13: osc_href_link_admin

/**
 * Generate an internal URL address for the administration side
 *
 * @param string $page The page to link to
 * @param string $parameters The parameters to pass to the page (in the GET scope)
 * @access public
 */
function osc_href_link_admin($page = null, $parameters = null)
{
    if (ENABLE_SSL === true) {
        $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG . 'admin/';
    } else {
        $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG . 'admin/';
    }
    $link .= $page;
    if (empty($parameters) && !osc_empty(SID)) {
        $link .= '?' . SID;
    } else {
        $link .= '?' . $parameters;
        if (!osc_empty(SID)) {
            $link .= '&' . SID;
        }
    }
    while (substr($link, -1) == '&' || substr($link, -1) == '?') {
        $link = substr($link, 0, -1);
    }
    return $link;
}
开发者ID:heshuai64,项目名称:gamestore,代码行数:28,代码来源:html_output.php

示例14: stop

 function stop()
 {
     global $osC_MessageStack, $osC_Template;
     $time_start = explode(' ', PAGE_PARSE_START_TIME);
     $time_end = explode(' ', microtime());
     $parse_time = number_format($time_end[1] + $time_end[0] - ($time_start[1] + $time_start[0]), 3);
     if (!osc_empty(SERVICE_DEBUG_EXECUTION_TIME_LOG)) {
         if (!@error_log(strftime('%c') . ' - ' . $_SERVER['REQUEST_URI'] . ' (' . $parse_time . 's)' . "\n", 3, SERVICE_DEBUG_EXECUTION_TIME_LOG)) {
             if (!file_exists(SERVICE_DEBUG_EXECUTION_TIME_LOG) || !is_writable(SERVICE_DEBUG_EXECUTION_TIME_LOG)) {
                 $osC_MessageStack->add('debug', 'Error: Execution time log file not writeable: ' . SERVICE_DEBUG_EXECUTION_TIME_LOG . ' [' . __CLASS__ . ']', 'error');
             }
         }
     }
     if (SERVICE_DEBUG_EXECUTION_DISPLAY == '1') {
         $osC_MessageStack->add('debug', 'Execution Time: ' . $parse_time . 's [' . __CLASS__ . ']', 'warning');
     }
     if ($osC_Template->showDebugMessages() && $osC_MessageStack->size('debug') > 0) {
         echo $osC_MessageStack->get('debug');
     }
     return true;
 }
开发者ID:Jon86,项目名称:oscommerce,代码行数:21,代码来源:debug.php

示例15: stop

 public static function stop()
 {
     $OSCOM_MessageStack = Registry::get('MessageStack');
     $OSCOM_Template = Registry::get('Template');
     $time_start = explode(' ', PAGE_PARSE_START_TIME);
     $time_end = explode(' ', microtime());
     $parse_time = number_format($time_end[1] + $time_end[0] - ($time_start[1] + $time_start[0]), 3);
     if (!osc_empty(SERVICE_DEBUG_EXECUTION_TIME_LOG)) {
         if (!@error_log(strftime('%c') . ' - ' . $_SERVER['REQUEST_URI'] . ' (' . $parse_time . 's)' . "\n", 3, SERVICE_DEBUG_EXECUTION_TIME_LOG)) {
             if (!file_exists(SERVICE_DEBUG_EXECUTION_TIME_LOG) || !is_writable(SERVICE_DEBUG_EXECUTION_TIME_LOG)) {
                 $OSCOM_MessageStack->add('debug', 'Error: Execution time log file not writeable: ' . SERVICE_DEBUG_EXECUTION_TIME_LOG, 'error');
             }
         }
     }
     if (SERVICE_DEBUG_EXECUTION_DISPLAY == '1') {
         $OSCOM_MessageStack->add('debug', 'Execution Time: ' . $parse_time . 's', 'warning');
     }
     if ($OSCOM_Template->showDebugMessages() && $OSCOM_MessageStack->exists('debug')) {
         echo $OSCOM_MessageStack->get('debug');
     }
     return true;
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:22,代码来源:Debug.php


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