Немного маленьких исправлений — чистка старых путей.
This commit is contained in:
parent
491c2321da
commit
89b42198c9
|
@ -3,17 +3,11 @@
|
|||
class Controller_Login extends Controller_Template {
|
||||
public $template = 'login';
|
||||
public function action_view() {
|
||||
if(Auth::instance()->logged_in()){
|
||||
if (Auth::instance()->logged_in(array('admin')) === FALSE) return $this->request->redirect('events/view');
|
||||
return $this->request->redirect('overview/view');
|
||||
}
|
||||
if(Auth::instance()->logged_in()) return $this->request->redirect('');
|
||||
if ($_POST){
|
||||
$user = ORM::factory('user');
|
||||
$status = Auth::instance()->login($_POST['login'], $_POST['password']);
|
||||
if ($status){
|
||||
if (Auth::instance()->logged_in(array('admin')) === FALSE) return $this->request->redirect('events/view');
|
||||
return $this->request->redirect('overview/view');
|
||||
}
|
||||
if ($status) return $this->request->redirect('');
|
||||
else $this->template->error = "Неверный логин или пароль.";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
</div>
|
||||
<div id="footer">Наши конкурсы -- самые быстрые конкурсы! Не доверяйте подделкам!<!--<?php echo $years ?>--></div>
|
||||
<div id="footer">Наши конкурсы — самые быстрые конкурсы! Не доверяйте подделкам!<!--<?php echo $years ?>--></div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Reference in a new issue