Your IP : 3.132.214.111


Current Path : /home/bitrix/ext_www/dev.home-comfort.in.ua/local/components/webprofy/search.b2b.form/
Upload File :
Current File : /home/bitrix/ext_www/dev.home-comfort.in.ua/local/components/webprofy/search.b2b.form/component.php

<?
if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true){
	die();
}
/** @global CMain $APPLICATION */
/** @global CUser $USER */
/** @global CDatabase $DB */
/** @var CBitrixComponent $this */
/** @var array $arParams */
/** @var array $arResult */
/** @var string $componentName */
/** @var string $componentPath */
/** @var string $componentTemplate */
/** @var string $parentComponentName */
/** @var string $parentComponentPath */
/** @var string $parentComponentTemplate */
$this->setFrameMode(false);

if(!\Bitrix\Main\Loader::IncludeModule("search")){
	ShowError(GetMessage("SEARCH_MODULE_UNAVAILABLE"));
	return;
}

CJSCore::Init(array('popup', 'currency'));
$currencyFormat = CCurrencyLang::GetFormatDescription('RUB');

?>
<script>
    BX.Currency.setCurrencyFormat('RUB', <? echo CUtil::PhpToJSObject($currencyFormat, false, true); ?>);
</script>

<?
$templatePage = "";

//options
if(isset($_REQUEST['qf'])){
	$q = trim($_REQUEST["qf"]);
}else{
	$q = false;
}

if($q !== false){
	$arResult["REQUEST"]["~QUERY"] = $q;
	$arResult["REQUEST"]["QUERY"] = htmlspecialcharsex($q);
	$arQueries = preg_split('/\r\n|[\r\n]/', $q);
	$arResult['QUERIES'] = $arQueries;
}else{
	$arResult["REQUEST"]["~QUERY"] = false;
	$arResult["REQUEST"]["QUERY"] = false;
}

if($this->InitComponentTemplate($templatePage)){
	$template = &$this->GetTemplate();
	$arResult["FOLDER_PATH"] = $folderPath = $template->GetFolder();
	if(strlen($folderPath) > 0){
		$this->ShowComponentTemplate();
	}
}else{
	$this->__ShowError(str_replace("#PAGE#", $templatePage, str_replace("#NAME#", $this->__templateName, "Can not find '#NAME#' template with page '#PAGE#'")));
}
?>