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


PHP StrToUpper函数代码示例

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


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

示例1: __BuildTree

 public static function __BuildTree($arPath, &$arTree, &$arComponent, $level = 1)
 {
     $arBXTopComponentCatalogLevel = array("content", "service", "communication", "e-store", "utility");
     $arBXTopComponentCatalogLevelSort = array(600, 700, 800, 900, 1000);
     if (!is_array($arTree["#"])) {
         $arTree["#"] = array();
     }
     if (!array_key_exists($arPath["ID"], $arTree["#"])) {
         $arTree["#"][$arPath["ID"]] = array();
         $arTree["#"][$arPath["ID"]]["@"] = array();
         $arTree["#"][$arPath["ID"]]["@"]["NAME"] = "";
         $arTree["#"][$arPath["ID"]]["@"]["SORT"] = IntVal($arPath["SORT"]);
         if ($level == 1 && in_array($arPath["ID"], $arBXTopComponentCatalogLevel)) {
             $arTree["#"][$arPath["ID"]]["@"]["NAME"] = GetMessage("VRT_COMP_CAT_" . StrToUpper($arPath["ID"]));
             $arTree["#"][$arPath["ID"]]["@"]["SORT"] = IntVal($arBXTopComponentCatalogLevelSort[array_search($arPath["ID"], $arBXTopComponentCatalogLevel)]);
         }
         if (strlen($arTree["#"][$arPath["ID"]]["@"]["NAME"]) <= 0) {
             $arTree["#"][$arPath["ID"]]["@"]["NAME"] = $arPath["NAME"];
         }
         if ($arTree["#"][$arPath["ID"]]["@"]["SORT"] <= 0) {
             $arTree["#"][$arPath["ID"]]["@"]["SORT"] = 100;
         }
     }
     if (array_key_exists("CHILD", $arPath)) {
         CComponentUtil::__BuildTree($arPath["CHILD"], $arTree["#"][$arPath["ID"]], $arComponent, $level + 1);
     } else {
         if (!is_array($arTree["#"][$arPath["ID"]]["*"])) {
             $arTree["#"][$arPath["ID"]]["*"] = array();
         }
         $arTree["#"][$arPath["ID"]]["*"][$arComponent["NAME"]] = $arComponent;
     }
 }
开发者ID:rasuldev,项目名称:torino,代码行数:32,代码来源:component_util.php

示例2: CleanUpElem

function CleanUpElem(&$elem_name, &$cfg_file, &$template)
{
    // Fixes HEX strings to look like 0xABCDEF12345 rather than 0Xabc or 0xaf
    if (Preg_Match("/(0x)([a-fA-F0-9]+)/i", $elem_name, $matches)) {
        $elem_name = Preg_Replace("/(0x)([a-fA-F0-9]+)/i", "0x" . StrToUpper($matches[2]), $elem_name);
    }
    print "    Cleaning up elem '{$elem_name}'\n";
    $cfg_elem = FindConfigElem($cfg_file, $elem_name);
    $cfg_elem = array_change_key_case($cfg_elem, CASE_LOWER);
    $new_elem = array();
    $last_label = 0;
    foreach ($template as $indice => $line) {
        if (Preg_Match('/\\[Label=([[:alnum:][:space:][:punct:]]+)\\]/', $line, $matches)) {
            if ($last_label) {
                unset($new_elem[$last_label]);
            }
            $matches[1] = Preg_Replace("/%s/i", " ", $matches[1]);
            $line = "//{$matches[1]}";
            if ($indice > 1) {
                $line = "\n\t{$line}";
            }
            $last_label = $line;
            $new_elem[$line] = array("");
            continue;
        } else {
            $property = StrToLower($line);
            if ($cfg_elem[$property]) {
                $new_elem[$line] = $cfg_elem[$property];
                unset($cfg_elem[$property]);
                $last_label = 0;
            }
        }
    }
    if (Count($cfg_elem) > 0) {
        $new_elem["\n\t//Custom Values"] = array("");
        // Lines not in the template go at the end as custom values
        foreach ($cfg_elem as $key => $value) {
            $new_elem[$key] = $value;
        }
    }
    if ($last_label) {
        unset($new_elem[$last_label]);
    }
    return $new_elem;
}
开发者ID:polserver,项目名称:poltools,代码行数:45,代码来源:cfgformat.php

示例3: text_to_morse

function text_to_morse($msg)
{
    global $fwd_morse;
    $msg = StrToUpper($msg);
    $words = preg_split("/\\s+/", $msg);
    $words_out = array();
    foreach ($words as $word) {
        $bits = array();
        for ($i = 0; $i < strlen($word); $i++) {
            $temp = $fwd_morse[substr($word, $i, 1)];
            if ($temp) {
                $bits[] = $temp;
            }
        }
        $words_out[] = implode(' ', $bits);
    }
    return implode(' / ', $words_out);
}
开发者ID:bright-spark,项目名称:php-snippets,代码行数:18,代码来源:morse.php

示例4: HexToRGB

 function HexToRGB($color)
 {
     //	Delete the # symbol
     $input = Trim(Str_Replace("#", "", StrToUpper($color)));
     //	Get every single number-letter
     $a = $this->_convertToDecimal($input[0]);
     $b = $this->_convertToDecimal($input[1]);
     $c = $this->_convertToDecimal($input[2]);
     $d = $this->_convertToDecimal($input[3]);
     $e = $this->_convertToDecimal($input[4]);
     $f = $this->_convertToDecimal($input[5]);
     //	Build the RGB code
     $r = $a * 16 + $b;
     $g = $c * 16 + $d;
     $b = $e * 16 + $f;
     //	Put R, G and B in an array for separate use
     $RGB = array($r, $g, $b);
     return $RGB;
 }
开发者ID:hukumonline,项目名称:quart80,代码行数:19,代码来源:ColorConverter.php

示例5: simple_row

function simple_row($img_key, $shorts, $props)
{
    $vars = $GLOBALS['catalog_vars'][$img_key];
    if (!is_array($vars)) {
        $vars = array();
    }
    foreach ($vars as $k => $v) {
        $vars[$k] = StrToUpper($v);
    }
    if (!is_array($shorts)) {
        $shorts = array();
    }
    $short = count($shorts) ? $shorts[0] : null;
    $ret = array('name' => null, 'unified' => null, 'variations' => $vars, 'docomo' => null, 'au' => null, 'softbank' => null, 'google' => null, 'image' => $img_key . '.png', 'sheet_x' => 0, 'sheet_y' => 0, 'short_name' => $short, 'short_names' => $shorts, 'text' => $GLOBALS['text'][$short], 'apple_img' => file_exists("{$GLOBALS['dir']}/../gemoji/images/emoji/unicode/{$img_key}.png"), 'hangouts_img' => file_exists("{$GLOBALS['dir']}/../img-hangouts-64/{$img_key}.png"), 'twitter_img' => file_exists("{$GLOBALS['dir']}/../img-twitter-72/{$img_key}.png"));
    foreach ($props as $k => $v) {
        $ret[$k] = $v;
    }
    return $ret;
}
开发者ID:jaygeeseman,项目名称:emoji-data,代码行数:19,代码来源:build_map.php

示例6: find_flags

function find_flags($path)
{
    $files = glob($path);
    $cps = array();
    foreach ($files as $file) {
        $bits = explode('/', $file);
        $bits = explode('.', array_pop($bits));
        $cp = StrToUpper(array_shift($bits));
        $cps[] = $cp;
    }
    $out = array();
    foreach ($cps as $cp) {
        if (!strlen($cp)) {
            continue;
        }
        list($a, $b) = explode('-', $cp);
        $a = hexdec($a) - 0x1f1e6;
        $b = hexdec($b) - 0x1f1e6;
        $a = chr(ord('a') + $a);
        $b = chr(ord('a') + $b);
        $out[] = "{$cp};flag-{$a}{$b}\n";
    }
    return $out;
}
开发者ID:devonharvey,项目名称:emoji-data,代码行数:24,代码来源:find_flags.php

示例7: trim

}
$arParams["PATH_TO_SMILE"] = trim($arParams["PATH_TO_SMILE"]);
$arParams["USER_ID"] = IntVal($arParams["USER_ID"]);
if ($arParams["USER_ID"] <= 0) {
    ShowError(GetMessage("SONET_ACTIVITY_NO_USER"));
    return;
}
$arParams["NAME_TEMPLATE"] = $arParams["NAME_TEMPLATE"] ? $arParams["NAME_TEMPLATE"] : CSite::GetNameFormat();
$arParams["NAME_TEMPLATE_WO_NOBR"] = str_replace(array("#NOBR#", "#/NOBR#"), array("", ""), $arParams["NAME_TEMPLATE"]);
$bUseLogin = $arParams["SHOW_LOGIN"] != "N" ? true : false;
$arSocNetFeaturesSettings = CSocNetAllowed::GetAllowedFeatures();
$arParams["LOG_DATE_DAYS"] = IntVal($arParams["LOG_DATE_DAYS"]);
if ($arParams["LOG_DATE_DAYS"] <= 0) {
    $arParams["LOG_DATE_DAYS"] = 7;
}
$arParams["AUTH"] = StrToUpper($arParams["AUTH"]) == "Y" ? "Y" : "N";
$arParams["EVENT_ID"] = array_key_exists("EVENT_ID", $arParams) && strlen($arParams["EVENT_ID"]) > 0 ? $arParams["EVENT_ID"] : false;
$arParams["LOG_CNT"] = array_key_exists("LOG_CNT", $arParams) && intval($arParams["LOG_CNT"]) > 0 ? $arParams["LOG_CNT"] : 0;
if ($arParams["USER_ID"] <= 0) {
    ShowError(GetMessage("SONET_ACTIVITY_NO_USER"));
    return;
}
$bCurrentUserIsAdmin = CSocNetUser::IsCurrentUserModuleAdmin();
$dbUser = CUser::GetByID($arParams["USER_ID"]);
if ($arUser = $dbUser->Fetch()) {
    $canViewProfile = CSocNetUserPerms::CanPerformOperation($GLOBALS["USER"]->GetID(), $arUser["ID"], "viewprofile", $bCurrentUserIsAdmin);
    if ($canViewProfile) {
        $arResult["Features"] = array("all", "system", "system_groups");
        if (CSocnetUser::IsFriendsAllowed()) {
            $arResult["Features"][] = "system_friends";
        }
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例8: array

    return 'No args...';
}
#-------------------------------------------------------------------------------
$ArgsIDs = array('PAYMENT_ID', 'PAYEE_ACCOUNT', 'PAYMENT_AMOUNT', 'PAYMENT_UNITS', 'PAYMENT_METAL_ID', 'PAYMENT_BATCH_NUM', 'PAYER_ACCOUNT', 'ACTUAL_PAYMENT_OUNCES', 'USD_PER_OUNCE', 'FEEWEIGHT', 'TIMESTAMPGMT', 'V2_HASH');
#-------------------------------------------------------------------------------
foreach ($ArgsIDs as $ArgID) {
    $Args[$ArgID] = @$Args[$ArgID];
}
#-------------------------------------------------------------------------------
$Config = Config();
#-------------------------------------------------------------------------------
$Settings = $Config['Invoices']['PaymentSystems']['Egold'];
#-------------------------------------------------------------------------------
$Hash = array($Args['PAYMENT_ID'], $Args['PAYEE_ACCOUNT'], $Args['PAYMENT_AMOUNT'], $Args['PAYMENT_UNITS'], $Args['PAYMENT_METAL_ID'], $Args['PAYMENT_BATCH_NUM'], $Args['PAYER_ACCOUNT'], StrToUpper(Md5($Settings['Hash'])), $Args['ACTUAL_PAYMENT_OUNCES'], $Args['USD_PER_OUNCE'], $Args['FEEWEIGHT'], $Args['TIMESTAMPGMT']);
#-------------------------------------------------------------------------------
$Hash = StrToUpper(Md5(Implode(':', $Hash)));
#-------------------------------------------------------------------------------
if ($Hash != $Args['V2_HASH']) {
    return ERROR | @Trigger_Error('[comp/www/Merchant/Egold]: проверка подлинности завершилась не удачей');
}
#-------------------------------------------------------------------------------
$Invoice = DB_Select('Invoices', array('ID', 'Summ'), array('UNIQ', 'ID' => $Args['PAYMENT_ID']));
#-------------------------------------------------------------------------------
switch (ValueOf($Invoice)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        return ERROR | @Trigger_Error(400);
    case 'array':
        #---------------------------------------------------------------------------
        if (Round($Invoice['Summ'] / $Settings['Course'], 2) != $Args['PAYEE_ACCOUNT']) {
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Egold.comp.php

示例9: GetUserLogEvents

 function GetUserLogEvents($userID, $arFilter = array())
 {
     global $DB;
     $userID = IntVal($userID);
     if ($userID <= 0) {
         return false;
     }
     $strWhere = "";
     if (is_array($arFilter) && count($arFilter) > 0) {
         foreach ($arFilter as $key => $value) {
             switch ($key) {
                 case "ENTITY_TYPE":
                     $strWhere .= " AND L.ENTITY_TYPE = '" . $DB->ForSql($value, 1) . "' ";
                     break;
                 case "ENTITY_ID":
                     $strWhere .= " AND L.ENTITY_ID = " . IntVal($value) . " ";
                     break;
                 case "EVENT_ID":
                     if (!is_array($value)) {
                         $strWhere .= " AND L.EVENT_ID = '" . $DB->ForSql($value, 50) . "' ";
                     } else {
                         if (!function_exists('__tmp_str_apos')) {
                             function __tmp_str_apos(&$tmpval, $tmpind)
                             {
                                 if (strlen($tmpval) > 0) {
                                     $tmpval = "'" . $GLOBALS["DB"]->ForSql($tmpval, 50) . "'";
                                 }
                             }
                         }
                         array_walk($value, '__tmp_str_apos');
                         $strWhere .= " AND L.EVENT_ID IN (" . implode(", ", $value) . ") ";
                     }
                     break;
                 case "LOG_DATE_DAYS":
                     $strWhere .= " AND L.LOG_DATE >= DATE_SUB(NOW(), INTERVAL " . IntVal($value) . " DAY) ";
                     break;
                 case "SITE_ID":
                     if (!is_array($value)) {
                         $strWhere .= " AND L.SITE_ID = '" . $DB->ForSql($value, 2) . "' ";
                     } else {
                         $counter = 0;
                         $strWhere .= " AND (";
                         foreach ($value as $site_id) {
                             if ($site_id === false) {
                                 $strWhere .= ($counter > 0 ? " OR" : "") . " L.SITE_ID IS NULL ";
                             } else {
                                 $strWhere .= ($counter > 0 ? " OR" : "") . " L.SITE_ID = '" . $DB->ForSql($site_id, 2) . "' ";
                             }
                             $counter++;
                         }
                         $strWhere .= ") ";
                     }
                     break;
             }
         }
     }
     $strSql = "SELECT L.ID, L.ENTITY_TYPE, L.ENTITY_ID, L.EVENT_ID, L.LOG_DATE, L.SITE_ID as SITE_ID, " . "\t" . $DB->DateToCharFunction("L.LOG_DATE", "FULL") . " as LOG_DATE_FORMAT, " . "\tL.TITLE_TEMPLATE, L.TITLE, L.MESSAGE, L.URL, L.MODULE_ID, L.CALLBACK_FUNC, " . "\tG.NAME as GROUP_NAME, G.OWNER_ID as GROUP_OWNER_ID, G.INITIATE_PERMS as GROUP_INITIATE_PERMS, " . "\tG.VISIBLE as GROUP_VISIBLE, G.OPENED as GROUP_OPENED, " . "\tU.NAME as USER_NAME, U.LAST_NAME as USER_LAST_NAME, U.SECOND_NAME as USER_SECOND_NAME, U.LOGIN as USER_LOGIN " . "FROM b_sonet_log L ";
     if (!Array_Key_Exists("ALL", $arFilter) || StrToUpper($arFilter["ALL"]) != "Y") {
         $strSql .= "\tINNER JOIN b_sonet_log_events LE " . "\t\tON (L.ENTITY_TYPE = LE.ENTITY_TYPE AND L.ENTITY_ID = LE.ENTITY_ID AND (L.EVENT_ID = LE.EVENT_ID OR ((L.EVENT_ID = 'blog_post' OR L.EVENT_ID = 'blog_comment' OR L.EVENT_ID = 'blog_post_micro') AND LE.EVENT_ID = 'blog'))) ";
     }
     $strSql .= "\tLEFT JOIN b_sonet_group G " . "\t\tON (L.ENTITY_TYPE = 'G' AND L.ENTITY_ID = G.ID) " . "\tLEFT JOIN b_user U " . "\t\tON (L.ENTITY_TYPE = 'U' AND L.ENTITY_ID = U.ID) " . "WHERE 1 = 1 ";
     if (!Array_Key_Exists("ALL", $arFilter) || StrToUpper($arFilter["ALL"]) != "Y") {
         $strSql .= "\tAND LE.USER_ID = " . $userID . " ";
     }
     $strSql .= $strWhere . "ORDER BY L.LOG_DATE DESC";
     $dbRes = $DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
     return $dbRes;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:68,代码来源:log_events.php

示例10: array

     $value1 = $value;
     $value = array();
     foreach ($value1 as $val) {
         if (Is_Array($val) && Count($val) > 0 || !Is_Array($val) && StrLen($val) > 0) {
             $value[] = $val;
         }
     }
     if (Count($value) <= 0) {
         continue;
     }
 } else {
     if (StrLen($value) <= 0) {
         continue;
     }
 }
 $keyTmp = StrToUpper(SubStr($key, 4));
 if ($keyTmp == "FIO") {
     $arFilter["NAME"] = $value;
     $arResult["ShowResults"] = true;
     $bFilter = true;
 } elseif (array_key_exists($keyTmp, $arUserProps)) {
     if (in_array($keyTmp, $arParams["USER_FIELDS_SEARCHABLE"])) {
         if ($keyTmp == "PERSONAL_BIRTHDAY") {
             $arFilter["PERSONAL_BIRTHDAY_1"] = $value;
             $arFilter["PERSONAL_BIRTHDAY_2"] = $value;
         } elseif ($keyTmp == "PERSONAL_BIRTHDAY_YEAR") {
             $arFilter["PERSONAL_BIRTHDAY_1"] = ConvertTimeStamp(mktime(0, 0, 0, 0, 0, $value), "SHORT", SITE_ID);
             $arFilter["PERSONAL_BIRTHDAY_2"] = ConvertTimeStamp(mktime(0, 0, 0, 12, 31, $value), "SHORT", SITE_ID);
         } elseif ($keyTmp == "PERSONAL_BIRTHDAY_DAY") {
             $arFilter["PERSONAL_BIRTHDAY_DATE"] = $value;
         } else {
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php

示例11: StrToUpper

<?php

$data = "1507EUREWTI TICKETS GROBKHAN INC3518660http://127.0.0.1:8001/reg/invoice_buy/hobex_paid/";
$key = "a86zx39tk24bn51dc07go19ps5";
print "'" . $data . $key . "'\n";
$hash = StrToUpper(SHA1($data . $key));
print $hash . "\n";
$hash = StrToUpper(SHA1(StrToUpper($data . $key)));
print $hash . "\n";
开发者ID:rhoerbe,项目名称:ewtishop2,代码行数:9,代码来源:signtest.php

示例12: array

#-------------------------------------------------------------------------------
$ArgsIDs = array('requestDatetime', 'action', 'md5', 'shopId', 'orderNumber', 'customerNumber', 'orderCreatedDatetime', 'orderSumAmount', 'orderSumCurrencyPaycash', 'orderSumBankPaycash', 'shopSumAmount', 'shopSumCurrencyPaycash', 'shopSumBankPaycash', 'orderIsPaid');
#-------------------------------------------------------------------------------
foreach ($ArgsIDs as $ArgID) {
    $Args[$ArgID] = @$Args[$ArgID];
}
#-------------------------------------------------------------------------------
$OrderID = $Args['orderNumber'];
#-------------------------------------------------------------------------------
$Config = Config();
#-------------------------------------------------------------------------------
$Settings = $Config['Invoices']['PaymentSystems']['Yandex'];
#-------------------------------------------------------------------------------
$Md5 = array($Args['orderIsPaid'], $Args['orderSumAmount'], $Args['shopSumCurrencyPaycash'], $Args['orderSumBankPaycash'], $Args['shopId'], $Args['invoiceId'], $Args['customerNumber'], $Settings['Hash']);
#-------------------------------------------------------------------------------
if (StrToUpper(Md5(Implode(';', $Md5))) != $Args['md5']) {
    return ERROR | @Trigger_Error('[comp/www/Merchant/Yandex]: проверка подлинности завершилась не удачей');
}
#-------------------------------------------------------------------------------
$Date = Date('c', Time());
#-------------------------------------------------------------------------------
$ShopID = $Settings['Send']['ShopID'];
#-------------------------------------------------------------------------------
$Invoice = DB_Select('Invoices', array('ID', 'Summ'), array('UNIQ', 'ID' => $OrderID));
#-------------------------------------------------------------------------------
switch (ValueOf($Invoice)) {
    case 'error':
        return ERROR | @Trigger_Error(500);
    case 'exception':
        return ERROR | @Trigger_Error(400);
    case 'array':
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Yandex.comp.php

示例13: simple_row

function simple_row($img_key, $shorts, $props)
{
    $vars = $GLOBALS['catalog_vars'][$img_key];
    if (!is_array($vars)) {
        $vars = array();
    }
    foreach ($vars as $k => $v) {
        $vars[$k] = StrToUpper($v);
    }
    if (!is_array($shorts)) {
        $shorts = array();
    }
    $short = count($shorts) ? $shorts[0] : null;
    $category = $GLOBALS['category_map'][$props['unified']];
    if (!is_array($category)) {
        foreach ($vars as $v) {
            if (is_array($GLOBALS['category_map'][$v])) {
                $category = $GLOBALS['category_map'][$v];
            }
        }
    }
    $ret = array('name' => null, 'unified' => null, 'variations' => $vars, 'docomo' => null, 'au' => null, 'softbank' => null, 'google' => null, 'image' => $img_key . '.png', 'sheet_x' => 0, 'sheet_y' => 0, 'short_name' => $short, 'short_names' => $shorts, 'text' => $GLOBALS['text'][$short], 'texts' => $GLOBALS['texts'][$short], 'category' => is_array($category) ? $category[0] : null, 'sort_order' => is_array($category) ? $category[1] : null);
    $ret['has_img_apple'] = file_exists("{$GLOBALS['dir']}/../img-apple-64/{$ret['image']}");
    $ret['has_img_google'] = file_exists("{$GLOBALS['dir']}/../img-google-64/{$ret['image']}");
    $ret['has_img_twitter'] = file_exists("{$GLOBALS['dir']}/../img-twitter-64/{$ret['image']}");
    $ret['has_img_emojione'] = file_exists("{$GLOBALS['dir']}/../img-emojione-64/{$ret['image']}");
    foreach ($props as $k => $v) {
        $ret[$k] = $v;
    }
    if (file_exists("../img-apple-64/{$img_key}-1f3fb.png")) {
        $ret['skin_variations'] = array();
        foreach ($GLOBALS['skin_variation_suffixes'] as $suffix) {
            $var_uni = $props['unified'] . '-' . $suffix;
            $var_img = $img_key . '-' . StrToLower($suffix) . '.png';
            $variation = array('unified' => $var_uni, 'image' => $var_img, 'sheet_x' => 0, 'sheet_y' => 0, 'has_img_apple' => file_exists("{$GLOBALS['dir']}/../img-apple-64/{$var_img}"), 'has_img_google' => file_exists("{$GLOBALS['dir']}/../img-google-64/{$var_img}"), 'has_img_twitter' => file_exists("{$GLOBALS['dir']}/../img-twitter-64/{$var_img}"), 'has_img_emojione' => file_exists("{$GLOBALS['dir']}/../img-emojione-64/{$var_img}"));
            $ret['skin_variations'][$var_uni] = $variation;
        }
    }
    return $ret;
}
开发者ID:jtkeyva,项目名称:emoji-data,代码行数:40,代码来源:build_map.php

示例14: __InTaskCompare

 function __InTaskCompare($arTask1, $arTask2, $arOrder)
 {
     foreach ($arOrder as $ord) {
         if (Array_Key_Exists($ord["ORDER"], $arTask1["FIELDS"])) {
             $v1 = $arTask1["FIELDS"][$ord["ORDER"]];
             $v2 = $arTask2["FIELDS"][$ord["ORDER"]];
             if ($ord["TYPE"] == "datetime") {
                 $v1 = CDatabase::FormatDate($v1, CLang::GetDateFormat("FULL"), "YYYY-MM-DD HH:MI:SS");
                 $v2 = CDatabase::FormatDate($v2, CLang::GetDateFormat("FULL"), "YYYY-MM-DD HH:MI:SS");
             }
             if ($ord["NULLS"]) {
                 if (StrLen($v1) <= 0 && StrLen($v2) > 0) {
                     return $ord["DIRECTION"] == "ASC" ? true : false;
                 } elseif (StrLen($v1) > 0 && StrLen($v2) <= 0) {
                     return $ord["DIRECTION"] == "ASC" ? false : true;
                 }
             }
             if ($v1 > $v2) {
                 return $ord["DIRECTION"] == "ASC" ? true : false;
             } elseif ($v1 < $v2) {
                 return $ord["DIRECTION"] == "ASC" ? false : true;
             }
         } else {
             foreach ($arTask1["PROPS"] as $key => $value) {
                 if (StrToUpper($key) == $ord["ORDER"]) {
                     $v1 = $value["VALUE"];
                     $v2 = $arTask2["PROPS"][$key]["VALUE"];
                     if ($ord["TYPE"] == "datetime") {
                         $v1 = CDatabase::FormatDate($v1, CLang::GetDateFormat("FULL"), "YYYY-MM-DD HH:MI:SS");
                         $v2 = CDatabase::FormatDate($v2, CLang::GetDateFormat("FULL"), "YYYY-MM-DD HH:MI:SS");
                     }
                     if ($ord["NULLS"]) {
                         if (StrLen($v1) <= 0 && StrLen($v2) > 0) {
                             return $ord["DIRECTION"] == "ASC" ? true : false;
                         } elseif (StrLen($v1) > 0 && StrLen($v2) <= 0) {
                             return $ord["DIRECTION"] == "ASC" ? false : true;
                         }
                     }
                     if ($v1 > $v2) {
                         return $ord["DIRECTION"] == "ASC" ? true : false;
                     } elseif ($v1 < $v2) {
                         return $ord["DIRECTION"] == "ASC" ? false : true;
                     }
                     break;
                 }
             }
         }
     }
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:50,代码来源:init.php

示例15: SPrintF

    #-------------------------------------------------------------------------------
    # одна рандомная буква в верхнем регистре
    $Password = SPrintF('%s%s', StrToUpper($Letters[Mt_Rand(0, StrLen($Letters) - 1)]), $Password);
    #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# число символов по которым строим пароль
$Size = StrLen($Chars) - 1;
#-------------------------------------------------------------------------------
#Debug(SPrintF('[comp/Passwords/Generator]: Chars = %s',$Chars));
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
# длинна пароля, необходимая длинна минус то что уже построено
$Length = $Length - StrLen($Password);
#-------------------------------------------------------------------------------
while ($Length--) {
    #-------------------------------------------------------------------------------
    $Char = $Chars[Mt_Rand(0, $Size)];
    #-------------------------------------------------------------------------------
    # рандомно, символ переводим в верхний регистр
    $Char = Mt_Rand(0, 2) % 3 ? $Char : StrToUpper($Char);
    #-------------------------------------------------------------------------------
    $Password = SPrintF('%s%s', $Password, $Char);
    #-------------------------------------------------------------------------------
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
return Str_Shuffle($Password);
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
开发者ID:carriercomm,项目名称:jbs,代码行数:31,代码来源:Generator.comp.php


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