Subversion Repositories cheapmusic

Rev

Rev 26 | Rev 30 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 26 Rev 29
Line 20... Line 20...
20
// Get session data
20
// Get session data
21
$sessData = !empty($_SESSION['sessData'])?$_SESSION['sessData']:array();
21
$sessData = !empty($_SESSION['sessData'])?$_SESSION['sessData']:array();
22
 
22
 
23
// Redirect to homepage if user not logged in
23
// Redirect to homepage if user not logged in
24
$userLoggedIn = (!empty($sessData['userLoggedIn']) && !empty($sessData['userID']))?true:false;
24
$userLoggedIn = (!empty($sessData['userLoggedIn']) && !empty($sessData['userID']))?true:false;
-
 
25
 
25
switch($pageFile){
26
switch($pageFile){
26
	case 'account.php':
27
	case 'account.php':
27
	case 'editAccount.php':
28
	case 'editAccount.php':
28
	case 'changePassword.php':
29
	case 'changePassword.php':
29
		if($userLoggedIn){
30
		if($userLoggedIn){
Line 53... Line 54...
53
			header("Location: account.php");
54
			header("Location: account.php");
54
			exit();
55
			exit();
55
		}
56
		}
56
		break;
57
		break;
57
	case 'login.php':
58
	case 'login.php':
-
 
59
	case 'index.php':
58
		if($userLoggedIn){
60
		if($userLoggedIn){
59
			header("Location: account.php");
61
			header("Location: account.php");
60
			exit();
62
			exit();
61
		}else{
63
		}else{
62
			// Include social login handler
64
			// Include social login handler