View file top_reit/rustats.su/system/controller/site.class.php

File size: 1.78Kb
<?php
/**
-------------------------------------------------------------
* Главная страница, основные функции
*
* @application         PHPage Engine
* @support             http://phpage.ru
* @copyright           Copyright (c) 2014 PHPage Group
* @author              http://phpage.ru/PHPage-Group
* @documentation       http://phpage.ru/documentation
* @license             license.txt (see attached file)
* @instruction         readme.txt (see attached file)
* @file                /system/controller/site.class.php
-------------------------------------------------------------
*/

class site{
	public function index(){
		Template::head(Core::$config['name_site']);
		Template::run(__CLASS__, 'index');
		Template::foot();
	}
	
	/* 
	* Страница не найдена
	*/
	public function notFound(){
		Template::head('Страница не найдена');
		Template::run(__CLASS__, 'err');
		Template::foot();
	}
	
	public function statistic(){
		Template::head('Общая статистика');
		Template::run(__CLASS__, 'statistic');
		Template::foot();
	}
		public function br_stat(){
		Template::head('Общая статистика');
		Template::run(__CLASS__, 'br_stat');
		Template::foot();
	}
		public function contacts(){
		Template::head('Контакты');
		Template::run(__CLASS__, 'partnerships');
		Template::foot();
	}
	
	public function us(){
		if(isset($_GET['get']) && Core::count("SELECT COUNT(*) FROM `users` WHERE `id` = ?", array($_GET['get'])) == true){
		$title = Core::query("SELECT * FROM `users` WHERE `id` = ?", array($_GET['get'])) -> fetch();	
                Template::head(Protect::title($title['login']));
			Template::run(__CLASS__, 'profile');
			Template::foot();
		}else{
			Core::redirect('/', 'Профиль не найден');
		}}

}
?>