/**
* User has already logged in, so display relavent links, including
* a link to the admin center if the user is an administrator.
*/
if($session->logged_in){
echo "Login
";
echo "Accesso effettuato con successo";
echo "Benvenuto $session->username, puoi accedere all'Area Protetta.
"
."[username\">Visulizza il tuo profilo] "
."[Modifica il tuo profilo] ";
if($session->isAdmin()){
echo "[Admin Center] ";
}
echo "[Logout]";
}
else{
?>
Login
Inserisci Nome Utente e Password per accedere
Prima di poter accedere ai contenuti di quest'area devi identificarti.
/**
* User not logged in, display the login form.
* If user has already tried to login, but errors were
* found, display the total number of errors.
* If errors occurred, they will be displayed.
*/
if($form->num_errors > 0){
echo "".$form->num_errors." errore(i)";
}
?>
}
/**
* Just a little page footer, tells how many registered members
* there are, how many users currently logged in and viewing site,
* and how many guests viewing site. Active users are displayed,
* with link to their user information.
*/
if($session->isAdmin()){
echo " |