From 5053969491a2704a1dd647266366ba19fb91ab95 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 3 Sep 2014 07:36:10 +0200 Subject: [PATCH] Don't cache redirects --- code/web/public_php/ams/func/activate_plugin.php | 3 +++ code/web/public_php/ams/func/add_sgroup.php | 3 +++ code/web/public_php/ams/func/add_user.php | 1 + code/web/public_php/ams/func/add_user_to_sgroup.php | 4 ++++ code/web/public_php/ams/func/change_info.php | 3 +++ code/web/public_php/ams/func/change_mail.php | 3 +++ code/web/public_php/ams/func/change_password.php | 3 +++ code/web/public_php/ams/func/change_receivemail.php | 5 +++++ code/web/public_php/ams/func/create_ticket.php | 6 ++++++ code/web/public_php/ams/func/deactivate_plugin.php | 4 ++++ code/web/public_php/ams/func/delete_plugin.php | 3 +++ code/web/public_php/ams/func/install_plugin.php | 4 ++++ code/web/public_php/ams/func/login.php | 1 + code/web/public_php/ams/func/modify_email_of_sgroup.php | 3 +++ code/web/public_php/ams/func/reply_on_ticket.php | 3 +++ code/web/public_php/ams/func/update_plugin.php | 1 + code/web/public_php/ams/inc/change_permission.php | 4 ++++ code/web/public_php/ams/inc/createticket.php | 2 ++ code/web/public_php/ams/inc/dashboard.php | 2 ++ code/web/public_php/ams/inc/login.php | 1 + code/web/public_php/ams/inc/plugins.php | 1 + code/web/public_php/ams/inc/plugins_update.php | 1 + code/web/public_php/ams/inc/reset_password.php | 1 + code/web/public_php/ams/inc/settings.php | 2 ++ code/web/public_php/ams/inc/sgroup_list.php | 3 +++ code/web/public_php/ams/inc/show_queue.php | 3 +++ code/web/public_php/ams/inc/show_reply.php | 2 ++ code/web/public_php/ams/inc/show_sgroup.php | 4 ++++ code/web/public_php/ams/inc/show_ticket.php | 2 ++ code/web/public_php/ams/inc/show_ticket_info.php | 2 ++ code/web/public_php/ams/inc/show_ticket_log.php | 2 ++ code/web/public_php/ams/inc/show_user.php | 2 ++ code/web/public_php/ams/inc/syncing.php | 1 + code/web/public_php/ams/inc/userlist.php | 1 + 34 files changed, 86 insertions(+) diff --git a/code/web/public_php/ams/func/activate_plugin.php b/code/web/public_php/ams/func/activate_plugin.php index 5d1d2b8fb..27de82ae2 100644 --- a/code/web/public_php/ams/func/activate_plugin.php +++ b/code/web/public_php/ams/func/activate_plugin.php @@ -21,12 +21,14 @@ function activate_plugin() { if ( $result ) { // if result is successfull it redirects and shows success message + header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=3" ); throw new SystemExit(); } else { //if result is unsuccessfull it redirects and throws error + header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=4" ); throw new SystemExit(); } @@ -34,6 +36,7 @@ function activate_plugin() { else { //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" ); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/add_sgroup.php b/code/web/public_php/ams/func/add_sgroup.php index c1823e2b0..ca7141731 100644 --- a/code/web/public_php/ams/func/add_sgroup.php +++ b/code/web/public_php/ams/func/add_sgroup.php @@ -30,6 +30,7 @@ function add_sgroup(){ require($SITEBASE . '/inc/sgroup_list.php'); $result= array_merge($result, sgroup_list()); return $result; + header("Cache-Control: max-age=1"); /*if (Helpers::check_if_game_client()) { header("Location: ".$INGAME_WEBPATH."?page=sgroup_list"); }else{ @@ -40,11 +41,13 @@ function add_sgroup(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/add_user.php b/code/web/public_php/ams/func/add_user.php index 612b8bc88..09cef717a 100644 --- a/code/web/public_php/ams/func/add_user.php +++ b/code/web/public_php/ams/func/add_user.php @@ -29,6 +29,7 @@ function add_user(){ $status = write_user( $edit ); if(Helpers::check_if_game_client()){ //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'); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/add_user_to_sgroup.php b/code/web/public_php/ams/func/add_user_to_sgroup.php index d797edf25..876d15e8a 100644 --- a/code/web/public_php/ams/func/add_user_to_sgroup.php +++ b/code/web/public_php/ams/func/add_user_to_sgroup.php @@ -36,8 +36,10 @@ function add_user_to_sgroup(){ //$result= array_merge($result, show_sgroup()); //helpers :: loadtemplate( 'show_sgroup', $result); if (Helpers::check_if_game_client()) { + header("Cache-Control: max-age=1"); header("Location: ".$INGAME_WEBPATH."?page=show_sgroup&id=".$id); }else{ + header("Cache-Control: max-age=1"); header("Location: ".$WEBPATH."?page=show_sgroup&id=".$id); } throw new SystemExit(); @@ -45,11 +47,13 @@ function add_user_to_sgroup(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/change_info.php b/code/web/public_php/ams/func/change_info.php index f9534e93d..8b346f025 100644 --- a/code/web/public_php/ams/func/change_info.php +++ b/code/web/public_php/ams/func/change_info.php @@ -102,17 +102,20 @@ function change_info(){ }else{ //ERROR: permission denied! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: The form was not filled in correclty + header("Cache-Control: max-age=1"); header("Location: index.php?page=settings"); throw new SystemExit(); } }else{ //ERROR: user is not logged in + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/change_mail.php b/code/web/public_php/ams/func/change_mail.php index 14f0c5f4c..706c18a58 100644 --- a/code/web/public_php/ams/func/change_mail.php +++ b/code/web/public_php/ams/func/change_mail.php @@ -78,17 +78,20 @@ function change_mail(){ }else{ //ERROR: permission denied! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: The form was not filled in correclty + header("Cache-Control: max-age=1"); header("Location: index.php?page=settings"); throw new SystemExit(); } }else{ //ERROR: user is not logged in + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/change_password.php b/code/web/public_php/ams/func/change_password.php index cc86462f5..aa2e74947 100644 --- a/code/web/public_php/ams/func/change_password.php +++ b/code/web/public_php/ams/func/change_password.php @@ -71,17 +71,20 @@ function change_password(){ }else{ //ERROR: permission denied! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: The form was not filled in correclty + header("Cache-Control: max-age=1"); header("Location: index.php?page=settings"); throw new SystemExit(); } }else{ //ERROR: user is not logged in + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/change_receivemail.php b/code/web/public_php/ams/func/change_receivemail.php index 0dc43d145..62dcfd79f 100644 --- a/code/web/public_php/ams/func/change_receivemail.php +++ b/code/web/public_php/ams/func/change_receivemail.php @@ -23,8 +23,10 @@ function change_receivemail(){ WebUsers::setReceiveMail($user_id, $receiveMail); } if (Helpers::check_if_game_client()) { + header("Cache-Control: max-age=1"); header("Location: ".$INGAME_WEBPATH."?page=settings&id=".$user_id); }else{ + header("Cache-Control: max-age=1"); header("Location: ".$WEBPATH."?page=settings&id=".$user_id); } throw new SystemExit(); @@ -32,17 +34,20 @@ function change_receivemail(){ }else{ //ERROR: permission denied! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: The form was not filled in correclty + header("Cache-Control: max-age=1"); header("Location: index.php?page=settings"); throw new SystemExit(); } }else{ //ERROR: user is not logged in + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/create_ticket.php b/code/web/public_php/ams/func/create_ticket.php index 6b725387c..cdc07cf8f 100644 --- a/code/web/public_php/ams/func/create_ticket.php +++ b/code/web/public_php/ams/func/create_ticket.php @@ -31,8 +31,10 @@ function create_ticket(){ $ticket_id = Ticket::create_Ticket($title, $content, $category, $author, unserialize($_SESSION['ticket_user'])->getTUserId(),0, $_POST); //redirect to the new ticket. if (Helpers::check_if_game_client()) { + header("Cache-Control: max-age=1"); header("Location: ".$INGAME_WEBPATH."?page=show_ticket&id=".$ticket_id); }else{ + header("Cache-Control: max-age=1"); header("Location: ".$WEBPATH."?page=show_ticket&id=".$ticket_id); } throw new SystemExit(); @@ -41,6 +43,7 @@ function create_ticket(){ //ERROR: LIB DB is not online! print_r($e); throw new SystemExit(); + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } @@ -48,17 +51,20 @@ function create_ticket(){ }else{ //ERROR: permission denied! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: The form was not filled in correclty + header("Cache-Control: max-age=1"); header("Location: index.php?page=create_ticket"); throw new SystemExit(); } }else{ //ERROR: user is not logged in + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/deactivate_plugin.php b/code/web/public_php/ams/func/deactivate_plugin.php index addb4d0ea..645b0779f 100644 --- a/code/web/public_php/ams/func/deactivate_plugin.php +++ b/code/web/public_php/ams/func/deactivate_plugin.php @@ -22,12 +22,15 @@ function deactivate_plugin() { if ( $result ) { // if result is successfull it redirects and shows success message + header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=5" ); + throw new SystemExit(); } else { // if result is unsuccessfull it redirects and shows success message + header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=6" ); throw new SystemExit(); @@ -36,6 +39,7 @@ function deactivate_plugin() { else { //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" ); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/delete_plugin.php b/code/web/public_php/ams/func/delete_plugin.php index 502f223fd..3ecd60329 100644 --- a/code/web/public_php/ams/func/delete_plugin.php +++ b/code/web/public_php/ams/func/delete_plugin.php @@ -29,6 +29,7 @@ function delete_plugin() { $db -> delete( 'plugins', array( 'id' => $id ), "Id=:id" ); //if result successfull redirect and show success message + header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=2" ); throw new SystemExit(); @@ -36,6 +37,7 @@ function delete_plugin() { else { // if result unsuccessfull redirect and show error message + header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=0" ); throw new SystemExit(); } @@ -44,6 +46,7 @@ function delete_plugin() { else { // if result unsuccessfull redirect and show error message + header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=0" ); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/install_plugin.php b/code/web/public_php/ams/func/install_plugin.php index d7b5755f0..61c9573cc 100644 --- a/code/web/public_php/ams/func/install_plugin.php +++ b/code/web/public_php/ams/func/install_plugin.php @@ -125,6 +125,7 @@ function install_plugin() { $dbr -> insert( "plugins", $install_result ); // if everything is successfull redirecting to the plugin template + header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=1" ); throw new SystemExit(); } @@ -132,6 +133,7 @@ function install_plugin() { { // file .info not exists rmdir( $target_path ); + header("Cache-Control: max-age=1"); header( "Location: index.php?page=install_plugin&result=2" ); throw new SystemExit(); } @@ -139,6 +141,7 @@ function install_plugin() { } else { // extraction failed + header("Cache-Control: max-age=1"); header( "Location: index.php?page=install_plugin&result=0" ); throw new SystemExit(); } @@ -293,6 +296,7 @@ function checkForUpdate( $fileName, $findPath, $tempFile, $tempPath ) $update['UpdatePath'] = $tempPath . "/" . trim( $fileName, ".zip" ) . "_" . $result['Version'] . ".zip"; $update['UpdateInfo'] = json_encode( $result ); $dbr -> insert( "updates", $update ); + header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=7" ); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/login.php b/code/web/public_php/ams/func/login.php index 0e71d57ca..7d665d532 100644 --- a/code/web/public_php/ams/func/login.php +++ b/code/web/public_php/ams/func/login.php @@ -33,6 +33,7 @@ function login(){ //go back to the index page. + header("Cache-Control: max-age=1"); if (Helpers::check_if_game_client()) { header( 'Location: '. $INGAME_WEBPATH . $GETString); }else{ diff --git a/code/web/public_php/ams/func/modify_email_of_sgroup.php b/code/web/public_php/ams/func/modify_email_of_sgroup.php index 8ea3708f9..e806989ce 100644 --- a/code/web/public_php/ams/func/modify_email_of_sgroup.php +++ b/code/web/public_php/ams/func/modify_email_of_sgroup.php @@ -44,6 +44,7 @@ function modify_email_of_sgroup(){ //require_once($SITEBASE . 'inc/show_sgroup.php'); //$result= array_merge($result, show_sgroup()); //helpers :: loadtemplate( 'show_sgroup', $result); + header("Cache-Control: max-age=1"); if (Helpers::check_if_game_client()) { header("Location: ".$INGAME_WEBPATH."?page=show_sgroup&id=".$sgroupid); }else{ @@ -54,11 +55,13 @@ function modify_email_of_sgroup(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/reply_on_ticket.php b/code/web/public_php/ams/func/reply_on_ticket.php index 2d625bf41..41845f03a 100644 --- a/code/web/public_php/ams/func/reply_on_ticket.php +++ b/code/web/public_php/ams/func/reply_on_ticket.php @@ -41,6 +41,7 @@ function reply_on_ticket(){ $newPriority = filter_var($_POST['ChangePriority'], FILTER_SANITIZE_NUMBER_INT); Ticket::updateTicketStatusAndPriority($ticket_id,$newStatus, $newPriority, $author); } + header("Cache-Control: max-age=1"); if (Helpers::check_if_game_client()) { header("Location: ".$INGAME_WEBPATH."?page=show_ticket&id=".$ticket_id); }else{ @@ -58,11 +59,13 @@ function reply_on_ticket(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/func/update_plugin.php b/code/web/public_php/ams/func/update_plugin.php index 025dd8f7d..e120c1339 100644 --- a/code/web/public_php/ams/func/update_plugin.php +++ b/code/web/public_php/ams/func/update_plugin.php @@ -30,6 +30,7 @@ function update_plugin() { $db -> delete( "updates", array( 'id' => $row['s.no'] ), "s.no=:id" ); // if update is installed succesffully redirect to show success message + header("Cache-Control: max-age=1"); header( "Location: index.php?page=plugins&result=8" ); throw new SystemExit(); diff --git a/code/web/public_php/ams/inc/change_permission.php b/code/web/public_php/ams/inc/change_permission.php index 456c07ecf..6f7a7b14b 100644 --- a/code/web/public_php/ams/inc/change_permission.php +++ b/code/web/public_php/ams/inc/change_permission.php @@ -22,6 +22,7 @@ function change_permission(){ //execute change. Ticket_User::change_permission(Ticket_User::constr_ExternId($user_id)->getTUserId(), $value); + header("Cache-Control: max-age=1"); if (Helpers::check_if_game_client()) { header("Location: ".$INGAME_WEBPATH."?page=show_user&id=".$user_id); }else{ @@ -32,6 +33,7 @@ function change_permission(){ }else{ //ERROR: GET PARAMS not given or trying to change admin + header("Cache-Control: max-age=1"); if (Helpers::check_if_game_client()) { header("Location: ".$INGAME_WEBPATH."?page=show_user&id=".$user_id); }else{ @@ -43,6 +45,7 @@ function change_permission(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); @@ -50,6 +53,7 @@ function change_permission(){ }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/createticket.php b/code/web/public_php/ams/inc/createticket.php index debf4f7e0..470bf3f5f 100644 --- a/code/web/public_php/ams/inc/createticket.php +++ b/code/web/public_php/ams/inc/createticket.php @@ -17,6 +17,7 @@ function createticket(){ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); @@ -47,6 +48,7 @@ function createticket(){ }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/dashboard.php b/code/web/public_php/ams/inc/dashboard.php index eb658a59c..8309ee737 100644 --- a/code/web/public_php/ams/inc/dashboard.php +++ b/code/web/public_php/ams/inc/dashboard.php @@ -29,6 +29,7 @@ function dashboard(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); @@ -36,6 +37,7 @@ function dashboard(){ }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/login.php b/code/web/public_php/ams/inc/login.php index 9fff79fd6..753873f38 100644 --- a/code/web/public_php/ams/inc/login.php +++ b/code/web/public_php/ams/inc/login.php @@ -17,6 +17,7 @@ function login() { $_SESSION['id'] = WebUsers::getId($result['name']); $_SESSION['ticket_user'] = serialize(Ticket_User::constr_ExternId($_SESSION['id'])); //go back to the index page. + header("Cache-Control: max-age=1"); if (Helpers::check_if_game_client()) { header('Location: ' . $INGAME_WEBPATH); } else { diff --git a/code/web/public_php/ams/inc/plugins.php b/code/web/public_php/ams/inc/plugins.php index 87724b11e..99a7ed0e7 100644 --- a/code/web/public_php/ams/inc/plugins.php +++ b/code/web/public_php/ams/inc/plugins.php @@ -32,6 +32,7 @@ function plugins() } else { // ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header( "Location: index.php?page=error" ); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/plugins_update.php b/code/web/public_php/ams/inc/plugins_update.php index c8dd669fd..69ac332b6 100644 --- a/code/web/public_php/ams/inc/plugins_update.php +++ b/code/web/public_php/ams/inc/plugins_update.php @@ -30,6 +30,7 @@ function plugins_update() } else { // ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header( "Location: index.php?page=error" ); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/reset_password.php b/code/web/public_php/ams/inc/reset_password.php index 6a98d2ee8..bfaed57aa 100644 --- a/code/web/public_php/ams/inc/reset_password.php +++ b/code/web/public_php/ams/inc/reset_password.php @@ -25,6 +25,7 @@ function reset_password(){ }else{ global $WEBPATH; $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: ".$WEBPATH."?page=error"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/settings.php b/code/web/public_php/ams/inc/settings.php index 8ce988e43..751738d93 100644 --- a/code/web/public_php/ams/inc/settings.php +++ b/code/web/public_php/ams/inc/settings.php @@ -12,6 +12,7 @@ function settings(){ if(($_GET['id'] != $_SESSION['id']) && (!Ticket_User::isMod(unserialize($_SESSION['ticket_user']))) ){ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); }else{ @@ -47,6 +48,7 @@ function settings(){ }else{ //ERROR: not logged in! header("Location: index.php"); + header("Cache-Control: max-age=1"); throw new SystemExit(); } } diff --git a/code/web/public_php/ams/inc/sgroup_list.php b/code/web/public_php/ams/inc/sgroup_list.php index dd1faa458..f6fb3a243 100644 --- a/code/web/public_php/ams/inc/sgroup_list.php +++ b/code/web/public_php/ams/inc/sgroup_list.php @@ -16,6 +16,7 @@ function sgroup_list(){ if(isset($_GET['delete']) && Ticket_User::isAdmin(unserialize($_SESSION['ticket_user']))){ $delete_id = filter_var($_GET['delete'], FILTER_SANITIZE_NUMBER_INT); $result['delete'] = Support_Group::deleteSupportGroup( $delete_id); + header("Cache-Control: max-age=1"); if (Helpers::check_if_game_client()) { header("Location: ".$INGAME_WEBPATH."?page=sgroup_list"); }else{ @@ -33,11 +34,13 @@ function sgroup_list(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/show_queue.php b/code/web/public_php/ams/inc/show_queue.php index 64614b317..6132719fa 100644 --- a/code/web/public_php/ams/inc/show_queue.php +++ b/code/web/public_php/ams/inc/show_queue.php @@ -148,6 +148,7 @@ function show_queue(){ //ERROR: Doesn't exist! $_SESSION['error_code'] = "404"; + header("Cache-Control: max-age=1"); header("Location: ams?page=error"); throw new SystemExit(); } @@ -155,11 +156,13 @@ function show_queue(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/show_reply.php b/code/web/public_php/ams/inc/show_reply.php index 2f05816f9..a1a3d6c7b 100644 --- a/code/web/public_php/ams/inc/show_reply.php +++ b/code/web/public_php/ams/inc/show_reply.php @@ -43,11 +43,13 @@ function show_reply(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/show_sgroup.php b/code/web/public_php/ams/inc/show_sgroup.php index 74f73b8a3..0ec446e4c 100644 --- a/code/web/public_php/ams/inc/show_sgroup.php +++ b/code/web/public_php/ams/inc/show_sgroup.php @@ -20,6 +20,7 @@ function show_sgroup(){ if(isset($_GET['delete']) && Ticket_User::isAdmin(unserialize($_SESSION['ticket_user']))){ $delete_id = filter_var($_GET['delete'], FILTER_SANITIZE_NUMBER_INT); $result['delete'] = Support_Group::deleteUserOfSupportGroup( $delete_id, $result['target_id'] ); + header("Cache-Control: max-age=1"); if (Helpers::check_if_game_client()) { header("Location: ".$INGAME_WEBPATH."?page=show_sgroup&id=" . $result['target_id']); }else{ @@ -64,6 +65,7 @@ function show_sgroup(){ //ERROR: No page specified! $_SESSION['error_code'] = "404"; + header("Cache-Control: max-age=1"); header("Location: ams?page=error"); throw new SystemExit(); } @@ -71,11 +73,13 @@ function show_sgroup(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/show_ticket.php b/code/web/public_php/ams/inc/show_ticket.php index 459b7e0e6..e8d010461 100644 --- a/code/web/public_php/ams/inc/show_ticket.php +++ b/code/web/public_php/ams/inc/show_ticket.php @@ -82,11 +82,13 @@ function show_ticket(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/show_ticket_info.php b/code/web/public_php/ams/inc/show_ticket_info.php index d5377fc39..9884df0bb 100644 --- a/code/web/public_php/ams/inc/show_ticket_info.php +++ b/code/web/public_php/ams/inc/show_ticket_info.php @@ -49,11 +49,13 @@ function show_ticket_info(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/show_ticket_log.php b/code/web/public_php/ams/inc/show_ticket_log.php index fd4a95188..6f7722169 100644 --- a/code/web/public_php/ams/inc/show_ticket_log.php +++ b/code/web/public_php/ams/inc/show_ticket_log.php @@ -67,11 +67,13 @@ function show_ticket_log(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/show_user.php b/code/web/public_php/ams/inc/show_user.php index 1128cd21e..fee580a96 100644 --- a/code/web/public_php/ams/inc/show_user.php +++ b/code/web/public_php/ams/inc/show_user.php @@ -41,11 +41,13 @@ function show_user(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } }else{ //ERROR: not logged in! + header("Cache-Control: max-age=1"); header("Location: index.php"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/syncing.php b/code/web/public_php/ams/inc/syncing.php index dff1d0402..e31409a09 100644 --- a/code/web/public_php/ams/inc/syncing.php +++ b/code/web/public_php/ams/inc/syncing.php @@ -30,6 +30,7 @@ function syncing(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); } diff --git a/code/web/public_php/ams/inc/userlist.php b/code/web/public_php/ams/inc/userlist.php index 36d180fe1..4455da069 100644 --- a/code/web/public_php/ams/inc/userlist.php +++ b/code/web/public_php/ams/inc/userlist.php @@ -30,6 +30,7 @@ function userlist(){ }else{ //ERROR: No access! $_SESSION['error_code'] = "403"; + header("Cache-Control: max-age=1"); header("Location: index.php?page=error"); throw new SystemExit(); }