Professional Documents
Culture Documents
com) ********
// 31/08/2009 !! COPYRIGHT !!
//--------A utiliser sans moderation :D -------------------------------
// Class d'authentification
//
<?php
/*
fichier Auth.php
/
class Auth{
}
?>
<?php
/*
index.php
/
session_start();
mysql_connect('localhost','root','');
mysql_select_db('cat');
mysql_query('SET NAMES 'utf8'');
include './Auth.php';
$login ='moonair';
$pass = 'moonair';
$_SESSION['Auth'] = array(
"login"=>$login,
"pass"=>$pass
);
if(Auth::isLogged()){
echo 'Vous etes identifier<br />';
echo 'Level : '.Auth::levelZone().'<br />';
switch(Auth::levelZone()){
case "1":
echo 'Administrateur<br />';
break;
case "2":
echo 'Membre<br />';
break;
case "3":
echo 'Membre Premium<br />';
break;
}
}else{
echo 'Non identifier<br />';
}
?>