|
|
@ -30,14 +30,14 @@ 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;
|
|
|
|
die();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$pageElements['status'] = $status;
|
|
|
|
$pageElements['status'] = $status;
|
|
|
|
$pageElements['no_visible_elements'] = 'TRUE';
|
|
|
|
$pageElements['no_visible_elements'] = 'TRUE';
|
|
|
|
$pageElements['ingame_webpath'] = $INGAME_WEBPATH;
|
|
|
|
$pageElements['ingame_webpath'] = $INGAME_WEBPATH;
|
|
|
|
helpers :: loadtemplate( 'register_feedback', $pageElements);
|
|
|
|
helpers :: loadtemplate( 'register_feedback', $pageElements);
|
|
|
|
exit;
|
|
|
|
die();
|
|
|
|
}elseif ($_POST['page']=="settings"){
|
|
|
|
}elseif (isset($_POST['page']) && $_POST['page']=="settings"){
|
|
|
|
// pass error and reload template accordingly
|
|
|
|
// pass error and reload template accordingly
|
|
|
|
$result['prevUsername'] = $_POST["Username"];
|
|
|
|
$result['prevUsername'] = $_POST["Username"];
|
|
|
|
$result['prevPassword'] = $_POST["Password"];
|
|
|
|
$result['prevPassword'] = $_POST["Password"];
|
|
|
@ -45,7 +45,7 @@ function add_user(){
|
|
|
|
$result['prevEmail'] = $_POST["Email"];
|
|
|
|
$result['prevEmail'] = $_POST["Email"];
|
|
|
|
$result['no_visible_elements'] = 'TRUE';
|
|
|
|
$result['no_visible_elements'] = 'TRUE';
|
|
|
|
helpers :: loadtemplate( 'settings', $result);
|
|
|
|
helpers :: loadtemplate( 'settings', $result);
|
|
|
|
exit;
|
|
|
|
die();
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
// pass error and reload template accordingly
|
|
|
|
// pass error and reload template accordingly
|
|
|
|
$result['prevUsername'] = $_POST["Username"];
|
|
|
|
$result['prevUsername'] = $_POST["Username"];
|
|
|
@ -55,7 +55,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;
|
|
|
|
die();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -83,9 +83,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;
|
|
|
|
die();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return $result;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|