Changed to use new throw new SystemExit();
This commit is contained in:
parent
a162da4479
commit
bfe319bd2d
2 changed files with 11 additions and 11 deletions
|
@ -32,7 +32,7 @@ function add_user(){
|
||||||
if(Helpers::check_if_game_client()){
|
if(Helpers::check_if_game_client()){
|
||||||
//if registering ingame then we have to set the header and dont need to reload the template.
|
//if registering ingame then we have to set the header and dont need to reload the template.
|
||||||
header('Location: email_sent.php');
|
header('Location: email_sent.php');
|
||||||
exit;
|
throw new SystemExit();
|
||||||
}
|
}
|
||||||
$pageElements = settings();
|
$pageElements = settings();
|
||||||
$pageElements['ingame_webpath'] = $INGAME_WEBPATH;
|
$pageElements['ingame_webpath'] = $INGAME_WEBPATH;
|
||||||
|
@ -44,7 +44,7 @@ function add_user(){
|
||||||
$pageElements['no_visible_elements'] = 'TRUE';
|
$pageElements['no_visible_elements'] = 'TRUE';
|
||||||
helpers :: loadtemplate( 'register_feedback', $pageElements);
|
helpers :: loadtemplate( 'register_feedback', $pageElements);
|
||||||
}
|
}
|
||||||
exit;
|
throw new SystemExit();
|
||||||
}elseif (isset($_GET['page']) && $_GET['page']=="settings"){
|
}elseif (isset($_GET['page']) && $_GET['page']=="settings"){
|
||||||
$pageElements = array_merge(settings(), $result);
|
$pageElements = array_merge(settings(), $result);
|
||||||
// pass error and reload template accordingly
|
// pass error and reload template accordingly
|
||||||
|
@ -54,7 +54,7 @@ function add_user(){
|
||||||
$pageElements['prevEmail'] = $_POST["Email"];
|
$pageElements['prevEmail'] = $_POST["Email"];
|
||||||
$pageElements['permission'] = unserialize($_SESSION['ticket_user'])->getPermission();
|
$pageElements['permission'] = unserialize($_SESSION['ticket_user'])->getPermission();
|
||||||
helpers :: loadtemplate( 'settings', $pageElements);
|
helpers :: loadtemplate( 'settings', $pageElements);
|
||||||
exit;
|
throw new SystemExit();
|
||||||
}else{
|
}else{
|
||||||
// pass error and reload template accordingly
|
// pass error and reload template accordingly
|
||||||
$result['prevUsername'] = $_POST["Username"];
|
$result['prevUsername'] = $_POST["Username"];
|
||||||
|
@ -64,7 +64,7 @@ function add_user(){
|
||||||
$result['no_visible_elements'] = 'TRUE';
|
$result['no_visible_elements'] = 'TRUE';
|
||||||
$pageElements['ingame_webpath'] = $INGAME_WEBPATH;
|
$pageElements['ingame_webpath'] = $INGAME_WEBPATH;
|
||||||
helpers :: loadtemplate( 'register', $result);
|
helpers :: loadtemplate( 'register', $result);
|
||||||
exit;
|
throw new SystemExit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@ function write_user($newUser){
|
||||||
}catch (PDOException $e) {
|
}catch (PDOException $e) {
|
||||||
//go to error page or something, because can't access website db
|
//go to error page or something, because can't access website db
|
||||||
print_r($e);
|
print_r($e);
|
||||||
exit;
|
throw new SystemExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
|
|
@ -58,7 +58,7 @@ function change_mail(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
helpers :: loadtemplate( 'settings', $result);
|
helpers :: loadtemplate( 'settings', $result);
|
||||||
exit;
|
throw new SystemExit();
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
$result['EMAIL'] = $reply;
|
$result['EMAIL'] = $reply;
|
||||||
|
@ -73,31 +73,31 @@ function change_mail(){
|
||||||
}
|
}
|
||||||
$result['CEMAIL_ERROR'] = true;
|
$result['CEMAIL_ERROR'] = true;
|
||||||
helpers :: loadtemplate( 'settings', $result);
|
helpers :: loadtemplate( 'settings', $result);
|
||||||
exit;
|
throw new SystemExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
//ERROR: permission denied!
|
//ERROR: permission denied!
|
||||||
$_SESSION['error_code'] = "403";
|
$_SESSION['error_code'] = "403";
|
||||||
header("Location: index.php?page=error");
|
header("Location: index.php?page=error");
|
||||||
exit;
|
throw new SystemExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
//ERROR: The form was not filled in correctly
|
//ERROR: The form was not filled in correctly
|
||||||
header("Location: index.php?page=settings");
|
header("Location: index.php?page=settings");
|
||||||
exit;
|
throw new SystemExit();
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
//ERROR: user is not logged in
|
//ERROR: user is not logged in
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
exit;
|
throw new SystemExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
}catch (PDOException $e) {
|
}catch (PDOException $e) {
|
||||||
//go to error page or something, because can't access website db
|
//go to error page or something, because can't access website db
|
||||||
print_r($e);
|
print_r($e);
|
||||||
exit;
|
throw new SystemExit();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue