Subversion Repositories cheapmusic

Rev

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

Rev 26 Rev 30
Line 99... Line 99...
99
        $sessData['status']['msg'] = 'Please fill all mandatory fields.'; 
99
        $sessData['status']['msg'] = 'Please fill all mandatory fields.'; 
100
    }
100
    }
101
 
101
 
102
	// Store signup status into the session
102
	// Store signup status into the session
103
    $_SESSION['sessData'] = $sessData;
103
    $_SESSION['sessData'] = $sessData;
104
    $redirectURL = ($sessData['status']['type'] == 'success')?'login.php':'registration.php';
104
    $redirectURL = ($sessData['status']['type'] == 'success')?'index.php':'registration.php';
105
	
105
	
106
	// Redirect to the home/login page
106
	// Redirect to the home/login page
107
    header("Location:".$redirectURL);
107
    header("Location:".$redirectURL);
108
	exit;
108
	exit;
109
}elseif(isset($_POST['loginSubmit'])){
109
}elseif(isset($_POST['loginSubmit'])){
Line 148... Line 148...
148
	
148
	
149
	// Store login status into the session
149
	// Store login status into the session
150
    $_SESSION['sessData'] = $sessData;
150
    $_SESSION['sessData'] = $sessData;
151
	
151
	
152
	// Redirect to the home page
152
	// Redirect to the home page
153
    header("Location:login.php");
153
    header("Location:index.php");
154
	exit;
154
	exit;
155
}elseif(isset($_POST['forgotSubmit'])){
155
}elseif(isset($_POST['forgotSubmit'])){
156
	$frmDisplay = '';
156
	$frmDisplay = '';
157
	
157
	
158
	// Get user inputs
158
	// Get user inputs
Line 251... Line 251...
251
        $sessData['status']['msg'] = 'All fields are mandatory, please fill all the fields.'; 
251
        $sessData['status']['msg'] = 'All fields are mandatory, please fill all the fields.'; 
252
    }
252
    }
253
	
253
	
254
	// Store reset password status into the session
254
	// Store reset password status into the session
255
    $_SESSION['sessData'] = $sessData;
255
    $_SESSION['sessData'] = $sessData;
256
    $redirectURL = ($sessData['status']['type'] == 'success')?'login.php':'resetPassword.php?fp_code='.$fp_code;
256
    $redirectURL = ($sessData['status']['type'] == 'success')?'index.php':'resetPassword.php?fp_code='.$fp_code;
257
	
257
	
258
	// Redirect to the login/reset pasword page
258
	// Redirect to the login/reset pasword page
259
    header("Location:".$redirectURL);
259
    header("Location:".$redirectURL);
260
	exit;
260
	exit;
261
}elseif(isset($_REQUEST['verifyEmail']) && $_REQUEST['verifyEmail'] == 1){
261
}elseif(isset($_REQUEST['verifyEmail']) && $_REQUEST['verifyEmail'] == 1){
Line 286... Line 286...
286
		$sessData['status']['msg'] = 'You have used the wrong verification link, please check your email inbox and try again.';
286
		$sessData['status']['msg'] = 'You have used the wrong verification link, please check your email inbox and try again.';
287
	}
287
	}
288
	
288
	
289
	// Store account activation status into the session
289
	// Store account activation status into the session
290
    $_SESSION['sessData'] = $sessData;
290
    $_SESSION['sessData'] = $sessData;
291
    $redirectURL = 'login.php';
291
    $redirectURL = 'index.php';
292
	
292
	
293
	//Redirect to the login page
293
	//Redirect to the login page
294
    header("Location:".$redirectURL);
294
    header("Location:".$redirectURL);
295
	exit;
295
	exit;
296
}elseif(isset($_POST['updateProfile']) && !empty($_SESSION['sessData']['userID'])){
296
}elseif(isset($_POST['updateProfile']) && !empty($_SESSION['sessData']['userID'])){
Line 474... Line 474...
474
    $sessData['status']['type'] = 'success';
474
    $sessData['status']['type'] = 'success';
475
    $sessData['status']['msg'] = 'You have logged off your account.';
475
    $sessData['status']['msg'] = 'You have logged off your account.';
476
    $_SESSION['sessData'] = $sessData;
476
    $_SESSION['sessData'] = $sessData;
477
	
477
	
478
	// Redirect to the home page
478
	// Redirect to the home page
479
    header("Location:login.php");
479
    header("Location:index.php");
480
	exit;
480
	exit;
481
}else{
481
}else{
482
	// Redirect to the home page
482
	// Redirect to the home page
483
    header("Location:login.php");
483
    header("Location:index.php");
484
	exit;
484
	exit;
485
}
485
}