Don't cache redirects

This commit is contained in:
kaetemi 2014-09-03 07:36:10 +02:00
parent 37e0201a5f
commit 88ca2ab7e9
34 changed files with 86 additions and 0 deletions

View file

@ -21,12 +21,14 @@ function activate_plugin() {
if ( $result ) if ( $result )
{ {
// if result is successfull it redirects and shows success message // if result is successfull it redirects and shows success message
header("Cache-Control: max-age=1");
header( "Location: index.php?page=plugins&result=3" ); header( "Location: index.php?page=plugins&result=3" );
throw new SystemExit(); throw new SystemExit();
} }
else else
{ {
//if result is unsuccessfull it redirects and throws error //if result is unsuccessfull it redirects and throws error
header("Cache-Control: max-age=1");
header( "Location: index.php?page=plugins&result=4" ); header( "Location: index.php?page=plugins&result=4" );
throw new SystemExit(); throw new SystemExit();
} }
@ -34,6 +36,7 @@ function activate_plugin() {
else else
{ {
//if $_GET variable is not set it redirects and shows error //if $_GET variable is not set it redirects and shows error
header("Cache-Control: max-age=1");
header( "Location: index.php?page=plugins&result=4" ); header( "Location: index.php?page=plugins&result=4" );
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -30,6 +30,7 @@ function add_sgroup(){
require($SITEBASE . '/inc/sgroup_list.php'); require($SITEBASE . '/inc/sgroup_list.php');
$result= array_merge($result, sgroup_list()); $result= array_merge($result, sgroup_list());
return $result; return $result;
header("Cache-Control: max-age=1");
/*if (Helpers::check_if_game_client()) { /*if (Helpers::check_if_game_client()) {
header("Location: ".$INGAME_WEBPATH."?page=sgroup_list"); header("Location: ".$INGAME_WEBPATH."?page=sgroup_list");
}else{ }else{
@ -40,11 +41,13 @@ function add_sgroup(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -29,6 +29,7 @@ function add_user(){
$status = write_user( $edit ); $status = write_user( $edit );
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("Cache-Control: max-age=1");
header('Location: email_sent.php'); header('Location: email_sent.php');
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -36,8 +36,10 @@ function add_user_to_sgroup(){
//$result= array_merge($result, show_sgroup()); //$result= array_merge($result, show_sgroup());
//helpers :: loadtemplate( 'show_sgroup', $result); //helpers :: loadtemplate( 'show_sgroup', $result);
if (Helpers::check_if_game_client()) { if (Helpers::check_if_game_client()) {
header("Cache-Control: max-age=1");
header("Location: ".$INGAME_WEBPATH."?page=show_sgroup&id=".$id); header("Location: ".$INGAME_WEBPATH."?page=show_sgroup&id=".$id);
}else{ }else{
header("Cache-Control: max-age=1");
header("Location: ".$WEBPATH."?page=show_sgroup&id=".$id); header("Location: ".$WEBPATH."?page=show_sgroup&id=".$id);
} }
throw new SystemExit(); throw new SystemExit();
@ -45,11 +47,13 @@ function add_user_to_sgroup(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -102,17 +102,20 @@ function change_info(){
}else{ }else{
//ERROR: permission denied! //ERROR: permission denied!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: The form was not filled in correclty //ERROR: The form was not filled in correclty
header("Cache-Control: max-age=1");
header("Location: index.php?page=settings"); header("Location: index.php?page=settings");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: user is not logged in //ERROR: user is not logged in
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -78,17 +78,20 @@ function change_mail(){
}else{ }else{
//ERROR: permission denied! //ERROR: permission denied!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: The form was not filled in correclty //ERROR: The form was not filled in correclty
header("Cache-Control: max-age=1");
header("Location: index.php?page=settings"); header("Location: index.php?page=settings");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: user is not logged in //ERROR: user is not logged in
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -71,17 +71,20 @@ function change_password(){
}else{ }else{
//ERROR: permission denied! //ERROR: permission denied!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: The form was not filled in correclty //ERROR: The form was not filled in correclty
header("Cache-Control: max-age=1");
header("Location: index.php?page=settings"); header("Location: index.php?page=settings");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: user is not logged in //ERROR: user is not logged in
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -23,8 +23,10 @@ function change_receivemail(){
WebUsers::setReceiveMail($user_id, $receiveMail); WebUsers::setReceiveMail($user_id, $receiveMail);
} }
if (Helpers::check_if_game_client()) { if (Helpers::check_if_game_client()) {
header("Cache-Control: max-age=1");
header("Location: ".$INGAME_WEBPATH."?page=settings&id=".$user_id); header("Location: ".$INGAME_WEBPATH."?page=settings&id=".$user_id);
}else{ }else{
header("Cache-Control: max-age=1");
header("Location: ".$WEBPATH."?page=settings&id=".$user_id); header("Location: ".$WEBPATH."?page=settings&id=".$user_id);
} }
throw new SystemExit(); throw new SystemExit();
@ -32,17 +34,20 @@ function change_receivemail(){
}else{ }else{
//ERROR: permission denied! //ERROR: permission denied!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: The form was not filled in correclty //ERROR: The form was not filled in correclty
header("Cache-Control: max-age=1");
header("Location: index.php?page=settings"); header("Location: index.php?page=settings");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: user is not logged in //ERROR: user is not logged in
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -31,8 +31,10 @@ function create_ticket(){
$ticket_id = Ticket::create_Ticket($title, $content, $category, $author, unserialize($_SESSION['ticket_user'])->getTUserId(),0, $_POST); $ticket_id = Ticket::create_Ticket($title, $content, $category, $author, unserialize($_SESSION['ticket_user'])->getTUserId(),0, $_POST);
//redirect to the new ticket. //redirect to the new ticket.
if (Helpers::check_if_game_client()) { if (Helpers::check_if_game_client()) {
header("Cache-Control: max-age=1");
header("Location: ".$INGAME_WEBPATH."?page=show_ticket&id=".$ticket_id); header("Location: ".$INGAME_WEBPATH."?page=show_ticket&id=".$ticket_id);
}else{ }else{
header("Cache-Control: max-age=1");
header("Location: ".$WEBPATH."?page=show_ticket&id=".$ticket_id); header("Location: ".$WEBPATH."?page=show_ticket&id=".$ticket_id);
} }
throw new SystemExit(); throw new SystemExit();
@ -41,6 +43,7 @@ function create_ticket(){
//ERROR: LIB DB is not online! //ERROR: LIB DB is not online!
print_r($e); print_r($e);
throw new SystemExit(); throw new SystemExit();
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }
@ -48,17 +51,20 @@ function create_ticket(){
}else{ }else{
//ERROR: permission denied! //ERROR: permission denied!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: The form was not filled in correclty //ERROR: The form was not filled in correclty
header("Cache-Control: max-age=1");
header("Location: index.php?page=create_ticket"); header("Location: index.php?page=create_ticket");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: user is not logged in //ERROR: user is not logged in
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -22,12 +22,15 @@ function deactivate_plugin() {
if ( $result ) if ( $result )
{ {
// if result is successfull it redirects and shows success message // if result is successfull it redirects and shows success message
header("Cache-Control: max-age=1");
header( "Location: index.php?page=plugins&result=5" ); header( "Location: index.php?page=plugins&result=5" );
throw new SystemExit(); throw new SystemExit();
} }
else else
{ {
// if result is unsuccessfull it redirects and shows success message // if result is unsuccessfull it redirects and shows success message
header("Cache-Control: max-age=1");
header( "Location: index.php?page=plugins&result=6" ); header( "Location: index.php?page=plugins&result=6" );
throw new SystemExit(); throw new SystemExit();
@ -36,6 +39,7 @@ function deactivate_plugin() {
else else
{ {
//if $_GET variable is not set it redirects and shows error //if $_GET variable is not set it redirects and shows error
header("Cache-Control: max-age=1");
header( "Location: index.php?page=plugins&result=6" ); header( "Location: index.php?page=plugins&result=6" );
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -29,6 +29,7 @@ function delete_plugin() {
$db -> delete( 'plugins', array( 'id' => $id ), "Id=:id" ); $db -> delete( 'plugins', array( 'id' => $id ), "Id=:id" );
//if result successfull redirect and show success message //if result successfull redirect and show success message
header("Cache-Control: max-age=1");
header( "Location: index.php?page=plugins&result=2" ); header( "Location: index.php?page=plugins&result=2" );
throw new SystemExit(); throw new SystemExit();
@ -36,6 +37,7 @@ function delete_plugin() {
else else
{ {
// if result unsuccessfull redirect and show error message // if result unsuccessfull redirect and show error message
header("Cache-Control: max-age=1");
header( "Location: index.php?page=plugins&result=0" ); header( "Location: index.php?page=plugins&result=0" );
throw new SystemExit(); throw new SystemExit();
} }
@ -44,6 +46,7 @@ function delete_plugin() {
else else
{ {
// if result unsuccessfull redirect and show error message // if result unsuccessfull redirect and show error message
header("Cache-Control: max-age=1");
header( "Location: index.php?page=plugins&result=0" ); header( "Location: index.php?page=plugins&result=0" );
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -125,6 +125,7 @@ function install_plugin() {
$dbr -> insert( "plugins", $install_result ); $dbr -> insert( "plugins", $install_result );
// if everything is successfull redirecting to the plugin template // if everything is successfull redirecting to the plugin template
header("Cache-Control: max-age=1");
header( "Location: index.php?page=plugins&result=1" ); header( "Location: index.php?page=plugins&result=1" );
throw new SystemExit(); throw new SystemExit();
} }
@ -132,6 +133,7 @@ function install_plugin() {
{ {
// file .info not exists // file .info not exists
rmdir( $target_path ); rmdir( $target_path );
header("Cache-Control: max-age=1");
header( "Location: index.php?page=install_plugin&result=2" ); header( "Location: index.php?page=install_plugin&result=2" );
throw new SystemExit(); throw new SystemExit();
} }
@ -139,6 +141,7 @@ function install_plugin() {
} else } else
{ {
// extraction failed // extraction failed
header("Cache-Control: max-age=1");
header( "Location: index.php?page=install_plugin&result=0" ); header( "Location: index.php?page=install_plugin&result=0" );
throw new SystemExit(); throw new SystemExit();
} }
@ -293,6 +296,7 @@ function checkForUpdate( $fileName, $findPath, $tempFile, $tempPath )
$update['UpdatePath'] = $tempPath . "/" . trim( $fileName, ".zip" ) . "_" . $result['Version'] . ".zip"; $update['UpdatePath'] = $tempPath . "/" . trim( $fileName, ".zip" ) . "_" . $result['Version'] . ".zip";
$update['UpdateInfo'] = json_encode( $result ); $update['UpdateInfo'] = json_encode( $result );
$dbr -> insert( "updates", $update ); $dbr -> insert( "updates", $update );
header("Cache-Control: max-age=1");
header( "Location: index.php?page=plugins&result=7" ); header( "Location: index.php?page=plugins&result=7" );
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -33,6 +33,7 @@ function login(){
//go back to the index page. //go back to the index page.
header("Cache-Control: max-age=1");
if (Helpers::check_if_game_client()) { if (Helpers::check_if_game_client()) {
header( 'Location: '. $INGAME_WEBPATH . $GETString); header( 'Location: '. $INGAME_WEBPATH . $GETString);
}else{ }else{

View file

@ -44,6 +44,7 @@ function modify_email_of_sgroup(){
//require_once($SITEBASE . 'inc/show_sgroup.php'); //require_once($SITEBASE . 'inc/show_sgroup.php');
//$result= array_merge($result, show_sgroup()); //$result= array_merge($result, show_sgroup());
//helpers :: loadtemplate( 'show_sgroup', $result); //helpers :: loadtemplate( 'show_sgroup', $result);
header("Cache-Control: max-age=1");
if (Helpers::check_if_game_client()) { if (Helpers::check_if_game_client()) {
header("Location: ".$INGAME_WEBPATH."?page=show_sgroup&id=".$sgroupid); header("Location: ".$INGAME_WEBPATH."?page=show_sgroup&id=".$sgroupid);
}else{ }else{
@ -54,11 +55,13 @@ function modify_email_of_sgroup(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -41,6 +41,7 @@ function reply_on_ticket(){
$newPriority = filter_var($_POST['ChangePriority'], FILTER_SANITIZE_NUMBER_INT); $newPriority = filter_var($_POST['ChangePriority'], FILTER_SANITIZE_NUMBER_INT);
Ticket::updateTicketStatusAndPriority($ticket_id,$newStatus, $newPriority, $author); Ticket::updateTicketStatusAndPriority($ticket_id,$newStatus, $newPriority, $author);
} }
header("Cache-Control: max-age=1");
if (Helpers::check_if_game_client()) { if (Helpers::check_if_game_client()) {
header("Location: ".$INGAME_WEBPATH."?page=show_ticket&id=".$ticket_id); header("Location: ".$INGAME_WEBPATH."?page=show_ticket&id=".$ticket_id);
}else{ }else{
@ -58,11 +59,13 @@ function reply_on_ticket(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -30,6 +30,7 @@ function update_plugin() {
$db -> delete( "updates", array( 'id' => $row['s.no'] ), "s.no=:id" ); $db -> delete( "updates", array( 'id' => $row['s.no'] ), "s.no=:id" );
// if update is installed succesffully redirect to show success message // if update is installed succesffully redirect to show success message
header("Cache-Control: max-age=1");
header( "Location: index.php?page=plugins&result=8" ); header( "Location: index.php?page=plugins&result=8" );
throw new SystemExit(); throw new SystemExit();

View file

@ -22,6 +22,7 @@ function change_permission(){
//execute change. //execute change.
Ticket_User::change_permission(Ticket_User::constr_ExternId($user_id)->getTUserId(), $value); Ticket_User::change_permission(Ticket_User::constr_ExternId($user_id)->getTUserId(), $value);
header("Cache-Control: max-age=1");
if (Helpers::check_if_game_client()) { if (Helpers::check_if_game_client()) {
header("Location: ".$INGAME_WEBPATH."?page=show_user&id=".$user_id); header("Location: ".$INGAME_WEBPATH."?page=show_user&id=".$user_id);
}else{ }else{
@ -32,6 +33,7 @@ function change_permission(){
}else{ }else{
//ERROR: GET PARAMS not given or trying to change admin //ERROR: GET PARAMS not given or trying to change admin
header("Cache-Control: max-age=1");
if (Helpers::check_if_game_client()) { if (Helpers::check_if_game_client()) {
header("Location: ".$INGAME_WEBPATH."?page=show_user&id=".$user_id); header("Location: ".$INGAME_WEBPATH."?page=show_user&id=".$user_id);
}else{ }else{
@ -43,6 +45,7 @@ function change_permission(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
@ -50,6 +53,7 @@ function change_permission(){
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -17,6 +17,7 @@ function createticket(){
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
@ -47,6 +48,7 @@ function createticket(){
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -29,6 +29,7 @@ function dashboard(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
@ -36,6 +37,7 @@ function dashboard(){
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -17,6 +17,7 @@ function login() {
$_SESSION['id'] = WebUsers::getId($result['name']); $_SESSION['id'] = WebUsers::getId($result['name']);
$_SESSION['ticket_user'] = serialize(Ticket_User::constr_ExternId($_SESSION['id'])); $_SESSION['ticket_user'] = serialize(Ticket_User::constr_ExternId($_SESSION['id']));
//go back to the index page. //go back to the index page.
header("Cache-Control: max-age=1");
if (Helpers::check_if_game_client()) { if (Helpers::check_if_game_client()) {
header('Location: ' . $INGAME_WEBPATH); header('Location: ' . $INGAME_WEBPATH);
} else { } else {

View file

@ -32,6 +32,7 @@ function plugins()
} else { } else {
// ERROR: No access! // ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header( "Location: index.php?page=error" ); header( "Location: index.php?page=error" );
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -30,6 +30,7 @@ function plugins_update()
} else { } else {
// ERROR: No access! // ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header( "Location: index.php?page=error" ); header( "Location: index.php?page=error" );
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -25,6 +25,7 @@ function reset_password(){
}else{ }else{
global $WEBPATH; global $WEBPATH;
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: ".$WEBPATH."?page=error"); header("Location: ".$WEBPATH."?page=error");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -12,6 +12,7 @@ function settings(){
if(($_GET['id'] != $_SESSION['id']) && (!Ticket_User::isMod(unserialize($_SESSION['ticket_user']))) ){ if(($_GET['id'] != $_SESSION['id']) && (!Ticket_User::isMod(unserialize($_SESSION['ticket_user']))) ){
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
}else{ }else{
@ -47,6 +48,7 @@ function settings(){
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Location: index.php"); header("Location: index.php");
header("Cache-Control: max-age=1");
throw new SystemExit(); throw new SystemExit();
} }
} }

View file

@ -16,6 +16,7 @@ function sgroup_list(){
if(isset($_GET['delete']) && Ticket_User::isAdmin(unserialize($_SESSION['ticket_user']))){ if(isset($_GET['delete']) && Ticket_User::isAdmin(unserialize($_SESSION['ticket_user']))){
$delete_id = filter_var($_GET['delete'], FILTER_SANITIZE_NUMBER_INT); $delete_id = filter_var($_GET['delete'], FILTER_SANITIZE_NUMBER_INT);
$result['delete'] = Support_Group::deleteSupportGroup( $delete_id); $result['delete'] = Support_Group::deleteSupportGroup( $delete_id);
header("Cache-Control: max-age=1");
if (Helpers::check_if_game_client()) { if (Helpers::check_if_game_client()) {
header("Location: ".$INGAME_WEBPATH."?page=sgroup_list"); header("Location: ".$INGAME_WEBPATH."?page=sgroup_list");
}else{ }else{
@ -33,11 +34,13 @@ function sgroup_list(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -148,6 +148,7 @@ function show_queue(){
//ERROR: Doesn't exist! //ERROR: Doesn't exist!
$_SESSION['error_code'] = "404"; $_SESSION['error_code'] = "404";
header("Cache-Control: max-age=1");
header("Location: ams?page=error"); header("Location: ams?page=error");
throw new SystemExit(); throw new SystemExit();
} }
@ -155,11 +156,13 @@ function show_queue(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -43,11 +43,13 @@ function show_reply(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -20,6 +20,7 @@ function show_sgroup(){
if(isset($_GET['delete']) && Ticket_User::isAdmin(unserialize($_SESSION['ticket_user']))){ if(isset($_GET['delete']) && Ticket_User::isAdmin(unserialize($_SESSION['ticket_user']))){
$delete_id = filter_var($_GET['delete'], FILTER_SANITIZE_NUMBER_INT); $delete_id = filter_var($_GET['delete'], FILTER_SANITIZE_NUMBER_INT);
$result['delete'] = Support_Group::deleteUserOfSupportGroup( $delete_id, $result['target_id'] ); $result['delete'] = Support_Group::deleteUserOfSupportGroup( $delete_id, $result['target_id'] );
header("Cache-Control: max-age=1");
if (Helpers::check_if_game_client()) { if (Helpers::check_if_game_client()) {
header("Location: ".$INGAME_WEBPATH."?page=show_sgroup&id=" . $result['target_id']); header("Location: ".$INGAME_WEBPATH."?page=show_sgroup&id=" . $result['target_id']);
}else{ }else{
@ -64,6 +65,7 @@ function show_sgroup(){
//ERROR: No page specified! //ERROR: No page specified!
$_SESSION['error_code'] = "404"; $_SESSION['error_code'] = "404";
header("Cache-Control: max-age=1");
header("Location: ams?page=error"); header("Location: ams?page=error");
throw new SystemExit(); throw new SystemExit();
} }
@ -71,11 +73,13 @@ function show_sgroup(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -82,11 +82,13 @@ function show_ticket(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -49,11 +49,13 @@ function show_ticket_info(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -67,11 +67,13 @@ function show_ticket_log(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -41,11 +41,13 @@ function show_user(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }
}else{ }else{
//ERROR: not logged in! //ERROR: not logged in!
header("Cache-Control: max-age=1");
header("Location: index.php"); header("Location: index.php");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -30,6 +30,7 @@ function syncing(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }

View file

@ -30,6 +30,7 @@ function userlist(){
}else{ }else{
//ERROR: No access! //ERROR: No access!
$_SESSION['error_code'] = "403"; $_SESSION['error_code'] = "403";
header("Cache-Control: max-age=1");
header("Location: index.php?page=error"); header("Location: index.php?page=error");
throw new SystemExit(); throw new SystemExit();
} }