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

check_admin.php 327B

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