'', 'pwd' => '', 'firm' => ''); //////// �������� ������ function add_auth($log, $pwd, $firm) { $this->cont['log'] = $log; $this->cont['pwd'] = $pwd; $this->cont['firm'] = $firm; } function clear_data() { $this->cont['log'] = ''; $this->cont['pwd'] = ''; $this->cont['firm'] = ''; } } ?>query('select count(*) from city order by cname '); $ex = $at->fetch_array($res); $val = $ex[0]/4; $cities .= '
��� ������
'; $flag = 2; $res = $at->query('select * from city order by cname '); while($row = $at->fetch_array($res)) { if($flag > $val+1){ $cities .= ''; $flag=1; } //$am = amount_obj($row['c_id']); $cities .= '
'.stripslashes($row['cname']).'
'; if(isset($city) && $city == $row['c_id'])$city_display = stripslashes($row['cname']); $flag++; } if($city_display == '')$city_display = '��� ������'; $city_display = $city_display; $at->elem['SCITY'] = $cities.''; $at->elem['CITY_VAL'] = $city; ///////////////////// ����� ������� $str = ''; $res = $at->query('select DISTINCT b.id as id, b.baner as baner, b.alt as alt, b.adres as adres, b.url as url, b.type_img as type_img from baners b, baners_city c WHERE b.stat = \'1\' AND '.(($city != '-1' && $city != '')?'c.city = \''.$city.'\' ':'c.city = \'0\'').' AND c.id_baner = b.id order by id '); $i=0; while($row = $at->fetch_array($res)){ $str .= '
'.stripslashes($row['baner']).'
'.stripslashes($row['alt']).'
'.stripslashes($row['adres']).'
'; $i++; } if($i-1 < 9)$str .= '
'.$row['alt'].'
'; //'' $at->elem['ARRAY_BAN'] = $str; $at->elem['AMB'] = (($i < 10)?$j:$i); if(isset($city) && $city != '' && $razd == ''){ $str = '��������� ������
    '; $query = 'select distinct f.firm_id as firm_id, f.fname as fname from firms_kat k, firms f where f.firm_id = k.firm_id and f.stat = \'1\' AND f.city = \''.$city.'\' AND k.categories_id=\'4384\' order by f.tarif DESC, f.fname '; $res = $at->query($query); while($row = $at->fetch_array($res)) { $str .= '
  • '.stripslashes($row['fname']).'
    '; } $at->elem['RESTOURANT'] = $str.'
'; $str = '

��������� ������
    '; $query = 'select distinct f.firm_id as firm_id, f.fname as fname from firms_kat k, firms f where f.firm_id = k.firm_id and f.stat = \'1\' AND f.city = \''.$city.'\' AND k.categories_id=\'4795\' order by f.tarif DESC, f.fname '; $res = $at->query($query); while($row = $at->fetch_array($res)) { $str .= '
  • '.stripslashes($row['fname']).'
    '; } $at->elem['HOTELS'] = $str.'
'; } else { $at->elem['HOTELS'] = ''; $at->elem['RESTOURANT'] = ''; } //////////////////////// ����� ������� ������ �� ������� $res = $at->query('select txt from strings WHERE city ='.(($city != '-1' && $city != '')?$city:'0')); $row = $at->fetch_array($res); if(trim($row[0]) == ''){ $res = $at->query('select txt from strings WHERE city =0'); $row = $at->fetch_array($res); } $at->elem['string'] = stripslashes($row[0]); //////////////////////// ����� ����� ������� ������ $res = $at->query('select txt from strings WHERE city =-1'); $row = $at->fetch_array($res); $at->elem['string1'] = stripslashes($row[0]); } @include_once dirname(__FILE__).'/system.php'; function cities_kat(){ global $at; global $city; global $city_display, $last_razd, $razd, $rubr, $podrubr, $key1, $let; //$am = amount_obj(""); $res = $at->query('select count(*) from city order by cname '); $ex = $at->fetch_array($res); $val = $ex[0]/3; $cities .= '

��� ������
'; $flag = 2; $res = $at->query('select * from city order by cname '); while($row = $at->fetch_array($res)) { if($flag > $val){ $cities .= ''; $flag=1; } //$am = amount_obj($row['c_id']); $cities .= '
'.stripslashes($row['cname']).'
'; if(isset($city) && $city == $row['c_id'])$city_display = stripslashes($row['cname']); $flag++; } if($city_display == '')$city_display = '��� ������'; $city_display = $city_display; $at->elem['SCITY'] = $cities.''; $at->elem['CITY_VAL'] = $city; ///////////////////// ����� ������� $str = ''; $res = $at->query('select DISTINCT b.id as id, b.baner as baner, b.alt as alt, b.adres as adres, b.url as url, b.type_img as type_img from baners b, baners_city c WHERE b.stat = \'1\' AND '.(($city != '-1' && $city != '')?'c.city = \''.$city.'\' ':'c.city = \'0\'').' AND c.id_baner = b.id order by id '); $i=0; while($row = $at->fetch_array($res)){ $str .= '
   '.stripslashes($row['baner']).'
   '.stripslashes($row['alt']).'
   '.stripslashes($row['adres']).'
'; $i++; } if($i-1 < 9)for($j=$i; $j<10; $j++)$str .= '
'.$row['alt'].'
'; //'' $at->elem['ARRAY_BAN'] = $str; $at->elem['AMB'] = (($i < 10)?$j:$i); if(isset($city) && $city != '' && $razd == ''){ $str = '��������� ������
    '; $query = 'select distinct f.firm_id as firm_id, f.fname as fname from firms_kat k, firms f where f.firm_id = k.firm_id and f.stat = \'1\' AND f.city = \''.$city.'\' AND k.categories_id=\'4384\' order by f.tarif DESC, f.fname '; $res = $at->query($query); while($row = $at->fetch_array($res)) { $str .= '
  • '.stripslashes($row['fname']).'
    '; } $at->elem['RESTOURANT'] = $str.'
'; $str = '

��������� ������
    '; $query = 'select distinct f.firm_id as firm_id, f.fname as fname from firms_kat k, firms f where f.firm_id = k.firm_id and f.stat = \'1\' AND f.city = \''.$city.'\' AND k.categories_id=\'4795\' order by f.tarif DESC, f.fname '; $res = $at->query($query); while($row = $at->fetch_array($res)) { $str .= '
  • '.stripslashes($row['fname']).'
    '; } $at->elem['HOTELS'] = $str.'
'; } else { $at->elem['HOTELS'] = ''; $at->elem['RESTOURANT'] = ''; } //////////////////////// ����� ������� ������ �� ������� $res = $at->query('select txt from strings WHERE city ='.(($city != '-1' && $city != '')?$city:'0')); $row = $at->fetch_array($res); if(trim($row[0]) == ''){ $res = $at->query('select txt from strings WHERE city =0'); $row = $at->fetch_array($res); } $at->elem['string'] = stripslashes($row[0]); //////////////////////// ����� ����� ������� ������ $res = $at->query('select txt from strings WHERE city =-1'); $row = $at->fetch_array($res); $at->elem['string1'] = stripslashes($row[0]); } function cities1(){ global $at; global $city; $cities = '

  • '.$rubr_destination.'
    '; else if($r1 != '')$rubr_destination = '
  • '.$rubr_destination.'
    '; else $rubr_destination = '
  • '.$rubr_destination.'
    '; return $rubr_destination; } function rubriks1(){ global $at, $rowRR; $rubr_destination = ''; $resRRR = $at->query('SELECT categories_id, categories_name, parent_id FROM categories WHERE categories_id = '.$rowRR[0]); $rowRRR = $at->fetch_array($resRRR); $rubr_destination .= ' - '.stripslashes($rowRRR[1]); $r = $rowRR[0]; if($rowRRR[2] != 0){ $resRRR = $at->query('SELECT categories_id, categories_name, parent_id FROM categories WHERE categories_id = '.$rowRRR[2]); $rowRRR = $at->fetch_array($resRRR); $rubr_destination = stripslashes($rowRRR[1]).$rubr_destination; $r1 = $rowRRR[0]; } if($rowRRR[2] != 0){ $resRRR = $at->query('SELECT categories_id, categories_name, parent_id FROM categories WHERE categories_id = '.$rowRRR[2]); $rowRRR = $at->fetch_array($resRRR); $rubr_destination = stripslashes($rowRRR[1]).' - '.$rubr_destination; $r2 = $rowRRR[0]; } $rubr_destination = $rubr_destination.'
    '; return $rubr_destination; } // ������� ������ �������� � ���� function menu_view(){ global $at, $cnt, $str, $razdel, $podrazdel, $rubrika, $podrubrika, $city, $razd, $rubr, $check_podrubr, $last_razd, $podrubr, $f; $at->elem['RAZD'] = $razd; $at->elem['RUBRIKA'] = $rubr; $check_podrubr=1; $at->elem['PODRUBRIKA'] = $podrubr; $at->elem['LAST'] = $last_razd; } ?>