2 /********************************************************************
6 Copyright 2008 Radosław Pietruszewski
8 This program is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 version 2 as published by the Free Software Foundation.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 ********************************************************************/
23 class Login
extends Controller
26 public function Login()
28 $this->User
= new User();
33 * stronka z formularzem logowania
40 $this->addMeta('<style type="text/css">.loginform label{float:left;width:140px;display:block}</style>');
42 echo $this->load
->view('login_form');
51 $login = $_POST['login'];
52 $pass = $_POST['password'];
53 $autologin = isset($_POST['autologin']);
55 $this->User
->Login($login, $pass, $autologin);
61 * formularz przysłania nowego hasła
64 function SendNewPassword()
66 setH1('Formularz wysyłania nowego hasła');
68 $this->addMeta('<style type="text/css">.sendpassform label{float:left;width:150px;display:block}}</style>');
70 echo $this->load
->view('login_sendnewpassword');
74 * przysyłanie nowego hasła (walidacja itd.)
77 function SendNewPasswordSubmit()