This commit is contained in:
thaaoblues 2024-04-11 22:11:19 +02:00
parent 380b353e30
commit 8fd771a345
2 changed files with 10 additions and 0 deletions

View file

@ -41,6 +41,14 @@ function verifier_session(){
//return json_encode(["status"=>1,"msg"=>"Bonjour !"]);
}
$ADMINS = array("mougnibas","rebillar");
function admin_seulement(){
global $ADMINS;
if(!in_array(phpCAS::getUser(), $ADMINS)) {
header("Location: /index.php");
}
}
?>

View file

@ -14,6 +14,8 @@ include("test_creds.php");
$conn = new mysqli($servername, $username, $password,$dbname);
admin_seulement();
// Function to fetch and display documents
function generer_chronologie() {