Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
103 - 1
<?php
2
/***************************************************************************
3
 *   Copyright (C) 2009-2011 by Geo Varghese(www.seopanel.in)  	   *
4
 *   sendtogeo@gmail.com   						   *
5
 *                                                                         *
6
 *   This program is free software; you can redistribute it and/or modify  *
7
 *   it under the terms of the GNU General Public License as published by  *
8
 *   the Free Software Foundation; either version 2 of the License, or     *
9
 *   (at your option) any later version.                                   *
10
 *                                                                         *
11
 *   This program is distributed in the hope that it will be useful,       *
12
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
13
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
14
 *   GNU General Public License for more details.                          *
15
 *                                                                         *
16
 *   You should have received a copy of the GNU General Public License     *
17
 *   along with this program; if not, write to the                         *
18
 *   Free Software Foundation, Inc.,                                       *
19
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
20
 ***************************************************************************/
21
include_once("includes/sp-load.php");
22
if(isLoggedIn() && ($_GET['sec'] != 'logout')){
23
	redirectUrl(SP_WEBPATH."/");
24
}
25
include_once(SP_CTRLPATH."/user.ctrl.php");
26
$controller = New UserController();
27
$controller->view->menu = 'login';
28
 
29
// set site details according to customizer plugin
30
$custSiteInfo = getCustomizerDetails();
31
$siteName = !empty($custSiteInfo['site_name']) ? $custSiteInfo['site_name'] : "Seo Panel";
32
$controller->set('spTitle', "$siteName: Login section");
33
$controller->set('spDescription', "Login to $siteName and utilise seo tools and plugins to increase the perfomance of your site.");
34
$controller->set('spKeywords', "$siteName Login section");
35
 
36
if($_SERVER['REQUEST_METHOD'] == 'POST'){
37
 
38
	switch($_POST['sec']){
39
 
40
		case "login":
41
			$controller->login();
42
			break;
43
 
44
		case "requestpass":
45
			$controller->set('spTitle', "$siteName forgot password");
46
			$controller->requestPassword($_POST['email']);
47
            break;
48
 
49
		default:
50
			$controller->index();
51
			break;
52
	}
53
 
54
}else{
55
	switch($_GET['sec']){
56
 
57
		case "logout":
58
			$controller->logout();
59
			break;
60
 
61
		case "forgot":
62
			$controller->set('spTitle', "$siteName forgot password");
63
			$controller->forgotPasswordForm();
64
			break;
65
 
66
		default:
67
			$controller->index($_GET);
68
			break;
69
	}
70
}
71
 
72
?>