<? if (!$sSerachForm) { ?>
<form action="<?=$bp.'search.php'?>" method="post" name="form_edit" id="form_edit" >
<fieldset style="background-color:#CFE6FE">
<table cellpadding="0" cellspacing="0" border=0 width="100%">
<tr>
<td >
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width=200 id="text_search"><input style="width: 200px" type="text" name="text_search" value="<?=urldecode($_GET['text_search'])?>"></td>
<td>
<input type="checkbox" name="sz" <? if($_GET['sz']) echo 'checked'; ?> > только в заголовках
<input type="checkbox" name="fy" <? if($_GET['fy']) echo 'checked'; ?> > с фото
<?
if(!$id_firm)
{
?>
<input type="radio" name="pols" checked value="0"> Все
<input type="radio" name="pols" value="1" <? if(intval($_GET['pols'])==1) echo 'checked'; ?>> Частные
<input type="radio" name="pols" value="2" <? if(intval($_GET['pols'])==2)echo 'checked'; ?> > Компании
<?
}
?>
</td>
<td>
N <input size="12" type="text" name="number_ob" value="<?=$number_ob?>">
</td>
<td width="50">
<input type="image" name="submit" border="0" src="<?=$bp.'icon/poisk.png';?>">
</td>
</tr>
</table>
</td>
</tr>
<tr><td><table cellpadding="0" cellspacing="0">
<tr>
<?
for ($i=0; $i<4; $i++)
{
?>
<td id="reg_<?=$i?>">
<?
if(count($arr_regions[$tree_reg[$i]]))
{
?>
<select style="width: 150px" name="region_<?=$i?>"
<?
if(!$i)
{
?>
onChange="search_reg(<?=$i?>, this.value, this.value, 0); return false">
<?
}
else
{
?>
onChange="search_reg(<?=$i?>, this.value, <?=$glob_region?>, <?=$tree_reg[$i]?>); return false">
<?
}
?>
<option value="0">любое расположение</option>
<?
foreach($arr_regions[$tree_reg[$i]] as $index=>$arr_region)
{
?>
<option value="<?=$index?>" <? if($tree_reg[($i+1)]==$index) echo 'selected'; ?> ><?=$arr_region?></option>
<?
}
?>
</select>
<input type="hidden" name="name_reg_<?=$i?>" id="name_reg_<?=$i?>" value="<?=$arr_regions_url[$tree_reg[$i]][$tree_reg[($i+1)]]?>">
<?
}
?>
</td>
<?
}
?>
<td id="reg_4"></td>
<td><input type="hidden" size=70 id="zapros_q" name="zapros_q" value=""></td>
</tr>
</table></td></tr>
<tr><td><table cellpadding="0" cellspacing="0" >
<tr>
<?
for ($i=0; $i<4; $i++)
{
?>
<td id="cat_<?=$i?>">
<?
if(count($arr_razdel[$tree_cat[$i]]))
{
?>
<select style="width: 150px" name="razdel_<?=$i?>" onChange="search_cat(<?=$i?>, this.value); return false">
<option value="0">все разделы</option>
<?
foreach($arr_razdel[$tree_cat[$i]] as $index=>$raz)
{
?>
<option value="<?=$index?>" <? if($tree_cat[($i+1)]==$index) echo 'selected'; ?> ><?=$raz?></option>
<?
}
?>
</select>
<input type="hidden" name="name_cat_<?=$i?>" id="name_cat_<?=$i?>" value="<?=$arr_razdel_url[$tree_cat[$i]][$tree_cat[($i+1)]]?>">
<?
}
?>
</td>
<?
}
?>
<td id="cat_4"></td>
<td></td>
</tr>
</table></td></tr>
<tr>
<td id="param">
<?
if($arr_field)
{
foreach($arr_field as $ar_fi)
{
if(($ar_fi['spec']=='st' || $ar_fi['spec']=='sp') && $ar_fi['field_search'])
{
eval("field_func_search_".$ar_fi['field_typ']." ('add', \$ar_fi, \$data[\$ar_fi['field_field']]);");
}
}
}
?>
</td>
</tr>
</table>
</fieldset>
<input type="hidden" name="id_firm" value="<?=$id_firm?>">
</form>
<? } ?>