ose $this->__statistic_closedata(TENDERS_LIST,"tender"); $this->__statistic_closedata(BARTER_LIST,"barter"); $this->__statistic_closedata(PRICE_LIST,"price"); $this->__statistic_closedata(PRESENT_LIST,"present"); // Активируем всё, что нужно активировать $this->__statistic_activate(NEWS_LIST,"news"); $this->__statistic_activate(PRESENT_LIST,"present"); $this->__statistic_activate(PRESS_LIST,"press"); $this->__statistic_activate(PRICE_LIST,"price"); $_DATA['REQUEST_URI']=$_SERVER['REQUEST_URI']; return $_DATA; } // первая страница сайта function index(){ $_DATA['company_folder']=$this->__mainframe_cataloguelist(COMPANY_CATALOGUE,"company"); // Теперь нужно показать листинг того, что есть. $sql = " SELECT tl.*,tt.name_tender_type FROM ".TENDERS_LIST." tl,".TENDERS_TYPE." tt WHERE tl.tender_status = 'view' AND tt.id_type = tl.id_tender_type ORDER BY tl.tender_data_add DESC LIMIT 10"; $_DATA['tender_list'] =parent::$DB->getdata_array_sql($sql); $key="tender"; $_DATA['tender_list']=$this->is_datacontrol_list($_DATA['tender_list'],array($key."_data_add"=>"data_add",$key."_data_update"=>"data_update",$key."_data_close"=>"data_close",$key."_data_start"=>"data_start"),"format_date"); // теперь объявлений $sql = " SELECT bl.* FROM ".BOARD_LIST." bl WHERE bl.board_status = 'view' ORDER BY bl.board_data_add DESC LIMIT 10"; $_DATA['board_list']=parent::$DB->getdata_array_sql($sql); $key="board"; $_DATA['board_list']=$this->is_datacontrol_list($_DATA['board_list'],array($key."_data_add"=>"data_add",$key."_data_update"=>"data_update",$key."_data_close"=>"data_close",$key."_data_start"=>"data_start"),"format_date"); $_DATA['board_list']=$this->is_datacontrol_list($_DATA['board_list'],array("board_message"=>"board_message"),"short_version"); // Общая статистика $_DATA['all_tenders']=$this->__statistic_info(TENDERS_LIST,array("field"=>"tender_status","value"=>"view")); $_DATA['all_board']=$this->__statistic_info(BOARD_LIST,array("field"=>"board_status","value"=>"view")); return parent::$HTML->ini_insert("main_index.tpl",$_DATA); } function _404(){ return "Ошибка 404"; } } ?>