Ajout fonctionnement de la possibilité globale d'éditer ou pas
This commit is contained in:
@@ -8,11 +8,19 @@ require_once 'vendor/autoload.php';
|
||||
$aid = $_GET['aid'];
|
||||
$isAdmin = $_SESSION['admin']==1;
|
||||
|
||||
$isEditable = $_SESSION['allowedit']==1;
|
||||
if(!$userid) {
|
||||
syslog(LOG_ERR, "Unauthorized access to form page aid:$aid from : {$_SERVER['REMOTE_ADDR']} ({$_SERVER['HTTP_USER_AGENT']})");
|
||||
header('Location: accred_list');
|
||||
die();
|
||||
}
|
||||
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']})");
|
||||
header('Location: accred_list');
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
$uname = $_SESSION['name'];
|
||||
if($_POST['btncancel']) {
|
||||
header('Location: accred_list');
|
||||
|
||||
Reference in New Issue
Block a user