phpcasss
This commit is contained in:
parent
380b353e30
commit
8fd771a345
2 changed files with 10 additions and 0 deletions
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
?>
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue