<?php
include_once("include/config.php");
include_once("include/auth.lib.php");
list($status, $user) = auth_get_status();
if($status == AUTH_LOGGED & auth_get_option("TRANSICTION METHOD") == AUTH_USE_LINK){
$link = "?uid=".$_GET['uid'];
}else $link = '';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Database ACSI Comitato Provinciale di Padova</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="style.css" rel="stylesheet" type="text/css">
<SCRIPT LANGUAGE="JavaScript">
function verifica(form) {
if (form.nome.value == "") {
alert("Occorre riempire il campo Nome");
return false;
} else if (form.cognome.value== "") {
alert("Occorre riempire il campo Cognome");
return false;
} else if (form.tel.value== "") {
alert("Occorre riempire il campo telefono");
return false;
} else if (form.mail.value== "") {
alert("Occorre riempire il campo email");
return false;
}
return true;
}
// --> </SCRIPT>
</head>
<body>
<table class="table1">
<!--DWLayoutTable-->
<tr>
<td height="20" colspan="9"><div align="center">Database ACSI Comitato Provinciale di Padova</div></td>
</tr>
<tr>
<td height="20"></td>
</tr>
<tr>
<td height="20" colspan="9"><div align="center"><?php include('in.php'); ?></div></td>
</tr>
</table>
<div id="main">
<?php
$id = $_GET['id'];
$query = "SELECT * FROM referente WHERE id = ".$id."";
$result = mysql_query($query) or die (mysql_error());
$array = mysql_fetch_array($result, MYSQL_BOTH);
?>
<FORM name="form" METHOD="POST" onSubmit="return verifica(this);" action="lista_referenti.php">
<table width="40%" class="table3">
<thead>
<tr>
<th height="22" colspan="2">MODIFICA DATI REFERENTE <?php echo $array['nome']; ?></th>
</tr></thead>
<tr>
<td height="22" colspan="2" valign="top"></td>
</tr>
<tr valign="middle">
<td height="26"><div align="justify" >Associazione</div></td>
<td >
<?php
$queryClub = "SELECT id,name FROM utenti ORDER BY name ASC";
$resultClub = mysql_query($queryClub) or die (mysql_error());
echo '<select name="idclub">';
echo '<option value="">» Seleziona</option>';
while($arrayClub = mysql_fetch_array($resultClub,MYSQL_BOTH)) {
echo '<option value="'.$arrayClub['id'].'" ';
if($arrayClub['id'] == $array['idclub']) echo 'selected';
echo '>'.$arrayClub['name'].'</option>';
}
echo '</select>';
?>
<span class="form">*</span></td>
</tr>
<tr valign="middle">
<td height="26"><div align="justify" >Nome</div></td>
<td ><input name="nome" type="text" id="nome" size="50" value="<?php echo $array['nome']; ?>">
<span class="form">*</span></td>
</tr>
<tr valign="middle">
<td height="26" >Cognome</td>
<td><input name="cognome" type="text" id="cognome" size="50" value="<?php echo $array['cognome']; ?>">
*</td>
</tr>
<tr valign="middle">
<td height="26" >Indirizzo</td>
<td><input name="indirizzo" type="text" id="indirizzo" size="50" value="<?php echo $array['indirizzo']; ?>">
*</td>
</tr>
<tr valign="middle">
<td height="26" >Progetto</td>
<td><input name="progetto" type="text" id="progetto" size="50" value="<?php echo $array['progetto']; ?>">
*</td>
</tr>
<tr valign="middle"><td height="26">Telefono</td>
<td ><input name="tel" type="text" id="tel" size="50" maxlength="20" value="<?php echo $array['tel']; ?>">
*</td>
</tr>
<tr valign="middle">
<td height="26">Email</td>
<td ><input name="mail" type="text" id="mail" size="50" value="<?php echo $array['mail']; ?>">
*</td>
</tr>
<tr valign="middle">
<td height="26">Note</td>
<td ><textarea name="note" cols="70" rows="5" wrap="virtual" id="note"><?php echo $array['note']; ?></textarea></td>
</tr>
<tr>
<td height="30" colspan="2" valign="baseline" ><input name="id" type="hidden" id="id" size="4" value="<?php echo $id; ?>"></td>
</tr>
<tr>
<td height="28" colspan="2" valign="top"><div align="right">
<input type="submit" name="modreferente" value="Modifica">
</div></td>
</tr>
</table>
</form>
</div>
</body>
</html>