session_begin(); $auth->acl($user->data); $user->setup(); $indice=0; $autorise=array("MATHS","ADMIN","NSI","NSIT"); if($user->data['username']!="Anonymous"){ $login=$user->data['username']; $id=$user->data['user_id']; $sql = "SELECT g. * FROM phpbb_groups g JOIN phpbb_user_group ug ON g.group_id = ug.group_id WHERE ug.user_id = '$id'"; $req = $db->sql_query($sql); $administrateur=false; while($tab = mysqli_fetch_array($req)) { if(in_array($tab['group_name'],$autorise)){$indice++;}; if($tab['group_name']=="ADMIN"){$administrateur=true;}; }; }; if(($user->data['username']=="Anonymous")||($indice==0)){header("Location: index.php");}; ?>