本文整理汇总了PHP中toUpper函数的典型用法代码示例。如果您正苦于以下问题:PHP toUpper函数的具体用法?PHP toUpper怎么用?PHP toUpper使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了toUpper函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: berekenSom
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<p><?php
echo $getal1 . " + " . $getal2 . " = " . berekenSom($getal1, $getal2);
?>
</p>
<p><?php
echo $getal1 . " * " . $getal2 . " = " . vermenigvuldig($getal1, $getal2);
?>
</p>
<p><?php
echo $getal . " is ";
if (isEven($getal)) {
echo " even";
} else {
echo " oneven";
}
?>
</p>
<p><?php
echo var_dump(toUpper($tekst));
?>
</p>
</body>
</html>
开发者ID:jorenvh1,项目名称:web-backend,代码行数:30,代码来源:opdracht-functions.php
示例2: testToUpper
public function testToUpper()
{
$this->assertEquals(toUpper('Hello World'), 'HELLO WORLD');
}
开发者ID:jordillull,项目名称:unit-tests-uib-2015,代码行数:4,代码来源:mytest.php
示例3: array
$element_type = "photo";
}
$arElement["SECTION_PATH"] = array();
if ($arElement["IBLOCK_SECTION_ID"] > 0) {
$rsPath = GetIBlockSectionPath($arElement["IBLOCK_ID"], $arElement["IBLOCK_SECTION_ID"]);
while ($arPath = $rsPath->GetNext()) {
$arElement["SECTION_PATH"][] = $arPath;
}
}
$strUrl = "";
$arChainBody[] = '<a href="' . CComponentEngine::MakePathFromTemplate($arParams["~PATH_TO_USER_" . toUpper($element_type)], array("user_id" => $arParams["SOCNET_USER_ID"], "path" => "")) . '">' . $arFeaturesTitles[$element_type] . '</a>';
$k = 0;
foreach ($arElement["SECTION_PATH"] as $arPath) {
if ($k > 0) {
$strUrl .= $arPath["NAME"] . "/";
$arPath["URL"] = CComponentEngine::MakePathFromTemplate($arParams["~PATH_TO_USER_" . toUpper($element_type) . "_SECTION"], array("user_id" => $arParams["SOCNET_USER_ID"], "path" => rtrim($strUrl, "/"), "section_id" => $arPath["ID"], "user_alias" => "user_" . $arParams["SOCNET_USER_ID"]));
if ($element_type != "calendar") {
$arChainBody[] = '<a href="' . $arPath["URL"] . '">' . htmlspecialcharsex($arPath["NAME"]) . '</a>';
} else {
$arChainBody[] = htmlspecialcharsex($arPath["NAME"]);
}
}
$k++;
}
$arResult["SEARCH"][$i]["CHAIN_PATH"] = implode(' / ', $arChainBody);
}
if (!$file && $element_type && $element_type != "files") {
if (file_exists($abs_path . $element_type . "_default.gif")) {
$file = $element_type . "_default.gif";
}
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:result_modifier.php
示例4: array
}
}
$arListParams = array('SELECT' => array('UF_*'));
if (!$bExcel && $arParams['USERS_PER_PAGE'] > 0) {
$arListParams['NAV_PARAMS'] = array('nPageSize' => $arParams['USERS_PER_PAGE'], 'bShowAll' => false);
}
if ($bDisable) {
$dbUsers = new CDBResult();
$dbUsers->InitFromArray(array());
} else {
if ($arFilter['LAST_NAME_RANGE']) {
//input format: a-z (letter - letter)
$letterRange = explode('-', $arFilter['LAST_NAME_RANGE'], 2);
$startLetterRange = array_shift($letterRange);
$endLetterRange = array_shift($letterRange);
$arFilter[] = array('LOGIC' => 'OR', array('><F_LAST_NAME' => array(toUpper($startLetterRange), toUpper($endLetterRange))), array('><F_LAST_NAME' => array(toLower($startLetterRange), toLower($endLetterRange))));
unset($arFilter['LAST_NAME_RANGE']);
}
$dbUsers = $obUser->GetList($sort_by = 'last_name', $sort_dir = 'asc', $arFilter, $arListParams);
}
$arDepartments = array();
$strUserIDs = '';
while ($arUser = $dbUsers->Fetch()) {
$arResult['USERS'][$arUser['ID']] = $arUser;
$strUserIDs .= ($strUserIDs == '' ? '' : '|') . $arUser['ID'];
}
//head
$dbRes = CIBlockSection::GetList(array(), array('UF_HEAD' => array_keys($arResult['USERS']), 'IBLOCK_ID' => COption::GetOptionInt('intranet', 'iblock_structure')), false, array('ID', 'NAME', 'UF_HEAD'));
while ($arSection = $dbRes->Fetch()) {
$arResult['USERS'][$arSection['UF_HEAD']]["DEP_HEAD"][$arSection["ID"]] = $arSection["NAME"];
}
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php
示例5: bxStatSort
function bxStatSort($a, $b)
{
global $by, $order, $arPrices, $arCurUsed;
$by = toUpper($by);
$order = toUpper($order);
if (in_array($by, array("PRODUCT_ID", "PAYED", "ALLOW_DELIVERY", "ORDER_COUNT", "COUNT", "QUANTITY", "DELAY", "ORDER_QUANTITY", "BASKET_QUANTITY"))) {
if (DoubleVal($a[$by]) == DoubleVal($b[$by])) {
return 0;
} elseif (DoubleVal($a[$by]) > DoubleVal($b[$by])) {
return $order == "DESC" ? -1 : 1;
} else {
return $order == "DESC" ? 1 : -1;
}
} elseif ($by == "PAYED_PROC" || $by == "ALLOW_DELIVERY_PROC") {
if ($by == "PAYED_PROC") {
$k = "PAYED";
} else {
$k = "ALLOW_DELIVERY";
}
if (IntVal($a[$k]) == IntVal($b[$k]) && IntVal($b[$k]) == 0) {
return 0;
} elseif (IntVal($a[$k]) > 0 && IntVal($b[$k]) > 0) {
if (DoubleVal($a[$k] * 100 / $a["ORDER_COUNT"]) > DoubleVal($b[$k] * 100 / $b["ORDER_COUNT"])) {
return $order == "DESC" ? -1 : 1;
} elseif (DoubleVal($a[$k] * 100 / $a["ORDER_COUNT"]) < DoubleVal($b[$k] * 100 / $b["ORDER_COUNT"])) {
return $order == "DESC" ? 1 : -1;
} else {
return 0;
}
} elseif (IntVal($a[$k]) > 0 && IntVal($b[$k]) <= 0) {
return $order == "DESC" ? -1 : 1;
} elseif (IntVal($a[$k]) <= 0 && IntVal($b[$k]) > 0) {
return $order == "DESC" ? 1 : -1;
} else {
return 0;
}
} else {
$bFound = false;
foreach ($arCurUsed as $cur) {
foreach ($arPrices as $price) {
if ($by == $price . "_" . $cur) {
$bFound = true;
$k = $cur;
$v = $price;
break;
}
}
if ($bFound) {
break;
}
}
if ($bFound) {
if (IntVal($a[$v][$k]) == IntVal($b[$v][$k])) {
return 0;
} elseif (IntVal($a[$v][$k]) > IntVal($b[$v][$k])) {
return $order == "DESC" ? -1 : 1;
} else {
return $order == "DESC" ? 1 : -1;
}
} else {
if ($a[$by] == $b[$by]) {
return 0;
} elseif ($a[$by] > $b[$by]) {
return $order == "DESC" ? -1 : 1;
} else {
return $order == "DESC" ? 1 : -1;
}
}
}
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:70,代码来源:stat_products.php
示例6: GetMessage
if (strlen($loader->strError) > 0) {
echo $loader->strError;
}
} else {
echo "failure\n" . GetMessage("CC_BSC1_EMPTY_CML");
}
}
} else {
echo "failure\n", GetMessage("CC_BSC1_ERROR_UNKNOWN_COMMAND");
}
}
$contents = ob_get_contents();
ob_end_clean();
if (!$bDesignMode) {
if (!$bCrmMode) {
if (toUpper(LANG_CHARSET) != "WINDOWS-1251") {
$contents = $APPLICATION->ConvertCharset($contents, LANG_CHARSET, "windows-1251");
}
}
if ($gzCompressionSupported) {
$contents = gzcompress($contents);
header("Content-Type: application/octet-stream");
header("Content-Length: " . (function_exists("mb_strlen") ? mb_strlen($contents, 'latin1') : strlen($contents)));
} else {
$str = function_exists("mb_strlen") ? mb_strlen($contents, 'latin1') : strlen($contents);
if ($_GET["mode"] == "query" || $_POST["mode"] == "query") {
header("Content-Type: application/xml; charset=windows-1251");
header("Content-Length: " . $str);
} else {
header("Content-Type: text/html; charset=windows-1251");
}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:component.php
示例7: array
if (!$bExtranetUser || CMobile::getApiVersion() >= 9 || intval($_GET["api_version"]) >= 9) {
$data = array("status" => "success", "page_mark" => "<!--bitrix_mobile_app-->", "sessid_md5" => bitrix_sessid(), "target" => md5($USER->GetID() . CMain::GetServerUniqID()), "photoUrl" => $img_src, "useModernStyle" => true, "appmap" => array("main" => array("url" => $params["START_PAGE"] ? $params["START_PAGE"] : "", "bx24ModernStyle" => true), "menu" => array("url" => $params["MENU_PAGE"] ? $params["MENU_PAGE"] : "")));
if (\Bitrix\MobileApp\Mobile::getInstance()->getApiVersion() >= 10 && strlen($params["CHAT_PAGE"]) > 0) {
$data["appmap"]["right"] = array("url" => $params["CHAT_PAGE"]);
}
if ($bExtranetUser) {
$rsSites = CSite::GetByID(CExtranet::GetExtranetSiteID());
if (($arExtranetSite = $rsSites->Fetch()) && $arExtranetSite["ACTIVE"] != "N") {
$data["whiteList"] = array($arExtranetSite["DIR"] . "mobile/");
$data["appmap"] = array("main" => array("url" => $arExtranetSite["DIR"] . "mobile/index.php", "bx24ModernStyle" => true), "menu" => array("url" => $arExtranetSite["DIR"] . "mobile/left.php"), "right" => array("url" => $arExtranetSite["DIR"] . "mobile/im/right.php"));
if (\Bitrix\MobileApp\Mobile::getInstance()->getApiVersion() >= 10) {
$data["appmap"]["right"] = array("url" => $arExtranetSite["DIR"] . "mobile/im/right.php");
}
}
}
if (toUpper(SITE_CHARSET) != "UTF-8") {
$data = $APPLICATION->ConvertCharsetArray($data, SITE_CHARSET, "utf-8");
}
}
$needAppPass = \Bitrix\Main\Context::getCurrent()->getServer()->get("HTTP_BX_APP_PASS");
$appUUID = \Bitrix\Main\Context::getCurrent()->getServer()->get("HTTP_BX_APP_UUID");
$deviceName = \Bitrix\Main\Context::getCurrent()->getServer()->get("HTTP_BX_DEVICE_NAME");
if ($needAppPass == 'mobile' && $USER->GetParam("APPLICATION_ID") === null) {
if (strlen($appUUID) > 0) {
$result = ApplicationPasswordTable::getList(array('select' => array('ID'), 'filter' => array('USER_ID' => $USER->GetID(), 'CODE' => $appUUID)));
if ($row = $result->fetch()) {
ApplicationPasswordTable::delete($row['ID']);
}
}
$password = ApplicationPasswordTable::generatePassword();
$res = ApplicationPasswordTable::add(array('USER_ID' => $USER->GetID(), 'APPLICATION_ID' => 'mobile', 'PASSWORD' => $password, 'CODE' => $appUUID, 'DATE_CREATE' => new Main\Type\DateTime(), 'COMMENT' => GetMessage("MD_GENERATE_BY_MOBILE") . (strlen($deviceName) > 0 ? " (" . $deviceName . ")" : ""), 'SYSCOMMENT' => GetMessage("MD_MOBILE_APPLICATION")));
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:checkout.php
示例8: getViewPort
/**
* Use it to get current value of "viewport"-metadata
*
* @param string $width
*
* @return mixed|string
*/
public function getViewPort($width = "")
{
if ($width == "") {
$width = $this->getDevicewidth();
}
if ($this->largeScreenSupport == true) {
//we need to change densitydpi for large screens
if ($this->getDevice() == "iPad") {
//ipad large screen setting
return $this->getIPadViewPort();
} elseif ($this->getScreenCategory() == "LARGE" || $this->getScreenCategory() == "XLARGE") {
//android large screen setting
return $this->getLargeScreenViewPort();
}
}
$viewPortMeta = "<meta id=\"bx_mobile_viewport\" name=\"viewport\" content=\"#content_value#\">";
if ($this->getIniscale()) {
$contentAttributes[] = "initial-scale=" . $this->getIniscale();
}
if ($this->getMaxscale()) {
$contentAttributes[] = "maximum-scale=" . $this->getMaxscale();
}
if ($this->getMinscale()) {
$contentAttributes[] = "minimum-scale=" . $this->getMinscale();
}
if ($this->getWidth()) {
$contentAttributes[] = "width=" . $this->getWidth();
} elseif ($this->getIniscale()) {
$contentAttributes[] = "width=" . $width / $this->getIniscale();
}
if (toUpper($this->getPlatform()) == "ANDROID") {
if (!$this->getWidth()) {
$contentAttributes[] = "width=device-width";
}
$contentAttributes[] = "target-densitydpi=" . $this->getTargetDpi();
}
$contentAttributes[] = "user-scalable=" . $this->getUserScalable();
return str_replace("#content_value#", implode(", ", $contentAttributes), $viewPortMeta);
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:46,代码来源:mobile.php
示例9: generirajUpit
function generirajUpit()
{
$listaUpit = array();
if (!empty($_REQUEST['oib'])) {
$listaUpit[] = 'contains(@oib, "' . $_REQUEST['oib'] . '")';
}
if (!empty($_REQUEST['ime'])) {
$listaUpit[] = 'contains(' . toUpper('ime') . ', "' . strToUpper($_REQUEST['ime']) . '")';
}
if (!empty($_REQUEST['prezime'])) {
$listaUpit[] = 'contains(' . toUpper('prezime') . ', "' . strToUpper($_REQUEST['prezime']) . '")';
}
if (!empty($_REQUEST['kategorija'])) {
$kategorijaUpit = array();
foreach ($_REQUEST['kategorija'] as $kategorija) {
$kategorijaUpit[] = '@kategorija="' . $kategorija . '"';
}
if (!empty($kategorijaUpit)) {
$listaUpit[] = '(' . implode(' or ', $kategorijaUpit) . ')';
}
}
$telefonUpit = array();
if (!empty($_REQUEST['tiptelefon'])) {
$telefonUpit[] = '@tip="' . $_REQUEST['tiptelefon'] . '"';
}
if (!empty($_REQUEST['broj'])) {
$telefonUpit[] = 'contains(broj, "' . $_REQUEST['broj'] . '")';
}
if (!empty($_REQUEST['pozivni'])) {
$pozivniUpit = array();
foreach ($_REQUEST['pozivni'] as $pozivni) {
$pozivniUpit[] = '@pozivni_broj="' . $pozivni . '"';
}
if (!empty($pozivniUpit)) {
$telefonUpit[] = 'broj[' . implode(' or ', $pozivniUpit) . ']';
}
}
if (!empty($telefonUpit)) {
$listaUpit[] = 'telefon[' . implode(' and ', $telefonUpit) . ']';
}
$adresaUpit = array();
if (!empty($_REQUEST['ulica'])) {
$adresaUpit[] = 'contains(' . toUpper('ulica') . ', "' . strToUpper($_REQUEST['ulica']) . '")';
}
if (!empty($_REQUEST['kucni_broj'])) {
$adresaUpit[] = 'contains(kucni_broj, "' . $_REQUEST['kucni_broj'] . '")';
}
if (!empty($_REQUEST['mjesto'])) {
$adresaUpit[] = 'contains(' . toUpper('mjesto') . ', "' . strToUpper($_REQUEST['mjesto']) . '")';
}
if (!empty($_REQUEST['postanski_broj'])) {
$adresaUpit[] = 'mjesto[contains(@postanski_broj, "' . $_REQUEST['postanski_broj'] . '")]';
}
if (!empty($_REQUEST['drzava'])) {
$adresaUpit[] = 'contains(' . toUpper('drzava') . ', "' . strToUpper($_REQUEST['drzava']) . '")';
}
if (!empty($adresaUpit)) {
$listaUpit[] = 'adresa[' . implode(' and ', $adresaUpit) . ']';
}
$zanimanjeUpit = array();
if (!empty($_REQUEST['vrsta_djelatnosti'])) {
if ($_REQUEST['vrsta_djelatnosti'] != 'none') {
$zanimanjeUpit[] = '@vrsta_djelatnosti="' . $_REQUEST['vrsta_djelatnosti'] . '"';
}
}
if (!empty($_REQUEST['kljucne_rijeci'])) {
$zanimanjeUpit[] = 'contains(' . toUpper('kljucne_rijeci') . ', "' . strToUpper($_REQUEST['kljucne_rijeci']) . '")';
}
if (!empty($_REQUEST['naziv_tvrtke'])) {
$zanimanjeUpit[] = 'contains(' . toUpper('naziv_tvrtke') . ', "' . strToUpper($_REQUEST['naziv_tvrtke']) . '")';
}
if (!empty($zanimanjeUpit)) {
$listaUpit[] = 'zanimanje[' . implode(' and ', $zanimanjeUpit) . ']';
}
if (!empty($_REQUEST['mail_adresa'])) {
$listaUpit[] = 'contains(mail_adresa, "' . $_REQUEST['mail_adresa'] . '")';
}
if (!empty($_REQUEST['datum_rodjenja'])) {
$listaUpit[] = 'datum_rodjenja="' . $_REQUEST['datum_rodjenja'] . '"';
}
$strUpit = implode(' and ', $listaUpit);
if (empty($strUpit)) {
return '/telefonski_imenik/osoba';
} else {
return '/telefonski_imenik/osoba[' . $strUpit . ']';
}
}
开发者ID:herettix,项目名称:root,代码行数:87,代码来源:funkcije.php
示例10: str_replace
$count++;
$table = $row;
$table = str_replace("##EDITFORMNAME##", "editform" . $count, $table);
$table = str_replace("##NID##", $nres["id"], $table);
$qpause_hour_time_dropdown = html_drop_down_arrays("pause_hour_time_drop", $qpause_hour_time, $qpause_hour_time, $pause_hour_time_drop);
//date("H",time()));
$qpause_min_time_dropdown = html_drop_down_arrays("pause_min_time_drop", $qpause_min_time, $qpause_min_time, $pause_min_time_drop);
//date("H",time()));
$table = str_replace("##PAUSEHOUR##", $qpause_hour_time_dropdown, $table);
$table = str_replace("##PAUSEMINUTES##", $qpause_min_time_dropdown, $table);
$qrating_dropdown = html_drop_down_arrays("rating_drop", $qrating, $qrating, "3");
//date("H",time()));
$table = str_replace("##RATING##", $qrating_dropdown, $table);
$table = str_replace("##NSTART##", $nres["begin"], $table);
$table = str_replace("##ACTIVITYSTOP##", substr($nres[aname], 0, 8) . "... " . $nres[wname], $table);
$table = str_replace("##NAMEDROPSTOP##", toUpper($nres['last']) . " " . $nres['first'], $table);
$table = str_replace("##DDESCRIPTION##", $nres["comm"], $table);
$table = str_replace("##FORM_NUM##", $count, $table);
// za Javascript hide
$nwhole_table .= $table;
// $pausintest.=print_r( $pause_hour_time_drop[$i]);
}
$tem = str_replace("##NLOGS##", $nwhole_table, $tem);
$tem = str_replace("##NMESSAGE##", $message, $tem);
for ($i = 1; $i < $count + 1; $i++) {
if ($_REQUEST['editform' . $i] == "Končaj") {
$stop_time = time();
$pht = $pause_hour_time_drop[0];
$pmt .= $pause_min_time_drop[0];
$pause_time = $pht * 3600 + $pmt * 60;
//dejansko vnesemo
开发者ID:urki,项目名称:urki-test-project,代码行数:31,代码来源:activity.php
示例11: ConvertCharset
private function ConvertCharset($data)
{
global $APPLICATION;
if (toUpper(LANG_CHARSET) != "UTF-8") {
return $APPLICATION->ConvertCharsetArray($data, 'utf-8', LANG_CHARSET);
} else {
return $data;
}
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:9,代码来源:hrxml.php
示例12: swapCase
/**
* Makes a case swapped version of the string
* @param string $string the input string
* @param boolean $mb to use or not to use multibyte character feature
* @return string case swapped version of the input string
*
* @author Rod Elias <[email protected]>
*/
function swapCase($string, $mb = false)
{
return array_reduce(str_split($string), function ($carry, $item) use($mb) {
return $carry .= isLower($item, $mb) ? toUpper($item, $mb) : toLower($item, $mb);
}, '');
}
开发者ID:phpfunct,项目名称:funct,代码行数:14,代码来源:Strings.php
示例13: foreach
if (el)
{
if (val)
el.style.display = "none";
else
el.style.display = "block";
}
}
//-->
</script>
<form method="POST" name="log_filter">
<select name="flt_event_id" onChange="javascript:document.log_filter.submit()">
<?php
foreach ($arResult["Features"] as $featureID) {
$featureName = GetMessage(toUpper("SONET_ACTIVITY_T_" . $featureID));
?>
<option value="<?php
echo $featureID;
?>
" <?php
echo $featureID == $_REQUEST["flt_event_id"] ? "selected" : "";
?>
><?php
echo $featureName;
?>
</option><?php
}
?>
</select>
</form>
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:template.php
示例14: bxStatSort
function bxStatSort($a, $b)
{
global $by, $order;
$by = toUpper($by);
$order = toUpper($order);
if (in_array($by, array("COUNT", "PAYED", "ALLOW_DELIVERY", "CANCELED"))) {
if (DoubleVal($a[$by]) == DoubleVal($b[$by])) {
return 0;
} elseif (DoubleVal($a[$by]) > DoubleVal($b[$by])) {
return $order == "DESC" ? -1 : 1;
} else {
return $order == "DESC" ? 1 : -1;
}
} elseif ($by == "PAYED_PROC" || $by == "ALLOW_DELIVERY_PROC" || $by == "CANCELED_PROC") {
if ($by == "PAYED_PROC") {
$k = "PAYED";
} else {
$k = "ALLOW_DELIVERY";
}
if (IntVal($a[$k]) == IntVal($b[$k]) && IntVal($b[$k]) == 0) {
return 0;
} elseif (IntVal($a[$k]) > 0 && IntVal($b[$k]) > 0) {
if (DoubleVal($a[$k] * 100 / $a["COUNT"]) > DoubleVal($b[$k] * 100 / $b["COUNT"])) {
return $order == "DESC" ? -1 : 1;
} elseif (DoubleVal($a[$k] * 100 / $a["COUNT"]) < DoubleVal($b[$k] * 100 / $b["COUNT"])) {
return $order == "DESC" ? 1 : -1;
} else {
return 0;
}
} elseif (IntVal($a[$k]) > 0 && IntVal($b[$k]) <= 0) {
return $order == "DESC" ? -1 : 1;
} elseif (IntVal($a[$k]) <= 0 && IntVal($b[$k]) > 0) {
return $order == "DESC" ? 1 : -1;
} else {
return 0;
}
} elseif (strpos($by, "STATUS_") !== false || strpos($by, "STATUS_PRICE_") !== false || strpos($by, "PRICE_DELIVERY_") !== false || strpos($by, "TAX_VALUE_") !== false || strpos($by, "DISCOUNT_VALUE_") !== false || strpos($by, "PRICE_") !== false || strpos($by, "PRICE_PAYED_") !== false || strpos($by, "PRICE_ALLOW_DELIVERY_") !== false || strpos($by, "PRICE_CANCELED_") !== false) {
if (strpos($by, "STATUS_PRICE_") !== false) {
$k = substr($by, strlen("STATUS_PRICE_"));
$v = "STATUS_PRICE";
} elseif (strpos($by, "STATUS_") !== false) {
$k = substr($by, strlen("STATUS_"));
$v = "STATUS";
} elseif (strpos($by, "PRICE_DELIVERY_") !== false) {
$k = substr($by, strlen("PRICE_DELIVERY_"));
$v = "PRICE_DELIVERY";
} elseif (strpos($by, "TAX_VALUE_") !== false) {
$k = substr($by, strlen("TAX_VALUE_"));
$v = "TAX_VALUE";
} elseif (strpos($by, "DISCOUNT_VALUE_") !== false) {
$k = substr($by, strlen("DISCOUNT_VALUE_"));
$v = "DISCOUNT_VALUE";
} elseif (strpos($by, "PRICE_PAYED_") !== false) {
$k = substr($by, strlen("PRICE_PAYED_"));
$v = "PRICE_PAYED";
} elseif (strpos($by, "PRICE_CANCELED_") !== false) {
$k = substr($by, strlen("PRICE_CANCELED_"));
$v = "PRICE_CANCELED";
} elseif (strpos($by, "PRICE_ALLOW_DELIVERY_") !== false) {
$k = substr($by, strlen("PRICE_ALLOW_DELIVERY_"));
$v = "PRICE_ALLOW_DELIVERY";
} else {
$k = substr($by, strlen("PRICE_"));
$v = "PRICE";
}
if (IntVal($a[$v][$k]) == IntVal($b[$v][$k])) {
return 0;
} elseif (IntVal($a[$v][$k]) > IntVal($b[$v][$k])) {
return $order == "DESC" ? -1 : 1;
} else {
return $order == "DESC" ? 1 : -1;
}
} else {
if (MakeTimeStamp($a["DATE"]) == MakeTimeStamp($b["DATE"])) {
return 0;
} elseif (MakeTimeStamp($a["DATE"]) > MakeTimeStamp($b["DATE"])) {
return $order == "DESC" ? -1 : 1;
} else {
return $order == "DESC" ? 1 : -1;
}
}
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:82,代码来源:stat.php
示例15: getConfigJSON
/**
* Return configuration in JSON format
*
* @param $appCode - application code
* @param bool $platform - platform code
*
* @see ConfigTable::getSupportedPlatforms for details on availible platforms
* @return string
* @throws \Bitrix\Main\ArgumentException
*/
public static function getConfigJSON($appCode, $platform = false)
{
$map = new \Bitrix\MobileApp\Designer\ConfigMap();
$res = ConfigTable::getList(array("filter" => array("APP_CODE" => $appCode)));
$configs = $res->fetchAll();
$targetConfig = array();
for ($i = 0; $i < count($configs); $i++) {
if ($configs[$i]["PLATFORM"] == $platform) {
$targetConfig = $configs[$i];
break;
} elseif ($configs[$i]["PLATFORM"] == "global") {
$targetConfig = $configs[$i];
}
}
$params = array_key_exists("PARAMS", $targetConfig) ? $targetConfig["PARAMS"] : array();
$imageParamList = $map->getParamsByType(ParameterType::IMAGE);
$imageSetParamList = $map->getParamsByType(ParameterType::IMAGE_SET);
$structuredConfig = array();
foreach ($params as $key => $value) {
if (!$map->has($key)) {
continue;
}
if (array_key_exists($key, $imageParamList)) {
$imagePath = \CFile::GetPath($value);
if (strlen($imagePath) > 0) {
$value = $imagePath;
} else {
continue;
}
}
if (array_key_exists($key, $imageSetParamList)) {
$tmpValue = array();
foreach ($value as $imageCode => $imageId) {
$imagePath = \CFile::GetPath($imageId);
if (strlen($imagePath) > 0) {
$tmpValue[$imageCode] = $imagePath;
} else {
continue;
}
}
$value = $tmpValue;
}
$structuredConfig = array_merge_recursive(self::nameSpaceToArray($key, $value), $structuredConfig);
}
$structuredConfig["info"] = array("designer_version" => ConfigMap::VERSION, "platform" => $platform);
if (toUpper(SITE_CHARSET) != "UTF-8") {
$structuredConfig = Encoding::convertEncodingArray($structuredConfig, SITE_CHARSET, "UTF-8");
}
return json_encode($structuredConfig);
}
开发者ID:Satariall,项目名称:izurit,代码行数:60,代码来源:manager.php
示例16: array
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
if (isset($arParams["TEMPLATE_THEME"]) && !empty($arParams["TEMPLATE_THEME"])) {
$arAvailableThemes = array();
$dir = trim(preg_replace("'[\\\\/]+'", "/", dirname(__FILE__) . "/themes/"));
if (is_dir($dir) && ($directory = opendir($dir))) {
while (($file = readdir($directory)) !== false) {
if ($file != "." && $file != ".." && is_dir($dir . $file)) {
$arAvailableThemes[] = $file;
}
}
closedir($directory);
}
if ($arParams["TEMPLATE_THEME"] == "site") {
$solution = COption::GetOptionString("main", "wizard_solution", "", SITE_ID);
if ($solution == "eshop") {
$templateId = COption::GetOptionString("main", "wizard_template_id", "eshop_bootstrap", SITE_ID);
$templateId = preg_match("/^eshop_adapt/", $templateId) ? "eshop_adapt" : $templateId;
$theme = COption::GetOptionString("main", "wizard_" . $templateId . "_theme_id", "blue", SITE_ID);
$arParams["TEMPLATE_THEME"] = in_array($theme, $arAvailableThemes) ? $theme : "blue";
}
} else {
$arParams["TEMPLATE_THEME"] = in_array($arParams["TEMPLATE_THEME"], $arAvailableThemes) ? $arParams["TEMPLATE_THEME"] : "blue";
}
} else {
$arParams["TEMPLATE_THEME"] = "blue";
}
$arParams["FILTER_VIEW_MODE"] = isset($arParams["FILTER_VIEW_MODE"]) && toUpper($arParams["FILTER_VIEW_MODE"]) == "HORIZONTAL" ? "HORIZONTAL" : "VERTICAL";
$arParams["POPUP_POSITION"] = isset($arParams["POPUP_POSITION"]) && in_array($arParams["POPUP_POSITION"], array("left", "right")) ? $arParams["POPUP_POSITION"] : "left";
开发者ID:Satariall,项目名称:izurit,代码行数:30,代码来源:result_modifier.php
示例17: AddToTimeStamp
$sHost = "payments.paysecure.ru";
$sUrl = "/orderstate/orderstate.cfm";
$dtm = AddToTimeStamp(array("MM" => -1), false);
$sVars = "Ordernumber=" . $ORDER_ID . "&Merchant_ID=" . $assist_Shop_IDP . "&login=" . $assist_LOGIN . "&password=" . $assist_PASSWORD . "&FORMAT=3&StartYear=" . date('Y', $dtm) . "&StartMonth=" . date('n', $dtm) . "&StartYDay=" . date('j', $dtm) . "";
$aDesc = array("In Process" => array(GetMessage("SASP_IP"), GetMessage("SASPD_IP")), "Delayed" => array(GetMessage("SASP_D"), GetMessage("SASPD_D")), "Approved" => array(GetMessage("SASP_A"), GetMessage("SASPD_A")), "PartialApproved" => array(GetMessage("SASP_PA"), GetMessage("SASPD_PA")), "PartialDelayed" => array(GetMessage("SASP_PD"), GetMessage("SASPD_PD")), "Canceled" => array(GetMessage("SASP_C"), GetMessage("SASPD_C")), "PartialCanceled" => array(GetMessage("SASP_PC"), GetMessage("SASPD_PC")), "Declined" => array(GetMessage("SASP_DEC"), GetMessage("SASPD_DEC")), "Timeout" => array(GetMessage("SASP_T"), GetMessage("SASPD_T")));
$sResult = QueryGetData($sHost, 80, $sUrl, $sVars, $errno, $errstr, "POST");
if ($sResult != "") {
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/classes/general/xml.php";
$objXML = new CDataXML();
$objXML->LoadString($sResult);
$arResult = $objXML->GetArray();
if (count($arResult) > 0 && $arResult["result"]["@"]["firstcode"] == "0") {
$aRes = $arResult["result"]["#"]["order"][0]["#"];
if (IntVal($aRes["ordernumber"][0]["#"]) == $ORDER_ID) {
$arFields = array();
$check = ToUpper(md5(toUpper(md5($password) . md5($assist_Shop_IDP . $aRes["ordernumber"][0]["#"] . $aRes["orderamount"][0]["#"] . $aRes["ordercurrency"][0]["#"] . $aRes["orderstate"][0]["#"]))));
if ($aRes["checkvalue"][0]["#"] == $check) {
$arOrder = CSaleOrder::GetByID($ORDER_ID);
$arFields = array("PS_STATUS" => $aRes["orderstate"][0]["#"] == "Approved" ? "Y" : "N", "PS_STATUS_CODE" => substr($aRes["orderstate"][0]["#"], 0, 5), "PS_STATUS_DESCRIPTION" => $aDesc[$aRes["orderstate"][0]["#"]][0], "PS_STATUS_MESSAGE" => $aDesc[$aRes["orderstate"][0]["#"]][1], "PS_SUM" => DoubleVal($aRes["orderamount"][0]["#"]), "PS_CURRENCY" => $aRes["ordercurrency"][0]["#"], "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG))));
if ($arOrder["PAYED"] != "Y" && CSalePaySystemAction::GetParamValue("AUTOPAY") == "Y" && $arFields["PS_STATUS"] == "Y" && Doubleval($arOrder["PRICE"]) == DoubleVal($arFields["PS_SUM"])) {
CSaleOrder::PayOrder($arOrder["ID"], "Y");
}
}
if (!empty($arFields)) {
CSaleOrder::Update($ORDER_ID, $arFields);
}
return true;
}
}
}
return false;
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:result.php
示例18: firstLetterToUpper
function firstLetterToUpper($str)
{
$str[0] = toUpper($str[0]);
return $str;
}
开发者ID:zivanof,项目名称:fun_project,代码行数:5,代码来源:cw_console.php
示例19: calculate
public function calculate($parameters)
{
return toUpper($this->parametersToString($parameters));
}
开发者ID:spas-viktor,项目名称:books,代码行数:4,代码来源:fabric.php
示例20: toLower
?>
<div class="adm-s-setting-content-block <?php
if (!empty($arBlock["TYPE"])) {
echo $arBlock["TYPE"] == "ONE" ? "one" : "one two";
}
?>
" id="<?php
echo toLower($stepCode . "_" . $block);
?>
">
<!-- BLOCK CONTENT container title -->
<div class="adm-s-setting-content-block-title-container">
<div class="adm-s-setting-content-block-line"></div>
<div class="adm-s-setting-content-block-point"></div>
<div class="adm-s-setting-content-block-title"><?php
echo GetMessage("STOREAS_STEPS_" . $stepCode . "_" . toUpper($block));
?>
</div>
<!-- BLOCK CONTENT status -->
<div class="adm-s-setting-content-block-status-container">
<div class="adm-s-setting-content-block-status red"></div>
<div class="adm-s-setting-content-block-status orange"></div>
<div class="adm-s-setting-content-block-status yellow"></div>
<div class="adm-s-setting-content-block-status green"></div>
<div class="adm-s-setting-content-block-status lightgreen"></div>
<div class="adm-s-setting-content-block-status-track">
<div class="adm-s-setting-content-block-status-track-point" style="left: <?php
echo $arBlock["PERCENT"];
?>
%;"><?php
echo $arBlock["DONE_COUNT"];
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:storeassist.php
注:本文中的toUpper函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者 |
请发表评论