<?php

if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
    die;
}
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/ibe/classes/js_lang/formtools.php";
$APPLICATION->AddHeadString(GetFormToolsStrings());
$APPLICATION->AddHeadString($arResult['SCRIPT']);
/* Диапазон дат */
$bShowDateRange = isset($GLOBALS['arParams']['DISPLAY_MATRIX']) && $GLOBALS['arParams']['DISPLAY_MATRIX'] == 'Y' && $GLOBALS['arParams']['FARES_DISPLAY_TYPE'] != 'SPLIT_FARES';
//trace($arResult);
$minDate = 0;
$curMonth = date('n');
$curYear = date('y');
$curFullYear = date('Y');
$arMonths = explode(',', GetMessage('monthNamesShort'));
foreach ($arMonths as &$month) {
    //  $month = mb_strtolower(str_replace('\'', '', $month), LANG_CHARSET);
    $month = str_replace('\'', '', $month);
}
echo $arResult['SCRIPT'];
?>

<?php 
if ($arResult["~SHOW_FORM"]) {
    ?>
<form action="<?php 
    echo $arResult['form_action'];
    ?>
" class="form-order clearfix" method="post" name="reg_form" onsubmit="
<?php 
<?php

require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/ibe/classes/ibe/utils.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/ibe/classes/ibe/tools/points.php';
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/ibe/classes/js_lang/formtools.php";
echo GetFormToolsStrings();
$USE_AUTOCOMPLETE = !count($arResult['points']) && true == $arParams["USE_AUTOCOMPLETE"];
// Использовать автозаполнение, если используются поля для ввода пунктов и разрешено автозаполнение
require_once "tools.php";
$minDate = 0;
$curMonth = date('n');
$curYear = date('y');
$curFullYear = date('Y');
$arMonths = explode(',', GetMessage('monthNamesShort'));
foreach ($arMonths as &$month) {
    //$month = mb_strtolower(str_replace('\'', '', $month), LANG_CHARSET);
    $month = str_replace('\'', '', $month);
}
?>

<div id="ts_ag_quick_reservation_form">
	<h2 class="caption"><?php 
echo GetMessage('TS_SHORTFORM_CAPTION');
?>
</h2>
	<div class="ext_form clearfix">
		<form method="post" action="<?php 
echo $arResult['form_action'];
?>
" onsubmit="return checkForm(this);" name="reg_form">
			<input type="hidden" name="next_page" value="<?php