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


PHP CCurrencyRates::GetList方法代码示例

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


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

示例1: getCurrencyRateToday

 /**
  * Метод вернет последнее имеющееся значение курса валюты
  *
  * @param string $currency
  *
  * @return float|int
  */
 private static function getCurrencyRateToday($currency = 'USD')
 {
     $currencyRateValue = 0;
     $paramSelection = array('ORDER' => array('BY' => 'data', 'TYPE' => 'desc'), 'FILTER' => array('CURRENCY' => $currency));
     $dbCurrencyRates = CCurrencyRates::GetList($paramSelection['ORDER']['BY'], $paramSelection['ORDER']['TYPE'], $paramSelection['FILTER']);
     if ($curencyRates = $dbCurrencyRates->Fetch()) {
         $currencyRateValue = floatval($curencyRates['RATE']);
     }
     return $currencyRateValue;
 }
开发者ID:ASDAFF,项目名称:module.markup,代码行数:17,代码来源:CQuetzalMarkupPriceUpdate.php

示例2: foreach

            $arID[] = $arRes['ID'];
        }
    }
    foreach ($arID as $ID) {
        $ID = (int) $ID;
        if ($ID <= 0) {
            continue;
        }
        switch ($_REQUEST['action']) {
            case "delete":
                CCurrencyRates::Delete($ID);
                break;
        }
    }
}
$rsData = CCurrencyRates::GetList($by, $order, $arFilter);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("curr_rates_nav")));
$arHeaders = array();
$arHeaders[] = array("id" => "ID", "content" => "ID", "default" => false);
$arHeaders[] = array("id" => "CURRENCY", "content" => GetMessage('curr_rates_curr1'), "sort" => "curr", "default" => true);
$arHeaders[] = array("id" => "DATE_RATE", "content" => GetMessage('curr_rates_date1'), "sort" => "date", "default" => true);
$arHeaders[] = array("id" => "RATE_CNT", "content" => GetMessage('curr_rates_rate_cnt'), "default" => true);
$arHeaders[] = array("id" => "RATE", "content" => GetMessage('curr_rates_rate'), "sort" => "rate", "default" => true);
$lAdmin->AddHeaders($arHeaders);
while ($arRes = $rsData->NavNext(true, "f_")) {
    $row =& $lAdmin->AddRow($f_ID, $arRes, "/bitrix/admin/currency_rate_edit.php?ID=" . $f_ID . "&lang=" . LANGUAGE_ID . GetFilterParams("filter_"), GetMessage('CURRENCY_RATES_A_EDIT'));
    $row->AddViewField('ID', '<a href="/bitrix/admin/currency_rate_edit.php?ID=' . $f_ID . '&lang=' . LANGUAGE_ID . GetFilterParams("filter_") . '" title="' . GetMessage('CURRENCY_RATES_A_EDIT_TITLE') . '">' . $f_ID . '</a>');
    $row->AddViewField('CURRENCY', '<a href="/bitrix/admin/currency_edit.php?ID=' . $f_CURRENCY . '&lang=' . LANGUAGE_ID . '" title="' . GetMessage('CURRENCY_A_EDIT_TITLE') . '">' . $f_CURRENCY . '</a>');
    $row->AddCalendarField('DATE_RATE');
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:currencies_rates.php

示例3: Array

    $str_CURRENCY = $result["CURRENCY"];
    $str_RATE_CNT = $result["RATE_CNT"];
    $str_RATE = $result["RATE"];
}
if ($bVarsFromForm) {
    $DB->InitTableVarsForEdit("b_catalog_currency_rate", "", "str_");
}
?>
<script type="text/javascript">
	var arCurrencies = new Array();
	var arCurrenciesNom = new Array();
	<?php 
$db_curr = CCurrency::GetList($by1 = "sort", $order1 = "asc");
$num_currencies = 0;
while ($curr = $db_curr->Fetch()) {
    $db_currate = CCurrencyRates::GetList($by5 = "DATE_RATE", $order5 = "DESC", array("CURRENCY" => $curr["CURRENCY"]));
    if ($currate = $db_currate->Fetch()) {
        echo "arCurrenciesNom[" . $num_currencies . "]=" . $currate["RATE_CNT"] . ";";
    } else {
        echo "arCurrenciesNom[" . $num_currencies . "]=" . $curr["AMOUNT_CNT"] . ";";
    }
    $num_currencies++;
}
?>

	function ChangeCurr()
	{
		CUR_SELECT_BOX = document.forms['form1'].elements['CURRENCY'].selectedIndex;
		CUR_RATE_CNT = document.forms['form1'].elements['RATE_CNT'];
		CUR_RATE_CNT.value = arCurrenciesNom[CUR_SELECT_BOX];
	}
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:31,代码来源:currency_rate_edit.php


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