<?php 
/**
------------------------------------------------------------------------
* Авторизация, регистрация, выход
*
* @application         PHPage Core
* @support             http://phpage.ru
* @copyright           Copyright (c) 2014 PHPage Group
* @author              http://phpage.ru/PHPage/Group
* @documentation       http://phpage.ru/documentation
* @license             http://phpage.ru/license.txt (see attached file)
* @instruction         http://phpage.ru/readme.txt (see attached file)
* @file                /system/controller/enter.class.php
------------------------------------------------------------------------
*/

class enter{
	public function login(){
		User::aut(false);
		
		require_once  MODEL.'enter.class.php';
		$enter = new enter_model();
		$enter -> login_post();
		
		Template::head('Войти');
		Template::run(__CLASS__, 'login');
		Template::foot();
	}
	
	public function logout(){
		User::aut(false);
		
		require_once  MODEL.'enter.class.php';
		$exit = new enter_model();
		$exit -> logout();
	}
		public function them(){		
		require_once  MODEL.'enter.class.php';
		$exit = new enter_model();
		$exit -> them();
	}
	public function registration(){
		User::aut(false);
		
		require_once  MODEL.'enter.class.php';
		$enter = new enter_model();
		$enter -> reg_post();
		
		Template::head('Регистрация');
		Template::run(__CLASS__, 'registration');
		Template::foot();
	}
}
?>