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


PHP _ml_strlen函数代码示例

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


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

示例1: install

 /**
  * Installs the specified module in the system.
  *
  * The install() method is called statically.
  * To call other methods of this class from this method,
  * the static call is used, for example,
  * Payment_Module_Paypal_CC::getTables() instead of $this->getTables().
  */
 function install()
 {
     global $application;
     $obj =& $application->getInstance('MessageResources', "payment-module-cod-messages", "AdminZone");
     $tables = Payment_Module_Cod::getTables();
     $query = new DB_Table_Create($tables);
     $table = 'pm_cod_settings';
     //
     $columns = $tables[$table]['columns'];
     //
     $query = new DB_Insert($table);
     $query->addInsertValue(1, $columns['id']);
     $query->addInsertValue("MODULE_NAME", $columns['key']);
     $query->addInsertValue('s:' . _ml_strlen($obj->getMessage('MODULE_NAME')) . ':"' . $obj->getMessage('MODULE_NAME') . '";', $columns['value']);
     $application->db->getDB_Result($query);
     $query = new DB_Insert($table);
     $query->addInsertValue(2, $columns['id']);
     $query->addInsertValue("PER_ORDER_SHIPPING_FEE", $columns['key']);
     $query->addInsertValue('s:' . _ml_strlen("0.00") . ':"' . "0.00" . '";', $columns['value']);
     $application->db->getDB_Result($query);
     /*
             $query = new DB_Insert($table);
             $query->addInsertValue(2, $columns['id']);
             $query->addInsertValue("MODULE_DESCR", $columns['key']);
             $query->addInsertValue('s:'._ml_strlen($obj->getMessage('MODULE_DESCR')).':"'.$obj->getMessage('MODULE_DESCR').'";', $columns['value']);
             $application->db->getDB_Result($query);
     */
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:36,代码来源:payment_module_cod_api.php

示例2: install

 /**
  * Installs the specified module in the system.
  *
  * The install() method is called statically.
  * To call other methods of this class from this method,
  * the static call is used, for example,
  * Payment_Module_Paypal_CC::getTables() instead of $this->getTables().
  */
 function install()
 {
     global $application;
     $obj =& $application->getInstance('MessageResources', "payment-module-wtp-messages", "AdminZone");
     $tables = Payment_Module_Wtp_CC::getTables();
     $query = new DB_Table_Create($tables);
     $table = 'pm_wtp_settings';
     $columns = $tables[$table]['columns'];
     $query = new DB_Insert($table);
     $query->addInsertValue(1, $columns['id']);
     $query->addInsertValue("MODULE_NAME", $columns['key']);
     $query->addInsertValue('s:' . _ml_strlen($obj->getMessage('MODULE_NAME')) . ':"' . $obj->getMessage('MODULE_NAME') . '";', $columns['value']);
     $application->db->getDB_Result($query);
     $query = new DB_Insert($table);
     $query->addInsertValue(2, $columns['id']);
     $query->addInsertValue("MODULE_METHOD_ID", $columns['key']);
     $query->addInsertValue('s:' . _ml_strlen("0") . ':"' . "0" . '";', $columns['value']);
     $application->db->getDB_Result($query);
     $query = new DB_Insert($table);
     $query->addInsertValue(3, $columns['id']);
     $query->addInsertValue("MODULE_METHOD_PASS", $columns['key']);
     $query->addInsertValue('s:' . _ml_strlen("0") . ':"' . "0" . '";', $columns['value']);
     $application->db->getDB_Result($query);
     $query = new DB_Insert($table);
     $query->addInsertValue(4, $columns['id']);
     $query->addInsertValue("MODULE_MODE", $columns['key']);
     $query->addInsertValue('s:' . _ml_strlen("0") . ':"' . "0" . '";', $columns['value']);
     $application->db->getDB_Result($query);
 }
开发者ID:digitaldevelopers,项目名称:plugin-avactis-2.1,代码行数:37,代码来源:payment_module_wtp_cc_api.php

示例3: onAction

 /** Processes action. */
 function onAction()
 {
     global $application;
     $request = $application->getInstance('Request');
     $search_string = trim($request->getValueByKey('search_string'));
     $search_type = trim($request->getValueByKey('search_type'));
     $Result = [];
     $search_result = $search_string;
     if (_ml_strlen($search_string) < 1) {
         modApiFunc('Session', 'un_Set', 'search_result_menu');
         $search_result = '';
         return $search_result;
     } else {
         $Result = '';
         if ($search_type == "systemPages") {
             $SystemPages = modApiFunc('CMS', 'getSystemPageList');
             $i = 0;
             foreach ($SystemPages as $key => $value) {
                 $occurerence = stripos($value, $search_string);
                 if ($occurerence === false) {
                     continue;
                 } else {
                     $Result[$i] = $value;
                     $i++;
                 }
             }
         }
         //systemPages
         if ($search_type == "staticArticle") {
             $Static_Pages = modApiFunc('CMS', 'getPageTree', 0);
             foreach ($Static_Pages as $key => $value) {
                 $occurerence = stripos($value['name'], $search_string);
                 if ($occurerence === false) {
                     continue;
                 } else {
                     $Result[$value['page_id']] = $value['name'];
                 }
             }
         }
         //static article
         if ($search_type == "categoryList") {
             $catalog_tree = modApiFunc("Catalog", "getSubcategoriesFullListWithParent", 1);
             foreach ($catalog_tree as $key => $cat) {
                 $occurerence = stripos($cat['name'], $search_string);
                 if ($occurerence === false) {
                     continue;
                 } else {
                     $Result[$cat['id']] = $cat['name'];
                 }
             }
         }
         // category list
         return json_encode($Result);
     }
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:56,代码来源:search_nav_menu.php

示例4: cut_uuid_suffix

 static function cut_uuid_suffix($text, $style)
 {
     //                . CCInfo             .
     // :                  getValidatedDataStructure            PersonInfoVariantID,         .
     $uuid_pattern = UUIDUtils::getRegexpPattern($style);
     $matches = array();
     if (preg_match($uuid_pattern, $text, $matches)) {
         $text = _ml_substr($text, 0, _ml_strlen($text) - UUIDUtils::getLength($style));
     } else {
     }
     return $text;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:12,代码来源:UUIDUtils.php

示例5: install

 /**
  * Installs the specified module in the system.
  *
  * The install() method is called statically.
  * To call other methods of this class from this method,
  * the static call is used, for example,
  * Payment_Module_AllInactive::getTables() instead of $this->getTables().
  */
 function install()
 {
     global $application;
     $obj =& $application->getInstance('MessageResources', "payment-module-all-inactive-messages", "AdminZone");
     $tables = Payment_Module_All_Inactive::getTables();
     $query = new DB_Table_Create($tables);
     $table = 'pm_all_inactive_settings';
     #
     $columns = $tables[$table]['columns'];
     #
     $query = new DB_Insert($table);
     $query->addInsertValue(1, $columns['id']);
     $query->addInsertValue("MODULE_NAME", $columns['key']);
     $query->addInsertValue('s:' . _ml_strlen($obj->getMessage('MODULE_NAME')) . ':"' . $obj->getMessage('MODULE_NAME') . '";', $columns['value']);
     $application->db->getDB_Result($query);
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:24,代码来源:payment_module_all_inactive_api.php

示例6: getTaxRateByZip

 /**
  * general function
  * gets an unformatted zip
  * ----------------------- !!! CURRENTLY !!!
  * formats it as a US-postal code, 5 or 5+4 digits length
  * ----------------------- !!! CURRENTLY !!!
  * gets a tax rate from DB and zip set
  * returns it as a percent tax rate
  * or returns 0 if zip is illegal or rate not found
  *
  * @param char[] $zip
  * @return float
  */
 function getTaxRateByZip($sid, $zip)
 {
     $zip = preg_replace("/[^0-9]/", '', $zip);
     $len = _ml_strlen($zip);
     if ($len != 5 && $len != 9) {
         return 0.0;
     }
     if ($len == 5) {
         $zip5 = intval($zip);
         return $this->getTaxRateByZip5($sid, $zip5);
     } else {
         $zip5 = intval(_ml_substr($zip, 0, 5));
         $zip4 = intval(_ml_substr($zip, 5, 4));
         $rlt = $this->getTaxRateByZip9($sid, $zip5, $zip4);
         if ($rlt !== FALSE) {
             return $rlt;
         }
         return $this->getTaxRateByZip5($sid, $zip5);
     }
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:33,代码来源:tax_rate_by_zip_api.php

示例7: onAction

 /**
  * Processes action.
  */
 function onAction()
 {
     global $application;
     $request = $application->getInstance('Request');
     $search_pattern = trim($request->getValueByKey('search_pattern'));
     if (_ml_strlen($search_pattern) == 0) {
         modApiFunc('Session', 'un_Set', 'search_result_id');
     } else {
         $search_id = modApiFunc('CatalogSearch', 'prepareProductsSearch', $search_pattern);
         modApiFunc('CatalogSearch', 'deleteOldSearches');
         modApiFunc('Session', 'set', 'search_result_id', $search_id);
     }
     $request = new Request();
     $request->setView(CURRENT_REQUEST_URL);
     $request->encodeURLs = false;
     if (!empty($search_pattern)) {
         $request->setKey('keyword', $search_pattern);
     }
     $application->redirect($request);
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:23,代码来源:search_products_action.php

示例8: outputParentSelectBox

 /**
  * Outputs the parent page select box
  */
 function outputParentSelectBox()
 {
     $result = '<option value="0"' . ($this->_Page_Data['parent_id'] == 0 ? ' selected="selected"' : '') . '>' . getMsg('CMS', 'CMS_ROOT') . '</option>' . "\n";
     $page_tree = modApiFunc('CMS', 'getPageTree');
     $subtree = false;
     $level = '';
     foreach ($page_tree as $v) {
         if ($v['page_id'] == $this->_Page_Data['page_id']) {
             $subtree = true;
             $level = $v['level'];
         }
         if (_ml_strlen($v['level']) <= _ml_strlen($level) && $v['page_id'] != $this->_Page_Data['page_id']) {
             $level = '';
             $subtree = false;
         }
         if ($v['page_id'] != $this->_Page_Data['page_id'] && !$subtree) {
             $result .= '<option value="' . $v['page_id'] . '"' . ($this->_Page_Data['parent_id'] == $v['page_id'] ? ' selected="selected"' : '') . '>' . str_replace(' ', '&nbsp;', $v['level']) . $v['name'] . '</option>' . "\n";
         }
     }
     return $result;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:24,代码来源:cms_page_data_az.php

示例9: isValidTypeDescr

 /**
  * Validates the user input. It checks "New Product Type Description".
  */
 function isValidTypeDescr($data)
 {
     $retval = is_string($data) && _ml_strlen(trim($data)) > 0 && _ml_strlen(trim($data)) < 513;
     return $retval;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:8,代码来源:update_product_type_action.php

示例10: outputSendSourceList

 /**
  * Prepares data to output of possible mailing list.
  *
  * @return string - HTML code
  */
 function outputSendSourceList($dirrection)
 {
     $retval = "";
     $list = modApiFunc("Notifications", "getSendSourceList", $dirrection);
     $email_code_strlen = _ml_strlen($this->notificationInfo['Email_Code']);
     if ($this->notificationInfo['Email_Code'] == "EMAIL_ADMINISTRATOR") {
         $selected_key = "EMAIL_ADMINISTRATOR=" . $this->notificationInfo['Admin_ID'];
     }
     foreach ($list as $key => $address) {
         if ($dirrection == 'to') {
             if (!in_array($key, $this->usedSendToEmails)) {
                 $retval .= "<option value='" . $key . "' >" . $address . "</option>";
             }
         } else {
             if ($this->currentNotificationId == 'Add') {
                 $retval .= "<option value='" . $key . "' >" . $address . "</option>";
             } else {
                 //"Edit" notification.
                 if ($this->notificationInfo['Email_Code'] == "EMAIL_ADMINISTRATOR") {
                     if ($key == $selected_key) {
                         $retval .= "<option selected value='" . $key . "' >" . $address . "</option>";
                     } else {
                         $retval .= "<option value='" . $key . "' >" . $address . "</option>";
                     }
                 } else {
                     if ($this->notificationInfo['Email_Code'] != "EMAIL_CUSTOM") {
                         if (_ml_substr($key, 0, $email_code_strlen) == $this->notificationInfo['Email_Code']) {
                             $retval .= "<option selected value='" . $key . "' >" . $address . "</option>";
                         } else {
                             $retval .= "<option value='" . $key . "' >" . $address . "</option>";
                         }
                     } else {
                         $retval .= "<option value='" . $key . "' >" . $address . "</option>";
                     }
                 }
             }
         }
     }
     return $retval;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:45,代码来源:mail_info_az.php

示例11: isFileFromDirectoryOrSubdirectories

 function isFileFromDirectoryOrSubdirectories($dir_path, $file_path)
 {
     $d = realpath($dir_path);
     $f = realpath($file_path);
     return _ml_substr($f, 0, _ml_strlen($d)) == $d;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:6,代码来源:shell_api.php

示例12: getTag


//.........这里部分代码省略.........
             break;
         case 'To':
             $value = $this->To;
             break;
         case 'CategoryStatistics':
             $value = $this->outputCategoryStatistics();
             break;
         case 'CurrensySign':
             $value = modApiFunc("Localization", "getCurrencySign");
             break;
         case 'ProductOfflineStatusReason':
             $prod_status_id = $this->_Current_Product->getProductTagValue('Available', PRODUCTINFO_NOT_LOCALIZED_DATA);
             $value = $prod_status_id == PRODUCT_STATUS_ONLINE ? getMsg('SYS', "PRODUCT_PARENT_STATUS_ONLINE") : "";
             break;
         case 'ProductOfflineStatusColor':
             //                   Offline.
             //                                    Online,                 ,      Offline -        .
             $prod_status_id = $this->_Current_Product->getProductTagValue('Available', PRODUCTINFO_NOT_LOCALIZED_DATA);
             $value = $prod_status_id == PRODUCT_STATUS_ONLINE ? "rgb(175, 175, 175)" : "#FF0000";
             break;
         case 'ProductCatsCount':
             $value = count($this->_Current_Product->getCategoriesIDs());
             break;
         case 'ProductCatsList':
             $_ps = array();
             $_cts = $this->_Current_Product->getCategoriesIDs();
             foreach ($_cts as $cid) {
                 $_ps[] = $this->_cats_paths[$cid];
             }
             asort($_ps);
             $_ps = array_map("addslashes", array_map("_ml_htmlentities", $_ps));
             $value = implode("<br>", $_ps);
             break;
         case 'ProductQuantityInStock':
             if ($this->_Current_Product->whichStockControlMethod() == PRODUCT_OPTIONS_INVENTORY_TRACKING) {
                 $value = "";
                 $inv_qty = modApiFunc('Product_Options', 'getQuantityInStockByInventoryTable', 'product', $this->_Current_Product->getProductTagValue('ID'));
                 if (Validator::isValidInt($inv_qty) == true) {
                     $value = $inv_qty . ' ' . modApiFunc('Localization', 'getUnitTypeValue', 'item');
                 }
             } else {
                 $value = $this->_Current_Product->getProductTagValue('QuantityInStock', PRODUCTINFO_NOT_LOCALIZED_DATA);
                 if (Validator::isValidInt($value) == true) {
                     $value = $this->_Current_Product->getProductTagValue('QuantityInStock', PRODUCTINFO_LOCALIZED_DATA);
                 }
             }
             break;
         case 'HeaderData':
             if (empty($this->psf_filter)) {
                 $value = modApiFunc('TmplFiller', 'fill', "catalog/prod_list/", "list-header-category-data.tpl.html", array());
             } else {
                 $value = modApiFunc('TmplFiller', 'fill', "catalog/prod_list/", "list-header-searchform-data.tpl.html", array());
             }
             break;
         case 'SearchFilterData':
             $value = $this->getSearchFilterDataText();
             break;
         case 'FooterData':
             if (empty($this->psf_filter)) {
                 $value = modApiFunc('TmplFiller', 'fill', "catalog/prod_list/", "list-footer-category-data.tpl.html", array());
             } else {
                 $value = modApiFunc('TmplFiller', 'fill', "catalog/prod_list/", "list-footer-searchform-data.tpl.html", array());
             }
             break;
         case 'IfSearchFormActive':
             $value = empty($this->psf_filter) ? '' : 'Y';
             break;
         case 'ProductThumbnail':
             $value = modApiFunc('TmplFiller', 'fill', 'catalog/prod_list/', 'list_item_image.tpl.html', array());
             break;
         case 'Local_NoImageSrc':
             $value = $application->getAppIni('URL_IMAGES_DIR') . 'noimage.png';
             break;
         case 'Local_SelectCategoriesProducts':
             $categorylist = modApiFunc("Catalog", "getSubcategoriesFullListWithParent", 1, false);
             foreach ($categorylist as $val => $data) {
                 $catvalid = $data["id"];
                 if ($data['level'] == 2) {
                     $value = '<option value="' . $catvalid . '" ' . ($CatID == $catvalid ? 'selected' : '') . '>&nbsp;&nbsp;&nbsp;' . $data["name"] . '</option>';
                 } else {
                     $value = '<option value="' . $catvalid . '" ' . ($CatID == $catvalid ? 'selected' : '') . '>' . $data["name"] . '</option>';
                 }
             }
             break;
         default:
             if (_ml_strpos($tag, 'Local_SortBy') === 0) {
                 $tag = _ml_substr($tag, _ml_strlen('Local_SortBy'));
                 $value = $this->getSortLink($tag);
                 break;
             }
             if (_ml_strpos($tag, 'Product') === 0) {
                 $tag = _ml_substr($tag, _ml_strlen('Product'));
             }
             if (is_object($this->_Current_Product) && $this->_Current_Product->isTagExists($tag)) {
                 $value = $this->_Current_Product->getProductTagValue($tag);
             }
             break;
     }
     return $value;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:101,代码来源:prodslist_az.php

示例13: getCZSiteHTTPSURL

 function getCZSiteHTTPSURL($SiteURL)
 {
     global $application;
     //                                - HTTPS               AVACTIS' .
     //                                - HTTP               AVACTIS' .
     //                                      SiteURL           .                                            SiteHTTPSURL.
     $AZ_AVACTIS_ROOT_HTTP_URL = $application->getAppIni("HTTP_URL_CONFIG.PHP");
     $AZ_AVACTIS_ROOT_HTTPS_URL = $application->getAppIni("HTTPS_URL");
     $url_cz = parse_url($SiteURL);
     $url_core = parse_url($AZ_AVACTIS_ROOT_HTTP_URL);
     $p_cz = explode("/", $url_cz['path']);
     $p_core = explode("/", $url_core['path']);
     foreach ($p_cz as $i => $p) {
         if (isset($p_core[$i]) && $p_cz[$i] == $p_core[$i] && !isset($p_cz[$i - 1])) {
             unset($p_cz[$i]);
             unset($p_core[$i]);
         }
     }
     $Path_CZ = implode("/", $p_cz);
     $Path_Core = implode("/", $p_core);
     $cz_https_url = preg_replace("/" . addcslashes($Path_Core, "/") . "/i", "", $AZ_AVACTIS_ROOT_HTTPS_URL);
     $cz_https_url .= $Path_CZ;
     if (_ml_strcasecmp("https://", _ml_substr($AZ_AVACTIS_ROOT_HTTPS_URL, 0, _ml_strlen("https://"))) !== 0) {
         return NULL;
     } else {
         return $cz_https_url;
     }
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:28,代码来源:configuration_api.php

示例14: outputParentSelectBox

 /**
  * Outputs the parent page select box
  */
 function outputParentSelectBox($id = -1, $selected = -1)
 {
     $result = '';
     if ($id == -1) {
         $result = '<option value="">' . getMsg('CMS', 'CMS_ANY') . '</option>' . "\n";
     }
     $result .= '<option value="0"' . ($selected == '0' ? ' selected="selected"' : '') . '>' . getMsg('CMS', 'CMS_ROOT') . '</option>' . "\n";
     $subtree = false;
     $level = '';
     foreach ($this->_page_tree as $v) {
         if ($v['page_id'] == $id) {
             $subtree = true;
             $level = $v['level'];
         }
         if (_ml_strlen($v['level']) <= _ml_strlen($level) && $v['page_id'] != $id) {
             $level = '';
             $subtree = false;
         }
         if ($v['page_id'] != $id && !$subtree) {
             $result .= '<option value="' . $v['page_id'] . '"' . ($v['page_id'] == $selected ? ' selected="selected"' : '') . '>' . str_replace(' ', '&nbsp;', $v['level']) . $v['name'] . '</option>' . "\n";
         }
     }
     return $result;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:27,代码来源:cms_pages_az.php

示例15: __is_valid_string

 function __is_valid_string(&$string)
 {
     if (!is_string($string)) {
         return false;
     }
     if (_ml_strlen($string) > 256) {
         $string = _ml_substr($string, 0, 256);
         return true;
     }
     return true;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:11,代码来源:validator.php


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