function __construct($url = 0, array $params) { parent::__construct($url, $params); if ($this->opt > 0) { $model = new Models_Buy($params, $this->opt); $view = new Views_Main($model->returnData, $form); } }
function __construct($url = 0, array $params) { parent::__construct($url, $params); if ($this->opt === 'list') { $model = new Models_Tags($params); $view = new Views_Main($model->returnData); } else { $id = $this->opt[3]; $model = new Models_Tag($params, $this->opt); $view = new Views_Main($model->returnData); } }
function __construct($url = 0, array $params) { parent::__construct($url, $params); if ($this->opt === 'list') { $model = new Models_Articles($params); $view = new Views_Main($model->returnData); } else { if ($_COOKIE["auth"] != 'true') { $view = new Views_Main('Sorry you need to <a href="http://' . $_SERVER['SERVER_NAME'] . '/fnx_journals/user/login"><b>sign in</b></a> for view articles'); } else { $ar_id = $this->opt[3]; $model = new Models_Article($params, $this->opt); $view = new Views_Main($model->returnData); } } }
function __construct($url = 0, array $params) { parent::__construct($url, $params); if ($this->opt === 'login') { $server = $_SERVER['SERVER_NAME']; if ($_COOKIE["auth"] == 'true') { $view = new Views_Main("<h1>You are allready logged</h1>"); } else { require_once 'Templates/AuthForm.tpl'; $view = new Views_Main('', $form); } } if ($this->opt === 'logout') { setcookie('auth', null, -1, "/", false); header("Location: http://{$_SERVER['SERVER_NAME']}/fnx_journals/articles"); die; } }