Технические характеристики преведены в соответствие с тех.документацией
производителя и могут отличатся от реальных.
0 )
{
$o=round($meters*0.18);
echo "";
}
?>
0 ) $where="meters>=$meters";
if( $speed>0 && $meters>0 ) $where="meters>=$meters and speed>=$speed";
$w2='';
$aaa="WHERE ";
if( strlen($where)>0 || $speed>0 ) $aaa="and ";
if( $l2=='t' and $l4=='t' ) $w2="$aaa (l2='t' or l4='t')";
if( $l2=='t' and $l4=='f' ) $w2="$aaa l2='t'";
if( $l2=='f' and $l4=='t' ) $w2="$aaa l4='t'";
if(strlen($where)==0)
{
if ($speed>0 )
{
$q="SELECT * FROM modem WHERE maxspeed>=$speed $w2 ORDER BY $sort";
#$rec=pg_exec($h,"SELECT * FROM modem WHERE maxspeed>=$speed $w2 ORDER BY $sort");
}
else
{
$q="SELECT * FROM modem $w2 ORDER BY $sort";
#$rec=pg_exec($h,"SELECT * FROM modem $w2 ORDER BY $sort");
}
}
else
{
$q="SELECT * FROM modem WHERE id IN (SELECT id FROM speed WHERE $where) $w2 ORDER BY $sort";
#$rec=pg_exec($h,"SELECT * FROM modem WHERE id IN (SELECT id FROM speed WHERE $where) $w2 ORDER BY name");
}
# echo "$q
";
$rec=pg_exec($h,"$q");
$rec_c=pg_numrows($rec);
$color1="#e0e0e0";
$color2="#f0f0f0";
for($i=0;$i<$rec_c;$i++)
{
$id=pg_result($rec,$i,'id');
$model=pg_result($rec,$i,'name');
$maxspeed=pg_result($rec,$i,'maxspeed');
$price=pg_result($rec,$i,'price');
$note=pg_result($rec,$i,'note');
$url=pg_result($rec,$i,'url');
$l2=pg_result($rec,$i,'l2');
$l4=pg_result($rec,$i,'l4');
$lcd=pg_result($rec,$i,'lcd');
$rec2=pg_exec($h,"SELECT * FROM speed WHERE id=$id ORDER BY speed DESC");
if(pg_numrows($rec2)==0) $km='?';
else $km=pg_result($rec2,0,'meters')/1000.0;
if($i%2==0)echo "