<?
header ("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header ("Cache-Control: no-cache, must-revalidate");
header ("Pragma: no-cache");
header("content-type: application/x-javascript; charset=windows-1251");
$data=$_GET['data'];
$val=$_GET['val'];
if ($data=='country') {
echo "<select name='country' onChange=\"dochange('sity', this.value), dochange('hotels', this.value)\">\n";
echo "<option value=''>-----Выбрать-----</option>\n";
$resCountry = CIBlock::GetList(Array(),Array('TYPE'=>'country','ACTIVE'=>'Y',));
while($ar_res = $resCountry->Fetch()){
echo "<option value=\"$ar_res['IBLOCK_ID']\">$ar_res['NAME']</option> \n";
}
}
if ($data=='sity') {
echo "<select name='sity' multiple>\n";
$resSity = CIBlockSection::GetList(Array(), Array("IBLOCK_ID"=>IntVal($val)));
while($ar_result = $db_list->GetNext())
{ echo "<option value=\"$ar_result['ID']\">$ar_result['NAME']</option> \n"; }
}
}
else if ($data=='hotel') {
echo "<select name='hotel' multiple>\n";
$res = CIBlockElement::GetList(Array(), Array("IBLOCK_ID"=>IntVal($val), "ACTIVE"=>"Y");
while($ar_fields = $res->GetNext())
{
echo "<option value=\"$ar_fields['ID']\">$ar_fields['NAME']</option> \n";
}
}
echo "</select>\n";
?> |