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

PHP Currency\CurrencyManager类代码示例

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

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



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

示例1: getCurrenciesList

 /**
  * Return currencies list.
  *
  * @return array Currencies list.
  * @throws SystemException
  * @throws \Bitrix\Main\LoaderException
  */
 public static function getCurrenciesList()
 {
     static $currencies = null;
     if ($currencies === null) {
         $currencies = array();
         if (!\Bitrix\Main\Loader::includeModule('currency')) {
             throw new SystemException("Can't include module \"Currency\"!");
         }
         $currencies = Currency\CurrencyManager::getCurrencyList();
     }
     return $currencies;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:19,代码来源:helper.php


示例2: getConfigStructure

 protected function getConfigStructure()
 {
     static $handlers = null;
     $initedHandlers = self::getRegisteredHandlers("SID");
     sortByColumn($initedHandlers, array(strtoupper("NAME") => SORT_ASC));
     if ($handlers === null) {
         $handlers = array("" => "");
         foreach ($initedHandlers as $handler) {
             $handlers[$handler["SID"]] = $handler["NAME"] . " [" . $handler["SID"] . "]";
         }
     }
     if (strlen($this->handlerInitParams["SID"]) <= 0 || $this->id <= 0) {
         $result = array("MAIN" => array("TITLE" => Loc::getMessage("SALE_DLVR_HANDL_AUT_HANDLER_SETTINGS"), "DESCRIPTION" => Loc::getMessage("SALE_DLVR_HANDL_AUT_HANDLER_SETTINGS_DSCR"), "ITEMS" => array("SID" => array("TYPE" => "ENUM", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_HANDLER_CHOOSE"), "OPTIONS" => $handlers, "ONCHANGE" => "top.BX.showWait(); if(this.form.elements['NAME'].value == '') this.form.elements['NAME'].value = this.selectedOptions[0].innerHTML.replace(/\\s*\\[.*\\]/g,''); this.form.submit();"))));
     } else {
         $handler = $this->handlerInitParams["SID"];
         $result = array("MAIN" => array("TITLE" => Loc::getMessage("SALE_DLVR_HANDL_AUT_HANDLER_SETTINGS"), "DESCRIPTION" => Loc::getMessage("SALE_DLVR_HANDL_AUT_HANDLER_SETTINGS_DSCR"), "ITEMS" => array("SID" => array("TYPE" => "DELIVERY_READ_ONLY", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_HANDLER_CHOOSE"), "VALUE" => $handler, "VALUE_VIEW" => $handlers[$handler]), "DESCRIPTION_INNER" => array("TYPE" => "DELIVERY_READ_ONLY", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_DESCRIPTION_INNER"), "VALUE" => $this->handlerInitParams["DESCRIPTION_INNER"]))));
     }
     $serviceCurrency = $this->currency;
     if (\Bitrix\Main\Loader::includeModule('currency')) {
         $currencyList = CurrencyManager::getCurrencyList();
         if (isset($currencyList[$this->currency])) {
             $serviceCurrency = $currencyList[$this->currency];
         }
         unset($currencyList);
     }
     $marginTypes = array("%" => "%", "CURRENCY" => $serviceCurrency);
     $result["MAIN"]["ITEMS"]["MARGIN_VALUE"] = array("TYPE" => "STRING", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_MARGIN_VALUE"), "DEFAULT" => 0);
     $result["MAIN"]["ITEMS"]["MARGIN_TYPE"] = array("TYPE" => "ENUM", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_MARGIN_TYPE"), "DEFAULT" => "%", "OPTIONS" => $marginTypes);
     if (strlen($this->sid) > 0) {
         $configProfileIds = array_keys($this->handlerInitParams["PROFILES"]);
     } else {
         $configProfileIds = array();
     }
     if (isset($this->oldConfig["CONFIG_GROUPS"])) {
         $groupProfileIds = array_keys($this->oldConfig["CONFIG_GROUPS"]);
         $intersect = array_intersect($groupProfileIds, $configProfileIds);
         foreach ($intersect as $pid) {
             unset($this->oldConfig["CONFIG_GROUPS"][$pid]);
         }
     }
     $oldConfig = $this->convertOldConfigToNew($this->oldConfig);
     if (!empty($oldConfig)) {
         if (isset($oldConfig["CONFIG_GROUPS"]["MAIN"])) {
             $oldConfig["CONFIG_GROUPS"]["MAIN_OLD"] = $oldConfig["CONFIG_GROUPS"]["MAIN"];
             unset($oldConfig["CONFIG_GROUPS"]["MAIN"]);
         }
         $result = array_merge($result, $oldConfig);
     }
     return $result;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:50,代码来源:automatic.php


示例3: UnInstallDB

 function UnInstallDB($arParams = array())
 {
     global $DB, $APPLICATION;
     $this->errors = false;
     if (!isset($arParams["savedata"]) || $arParams["savedata"] != "Y") {
         $this->errors = $DB->RunSQLBatch($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/currency/install/db/" . strtolower($DB->type) . "/uninstall.sql");
         if ($this->errors !== false) {
             $APPLICATION->ThrowException(implode('', $this->errors));
             return false;
         }
     }
     \Bitrix\Currency\CurrencyManager::clearCurrencyCache();
     CAgent::RemoveModuleAgents('currency');
     ModuleManager::unRegisterModule('currency');
     return true;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:16,代码来源:index.php


示例4: unset

                 unset($dayData['BANNER_ID']);
                 unset($dayData['DATE_DAY']);
                 $dayData['date'] = $date;
                 $graphData[] = $dayData;
             }
             $res["data"] = $graphData;
             $res["date_from"] = $dateStart->toString();
             $res["date_to"] = $dateFinish->toString();
             if (\Bitrix\Main\ModuleManager::isModuleInstalled('sale') && \Bitrix\Main\ModuleManager::isModuleInstalled('catalog') && Loader::includeModule('currency')) {
                 $orderStats = Adv\OrderTable::getList(array('filter' => array('=BANNER_ID' => $bannerId, '=PROCESSED' => Adv\OrderTable::PROCESSED, ">=TIMESTAMP_X" => $dateStart, "<TIMESTAMP_X" => $dateFinish), 'group' => array('BANNER_ID'), 'select' => array('BANNER_SUM'), 'runtime' => array(new \Bitrix\Main\Entity\ExpressionField('BANNER_SUM', 'SUM(SUM)'))));
                 if ($stat = $orderStats->fetch()) {
                     $res["order_sum"] = $stat['BANNER_SUM'];
                 } else {
                     $res["order_sum"] = 0;
                 }
                 $res["order_sum_format"] = \CCurrencyLang::CurrencyFormat(doubleval($res["order_sum"]), \Bitrix\Currency\CurrencyManager::getBaseCurrency(), true);
             }
         }
     } else {
         $res = array("session" => $loadingSession, "amount" => $_SESSION[$loadingSession]['ORIGINAL_CNT'], "left" => count($_SESSION[$loadingSession]["GAPS"]));
     }
     break;
 case 'campaign_stats':
     $res = array();
     $campaignId = intval($_REQUEST['campaign']);
     $loadingSession = $_REQUEST['loading_session'];
     $gaps = array();
     if ($loadingSession) {
         if (isset($_SESSION[$loadingSession]) && $_SESSION[$loadingSession]['CAMPAIGN_ID'] == $campaignId) {
             $dateStart = new Date($_SESSION[$loadingSession]['DATE_START']);
             $dateFinish = new Date($_SESSION[$loadingSession]['DATE_FINISH']);
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:seo_yandex_direct.php


示例5: getConfigStructure

 protected function getConfigStructure()
 {
     static $profiles = null;
     if ($profiles === null) {
         $profiles = array("" => "");
         foreach ($this->parentHandlerInitParams["PROFILES"] as $profileId => $profileParams) {
             $profiles[$profileId] = $profileParams["TITLE"] . " [" . $profileId . "]";
         }
     }
     $result = array("MAIN" => array("TITLE" => Loc::getMessage("SALE_DLVR_HANDL_AUTP_CONF_MAIN_TITLE"), "DESCRIPTION" => Loc::getMessage("SALE_DLVR_HANDL_AUTP_CONF_MAIN_DESCR"), "ITEMS" => array("PROFILE_ID" => array("TYPE" => "ENUM", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUTP_CONF_MAIN_PROFILE_ID"), "OPTIONS" => $profiles, "ONCHANGE" => "top.BX.showWait(); this.form.submit(); /* elements.apply.click();*/"))));
     $serviceCurrency = $this->currency;
     if (\Bitrix\Main\Loader::includeModule('currency')) {
         $currencyList = CurrencyManager::getCurrencyList();
         if (isset($currencyList[$this->currency])) {
             $serviceCurrency = $currencyList[$this->currency];
         }
         unset($currencyList);
     }
     $marginTypes = array("%" => "%", "CURRENCY" => $serviceCurrency);
     $result["MAIN"]["ITEMS"]["MARGIN_VALUE"] = array("TYPE" => "STRING", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_MARGIN_VALUE"), "DEFAULT" => 0);
     $result["MAIN"]["ITEMS"]["MARGIN_TYPE"] = array("TYPE" => "ENUM", "NAME" => Loc::getMessage("SALE_DLVR_HANDL_AUT_MARGIN_TYPE"), "DEFAULT" => "%", "OPTIONS" => $marginTypes);
     $configProfileIds = array_keys($this->parentHandlerInitParams["PROFILES"]);
     if (strlen($this->profileId) > 0 && in_array($this->profileId, $configProfileIds)) {
         $oldAutoConfig = $this->parentAutomatic->getOldConfig();
         if ($oldAutoConfig && isset($oldAutoConfig["CONFIG_GROUPS"]) && is_array($oldAutoConfig["CONFIG_GROUPS"])) {
             foreach ($oldAutoConfig["CONFIG_GROUPS"] as $key => $groupId) {
                 if ($this->profileId != $groupId) {
                     unset($oldAutoConfig["CONFIG_GROUPS"][$key]);
                 }
             }
             foreach ($oldAutoConfig["CONFIG"] as $key => $params) {
                 if ($this->profileId != $params["CONFIG"]) {
                     unset($oldAutoConfig["CONFIG"][$key]);
                 }
             }
         }
         $oldConfig = Automatic::convertOldConfigToNew($oldAutoConfig);
         if (!empty($oldConfig)) {
             if (isset($oldConfig["CONFIG_GROUPS"]["MAIN"])) {
                 $oldConfig["CONFIG_GROUPS"]["MAIN_OLD"] = $oldConfig["CONFIG_GROUPS"]["MAIN"];
                 unset($oldConfig["CONFIG_GROUPS"]["MAIN"]);
             }
             $result = array_merge($result, $oldConfig);
         }
     }
     return $result;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:47,代码来源:automatic_profile.php


示例6: IncludeModuleLangFile

<?php

/** @global CUser $USER */
use Bitrix\Main;
use Bitrix\Currency;
if ($USER->CanDoOperation('catalog_read') || $USER->CanDoOperation('catalog_price') || $USER->CanDoOperation('catalog_view')) {
    IncludeModuleLangFile($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/catalog/templates/product_edit.php');
    $currencyList = array();
    foreach (Currency\CurrencyManager::getCurrencyList() as $currency => $currencyName) {
        $currencyList[$currency] = array('CURRENCY' => $currency, 'FULL_NAME' => htmlspecialcharsex($currencyName), 'FULL_NAME_JS' => CUtil::JSEscape(htmlspecialcharsbx($currencyName)));
    }
    unset($currency, $currencyName);
    $IBLOCK_ID = (int) $IBLOCK_ID;
    if ($IBLOCK_ID <= 0) {
        return;
    }
    $MENU_SECTION_ID = (int) $MENU_SECTION_ID;
    $PRODUCT_ID = $ID > 0 ? CIBlockElement::GetRealElement($ID) : 0;
    $arBaseProduct = false;
    $periodTimeTypes = array();
    if ($arMainCatalog['SUBSCRIPTION'] == 'Y') {
        $arDefProduct = array('QUANTITY' => '', 'QUANTITY_RESERVED' => '', 'VAT_ID' => 0, 'VAT_INCLUDED' => 'N', 'QUANTITY_TRACE_ORIG' => 'D', 'CAN_BUY_ZERO_ORIG' => 'D', 'PRICE_TYPE' => '', 'RECUR_SCHEME_TYPE' => '', 'RECUR_SCHEME_LENGTH' => '', 'TRIAL_PRICE_ID' => '', 'WITHOUT_ORDER' => '', 'PURCHASING_PRICE' => '', 'PURCHASING_CURRENCY' => '', 'BARCODE_MULTI' => '', 'SUBSCRIBE_ORIG' => 'D');
        $periodTimeTypes = CCatalogProduct::GetTimePeriodTypes(true);
    } else {
        $arDefProduct = array('QUANTITY' => '', 'QUANTITY_RESERVED' => '', 'WEIGHT' => '', 'WIDTH' => '', 'LENGTH' => '', 'HEIGHT' => '', 'MEASURE' => '', 'VAT_ID' => 0, 'VAT_INCLUDED' => 'N', 'QUANTITY_TRACE_ORIG' => 'D', 'CAN_BUY_ZERO_ORIG' => 'D', 'PURCHASING_PRICE' => '', 'PURCHASING_CURRENCY' => '', 'BARCODE_MULTI' => '', 'SUBSCRIBE_ORIG' => 'D');
    }
    if ($PRODUCT_ID > 0) {
        $bReadOnly = !($USER->CanDoOperation('catalog_price') && CIBlockElementRights::UserHasRightTo($IBLOCK_ID, $PRODUCT_ID, "element_edit_price"));
        if ($arMainCatalog['SUBSCRIPTION'] == 'Y') {
            $arProductSelect = array('ID', 'QUANTITY', 'QUANTITY_RESERVED', 'QUANTITY_TRACE_ORIG', 'VAT_ID', 'VAT_INCLUDED', 'CAN_BUY_ZERO_ORIG', 'PRICE_TYPE', 'RECUR_SCHEME_TYPE', 'RECUR_SCHEME_LENGTH', 'TRIAL_PRICE_ID', 'WITHOUT_ORDER', 'PURCHASING_PRICE', 'PURCHASING_CURRENCY', 'BARCODE_MULTI', 'SUBSCRIBE_ORIG', 'TYPE');
        } else {
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:31,代码来源:product_edit.php


示例7:

<tr>
	<td width="30%" class="adm-detail-required-field"><?=Loc::getMessage('SEO_YANDEX_STATS_PERIOD')?>:</td>
	<td width="70%">
			<span style="white-space: nowrap; display:inline-block;"><select name="period_sel" onchange="setGraphInterval(this.value)">
					<option value="interval"><?=Loc::getMessage('SEO_YANDEX_STATS_GRAPH_INTERVAL')?></option>
					<option value="week_ago"><?=Loc::getMessage('SEO_YANDEX_STATS_GRAPH_WEEK')?></option>
					<option value="month_ago"><?=Loc::getMessage('SEO_YANDEX_STATS_GRAPH_MONTH')?></option>
				</select>&nbsp;<span id="seo_graph_interval"><?=CalendarDate("date_from", $dateStart->toString(), 'form1', "4")?>&nbsp;&hellip;<?=CalendarDate("date_to", $dateFinish->toString(), 'form1', "4")?></span></span>&nbsp;&nbsp;<input type="button" value="<?=Loc::getMessage('SEO_YANDEX_STATS_PERIOD_APPLY')?>" onclick="loadGraphData()" id="stats_loading_button" name="template_preview"><span id="stats_wait" class="loading-message-text" style="display: none; margin-top: 5px;"><?=Loc::getMessage('SEO_YANDEX_STATS_WAIT')?></span>
	</td>
</tr>
<?
	if($bSale):
?>
<tr>
	<td><?=Loc::getMessage('SEO_YANDEX_STATS_SUM_ORDER_REPIOD')?>:</td>
	<td><span id="banner_profit"><?=\CCurrencyLang::CurrencyFormat(doubleval($bannerProfit), \Bitrix\Currency\CurrencyManager::getBaseCurrency(), true)?></span></td>
</tr>
<?
	endif;
?>
<tr>
	<td><?=Loc::getMessage('SEO_YANDEX_STATS_GRAPH_TYPE')?>:</td>
	<td><select onchange="setGraph(this.value)">
		<option value="sum"><?=Loc::getMessage('SEO_YANDEX_STATS_GRAPH_TYPE_SUM')?></option>
		<option value="shows"><?=Loc::getMessage('SEO_YANDEX_STATS_GRAPH_TYPE_SHOWS')?></option>
		<option value="clicks"><?=Loc::getMessage('SEO_YANDEX_STATS_GRAPH_TYPE_CLICKS')?></option>
	</select></td>
</tr>
<tr>
	<td colspan="2">
<?
开发者ID:nycmic,项目名称:bittest,代码行数:31,代码来源:seo_search_yandex_direct_banner_edit.php


示例8: array

	$arComponentParameters["PARAMETERS"]['CONVERT_CURRENCY'] = array(
		'PARENT' => 'PRICES',
		'NAME' => GetMessage('CP_BCS_CONVERT_CURRENCY'),
		'TYPE' => 'CHECKBOX',
		'DEFAULT' => 'N',
		'REFRESH' => 'Y',
	);

	if (isset($arCurrentValues['CONVERT_CURRENCY']) && $arCurrentValues['CONVERT_CURRENCY'] == 'Y')
	{
		$arComponentParameters['PARAMETERS']['CURRENCY_ID'] = array(
			'PARENT' => 'PRICES',
			'NAME' => GetMessage('CP_BCS_CURRENCY_ID'),
			'TYPE' => 'LIST',
			'VALUES' => Currency\CurrencyManager::getCurrencyList(),
			'DEFAULT' => Currency\CurrencyManager::getBaseCurrency(),
			"ADDITIONAL_VALUES" => "Y",
		);
	}
}

if (empty($offers))
{
	unset($arComponentParameters["PARAMETERS"]["OFFERS_FIELD_CODE"]);
	unset($arComponentParameters["PARAMETERS"]["OFFERS_PROPERTY_CODE"]);
	unset($arComponentParameters["PARAMETERS"]["OFFERS_SORT_FIELD"]);
	unset($arComponentParameters["PARAMETERS"]["OFFERS_SORT_ORDER"]);
	unset($arComponentParameters["PARAMETERS"]["OFFERS_SORT_FIELD2"]);
	unset($arComponentParameters["PARAMETERS"]["OFFERS_SORT_ORDER2"]);
}
else
开发者ID:nycmic,项目名称:bittest,代码行数:31,代码来源:.parameters.php


示例9: convertCurrency

 /**
  * Convert discount data to other currency (sale currency).
  *
  * @param array &$discount				Discout data.
  * @param string $currency				New currency.
  * @return void
  */
 public static function convertCurrency(&$discount, $currency)
 {
     $currency = Currency\CurrencyManager::checkCurrencyID($currency);
     if ($currency === false || empty($discount) || !is_array($discount)) {
         return;
     }
     if (!isset($discount['VALUE_TYPE']) || !isset($discount['CURRENCY']) || $discount['CURRENCY'] == $currency) {
         return;
     }
     switch ($discount['VALUE_TYPE']) {
         case self::VALUE_TYPE_FIX:
         case self::VALUE_TYPE_SALE:
             $discount['VALUE'] = roundEx(\CCurrencyRates::convertCurrency($discount['VALUE'], $discount['CURRENCY'], $currency), CATALOG_VALUE_PRECISION);
             $discount['CURRENCY'] = $currency;
             break;
         case self::VALUE_TYPE_PERCENT:
             if ($discount['MAX_DISCOUNT'] > 0) {
                 $discount['MAX_DISCOUNT'] = roundEx(\CCurrencyRates::convertCurrency($discount['MAX_DISCOUNT'], $discount['CURRENCY'], $currency), CATALOG_VALUE_PRECISION);
             }
             $discount['CURRENCY'] = $currency;
             break;
     }
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:30,代码来源:discount.php


示例10: foreach

            $boolPriceInc = true;
        }
    }
    if (is_array($arCatGroup) && !empty($arCatGroup)) {
        foreach ($arCatGroup as &$CatalogGroups) {
            if (in_array("CATALOG_GROUP_" . $CatalogGroups["ID"], $arSelectedFields)) {
                $arFilter["CATALOG_SHOP_QUANTITY_" . $CatalogGroups["ID"]] = 1;
                $boolPriceInc = true;
            }
        }
        unset($CatalogGroups);
    }
    if ($boolPriceInc) {
        $boolSubCurrency = Loader::includeModule('currency');
        if ($boolSubCurrency) {
            $arCurrencyList = array_keys(Currency\CurrencyManager::getCurrencyList());
        }
    }
    unset($boolPriceInc);
}
$arSelectedFieldsMap = array();
foreach ($arSelectedFields as $field) {
    $arSelectedFieldsMap[$field] = true;
}
$measureList = array(0 => ' ');
if (isset($arSelectedFieldsMap['CATALOG_MEASURE'])) {
    $measureIterator = CCatalogMeasure::getList(array(), array(), false, false, array('ID', 'MEASURE_TITLE', 'SYMBOL_RUS'));
    while ($measure = $measureIterator->Fetch()) {
        $measureList[$measure['ID']] = $measure['SYMBOL_RUS'] != '' ? $measure['SYMBOL_RUS'] : $measure['MEASURE_TITLE'];
    }
    unset($measure, $measureIterator);
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:iblock_subelement_list.php


示例11: isExistCurrencyLanguage

	public static function isExistCurrencyLanguage($currency, $language)
	{
		global $DB;
		$currency = Currency\CurrencyManager::checkCurrencyID($currency);
		$language = Currency\CurrencyManager::checkLanguage($language);
		if ($currency === false || $language === false)
			return false;
		$query = "select LID from b_catalog_currency_lang where CURRENCY = '".$DB->ForSql($currency)."' and LID = '".$DB->ForSql($language)."'";
		$searchIterator = $DB->Query($query, false, 'File: '.__FILE__.'<br>Line: '.__LINE__);
		if ($result = $searchIterator->Fetch())
		{
			return true;
		}
		return false;
	}
开发者ID:akniyev,项目名称:arteva.ru,代码行数:15,代码来源:currency_lang.php


示例12:

" onclick="loadGraphData()" id="stats_loading_button" name="template_preview"><span id="stats_wait" class="loading-message-text" style="display: none; margin-top: 5px;"><?php 
    echo Loc::getMessage('SEO_YANDEX_STATS_WAIT');
    ?>
</span>
	</td>
</tr>
<?php 
    if ($bSale) {
        ?>
<tr>
	<td><?php 
        echo Loc::getMessage('SEO_YANDEX_STATS_SUM_ORDER_REPIOD');
        ?>
:</td>
	<td><span id="banner_profit"><?php 
        echo \CCurrencyLang::CurrencyFormat(doubleval($bannerProfit), \Bitrix\Currency\CurrencyManager::getBaseCurrency(), true);
        ?>
</span></td>
</tr>
<?php 
    }
    ?>
<tr>
	<td><?php 
    echo Loc::getMessage('SEO_YANDEX_STATS_GRAPH_TYPE');
    ?>
:</td>
	<td><select onchange="setGraph(this.value)">
		<option value="sum"><?php 
    echo Loc::getMessage('SEO_YANDEX_STATS_GRAPH_TYPE_SUM');
    ?>
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:seo_search_yandex_direct_banner_edit.php


示例13: array

$filterFields = array();

if (!isset($by))
	$by = 'SORT';
if (!isset($order))
	$order = 'ASC';
$by = strtoupper($by);
$order = strtoupper($order);

if ($adminList->EditAction() && $CURRENCY_RIGHT == "W")
{
	if (isset($FIELDS) && is_array($FIELDS))
	{
		foreach ($FIELDS as $ID => $arFields)
		{
			$ID = Currency\CurrencyManager::checkCurrencyID($ID);
			if ($ID === false)
				continue;

			if (!$adminList->IsUpdated($ID))
				continue;

			if (!CCurrency::Update($ID, $arFields))
			{
				if ($ex = $APPLICATION->GetException())
				{
					$adminList->AddUpdateError(GetMessage("CURRENCY_SAVE_ERR", array("#ID#" => $ID, "#ERROR_TEXT#" => $ex->GetString())), $ID);
				}
				else
				{
					$adminList->AddUpdateError(GetMessage("CURRENCY_SAVE_ERR2", array("#ID#"=>$ID)), $ID);
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:currencies.php


示例14: array

					"#ID#" => $banner["BANNER_ID"],
					"#XML_ID#" => $banner["BANNER_XML_ID"],
				)).'">'.Converter::getHtmlConverter()->encode($banner['BANNER_NAME']).'</a>');


			$row->AddViewField('XML_ID', '<a href="https://direct.yandex.ru/registered/main.pl?cmd=showCampMultiEdit&bids='.$banner['BANNER_XML_ID'].'&cid='.$campaign['XML_ID'].'" target="_blank" title="'.Converter::getHtmlConverter()->encode(Loc::getMessage('SEO_CAMPAIGN_EDIT_EXTERNAL')).'">'.Loc::getMessage('SEO_YANDEX_DIRECT_LINK_TPL', array('#XML_ID#' => $banner['BANNER_XML_ID'])).'</a>');


			$row->AddViewField("BANNER_SUM", number_format($banner['BANNER_SUM'], 2, '.', ' '));

			$row->AddViewField("BANNER_SHOWS", $banner['BANNER_SHOWS']);
			$row->AddViewField("BANNER_CLICKS", $banner['BANNER_CLICKS']);
			$row->AddViewField("BANNER_CTR", number_format($banner['BANNER_CTR'], 2, '.', ' '));
			if($bShowOrderStats)
			{
				$row->AddViewField("BANNER_SUM_ORDER", \CCurrencyLang::CurrencyFormat(doubleval($banner['BANNER_SUM_ORDER']), \Bitrix\Currency\CurrencyManager::getBaseCurrency(), true));
			}
		}
	}

	$statsAdminList->checkListMode();
}

if($ID <= 0)
{
	$campaign = array(
		"SETTINGS" => array(
			"Name" => Loc::getMessage("SEO_CAMPAIGN_NAME_DEFAULT", array("#DATE#" => ConvertTimeStamp())),
			"FIO" => $currentUser['real_name'],
			"StartDate" => ConvertTimeStamp(),
			"EmailNotification" => array(
开发者ID:nycmic,项目名称:bittest,代码行数:31,代码来源:seo_search_yandex_direct_edit.php


示例15: array

<?php

use Bitrix\Conversion\Config;
use Bitrix\Currency\CurrencyManager;
use Bitrix\Main\Loader;
use Bitrix\Main\Localization\Loc;
Loc::loadMessages($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/options.php');
Loc::loadMessages(__FILE__);
if (!$USER->IsAdmin()) {
    return;
}
$modules = Config::getModules();
// TODO all modules with attributes must be active
unset($modules['conversion'], $modules['abtest'], $modules['sender'], $modules['seo']);
$currency = Config::getBaseCurrency();
if (!(Loader::includeModule('currency') && ($currencies = CurrencyManager::getCurrencyList()))) {
    $currencies = array($currency => $currency);
}
if ($REQUEST_METHOD == 'POST' && strlen($Update . $Apply . $RestoreDefaults) > 0 && check_bitrix_sessid()) {
    if (strlen($RestoreDefaults) > 0) {
        Config::setBaseCurrency(null);
        $currency = Config::getBaseCurrency();
        Config::setModules(array());
        $modules = Config::getModules();
    } else {
        if ($currencies[$_POST['CURRENCY']]) {
            $currency = $_POST['CURRENCY'];
            Config::setBaseCurrency($currency);
        }
        foreach ($modules as $name => $config) {
            $modules[$name]['ACTIVE'] = isset($_POST['MODULE'][$name]['ACTIVE']);
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:31,代码来源:options.php


示例16: intval

}
$arParams["CACHE_TIME"] = intval($arParams["CACHE_TIME"]);
if ($this->StartResultCache()) {
    if (!CModule::IncludeModule("currency")) {
        $this->AbortResultCache();
        ShowError(GetMessage("CURRENCY_MODULE_NOT_INSTALLED"));
        return;
    }
    global $CACHE_MANAGER;
    $arResult = array();
    $arResult["CURRENCY"] = array();
    if ('' == $arParams["CURRENCY_BASE"]) {
        $arParams["CURRENCY_BASE"] = COption::GetOptionString("sale", "default_currency");
    }
    if ('' == $arParams["CURRENCY_BASE"]) {
        $arParams["CURRENCY_BASE"] = Currency\CurrencyManager::getBaseCurrency();
    }
    if ('' != $arParams["CURRENCY_BASE"]) {
        if ('' == $arParams["RATE_DAY"]) {
            $arResult["RATE_DAY_TIMESTAMP"] = time();
            $arResult["RATE_DAY_SHOW"] = ConvertTimeStamp($arResult["RATE_DAY_TIMESTAMP"], 'SHORT');
        } else {
            $arRATE_DAY_PARSED = ParseDateTime($arParams["RATE_DAY"], "YYYY-MM-DD");
            $arRATE_DAY_PARSED['YYYY'] = intval($arRATE_DAY_PARSED['YYYY']);
            if (1901 > $arRATE_DAY_PARSED["YYYY"] || 2038 < $arRATE_DAY_PARSED["YYYY"]) {
                $arResult["RATE_DAY_TIMESTAMP"] = time();
                $arResult["RATE_DAY_SHOW"] = ConvertTimeStamp($arResult["RATE_DAY_TIMESTAMP"], 'SHORT');
            } else {
                $arResult["RATE_DAY_TIMESTAMP"] = mktime(0, 0, 0, $arRATE_DAY_PARSED["MM"], $arRATE_DAY_PARSED["DD"], $arRATE_DAY_PARSED["YYYY"]);
                $arResult["RATE_DAY_SHOW"] = ConvertTimeStamp($arResult["RATE_DAY_TIMESTAMP"], 'SHORT');
            }
开发者ID:webgksupport,项目名称:alpina,代码行数:31,代码来源:component.php


示例17: Delete

 public static function Delete($ID)
 {
     global $DB;
     global $APPLICATION;
     /** @global CStackCacheManager $stackCacheManager */
     global $stackCacheManager;
     $ID = (int) $ID;
     if ($ID <= 0) {
         return false;
     }
     foreach (GetModuleEvents("currency", "OnBeforeCurrencyRateDelete", true) as $arEvent) {
         if (ExecuteModuleEventEx($arEvent, array($ID)) === false) {
             return false;
         }
     }
     $arFields = CCurrencyRates::GetByID($ID);
     if (!is_array($arFields)) {
         $arMsg = array('id' => 'ID', 'text' => GetMessage('BT_MOD_CURR_ERR_RATE_CANT_DELETE_ABSENT_ID'));
         $e = new CAdminException($arMsg);
         $APPLICATION->ThrowException($e);
         return false;
     }
     $stackCacheManager->Clear("currency_rate");
     $strSql = "DELETE FROM b_catalog_currency_rate WHERE ID = " . $ID;
     $DB->Query($strSql, false, "File: " . __FILE__ . "<br>Line: " . __LINE__);
     Currency\CurrencyManager::updateBaseRates($arFields['CURRENCY']);
     Currency\CurrencyManager::clearTagCache($arFields['CURRENCY']);
     self::$currentCache = array();
     foreach (GetModuleEvents("currency", "OnCurrencyRateDelete", true) as $arEvent) {
         ExecuteModuleEventEx($arEvent, array($ID));
     }
     return true;
 }
开发者ID:akniyev,项目名称:itprom_dobrohost,代码行数:33,代码来源:currency_rate.php


示例18: getProductData

 /**
  * @param Basket $basketCollection
  * @param array $select
  * @param BasketItem $refreshItem
  * @return array
  * @throws NotSupportedException
  */
 public static function getProductData(Basket $basketCollection, array $select = array(), BasketItem $refreshItem = null)
 {
     $result = array();
     $orderId = null;
     $userId = null;
     $siteId = null;
     $currency = null;
     if (($order = $basketCollection->getOrder()) !== null) {
         $userId = $order->getUserId();
         $siteId = $order->getSiteId();
         $currency = $order->getCurrency();
     }
     if ($userId === null) {
         static $usersIds = array();
         if (empty($usersIds[$basketCollection->getFUserId(true)])) {
             $usersIds[$basketCollection->getFUserId(true)] = \CSaleUser::getUserID($basketCollection->getFUserId(true));
         }
         $userId = $usersIds[$basketCollection->getFUserId(true)];
     }
     if ($siteId === null) {
         $siteId = $basketCollection->getSiteId();
     }
     if ($siteId === null) {
         return array();
     }
     if ($currency === null) {
         $currency = Internals\SiteCurrencyTable::getSiteCurrency($siteId);
         if (!$currency) {
             $currency = Currency\CurrencyManager::getBaseCurrency();
         }
     }
     $basketList = static::makeArrayFromBasketCollection($basketCollection, $refreshItem);
     $basketProviderMap = static::createProviderBasketMap($basketList, array('QUANTITY', 'RENEWAL'));
     $basketProviderList = static::redistributeToProviders($basketProviderMap);
     if (!empty($basketProviderList)) {
         $needPrice = in_array('PRICE', $select);
         $needBasePrice = in_array('BASE_PRICE', $select);
         $needCoupons = in_array('COUPONS', $select);
         $data = array('USER_ID' => (int) $userId, 'SITE_ID' => $siteId, 'CURRENCY' => $currency, 'CHECK_QUANTITY' => in_array('QUANTITY', $select) ? 'Y' : 'N', 'CHECK_PRICE' => $needPrice ? 'Y' : 'N', 'CHECK_COUPONS' => $needCoupons ? 'Y' : 'N', 'RENEWAL' => in_array('RENEWAL', $select) ? 'Y' : 'N');
         if ($needBasePrice) {
             $data['CHECK_DISCOUNT'] = 'N';
         }
         $useOrderProduct = false;
         if ($needPrice) {
             $useOrderProduct = true;
         }
         if ($needCoupons) {
             $useOrderProduct = false;
         }
         unset($needCoupons, $needPrice);
         foreach ($basketProviderList as $provider => $providerBasketItemList) {
             if ($provider instanceof Provider) {
                 throw new NotSupportedException('provider not supported');
             } elseif ($provider && array_key_exists("IBXSaleProductProvider", class_implements($provider))) {
                 foreach ($providerBasketItemList as $providerBasketItem) {
                     $currentUseOrderProduct = $useOrderProduct;
                     if (!isset($providerBasketItem['BASKET_ID']) || (int) $providerBasketItem['BASKET_ID'] <= 0) {
                         $currentUseOrderProduct = false;
                     }
                     $providerFields = $data;
                     if ($providerBasketItem['BASKET_ITEM']->isBundleChild()) {
                         $providerFields['CHECK_DISCOUNT'] = 'N';
                     }
                     $providerFields['PRODUCT_ID'] = $providerBasketItem['PRODUCT_ID'];
                     $providerFields['QUANTITY'] = $providerBasketItem['QUANTITY'];
                     $hasTrustData = false;
                     $trustData = static::getTrustData($siteId, $providerBasketItem['MODULE'], $providerBasketItem['PRODUCT_ID']);
                     if (static::isReadTrustData() === true && !empty($trustData) && is_array($trustData)) {
                         $hasTrustData = true;
                         $resultProductData = $trustData;
                         foreach (static::getProductDataRequiredFields() as $requiredField) {
                             if (!array_key_exists($requiredField, $resultProductData)) {
                                 $hasTrustData = false;
                                 break;
                             }
                         }
                         if ($hasTrustData && in_array('PRICE', $select)) {
                             foreach (static::getProductDataRequiredPriceFields() as $requiredField) {
                                 if (!array_key_exists($requiredField, $resultProductData)) {
                                     $hasTrustData = false;
                                     break;
                                 }
                             }
                         }
                     }
                     if (!$hasTrustData) {
                         $resultProductData = $currentUseOrderProduct ? $provider::OrderProduct($providerFields) : $provider::GetProductData($providerFields);
                     }
                     $basketCode = $providerBasketItem['BASKET_ITEM']->getBasketCode();
                     $result[$basketCode] = $resultProductData;
                 }
             } else {
                 foreach ($providerBasketItemList as $providerBasketItem) {
//.........这里部分代码省略.........
开发者ID:Satariall,项目名称:izurit,代码行数:101,代码来源:providerbase.php


示例19: OrderProduct

 /**
  * @param array $arParams
  * @return array|false
  */
 public static function OrderProduct($arParams)
 {
     $adminSection = defined('ADMIN_SECTION') && ADMIN_SECTION === true;
     $arParams['RENEWAL'] = isset($arParams['RENEWAL']) && $arParams['RENEWAL'] == 'Y' ? 'Y' : 'N';
     $arParams['CHECK_QUANTITY'] = isset($arParams['CHECK_QUANTITY']) && $arParams['CHECK_QUANTITY'] == 'N' ? 'N' : 'Y';
     $arParams['CHECK_DISCOUNT'] = isset($arParams['CHECK_DISCOUNT']) && $arParams['CHECK_DISCOUNT'] == 'N' ? 'N' : 'Y';
     $arParams['USER_ID'] = isset($arParams['USER_ID']) ? (int) $arParams['USER_ID'] : 0;
     if ($arParams['USER_ID'] < 0) {
         $arParams['USER_ID'] = 0;
     }
     $arParams['SITE_ID'] = isset($arParams['SITE_ID']) ? $arParams['SITE_ID'] : false;
     $strSiteID = $arParams['SITE_ID'];
     $arParams['BASKET_ID'] = (string) (isset($arParams['BASKET_ID']) ? $arParams['BASKET_ID'] : '0');
     $arParams['CURRENCY'] = isset($arParams['CURRENCY']) ? Currency\CurrencyManager::checkCurrencyID($arParams['CURRENCY']) : false;
     if ($arParams['CURRENCY'] === false) {
         $arParams['CURRENCY'] = CSaleLang::GetLangCurrency($strSiteID ? $strSiteID : SITE_ID);
     }
     global $USER;
     $productID = (int) $arParams['PRODUCT_ID'];
     $quantity = (double) $arParams['QUANTITY'];
     $intUserID = (int) $arParams['USER_ID'];
     $arResult = array();
     if ($adminSection) {
         if ($intUserID == 0) {
             return $arResult;
         }
         if (!($userGroups = static::getHitCache('USER_GROUPS', $intUserID))) {
             $userGroups = self::getUserGroups($intUserID);
             static::setHitCache('USER_GROUPS', $intUserID, $userGroups);
         }
         if (empty($userGroups)) {
             return $arResult;
         }
         if (!($arProduct = static::getHitCache('IBLOCK_ELEMENT_PERM_N', $productID))) {
             $dbIBlockElement = CIBlockElement::GetList(array(), array('ID' => $productID, 'ACTIVE' => 'Y', 'ACTIVE_DATE' => 'Y', 'CHECK_PERMISSION' => 'N'), false, false, array('ID', 'IBLOCK_ID', 'NAME', 'DETAIL_PAGE_URL'));
             if ($arProduct = $dbIBlockElement->GetNext()) {
                 static::setHitCache('IBLOCK_ELEMENT_PERM_N', $productID, $arProduct);
             }
             unset($dbIBlockElement);
         }
         if (empty($arProduct) || !is_array($arProduct)) {
             return $arResult;
         }
         $iblockRightByID = null;
         if (!($iblockRightByID = static::getHitCache('IBLOCK_RIGHT', $arProduct['IBLOCK_ID']))) {
             if ($iblockRightByID = CIBlock::GetArrayByID($arProduct['IBLOCK_ID'], 'RIGHTS_MODE')) {
                 static::setHitCache('IBLOCK_RIGHT', $arProduct['IBLOCK_ID'], $iblockRightByID);
             }
         }
         if ($iblockRightByID == 'E') {
             $proxyUserPermissionKey = $productID . "|" . $intUserID;
             if (!($arUserRights = static::getHitCache('USER_RIGHT', $proxyUserPermissionKey))) {
                 if ($arUserRights = CIBlockElementRights::GetUserOperations($productID, $intUserID)) {
                     static::setHitCache('USER_RIGHT', $proxyUserPermissionKey, $arUserRights);
                 }
             }
             if (empty($arUserRights) || !isset($arUserRights['element_read'])) {
                 return $arResult;
             }
             unset($arUserRights);
         } else {
             $proxyIblockPermissionKey = $arProduct['IBLOCK_ID'] . "|" . $intUserID;
             if (!($iblockPermissions = static::getHitCache('IBLOCK_PERM', $proxyIblockPermissionKey))) {
                 if ($iblockPermissions = CIBlock::GetPermission($arProduct['IBLOCK_ID'], $intUserID)) {
                     static::setHitCache('IBLOCK_PERM', $proxyIblockPermissionKey, $iblockPermissions);
                 }
             }
             if ($iblockPermissions < 'R') {
                 return $arResult;
             }
         }
     } else {
         $userGroups = $USER->GetUserGroupArray( 

鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Disk\Driver类代码示例发布时间:2022-05-23
下一篇:
PHP Element\NodeElement类代码示例发布时间: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