Grazie, Kev
ecco il codice che mi ha generato DW8:
Codice PHP:
<?php require_once('Connections/login_prometeo.php'); ?>
<?php
mysql_select_db($database_login_prometeo, $login_prometeo);
$query_login_prometeo = "SELECT * FROM login_utente";
$login_prometeo = mysql_query($query_login_prometeo, $login_prometeo) or die(mysql_error());
$row_login_prometeo = mysql_fetch_assoc($login_prometeo);
$totalRows_login_prometeo = mysql_num_rows($login_prometeo);
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
}
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
if (isset($_POST['userid'])) {
$loginUsername=$_POST['userid'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "/homepage.html";
$MM_redirectLoginFailed = "blank";
$MM_redirecttoReferrer = false;
mysql_select_db($database_login_prometeo, $login_prometeo);
$LoginRS__query=sprintf("SELECT userid, password FROM login_utente WHERE userid='%s' AND password='%s'",
get_magic_quotes_gpc() ? $loginUsername : addslashes($loginUsername), get_magic_quotes_gpc() ? $password : addslashes($password));
$LoginRS = mysql_query($LoginRS__query, $login_prometeo) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
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">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<title>Calendar</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="file:///C|/Users/The principal/Desktop/SitoPrometeoLeggero/mm_travel2.css" type="text/css" />
<script language="JavaScript" type="text/javascript">
//--------------- LOCALIZEABLE GLOBALS ---------------
var d=new Date();
var monthname=new Array("January","February","March","April","May","June","July","August","September","October","November","December");
//Ensure correct for language. English is "January 1, 2004"
var TODAY = monthname[d.getMonth()] + " " + d.getDate() + ", " + d.getFullYear();
//--------------- END LOCALIZEABLE ---------------
</script>
<style type="text/css">
<!--
p.MsoNormal {mso-style-parent:"";
margin-top:0cm;
margin-right:0cm;
margin-bottom:10.0pt;
margin-left:0cm;
line-height:115%;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
}
p.MsoNormal1 {mso-style-parent:"";
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
margin-left:0cm; margin-right:0cm; margin-top:0cm}
div.Section1 {page:Section1;}
p.MsoNormal2 {mso-style-parent:"";
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
margin-left:0cm; margin-right:0cm; margin-top:0cm}
.Stile1 {font-size: 14px}
.Stile2 {font-size: 16px}
-->
</style>
</head>
<body bgcolor="#C0DFFD">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr bgcolor="#3366CC">
<td width="69" colspan="2" rowspan="2" nowrap="nowrap"><img src="prometeo.jpg" alt="Header image" width="77" height="125" border="0" /></td>
<td width="316" height="63" id="logo" valign="bottom" align="center" nowrap="nowrap"><div align="center">Prometeo</div></td>
<td width="600"> </td>
</tr>
<tr bgcolor="#3366CC">
<td height="64" id="tagline" valign="top" align="center"><div align="center">Associazione senza scopi di lucro</div></td>
<td width="600"> </td>
</tr>
<tr>
<td colspan="4" bgcolor="#003366"><img src="file:///C|/Users/The principal/Desktop/SitoPrometeoLeggero/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
</tr>
<tr bgcolor="#CCFF99">
<td width="8" bgcolor="#FFFFFF"> </td>
<td height="25" colspan="3" bgcolor="#FFFFFF" id="dateformat"> </td>
</tr>
<tr>
<td colspan="4" bgcolor="#003366"><img src="file:///C|/Users/The principal/Desktop/SitoPrometeoLeggero/mm_spacer.gif" alt="" width="1" height="1" border="0" /></td>
</tr>
</table>
<h1 align="center" class="bodyText"> </h1>
<p align="center" class="bodyText Stile2">Benvenuto nel sito web di Prometeo </p>
<p align="center" class="bodyText">Al momento l'accesso è consentito ai soli utenti autorizzati.</p>
<p align="center" class="bodyText">Per ottenere le credenziali di accesso, rivolgersi allo staff di Prometeo, all'indirizzo e-mail [email]prometeoweb@altervista.org[/email] </p>
<div align="center">
<div align="center">
<table width="355">
<tr bgcolor="#99FF66">
<td width="347" height="328"><p align="center">PREGO, ESEGUIRE IL LOGIN</p>
<p align="center"> </p>
<form ACTION="<?php echo $loginFormAction; ?>" id="Modulo_login" name="Modulo_login" method="POST">
<label>
<div align="center">nome utente <br />
<input name="userid" type="text" id="userid" />
</div>
</label>
<p>
<label>
<div align="center">
<div align="center"><br />
password <br />
<input name="password" type="password" id="password" />
</div>
</label>
<div align="center"></div>
<label>
<div align="right">
<div align="right"><br />
<br />
Login
<input type="submit" name="Submit" value="Invia" />
</div>
</label>
</form> </td>
</tr>
</table>
</div>
<p align="center" class="bodyText Stile1"> </p>
</body>
</html>
<?php
mysql_free_result($login_prometeo);
?>
Aspetto cortese risposta.