<?php require_once('Connections/fd.php'); ?>
<?php
// *** Validate request to login to this site.
session_start();
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($accesscheck)) {
$GLOBALS['PrevUrl'] = $accesscheck;
session_register('PrevUrl');
}
if (isset($_POST['nome'])) {
$loginUsername=$_POST['nome'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "http.//www.italianghosts.altervista.org/membri";
$MM_redirectLoginFailed = "http.//www.italianghosts.altervista.org/nologin";
$MM_redirecttoReferrer = false;
mysql_select_db($database_fd, $fd);
$LoginRS__query=sprintf("SELECT Username, PASSWORD FROM login WHERE Username='%s' AND PASSWORD='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $fd) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$GLOBALS['MM_Username'] = $loginUsername;
$GLOBALS['MM_UserGroup'] = $loginStrGroup;
//register the session variables
session_register("MM_Username");
session_register("MM_UserGroup");
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
}
header("Location: " . $MM_redirectLoginSuccess );
}
else {
header("Location: ". $MM_redirectLoginFailed );
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Documento senza titolo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<p> </p>
<form ACTION="<?php echo $loginFormAction; ?>" name="form1" id="form1" method="POST">
<p>NOME
<input type="text" name="nome" />
PASSWORD
<input name="password" type="password" />
<input name="Submit" type="submit" lang="it" value="Invia" />
</p>
</form>
<p><em>*esegui il login con lo stesso nome e la stessa password che usi su Age of Empires 3 </em> </p>
</body>
</html>