male zmiany w konfiguracji, bazie danych, pare nowych funkcji w helpers, refaktoryzac...
[watermeloncms.git] / cms / wtrmln / modules / controllers / login.php
blobcfd68259a86903eda7ec450fd2a98dd6a37c5bb9
1 <?php
2 /********************************************************************
4 Watermelon CMS
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
25 private $User;
26 public function Login()
28 $this->User = new User();
29 parent::Controller();
33 * stronka z formularzem logowania
36 function Index()
38 setH1('Logowanie');
40 $this->addMeta('<style type="text/css">.loginform label{float:left;width:140px;display:block}</style>');
42 echo $this->load->view('login_form');
46 * samo logowanie
49 function Submit()
51 $login = $_POST['login'];
52 $pass = $_POST['password'];
53 $autologin = isset($_POST['autologin']);
55 $this->User->Login($login, $pass, $autologin);
57 //TODO
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()
79 //TODO