Changement du header() à une solution Javascript
This commit is contained in:
parent
31c81b6069
commit
a38230db40
@ -2,7 +2,7 @@
|
|||||||
require_once 'vendor/autoload.php';
|
require_once 'vendor/autoload.php';
|
||||||
ini_set('display_errors', 0);
|
ini_set('display_errors', 0);
|
||||||
ini_set('display_startup_errors', 0);
|
ini_set('display_startup_errors', 0);
|
||||||
error_reporting(E_ALL & ~E_NOTICE );
|
error_reporting(E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED & ~E_WARNING );
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
$userid = $_SESSION['uid'];
|
$userid = $_SESSION['uid'];
|
||||||
@ -14,12 +14,12 @@ require_once 'vendor/autoload.php';
|
|||||||
$isEditable = $_SESSION['allowedit']==1;
|
$isEditable = $_SESSION['allowedit']==1;
|
||||||
if(!$userid) {
|
if(!$userid) {
|
||||||
syslog(LOG_ERR, "Unauthorized access to form page aid:$aid from : {$_SERVER['REMOTE_ADDR']} ({$_SERVER['HTTP_USER_AGENT']})");
|
syslog(LOG_ERR, "Unauthorized access to form page aid:$aid from : {$_SERVER['REMOTE_ADDR']} ({$_SERVER['HTTP_USER_AGENT']})");
|
||||||
header('Location: accred_list');
|
echo "<script type='text/javascript'> document.location = 'accred_list'; </script>";
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
if(!$isAdmin && $isEditable!=1) {
|
if(!$isAdmin && $isEditable!=1) {
|
||||||
syslog(LOG_ERR, "Unauthorized access to form page aid by non editable user :$aid from : {$_SERVER['REMOTE_ADDR']} ({$_SERVER['HTTP_USER_AGENT']})");
|
syslog(LOG_ERR, "Unauthorized access to form page aid by non editable user :$aid from : {$_SERVER['REMOTE_ADDR']} ({$_SERVER['HTTP_USER_AGENT']})");
|
||||||
header('Location: accred_list');
|
echo "<script type='text/javascript'> document.location = 'accred_list'; </script>";
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ require_once 'vendor/autoload.php';
|
|||||||
|
|
||||||
$uname = $_SESSION['name'];
|
$uname = $_SESSION['name'];
|
||||||
if($_POST['btncancel']) {
|
if($_POST['btncancel']) {
|
||||||
header('Location: accred_list');
|
echo "<script type='text/javascript'> document.location = 'accred_list'; </script>";
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
$prices = array(
|
$prices = array(
|
||||||
@ -138,8 +138,7 @@ if (!$mysqli->query($query) ) {
|
|||||||
echo "Table creation failed: (" . $mysqli->errno . ") " . $mysqli->error;
|
echo "Table creation failed: (" . $mysqli->errno . ") " . $mysqli->error;
|
||||||
die("Argh");
|
die("Argh");
|
||||||
}
|
}
|
||||||
|
echo "<script type='text/javascript'> document.location = 'accred_list'; </script>";
|
||||||
header('Location: accred_list');
|
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user