CMS ultra léger au style oldschool, projet de la communauté Kalaïn Hundin.

check_admin.php 333B

1234567891011121314151617181920
  1. <?php
  2. $sql="SELECT user_rank FROM user WHERE id_user=$id_user";
  3. $req = $dbh->query($sql) or die('Erreur SQL !<br />'.$sql.'<br />'.mysql_error());
  4. $user_ranking = $req->fetch(PDO::FETCH_ASSOC);
  5. $user_rank="$user_ranking[user_rank]";
  6. if($user_rank==1){
  7. $admin_mode = "1";
  8. }else{
  9. $admin_mode = "0";
  10. }
  11. ?>