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

PHP CLang类代码示例

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

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



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

示例1: ConvertFromDB

 public static function ConvertFromDB($arProperty, $value)
 {
     if (strlen($value["VALUE"]) > 0) {
         $value["VALUE"] = CDatabase::FormatDate($value["VALUE"], "YYYY-MM-DD", CLang::GetDateFormat("SHORT"));
     }
     return $value;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:7,代码来源:prop_date.php


示例2: mark_order_as_error

	protected function mark_order_as_error($order, array $data) {
		CSaleOrder::Update($order['ID'], array(
			'PS_STATUS' => 'N',
			'PS_SUM' => $data['amount'],
			'PS_CURRENCY' => $data['currency'],
			'PS_STATUS_MESSAGE' => $data['message'],
			'PS_RESPONSE_DATE' => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat('FULL', LANG))),
		));
	}
开发者ID:ASDAFF,项目名称:bitrix-futupayments,代码行数:9,代码来源:result_rec.php


示例3: setPayed

 public function setPayed($value)
 {
     $value = (bool) $value ? 'Y' : 'N';
     if ($value == 'Y') {
         \CSaleOrder::PayOrder($this['ID'], 'Y');
     } else {
         $data = array('PAYED' => (bool) $value ? 'Y' : 'N', 'DATE_PAYED' => Date(\CDatabase::DateFormatToPHP(\CLang::GetDateFormat('FULL', LANG))), 'USER_ID' => $this['USER_ID']);
         return \CSaleOrder::Update($this['ID'], $data);
     }
 }
开发者ID:AlexSmerw,项目名称:domino,代码行数:10,代码来源:Order.class.php


示例4: GetEditFormHTML

 function GetEditFormHTML($arUserField, $arHtmlControl)
 {
     $arHtmlControl["VALIGN"] = "middle";
     if ($arUserField["EDIT_IN_LIST"] == "Y") {
         if ($arUserField["ENTITY_VALUE_ID"] < 1 && $arUserField["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] != "NONE") {
             if ($arUserField["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] == "NOW") {
                 $arHtmlControl["VALUE"] = ConvertTimeStamp(time(), "SHORT");
             } else {
                 $arHtmlControl["VALUE"] = CDatabase::FormatDate($arUserField["SETTINGS"]["DEFAULT_VALUE"]["VALUE"], "YYYY-MM-DD", CLang::GetDateFormat("SHORT"));
             }
         }
         return CAdminCalendar::CalendarDate($arHtmlControl["NAME"], $arHtmlControl["VALUE"]);
     } elseif (strlen($arHtmlControl["VALUE"]) > 0) {
         return $arHtmlControl["VALUE"];
     } else {
         return '&nbsp;';
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:18,代码来源:usertypedate.php


示例5: GetEditFormHTML

 function GetEditFormHTML($arUserField, $arHtmlControl)
 {
     $arHtmlControl["VALIGN"] = "middle";
     if ($arUserField["EDIT_IN_LIST"] == "Y") {
         if ($arUserField["ENTITY_VALUE_ID"] < 1 && $arUserField["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] != "NONE") {
             if ($arUserField["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] == "NOW") {
                 $arHtmlControl["VALUE"] = ConvertTimeStamp(time() + CTimeZone::GetOffset(), "FULL");
             } else {
                 $arHtmlControl["VALUE"] = str_replace(" 00:00:00", "", CDatabase::FormatDate($arUserField["SETTINGS"]["DEFAULT_VALUE"]["VALUE"], "YYYY-MM-DD HH:MI:SS", CLang::GetDateFormat("FULL")));
             }
         }
         return CAdminCalendar::CalendarDate($arHtmlControl["NAME"], $arHtmlControl["VALUE"], 20, true);
     } elseif (strlen($arHtmlControl["VALUE"]) > 0) {
         return $arHtmlControl["VALUE"];
     } else {
         return '&nbsp;';
     }
 }
开发者ID:spas-viktor,项目名称:books,代码行数:18,代码来源:usertypetime.php


示例6: GetMessage

</option>
				<?php 
    }
    ?>
			<?php 
}
?>
			</select>
		</td>
	</tr>
	<tr>
		<th><?php 
echo GetMessage("F_BIRTHDATE");
?>
 (<?php 
echo CLang::GetDateFormat("SHORT");
?>
):</th>
		<td><?php 
$APPLICATION->IncludeComponent("bitrix:main.calendar", "", array("SHOW_INPUT" => "Y", "FORM_NAME" => "form1", "INPUT_NAME" => "PERSONAL_BIRTHDAY", "INPUT_VALUE" => $arResult["~str_PERSONAL_BIRTHDAY"]), $component, array("HIDE_ICONS" => "Y"));
?>
</td>
	</tr>
	<tr>
		<th><?php 
echo GetMessage("F_PHOTO");
?>
</th>
		<td><input name="PERSONAL_PHOTO" size="30" type="file" />
			<?php 
if ($arResult["SHOW_DELETE_PERSONAL_PHOTO"] == "Y") {
开发者ID:dayAlone,项目名称:MyQube,代码行数:31,代码来源:template.php


示例7: ToUpper

    if ($lmi_payee_purse != $IdM) {
        $err = 3;
        $err_text = 'ERR: НЕВЕРЕН ID МАГАЗИНА : ' . $lmi_payee_purse;
    }
    if ($lmi_prerequest == 1) {
        if ($err != 0) {
            echo $err_text;
        } else {
            echo 'YES';
        }
    } else {
        $common_string = $lmi_payee_purse . $lmi_payment_amount . $lmi_payment_no . $lmi_mode . $lmi_sys_invs_no . $lmi_sys_trans_no . $lmi_sys_trans_date . $sk . $lmi_payer_purse . $lmi_payer_wm;
        $hash = ToUpper(md5($common_string));
        if ($err == 0) {
            if ($hash == $lmi_hash) {
                $strPS_STATUS_DESCRIPTION = "";
                $strPS_STATUS_DESCRIPTION .= "Идентификатор магазина - " . $lmi_payee_purse . "; ";
                $strPS_STATUS_DESCRIPTION .= "Внутренний номер платежа  в системе Z-PAYMENT - " . $lmi_sys_invs_no . "; ";
                $strPS_STATUS_DESCRIPTION .= "Внутренний номер счета в системе Z-PAYMENT - " . $lmi_sys_trans_no . "; ";
                $strPS_STATUS_DESCRIPTION .= "дата платежа - " . $lmi_sys_trans_date . "";
                $strPS_STATUS_MESSAGE = "";
                $strPS_STATUS_MESSAGE .= "кошелек покупателя или его e-mail  - " . $lmi_payer_purse . "; ";
                $arFields = array("PS_STATUS" => "Y", "PS_STATUS_CODE" => "-", "PS_STATUS_DESCRIPTION" => $strPS_STATUS_DESCRIPTION, "PS_STATUS_MESSAGE" => $strPS_STATUS_MESSAGE, "PS_SUM" => $lmi_payment_amount, "PS_CURRENCY" => $arOrder["CURRENCY"], "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG))), "USER_ID" => $arOrder["USER_ID"]);
                // You can comment this code if you want PAYED flag not to be set automatically
                CSaleOrder::PayOrder($arOrder["ID"], "Y");
                CSaleOrder::Update($arOrder["ID"], $arFields);
            }
        }
    }
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/epilog_after.php";
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:z_payment_result.php


示例8: GetRSSText

 function GetRSSText($arIBLOCK, $LIMIT_NUM = false, $LIMIT_DAY = false, $yandex = false)
 {
     global $DB;
     $strRes = "";
     $serverName = "";
     if (isset($arIBLOCK["SERVER_NAME"]) && strlen($arIBLOCK["SERVER_NAME"]) > 0) {
         $serverName = $arIBLOCK["SERVER_NAME"];
     }
     if (strlen($serverName) <= 0 && !isset($arIBLOCK["SERVER_NAME"])) {
         $dbSite = CSite::GetList($b = "sort", $o = "asc", array("LID" => $arIBLOCK["LID"]));
         if ($arSite = $dbSite->Fetch()) {
             $serverName = $arSite["SERVER_NAME"];
         }
     }
     if (strlen($serverName) <= 0) {
         if (defined("SITE_SERVER_NAME") && strlen(SITE_SERVER_NAME) > 0) {
             $serverName = SITE_SERVER_NAME;
         } else {
             $serverName = COption::GetOptionString("main", "server_name", "www.bitrixsoft.com");
         }
     }
     $strRes .= "<channel>\n";
     $strRes .= "<title>" . htmlspecialcharsbx($arIBLOCK["NAME"]) . "</title>\n";
     $strRes .= "<link>http://" . $serverName . "</link>\n";
     $strRes .= "<description>" . htmlspecialcharsbx($arIBLOCK["DESCRIPTION"]) . "</description>\n";
     $strRes .= "<lastBuildDate>" . date("r") . "</lastBuildDate>\n";
     $strRes .= "<ttl>" . $arIBLOCK["RSS_TTL"] . "</ttl>\n";
     $db_img_arr = CFile::GetFileArray($arIBLOCK["PICTURE"]);
     if ($db_img_arr) {
         if (substr($db_img_arr["SRC"], 0, 1) == "/") {
             $strImage = "http://" . $serverName . $db_img_arr["SRC"];
         } else {
             $strImage = $db_img_arr["SRC"];
         }
         $strRes .= "<image>\n";
         $strRes .= "<title>" . htmlspecialcharsbx($arIBLOCK["NAME"]) . "</title>\n";
         $strRes .= "<url>" . $strImage . "</url>\n";
         $strRes .= "<link>http://" . $serverName . "</link>\n";
         $strRes .= "<width>" . $db_img_arr["WIDTH"] . "</width>\n";
         $strRes .= "<height>" . $db_img_arr["HEIGHT"] . "</height>\n";
         $strRes .= "</image>\n";
     }
     $arNodes = array();
     $db_res = $DB->Query("SELECT NODE, NODE_VALUE FROM b_iblock_rss WHERE IBLOCK_ID = " . IntVal($arIBLOCK["ID"]));
     while ($db_res_arr = $db_res->Fetch()) {
         $arNodes[$db_res_arr["NODE"]] = $db_res_arr["NODE_VALUE"];
     }
     CTimeZone::Disable();
     $strSql = "SELECT DISTINCT BE.*, " . "\t" . $DB->DateToCharFunction("BE.TIMESTAMP_X") . " as TIMESTAMP_X, " . "\t" . $DB->DateToCharFunction("BE.ACTIVE_FROM", "FULL") . " as ACTIVE_FROM, " . "\t" . $DB->DateToCharFunction("BE.ACTIVE_TO", "FULL") . " as ACTIVE_TO, " . "\tL.DIR as LANG_DIR, B.DETAIL_PAGE_URL, B.LIST_PAGE_URL, B.LID, L.SERVER_NAME " . "FROM b_iblock_element BE, b_lang L, b_iblock B " . "\tLEFT JOIN b_iblock_group IBG ON IBG.IBLOCK_ID=B.ID " . "WHERE BE.IBLOCK_ID = B.ID " . "\tAND B.LID = L.LID " . "\tAND IBG.GROUP_ID IN (2) " . "\tAND BE.WF_STATUS_ID = 1 AND BE.WF_PARENT_ELEMENT_ID is null " . "\tAND IBG.PERMISSION>='R' " . "\tAND (IBG.PERMISSION='X' OR B.ACTIVE='Y') " . "\tAND (BE.IBLOCK_ID = " . IntVal($arIBLOCK["ID"]) . ") " . "\tAND ((BE.ACTIVE_TO >= " . $DB->GetNowFunction() . " OR BE.ACTIVE_TO IS NULL) AND (BE.ACTIVE_FROM <= " . $DB->GetNowFunction() . " OR BE.ACTIVE_FROM IS NULL)) " . "\tAND (BE.ACTIVE = 'Y') ";
     if ($LIMIT_DAY !== false) {
         $strSql .= " AND (BE.ACTIVE_FROM>=" . $DB->CharToDateFunction($DB->ForSql(date($DB->DateFormatToPHP(CLang::GetDateFormat("FULL")), mktime(date("H"), date("i"), date("s"), date("m"), date("d") - IntVal($LIMIT_DAY), date("Y")))), "FULL") . " OR BE.ACTIVE_FROM IS NULL) ";
     }
     $strSql .= "ORDER BY BE.ACTIVE_FROM DESC, BE.SORT ASC ";
     $res = $DB->Query($strSql);
     CTimeZone::Enable();
     $items = new CIBlockResult($res->result);
     if ($LIMIT_NUM !== False && IntVal($LIMIT_NUM) > 0) {
         $items->NavStart($LIMIT_NUM);
     }
     while ($arItem = $items->GetNext()) {
         $props = CIBlockElement::GetProperty($arIBLOCK["ID"], $arItem["ID"], "sort", "asc", array("ACTIVE" => "Y", "NON_EMPTY" => "Y"));
         $arProps = array();
         while ($arProp = $props->Fetch()) {
             if (strlen($arProp["CODE"]) > 0) {
                 $arProps[$arProp["CODE"]] = array("NAME" => htmlspecialcharsbx($arProp["NAME"]), "VALUE" => htmlspecialcharsex($arProp["VALUE"]));
             } else {
                 $arProps[$arProp["ID"]] = array("NAME" => htmlspecialcharsbx($arProp["NAME"]), "VALUE" => htmlspecialcharsex($arProp["VALUE"]));
             }
         }
         $arLinkProp = $arProps["DOC_LINK"];
         $strRes .= "<item>\n";
         if (strlen($arNodes["title"]) > 0) {
             $strRes .= "<title>" . htmlspecialcharsbx(CIBlockRSS::ExtractProperties($arNodes["title"], $arProps, $arItem)) . "</title>\n";
         } else {
             $strRes .= "<title>" . htmlspecialcharsbx($arItem["~NAME"]) . "</title>\n";
         }
         if (strlen($arNodes["link"]) > 0) {
             $strRes .= "<link>" . CIBlockRSS::ExtractProperties($arNodes["link"], $arProps, $arItem) . "</link>\n";
         } else {
             $strRes .= "<link>http://" . $serverName . ($arLinkProp["VALUE"] ? $arLinkProp["VALUE"] : $arItem["DETAIL_PAGE_URL"]) . "</link>\n";
         }
         if (strlen($arNodes["description"]) > 0) {
             $strRes .= "<description>" . htmlspecialcharsbx(CIBlockRSS::ExtractProperties($arNodes["description"], $arProps, $arItem)) . "</description>\n";
         } else {
             $strRes .= "<description>" . ($arItem["PREVIEW_TEXT"] || $yandex ? htmlspecialcharsbx($arItem["PREVIEW_TEXT"]) : htmlspecialcharsbx($arItem["DETAIL_TEXT"])) . "</description>\n";
         }
         if (strlen($arNodes["enclosure"]) > 0) {
             $strRes .= "<enclosure url=\"" . htmlspecialcharsbx(CIBlockRSS::ExtractProperties($arNodes["enclosure"], $arProps, $arItem)) . "\" length=\"" . htmlspecialcharsbx(CIBlockRSS::ExtractProperties($arNodes["enclosure_length"], $arProps, $arItem)) . "\" type=\"" . htmlspecialcharsbx(CIBlockRSS::ExtractProperties($arNodes["enclosure_type"], $arProps, $arItem)) . "\"/>\n";
         } else {
             $db_img_arr = CFile::GetFileArray($arItem["PREVIEW_PICTURE"]);
             if ($db_img_arr) {
                 if (substr($db_img_arr["SRC"], 0, 1) == "/") {
                     $strImage = "http://" . $serverName . $db_img_arr["SRC"];
                 } else {
                     $strImage = $db_img_arr["SRC"];
                 }
                 $strRes .= "<enclosure url=\"" . $strImage . "\" length=\"" . $db_img_arr["FILE_SIZE"] . "\" type=\"" . $db_img_arr["CONTENT_TYPE"] . "\" width=\"" . $db_img_arr["WIDTH"] . "\" height=\"" . $db_img_arr["HEIGHT"] . "\"/>\n";
             }
         }
         if (strlen($arNodes["category"]) > 0) {
//.........这里部分代码省略.........
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:101,代码来源:iblockrss.php


示例9: array

<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_GET["server_responce"]) && $_GET["server_responce"] == "Y" && !empty($_POST["cartId"])) {
    $bCorrect = True;
    if ($bCorrect && !($arOrder = CSaleOrder::GetByID(IntVal($_POST["cartId"])))) {
        $bCorrect = False;
    }
    if ($bCorrect) {
        CSalePaySystemAction::InitParamArrays($arOrder, $arOrder["ID"]);
        $strCallbackPassword = CSalePaySystemAction::GetParamValue("CALLBACK_PASSWORD");
        if (strlen($strCallbackPassword) <= 0 || $_POST["callbackPW"] != $strCallbackPassword) {
            $bCorrect = False;
        }
    }
    if ($bCorrect && isset($_POST["testMode"]) && IntVal($_POST["testMode"]) > 0) {
        $bCorrect = False;
    }
    if ($bCorrect) {
        $arFields = array("PS_STATUS" => $_POST["transStatus"] == "Y" ? "Y" : "N", "PS_STATUS_CODE" => $_POST["transStatus"], "PS_STATUS_DESCRIPTION" => $_POST["rawAuthMessage"], "PS_STATUS_MESSAGE" => $_POST["transStatus"] == "Y" ? "The WorldPay ID for this transaction: " . $_POST["transId"] . ", Time of this transaction: " . Date("r", $_POST["transTime"]) : "", "PS_SUM" => $_POST["authAmount"], "PS_CURRENCY" => $_POST["authCurrency"], "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG))), "USER_ID" => $arOrder["USER_ID"]);
        if ($arOrder["CURRENCY"] == $_POST["authCurrency"] && $arOrder["PRICE"] == $_POST["authAmount"]) {
            CSaleOrder::PayOrder($arOrder["ID"], "Y");
        }
        CSaleOrder::Update($arOrder["ID"], $arFields);
    }
}
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:28,代码来源:result_rec.php


示例10: Update

 function Update($ID, $arFields, $bDateUpdate = true)
 {
     global $DB, $USER_FIELD_MANAGER, $CACHE_MANAGER;
     $ID = IntVal($ID);
     $arFields1 = array();
     foreach ($arFields as $key => $value) {
         if (substr($key, 0, 1) == "=") {
             $arFields1[substr($key, 1)] = $value;
             unset($arFields[$key]);
         }
     }
     if (!CSaleOrder::CheckFields("UPDATE", $arFields, $ID)) {
         return false;
     }
     foreach (GetModuleEvents("sale", "OnBeforeOrderUpdate", true) as $arEvent) {
         if (ExecuteModuleEventEx($arEvent, array($ID, &$arFields)) === false) {
             return false;
         }
     }
     $strUpdate = $DB->PrepareUpdate("b_sale_order", $arFields);
     foreach ($arFields1 as $key => $value) {
         if (strlen($strUpdate) > 0) {
             $strUpdate .= ", ";
         }
         $strUpdate .= $key . "=" . $value . " ";
     }
     //get old fields
     $arOrderOldFields = CSaleOrder::GetByID($ID);
     $strSql = "UPDATE b_sale_order SET " . "\t" . $strUpdate . " ";
     if ($bDateUpdate) {
         $strSql .= ",\tDATE_UPDATE = " . $DB->GetNowFunction() . " ";
     }
     $strSql .= "WHERE ID = " . $ID . " ";
     $res = $DB->Query($strSql, true, "File: " . __FILE__ . "<br>Line: " . __LINE__);
     if (!$res) {
         return false;
     }
     $USER_FIELD_MANAGER->Update("ORDER", $ID, $arFields);
     if ($res) {
         CSaleOrderChange::AddRecordsByFields($ID, $arOrderOldFields, $arFields);
     }
     unset($GLOBALS["SALE_ORDER"]["SALE_ORDER_CACHE_" . $ID]);
     foreach (GetModuleEvents("sale", "OnOrderUpdate", true) as $arEvent) {
         ExecuteModuleEventEx($arEvent, array($ID, $arFields));
     }
     if (isset($arFields["TRACKING_NUMBER"])) {
         foreach (GetModuleEvents("sale", "OnTrackingNumberChange", true) as $arEvent) {
             ExecuteModuleEventEx($arEvent, array($ID, $arFields["TRACKING_NUMBER"]));
         }
         if (strlen($arFields["TRACKING_NUMBER"]) > 0 && $arOrderOldFields["TRACKING_NUMBER"] != $arFields["TRACKING_NUMBER"]) {
             $accountNumber = isset($arFields["ACCOUNT_NUMBER"]) ? $arFields["ACCOUNT_NUMBER"] : $arOrderOldFields["ACCOUNT_NUMBER"];
             $userId = isset($arFields["USER_ID"]) ? $arFields["USER_ID"] : $arOrderOldFields["USER_ID"];
             $payerName = "";
             $payerEMail = '';
             $dbUser = CUser::GetByID($userId);
             if ($arUser = $dbUser->Fetch()) {
                 if (strlen($payerName) <= 0) {
                     $payerName = $arUser["NAME"] . (strlen($arUser["NAME"]) <= 0 || strlen($arUser["LAST_NAME"]) <= 0 ? "" : " ") . $arUser["LAST_NAME"];
                 }
                 if (strlen($payerEMail) <= 0) {
                     $payerEMail = $arUser["EMAIL"];
                 }
             }
             $arEmailFields = array("ORDER_ID" => $accountNumber, "ORDER_DATE" => Date($DB->DateFormatToPHP(CLang::GetDateFormat("SHORT", $arOrderOldFields["LID"]))), "ORDER_USER" => $payerName, "ORDER_TRACKING_NUMBER" => $arFields["TRACKING_NUMBER"], "BCC" => COption::GetOptionString("sale", "order_email", "order@" . $SERVER_NAME), "EMAIL" => $payerEMail, "SALE_EMAIL" => COption::GetOptionString("sale", "order_email", "order@" . $SERVER_NAME));
             $event = new CEvent();
             $event->Send("SALE_ORDER_TRACKING_NUMBER", $arOrderOldFields["LID"], $arEmailFields, "N");
         }
     }
     if (defined("CACHED_b_sale_order") && $bDateUpdate && $arFields["UPDATED_1C"] != "Y") {
         $CACHE_MANAGER->Read(CACHED_b_sale_order, "sale_orders");
         $CACHE_MANAGER->SetImmediate("sale_orders", true);
     }
     return $ID;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:74,代码来源:order.php


示例11: elseif

     $result['MESSAGE'] = Loc::getMessage('BX_CURRENCY_GET_RATE_ERR_DATE_RATE');
 } elseif ($currency == '') {
     $result['STATUS'] = 'ERROR';
     $result['MESSAGE'] = Loc::getMessage('BX_CURRENCY_GET_RATE_ERR_CURRENCY');
 } else {
     $url = '';
     switch ($baseCurrency) {
         case 'UAH':
             $url = 'http://bank.gov.ua/NBUStatService/v1/statdirectory?exchange&date=' . $DB->FormatDate($date, CLang::GetDateFormat('SHORT', LANGUAGE_ID), 'YMD');
             break;
         case 'BYR':
             $url = 'http://www.nbrb.by//Services/XmlExRates.aspx?ondate=' . $DB->FormatDate($date, CLang::GetDateFormat('SHORT', LANGUAGE_ID), 'Y-M-D');
             break;
         case 'RUB':
         case 'RUR':
             $url = 'http://www.cbr.ru/scripts/XML_daily.asp?date_req=' . $DB->FormatDate($date, CLang::GetDateFormat('SHORT', LANGUAGE_ID), 'D.M.Y');
             break;
     }
     $http = new HttpClient();
     $data = $http->get($url);
     $charset = 'windows-1251';
     $matches = array();
     if (preg_match("/<" . "\\?XML[^>]{1,}encoding=[\"']([^>\"']{1,})[\"'][^>]{0,}\\?" . ">/i", $data, $matches)) {
         $charset = trim($matches[1]);
     }
     $data = preg_replace("#<!DOCTYPE[^>]+?>#i", '', $data);
     $data = preg_replace("#<" . "\\?XML[^>]+?\\?" . ">#i", '', $data);
     $data = $APPLICATION->ConvertCharset($data, $charset, SITE_CHARSET);
     $objXML = new CDataXML();
     $res = $objXML->LoadString($data);
     if ($res !== false) {
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:get_rate.php


示例12: foreach

 } else {
     $arAdditionalFields["AFFILIATE_ID"] = false;
 }
 $ORDER_ID = CSaleOrder::DoSaveOrder($arBasketItems, $arAdditionalFields, 0, $arErrors);
 if ($ORDER_ID > 0 && empty($arErrors)) {
     CSaleBasket::OrderBasket($ORDER_ID, CSaleBasket::GetBasketUserID(), SITE_ID, false);
     /*send mail order*/
     $strOrderList = "";
     foreach ($arBasketItems["BASKET_ITEMS"] as $val) {
         if (CSaleBasketHelper::isSetItem($val)) {
             continue;
         }
         $strOrderList .= $val["NAME"] . " - " . $val["QUANTITY"] . " " . GetMessage("SOA_SHT") . ": " . SaleFormatCurrency($val["PRICE"], $arBasketItems["CURRENCY"]);
         $strOrderList .= "\n";
     }
     $arFields = array("ORDER_ID" => $ORDER_ID, "ORDER_DATE" => Date($DB->DateFormatToPHP(CLang::GetDateFormat("SHORT", SITE_ID))), "ORDER_USER" => strlen($payerName) > 0 ? $payerName : $USER->GetFullName(), "PRICE" => SaleFormatCurrency($arBasketItems["PRICE"], $arBasketItems["CURRENCY"]), "BCC" => COption::GetOptionString("sale", "order_email", "order@" . $SERVER_NAME), "EMAIL" => strlen($payerEMail) > 0 ? $payerEMail : $USER->GetEmail(), "ORDER_LIST" => $strOrderList, "SALE_EMAIL" => COption::GetOptionString("sale", "order_email", "order@" . $SERVER_NAME), "DELIVERY_PRICE" => $arBasketItems["PRICE_DELIVERY"]);
     $eventName = "SALE_NEW_ORDER";
     $bSend = true;
     foreach (GetModuleEvents("sale", "OnOrderNewSendEmail", true) as $arEvent) {
         if (ExecuteModuleEventEx($arEvent, array($ORDER_ID, &$eventName, &$arFields)) === false) {
             $bSend = false;
         }
     }
     if ($bSend) {
         $event = new CEvent();
         $event->Send($eventName, SITE_ID, $arFields, "N");
     }
     /*end mail*/
     CSaleMobileOrderPush::send("ORDER_CREATED", array("ORDER_ID" => $arFields["ORDER_ID"]));
     if (Loader::includeModule("statistic")) {
         $event1 = "eStore";
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php


示例13: IntVal

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
$inv_id = IntVal($_REQUEST["inv_id"]);
if (IntVal($inv_id) > 0) {
    $bCorrectPayment = True;
    $inv_id = IntVal($_REQUEST["inv_id"]);
    $out_summ = $_REQUEST["OutSum"];
    $crc = $_REQUEST["SignatureValue"];
    if (!($arOrder = CSaleOrder::GetByID(IntVal($inv_id)))) {
        $bCorrectPayment = False;
    }
    if ($bCorrectPayment) {
        CSalePaySystemAction::InitParamArrays($arOrder, $arOrder["ID"]);
    }
    $mrh_pass2 = CSalePaySystemAction::GetParamValue("ShopPassword2");
    $strCheck = md5($out_summ . ":" . $inv_id . ":" . $mrh_pass2);
    if ($bCorrectPayment && strtoupper($CHECKSUM) != strtoupper($strCheck)) {
        $bCorrectPayment = False;
    }
    if ($bCorrectPayment) {
        $arFields = array("PS_STATUS" => "Y", "PS_STATUS_CODE" => "-", "PS_STATUS_DESCRIPTION" => $strPS_STATUS_DESCRIPTION, "PS_STATUS_MESSAGE" => $strPS_STATUS_MESSAGE, "PS_SUM" => $out_summ, "PS_CURRENCY" => "", "PS_RESPONSE_DATE" => Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANG))));
        // You can comment this code if you want PAYED flag not to be set automatically
        if ($arOrder["PRICE"] == $out_summ) {
            CSaleOrder::PayOrder($arOrder["ID"], "Y");
        }
        if (CSaleOrder::Update($arOrder["ID"], $arFields)) {
            echo "OK";
        }
    }
}
开发者ID:laiello,项目名称:cartonbank,代码行数:31,代码来源:result_rec.php


示例14: array_intersect

    }
}
$arResult["GROUPS_FORUMS"] = $arGroups;
$arParams["FID"] = array_intersect($arParams["FID"], array_keys($arResult["FORUMS"]));
/************** Search data ****************************************/
if (strLen($_REQUEST["q"]) > 0 || !empty($_REQUEST["tags"])) {
    if ($_REQUEST["order"] == "date") {
        $arResult["order"]["active"] = "date";
        $aSort = array("DATE_CHANGE" => "DESC");
    } elseif ($_REQUEST["order"] == "topic") {
        $arResult["order"]["active"] = "topic";
        $aSort = array("PARAM2" => "DESC", "DATE_CHANGE" => "ASC");
    }
    $arFilter1 = array("MODULE_ID" => "forum", "SITE_ID" => SITE_ID, "QUERY" => $q, "TAGS" => $_REQUEST["tags"] ? $_REQUEST["tags"] : "");
    if (intVal($_REQUEST["DATE_CHANGE"]) > 0) {
        $arFilter1["DATE_CHANGE"] = Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", LANGUAGE_ID)), time() - intVal($_REQUEST["DATE_CHANGE"]) * 24 * 3600 + CTimeZone::GetOffset());
    }
    $arFilter2 = array();
    if (!empty($arParams["FID_RANGE"]) || !empty($arParams["FID"])) {
        $arFilter2["PARAM1"] = empty($arParams["FID_RANGE"]) ? array() : array_keys($arResult["FORUMS"]);
        $arFilter2["PARAM1"] = empty($arParams["FID"]) ? $arFilter2["PARAM1"] : $arParams["FID"];
    }
    $obSearch = new CSearch();
    //When restart option is set we will ignore error on query with only stop words
    $obSearch->SetOptions(array("ERROR_ON_EMPTY_STEM" => $arParams["RESTART"] != "Y", "NO_WORD_LOGIC" => $arParams["NO_WORD_LOGIC"] == "Y"));
    $obSearch->Search($arFilter1, $aSort, array($arFilter2));
    if ($obSearch->errorno != 0) {
        $arResult["ERROR_MESSAGE"] = $obSearch->error;
    } else {
        $obSearch->NavStart($arParams["TOPICS_PER_PAGE"], false);
        $obSearch->nPageWindow = $arParams["PAGE_NAVIGATION_WINDOW"];
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:component.php


示例15: array

                $cData->Update($ID, array("ACTIVE" => $action == "deactivate" ? "N" : "Y"));
                break;
            default:
                break;
        }
    }
}
$arHeaders = array(array("id" => "ID", "content" => GetMessage("LFP_SCHEME_LIST_ID"), "sort" => "ID", "align" => "right", "default" => true), array("id" => "NAME", "content" => GetMessage("LFP_SCHEME_LIST_NAME"), "sort" => "NAME", "align" => "left", "default" => true), array("id" => "ACTIVE", "content" => GetMessage("LFP_SCHEME_LIST_ACTIVE"), "sort" => "ACTIVE", "align" => "left", "default" => true), array("id" => "SORT", "content" => GetMessage("LFP_SCHEME_LIST_SORT"), "sort" => "SORT", "align" => "left", "default" => true), array("id" => "LID", "content" => GetMessage("LFP_SCHEME_LIST_LID"), "sort" => "LID", "align" => "left", "default" => true), array("id" => "TYPE", "content" => GetMessage("LFP_SCHEME_LIST_TYPE"), "sort" => "TYPE", "align" => "left", "default" => true));
$lAdmin->AddHeaders($arHeaders);
$rsData = CXDILFScheme::GetList(array($by => $order));
$rsData = new CAdminResult($rsData, $sTableID);
while (is_array($arRes = $rsData->GetNext())) {
    $row =& $lAdmin->AddRow($arRes["ID"], $arRes);
    $row->AddInputField("NAME", array("size" => 20));
    $row->AddViewField("NAME", '<a href="xdi_lf_scheme_edit.php?ID=' . $arRes["ID"] . '&amp;lang=' . LANG . '">' . $arRes["NAME"] . '</a>');
    $row->AddEditField("LID", CLang::SelectBox("FIELDS[" . $arRes["ID"] . "][LID]", $arRes["LID"]));
    $row->AddInputField("SORT", array("size" => 20));
    $row->AddCheckField("ACTIVE");
    $row->AddViewField("ID", '<a href="xdi_lf_scheme_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $arRes["ID"] . '">' . $arRes["ID"] . '</a>');
    $row->AddViewField("TYPE", GetMessage("LFP_SCHEME_LIST_" . $arRes["TYPE"]));
    $arActions = array(array("ICON" => "edit", "DEFAULT" => true, "TEXT" => GetMessage("LFP_SCHEME_LIST_EDIT"), "ACTION" => $lAdmin->ActionRedirect('xdi_lf_scheme_edit.php?lang=' . LANGUAGE_ID . '&ID=' . $arRes["ID"])));
    $arActions[] = array("SEPARATOR" => "Y");
    if ($arRes["ACTIVE"] === "Y") {
        $arActions[] = array("TEXT" => GetMessage("LFP_SCHEME_LIST_DEACTIVATE"), "ACTION" => "if(confirm('" . GetMessage("LFP_SCHEME_LIST_DEACTIVATE_CONF") . "')) " . $lAdmin->ActionDoGroup($arRes["ID"], "deactivate"));
    } else {
        $arActions[] = array("TEXT" => GetMessage("LFP_SCHEME_LIST_ACTIVATE"), "ACTION" => $lAdmin->ActionDoGroup($arRes["ID"], "activate"));
    }
    $arActions[] = array("ICON" => "delete", "TEXT" => GetMessage("LFP_SCHEME_LIST_DELETE"), "ACTION" => "if(confirm('" . GetMessage("LFP_SCHEME_LIST_DELETE_CONF") . "')) " . $lAdmin->ActionDoGroup($arRes["ID"], "delete"));
    if (!empty($arActions)) {
        $row->AddActions($arActions);
    }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:lf_scheme_list.php


示例16: getProductDataToFillBasket

		$arParams = getProductDataToFillBasket($productId, $quantity, $userId, $LID, $userColumns);

		$result = CUtil::PhpToJSObject(array("params" => $arParams, "type" => $type));

		CRMModeOutput($result);
	}

}//end ORDER_AJAX=Y

/*****************************************************************************/
/**************************** FORM ORDER *************************************/
/*****************************************************************************/

//date order
$str_DATE_UPDATE = Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", $lang)));
$str_DATE_INSERT = Date(CDatabase::DateFormatToPHP(CLang::GetDateFormat("FULL", $lang)));

if (isset($ID) && $ID > 0)
{
	if (!$arOrderOldTmp)
		LocalRedirect("sale_order.php?lang=".LANGUAGE_ID.GetFilterParams("filter_", false));

	$LID = $str_LID;
	$str_DELIVERY_ID = (isset($_POST["DELIVERY_ID"]) && strlen($_POST["DELIVERY_ID"]) > 0) ? $_POST["DELIVERY_ID"] : $str_DELIVERY_ID;
	$str_PAY_SYSTEM_ID = (isset($_POST["PAY_SYSTEM_ID"]) && intval($_POST["PAY_SYSTEM_ID"]) > 0) ? intval($_POST["PAY_SYSTEM_ID"]) : $str_PAY_SYSTEM_ID;
}

if (!isset($str_TAX_VALUE) OR $str_TAX_VALUE == "")
	$str_TAX_VALUE = 0;

if (intval($str_PERSON_TYPE_ID) <= 0)
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:order_new.php


示例17: ShowDateFormat

 public static function ShowDateFormat($css_style = "")
 {
     $format = CLang::GetDateFormat("SHORT");
     if (strlen($css_style) > 0) {
         return '<span class="' . $css_style . '">' . $format . '</span>';
     } else {
         return $format;
     }
 }
开发者ID:andy-profi,项目名称:bxApiDocs,代码行数:9,代码来源:form_callformoutput.php


示例18: foreach

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
?>
<div class="fields integer" id="main_<?php 
echo $arParams["arUserField"]["FIELD_NAME"];
?>
"><?php 
$index = 0;
$fIndex = $arResult["RANDOM"];
foreach ($arResult["VALUE"] as $res) {
    if ($index == 0 && $arParams["arUserField"]["ENTITY_VALUE_ID"] < 1 && $arParams["arUserField"]["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] != "NONE") {
        if ($arParams["arUserField"]["SETTINGS"]["DEFAULT_VALUE"]["TYPE"] == "NOW") {
            $res = ConvertTimeStamp(time() + CTimeZone::GetOffset(), "FULL");
        } else {
            $res = str_replace(" 00:00:00", "", CDatabase::FormatDate($arParams["arUserField"]["SETTINGS"]["DEFAULT_VALUE"]["VALUE"], "YYYY-MM-DD HH:MI:SS", CLang::GetDateFormat("FULL")));
        }
    }
    $name = $arParams["arUserField"]["FIELD_NAME"];
    if ($arParams["arUserField"]["MULTIPLE"] == "Y") {
        $name = $arParams["arUserField"]["~FIELD_NAME"] . "[" . $index . "]";
    }
    ?>
<div class="fields datetime">
<input type="text" name="<?php 
    echo $name;
    ?>
" value="<?php 
    echo $res;
    ?>
"<?php 
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:template.php


示例19: GetMessage

	<td><?php 
echo GetMessage("MAIN_F_TIMESTAMP") . ":";
?>
</td>
	<td><?php 
echo CalendarPeriod("find_timestamp_1", htmlspecialcharsbx($find_timestamp_1), "find_timestamp_2", htmlspecialcharsbx($find_timestamp_2), "find_form", "Y");
?>
</td>
</tr>
<tr>
	<td><?php 
echo GetMessage("MAIN_F_LID");
?>
</td>
	<td><?php 
ech 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP CLangAdmin类代码示例发布时间:2022-05-23
下一篇:
PHP CLMText类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap