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