country($_GET['country']); $ret = '

ТУРИЗМ

'; $last = null; $countries = array(); $nr = $this->db->query('SELECT menu.id, menu.name, menu.href, countries.id, countries.name FROM countries LEFT JOIN menu ON countries.id=menu.country_id ORDER BY countries.ord, menu.id', __FILE__, __LINE__); for($i = 0; $i < $nr; $i++) { list($menu_id, $name, $href, $id, $country) = $this->db->frow(__FILE__, __LINE__); if($last == null or $id != $last->id) { $last = new Country($id, $country); array_push($countries, $last); } if($menu_id > 0) { $menu = new Menu($menu_id, $name, $href); $last->add_menu($menu); } } $tmp = (int)(count($countries) / 4); $tmp *= 4; for($i = 0; $i < count($countries); $i++) { $country = $countries[$i]; if($i % 4 == 0) $ret .= ' '; $ret .= ' name.'
'; $menu = $country->menu; for($j = 0; $j < count($menu); $j++) { $ret .= ' '; if($this->admin != null) $ret .= ' '; /* авиаперелеты
спецпредложения
па?тк?для турист?/a>
stop-sale
экскурси?/a>
подбор тура
визы
катало?/a>
'; if($this->admin != null) $ret .= '
';*/ $ret .= ' '; } $ret .= '
'.$menu[$j]->name.'
'; if($this->admin != null) $ret .= '
Добавить страницу
'; $ret .= ' '; } $ret .= '
'; return $ret; } private function country($id) { $nr = $this->db->query('SELECT menu.id, menu.name, menu.href, countries.name FROM countries LEFT JOIN menu ON countries.id=menu.country_id WHERE countries.id='.$id, __FILE__, __LINE__); if($nr == 0) { $this->is404 = true; return false; } $c; for($i = 0; $i < $nr; $i++) { list($menu_id, $name, $href, $country) = $this->db->frow(__FILE__, __LINE__); if($i == 0) $c = new Country($id, $country); if($menu_id > 0) { $m = new Menu($menu_id, $name, $href); $c->add_menu($m); } } if(isset($_GET['type'])) return $this->withType($id, $c->name, $_GET['type']); $ret = '
Туризм > '.$c->name.'
'.$c->name.'
'; $menu = $c->menu; for($i = 0; $i < count($menu); $i++) { $ret .= ' '.$menu[$i]->name.'
'; } $ret .= '
'; return $ret; } private function withType($id, $name, $type) { if($type == 'avia') $t = 'авиаперелеты'; else if($type == 'spo') $t = 'спецпредложения'; else if($type == 'mmb') $t = 'па?тк?для турист?; else if($type == 'stopsale') $t = 'stop-sale'; else if($type == 'ekskurs') $t = 'экскурси?; else if($type == 'podbor') $t = 'подбор тура'; else if($type == 'visa') $t = 'визы'; else if($type == 'catalog') $t = 'катало?; $ret = '
Туризм > '.$name.' > '.$t.'
'; $src = 'http://book.teztour.com/book/vc/blank/'; if($type == 'avia') $src .= 'avia_reference?country='.$id.'&avia_airport='.$this->air[$id]; else if($type == 'spo') $src .= 'spo?country='.$id.'&city=345'; else if($type == 'mmb') $src = 'http://teztour.com/book/vc/site_c/s/i-page/visa/visa_'.$id.'?country='.$id.'&city=345'; else if($type == 'stopsale') $src .= 's/stopsale?country='.$id; else if($type == 'ekskurs') $src = 'http://teztour.com/book/vc/site_c/s/ekskurs?country='.$id.'&city=345'; else if($type == 'podbor') $src .= 'tourSearch?tsChoosedCountryId='.$id.'&tsChoosedRegionId=0'; else if($type == 'visa') $src = 'http://teztour.com/book/vc/site_c/s/i-page/visa/visa_'.$id.'?country='.$id; else if($type == 'catalog') $src .= 'catalog_search?fCountry='.$id.'&refilter=1&fName=&fNameStartsWith=0&fHotelType=&fSpo='; $ret .= '
'; return $ret; } protected function getTitle() { return $this->title; } protected function getDescription() { return $this->description; } protected function getKeywords() { return $this->keywords; } private $title = 'Туризм. Турагентство. teztour ru. те?ту? tez tour. тезтур.'; private $description = 'Туризм. Турагентство. teztour ru. те?ту? tez tour. тезтур.'; private $keywords = 'Туризм. Турагентство. teztour ru. те?ту? tez tour. тезтур.'; private $air = array(166775 => 107214, 7067498 => 111918, 5733 => 30882, 1104 => 3, 5732 => 842, 12695 => 664, 111137 => 40216, 111241 => 39984); } $page = new TourismPage(); ?>