Example #1
0
 public function start()
 {
     $this->region_id = intval(Request::Cookie('region_id', 0));
     $this->group_id = intval(Request::GetPart(1, 0));
     $this->groups_array = GroupModel::GetList();
     $this->groups_array[0] = 'Все направления';
     $this->regions_array = RegionModel::GetList();
     $this->regions_array[0] = 'Вся Россия';
     if (!isset($this->groups_array[$this->group_id])) {
         $this->group_id = 0;
     }
     if (!isset($this->regions_array[$this->region_id])) {
         $this->region_id = 0;
     }
     $this->page_link_prefix = $this->group_id . '/';
     $this->page = intval(Request::GetPart(2, 1));
     if ($this->page == 0) {
         $this->page = 1;
     }
     $this->search = trim(Request::Get('q', ''));
     if ($this->search != '') {
         $this->SearchCommand();
     }
     Site::$search_link = Site::Link('list/' . $this->group_id . '/');
 }