<?php
/**
 * class _controller
 *
 * Description for class _controller
 *
 * @author:
*/
namespace area\presenter\controller;

use core\controller;
use core\url;
use core\user;

class _controller extends controller {
	public function __construct() {
		global $__template;
		
		$__template->setTemplateDir(__DIR__."/../views/");

		if(user::auth("user")) {
			if(!user::is_authorization()) {
				$url = "";
				if(isset($_SERVER["REQUEST_URI"]) && !empty($_SERVER["REQUEST_URI"])) {
					$url = "?url={$_SERVER["REQUEST_URI"]}";
				}

				url::redirectAction("logowanie{$url}", "", "", "");
			}

			$this->viewError("access");
		}

		parent::__construct();
	}
}
?>