本文整理匯總了PHP中CCurrencyLang::GetList方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCurrencyLang::GetList方法的具體用法?PHP CCurrencyLang::GetList怎麽用?PHP CCurrencyLang::GetList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CCurrencyLang
的用法示例。
在下文中一共展示了CCurrencyLang::GetList方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$currency['IS_INVOICE_CURRENCY'] = $currencyID !== '' && $currencyID === CCrmCurrency::getInvoiceDefault();
$arResult['CURRENCY_ID'] = $currencyID;
$arResult['CURRENCY'] = $currency;
$arResult['FORM_ID'] = 'CRM_CURRENCY_EDIT';
$arResult['GRID_ID'] = 'CRM_CURRENCY_EDIT';
$arResult['BACK_URL'] = CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_CURRENCY_LIST'], array());
$langs = array();
$rsLang = CLangAdmin::GetList($by = 'sort', $order = 'asc');
while ($arLang = $rsLang->Fetch()) {
$lid = $arLang['LID'];
$langs[$lid] = array('NAME' => $arLang['NAME']);
}
$arResult['LANGS'] = $langs;
$currencyLocs = array();
if ($currencyID !== '') {
$rs = CCurrencyLang::GetList($by = '', $order = '', $currencyID);
while ($ary = $rs->GetNext()) {
$loc = array();
$loc['FULL_NAME'] = $ary['FULL_NAME'];
$loc['FORMAT_STRING'] = $ary['FORMAT_STRING'];
$loc['DEC_POINT'] = $ary['DEC_POINT'];
$loc['THOUSANDS_SEP'] = $ary['THOUSANDS_SEP'];
$loc['THOUSANDS_VARIANT'] = $ary['THOUSANDS_VARIANT'];
$currencyLocs[$ary['LID']] = $loc;
}
}
if (check_bitrix_sessid()) {
if ($_SERVER['REQUEST_METHOD'] == 'POST' && (isset($_POST['save']) || isset($_POST['apply']))) {
$currencyID = isset($_POST['currency_id']) ? $_POST['currency_id'] : '';
$fields = array();
if (!isset($currencyID[0]) && isset($_POST['ID'])) {
示例2: array_fill_keys
$APPLICATION->SetTitle(GetMessage("CURRENCY_EDIT_TITLE"));
} else {
$APPLICATION->SetTitle(GetMessage("CURRENCY_NEW_TITLE"));
}
require $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_after.php";
$currency = $defaultValues;
$currencyLangs = array_fill_keys($langID, $defaultLangValues);
if ($ID != '') {
$currency = CCurrency::GetByID($ID);
if (empty($currency)) {
$ID = '';
$currency = $defaultValues;
} else {
$by = 'currency';
$order = 'asc';
$langIterator = CCurrencyLang::GetList($by, $order, $ID);
while ($lang = $langIterator->Fetch()) {
$lang['THOUSANDS_SEP'] = (string) $lang['THOUSANDS_SEP'];
$lang['THOUSANDS_VARIANT'] = (string) $lang['THOUSANDS_VARIANT'];
$currencyLangs[$lang['LID']] = $lang;
}
unset($lang, $langIterator, $order, $by);
}
}
if (!empty($errorMessage)) {
$currency = $arFields;
if (!isset($currency['CURRENCY'])) {
$currency['CURRENCY'] = '';
}
$currencyLangs = $arFields['LANG'];
}
示例3: GetCurrencyLocalizations
public static function GetCurrencyLocalizations($currencyID)
{
if (!CModule::IncludeModule('currency')) {
return array();
}
$currencyID = strval($currencyID);
if ($currencyID === '') {
return array();
}
$result = array();
$by = '';
$order = '';
$dbResult = CCurrencyLang::GetList($by, $order, self::NormalizeCurrencyID($currencyID));
if ($dbResult) {
while ($item = $dbResult->Fetch()) {
$result[$item['LID']] = $item;
}
}
return $result;
}
示例4: array
$aContext[] = array("ICON" => "btn_new", "TEXT" => GetMessage("MAIN_ADMIN_MENU_CREATE"), "LINK" => "currency_edit.php?lang=" . LANG, "TITLE" => GetMessage("MAIN_ADMIN_MENU_CREATE"));
if ($CURRENCY_RIGHT == "W") {
$aContext[] = array("ICON" => "btn_delete", "TEXT" => GetMessage("MAIN_ADMIN_MENU_DELETE"), "ONCLICK" => "javascript:if(confirm('" . GetMessage("CONFIRM_DEL_MESSAGE") . "'))window.location='currencies.php?action=delete&ID[]=" . CUtil::JSEscape($ID) . "&lang=" . LANG . "&" . bitrix_sessid_get() . "';");
}
}
$context = new CAdminContextMenu($aContext);
$context->Show();
//Defaults
$f_SORT = "10";
$f_AMOUNT_CNT = "1";
if (strlen($ID) > 0 && !$bVarsFromForm) {
$result = CCurrency::GetByID($ID);
$f_AMOUNT_CNT = $result["AMOUNT_CNT"];
$f_AMOUNT = number_format($result["AMOUNT"], 4);
$f_SORT = $result["SORT"];
$res = CCurrencyLang::GetList($by, $order, $ID);
while ($ar = $res->Fetch()) {
${"l_FULL_NAME_" . $ar["LID"]} = $ar["FULL_NAME"];
${"l_FORMAT_STRING_" . $ar["LID"]} = $ar["FORMAT_STRING"];
${"l_DEC_POINT_" . $ar["LID"]} = $ar["DEC_POINT"];
${"l_THOUSANDS_SEP_" . $ar["LID"]} = $ar["THOUSANDS_SEP"];
${"l_THOUSANDS_VARIANT_" . $ar["LID"]} = $ar["THOUSANDS_VARIANT"];
${"l_DECIMALS_" . $ar["LID"]} = $ar["DECIMALS"];
}
}
if ($bVarsFromForm) {
$DB->InitTableVarsForEdit("b_catalog_currency", "", "f_");
for ($i = 0; $i < $iCount; $i++) {
${"l_FULL_NAME_" . $arLangsLID[$i]} = ${"FULL_NAME_" . $arLangsLID[$i]};
${"l_FORMAT_STRING_" . $arLangsLID[$i]} = ${"FORMAT_STRING_" . $arLangsLID[$i]};
${"l_DEC_POINT_" . $arLangsLID[$i]} = ${"DEC_POINT_" . $arLangsLID[$i]};