<?php require_once('Connections/Modulo.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO librosoci (Cognome, Nome, Sesso, Indirizzo, N, Localita, Provincia, CAP, Datadinascita, Datadirichiesta, Email, Cellulare, Nazionalita, ViaPiazza, Inviata) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString(strtoupper($_POST['Cognome']), "text"),
GetSQLValueString(strtoupper($_POST['Nome']), "text"),
GetSQLValueString(strtoupper($_POST['Sesso']), "text"),
GetSQLValueString(strtoupper($_POST['Indirizzo']), "text"),
GetSQLValueString(strtoupper($_POST['N']), "text"),
GetSQLValueString(strtoupper($_POST['Localita']), "text"),
GetSQLValueString(strtoupper($_POST['Provincia']), "text"),
GetSQLValueString(strtoupper($_POST['CAP']), "text"),
GetSQLValueString(str_replace("-","/", $_POST['Datadinascita']), "text"),
GetSQLValueString(str_replace("-","/", $_POST['Datadirichiesta']), "text"),
GetSQLValueString(strtoupper($_POST['Email']), "text"),
GetSQLValueString(strtoupper($_POST['Cellulare']), "text"),
GetSQLValueString(strtoupper($_POST['Nazionalita']), "text"),
GetSQLValueString(strtoupper($_POST['ViaPiazza']), "text"),
GetSQLValueString($_POST['Inviata'], "text"));
mysql_select_db($database_Modulo, $Modulo);
$Result1 = mysql_query($insertSQL, $Modulo) or die(mysql_error());
$insertGoTo = "http://www.barcollo.net/modulo/ok.html";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
mysql_select_db($database_Modulo, $Modulo);
$query_mysql = "SELECT Cognome, Nome, Sesso, Indirizzo, N, Localita, Provincia, CAP, Datadinascita, Datadirichiesta, Email, Cellulare, Nazionalita, ViaPiazza, Inviata FROM librosoci";
$mysql = mysql_query($query_mysql, $Modulo) or die(mysql_error());
$row_mysql = mysql_fetch_assoc($mysql);
$totalRows_mysql = mysql_num_rows($mysql);
?>
<!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">
<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryValidationCheckbox.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationCheckbox.css" rel="stylesheet" type="text/css" />
<style type="text/css">
body,td,th {
font-family: Verdana, Geneva, sans-serif;
font-weight: bold;
font-style: italic;
text-align: left;
}
</style>
<body bgcolor="#000000" text="#FFFFFF"><form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
Arci Barcollo - Modulo Online
<p> </p>
<table width="976" border="0">
<tr>
<td width="142">Cognome</td>
<td width="824"><span id="sprytextfield2">
<label for="Cognome"></label>
<input name="Cognome" type="text" id="Cognome7" size="30" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span></td>
</tr>
<tr>
<td>Nome</td>
<td><span id="sprytextfield3">
<label for="Nome"></label>
<input name="Nome" type="text" id="Nome" size="30" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span></td>
</tr>
<tr>
<td>Sesso</td>
<td><span id="sprytextfield4">
<label for="Sesso"></label>
<input name="Sesso" type="text" id="Sesso" size="1" maxlength="1" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span></td>
</tr>
<tr>
<td>Via/Piazza</td>
<td><span id="sprytextfield5">
<label for="ViaPiazza"></label>
<input name="ViaPiazza" type="text" id="ViaPiazza" value="VIA" size="6" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span></td>
</tr>
<tr>
<td>Indirizzo</td>
<td><span id="sprytextfield6">
<label for="Indirizzo"></label>
<input name="Indirizzo" type="text" id="Indirizzo" size="40" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span></td>
</tr>
<tr>
<td>N</td>
<td><span id="sprytextfield7">
<label for="N"></label>
<input name="N" type="text" id="N" size="5" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span></td>
</tr>
<tr>
<td>Localita'</td>
<td><span id="sprytextfield8">
<label for="Localita"></label>
<input name="Localita" type="text" id="Localita" value="PALERMO" size="35" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span></td>
</tr>
<tr>
<td>Provincia</td>
<td><span id="sprytextfield9">
<label for="Provincia"></label>
<input name="Provincia" type="text" id="Provincia" value="PA" size="1" maxlength="2" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span></td>
</tr>
<tr>
<td>C.A.P.</td>
<td><span id="sprytextfield10">
<label for="CAP"></label>
<input name="CAP" type="text" id="CAP" size="3" maxlength="5" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span></td>
</tr>
<tr>
<td>Data di nascita</td>
<td><span id="sprytextfield11">
<label for="Datadinascita"></label>
<input name="Datadinascita" type="text" id="Datadinascita" size="5" maxlength="8" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span>Formato corretto Esempio 07/04/86</td>
</tr>
<tr>
<td>Data di oggi</td>
<td><span id="sprytextfield12">
<label for="Datadirichiesta"></label>
<input name="Datadirichiesta" type="text" id="Datadirichiesta" size="6" maxlength="10" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span>Formato corretto Esempio 01/01/2011</td>
</tr>
<tr>
<td>E-mail</td>
<td><span id="sprytextfield13">
<label for="Email"></label>
<input name="Email" type="text" id="Email" size="30" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span></td>
</tr>
<tr>
<td>Cellulare</td>
<td><span id="sprytextfield14">
<label for="Cellulare"></label>
<input name="Cellulare" type="text" id="Cellulare" size="7" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span></td>
</tr>
<tr>
<td>Nazionalita'</td>
<td><span id="sprytextfield16">
<label for="Nazionalita"></label>
<input name="Nazionalita" type="text" id="Nazionalita" value="ITALIANA" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span></td>
</tr>
<tr>
<td>Inviata</td>
<td><span id="sprytextfield17">
<label for="Inviata"></label>
<input name="Inviata" type="text" disabled id="Inviata" value="DCINTERNET" />
<span class="textfieldRequiredMsg">Campo obbligatorio.</span></span></td>
</tr>
<tr>
<td height="210"><img src="http://www.barcollo.net/immagini/logonero.jpg" width="130" height="167" /> </td>
<td><span id="sprycheckbox1">
<input type="checkbox" name="aggree" id="aggree" />
Spuntanto la seguente casella
di controllo Lei Dichiara di aver preso visione dello<font FACE="Arial,Bold, sans-serif"><b> <a target="_blank" href="statuto.html">statuto</a> </b></font> dell'associazione e di condividerne i contenuti, si impegna altresi' al rispetto dello
Statuto sociale e della civile convivenza e dichiara di non avere pendenze
penali e di avere il pieno godimento dei diritti civili. Acconsente inoltre al
trattamento dei dati personali in relazione all'informativa riportata alla fine
dello statuto.
<label for="aggree"></label>
<span class="checkboxRequiredMsg">Devi accettare i termini e le condizioni.</span></span> </td>
</tr>
</table>
<span> </span>
<p><span id="sprycheckbox1"><span class="checkboxRequiredMsg">.</span></span>
<input type="submit" name="Invio" id="Invio" value="Invia" />
<input type="hidden" name="MM_insert" value="form1" />
</p>
</form>
<script type="text/javascript">
var sprycheckbox1 = new Spry.Widget.ValidationCheckbox("sprycheckbox1");
var sprytextfield2 = new Spry.Widget.ValidationTextField("sprytextfield2");
var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3");
var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4");
var sprytextfield5 = new Spry.Widget.ValidationTextField("sprytextfield5");
var sprytextfield6 = new Spry.Widget.ValidationTextField("sprytextfield6");
var sprytextfield7 = new Spry.Widget.ValidationTextField("sprytextfield7");
var sprytextfield8 = new Spry.Widget.ValidationTextField("sprytextfield8");
var sprytextfield9 = new Spry.Widget.ValidationTextField("sprytextfield9");
var sprytextfield10 = new Spry.Widget.ValidationTextField("sprytextfield10");
var sprytextfield11 = new Spry.Widget.ValidationTextField("sprytextfield11");
var sprytextfield12 = new Spry.Widget.ValidationTextField("sprytextfield12");
var sprytextfield13 = new Spry.Widget.ValidationTextField("sprytextfield13");
var sprytextfield14 = new Spry.Widget.ValidationTextField("sprytextfield14");
var sprytextfield16 = new Spry.Widget.ValidationTextField("sprytextfield16");
var sprytextfield17 = new Spry.Widget.ValidationTextField("sprytextfield17");
</script>
</html>
<?php
mysql_free_result($mysql);
?>