<html>
<head>
<title>Selfcare :: cliente</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src="script.js"></script>
<head>
<?php
if(isset($_POST['Tessera'])) {
$dbhost = 'localhost';
$dbuser = '';
$dbpass = '';
$conn = mysql_connect($dbhost, $dbuser, $dbpass);
if(! $conn ) {
die('Could not connect: ' . mysql_error());
}
if(! get_magic_quotes_gpc() ) {
$Tessera = addslashes ($_POST['Tessera']);
$Codice_agenzia = addslashes ($_POST['Codice_agenzia']);
$Agenzia = addslashes ($_POST['Agenzia']);
$Nome = addslashes ($_POST['Nome']);
$Cognome = addslashes ($_POST['Cognome']);
$Codice_fiscale = addslashes ($_POST['Codice_fiscale']);
$Codice_cliente = addslashes ($_POST['Codice_cliente']);
$Indirizzo = addslashes ($_POST['Indirizzo']);
$Comune = addslashes ($_POST['Comune']);
$Data_di_nascita = addslashes ($_POST['Data_di_nascita']);
$Indirizzo_email = addslashes ($_POST['Indirizzo_email']);
$Telefono = addslashes ($_POST['Telefono']);
$Username = addslashes ($_POST['Username']);
$Password = addslashes ($_POST['Password']);
$Conferma_password = addslashes ($_POST['Conferma_password']);
}else {
$Tessera = $_POST['Tessera'];
$Codice_agenzia = $_POST['Codice_agenzia'];
$Agenzia = $_POST['Agenzia'];
$Cognome = $_POST['Cognome'];
$Nome = $_POST['Nome'];
$Codice_fiscale = $_POST['Codice_fiscale'];
$Codice_cliente = $_POST['Codice_cliente'];
$Indirizzo = $_POST['Indirizzo'];
$Comune = $_POST['Comune'];
$Data_di_nascita = $_POST['Data_di_nascita'];
$Indirizzo_email = $_POST['Indirizzo_email'];
$Telefono = $_POST['Telefono'];
$Username = $_POST['Username'];
$Password = $_POST['Password'];
$Conferma_password = $_POST['Conferma_password'];
}
$sql = "INSERT INTO Profilo ". "(Tessera, Codice_agenzia, Agenzia, Cognome, Nome, Codice_fiscale, Codice_cliente, Indirizzo, Comune, Data_di_nascita, Indirizzo_email, Telefono, Username, Password, Conferma_password)"." VALUES('$Tessera', '$Codice_agenzia', '$Agenzia', '$Cognome','$Nome','$Codice_fiscale','$Codice_cliente', '$Indirizzo', '$Comune','$Data_di_nascita','$Indirizzo_email','$Telefono','$Username','$Password','$Conferma_password')";
mysql_select_db('');
$retval = mysql_query( $sql, $conn );
if(! $retval ) {
die('Could not enter data: ' . mysql_error());
}
echo '<br><br>
<DIV align="center"><div style="width:900px;height:800px;-webkit-border-radius: 0px;-moz-border-radius: 0px;border-radius: dashed 0px;background-color:#FFFFFF;-webkit-box-shadow: #B3B3B3 16px 16px 16px;-moz-box-shadow: #B3B3B3 16px 16px 16px; box-shadow: #B3B3B3 16px 16px 16px;">
<table>
<tr>
<td ALIGN="LEFT" >
<div align="left"><img src="image.png" style="width:250; heigth:150; margin:7px;"></div>
</td>
<TD> </TD>
<td> Modulo inserimento dati - UTENTE - ATTIVAZIONE CARTA</td>
<td> QUI INSERISCO IL CODICE A BARRE</td> //QUI DEVE APPARIRE L'IMMAGINE DEL CODICE
</tr>
</table>
<fieldset>
<legend>DATI AZIENDA </legend>
<td><br></td>
<TABLE>
<tr>
<td><p>Codice agenzia</p>
<input type="text" value="$Codice_agenzia"></td>
<td><p>Tessera</p>
<input type="text" value="[$Tessera]"></td>
<td><p>Agenzia</p>
<input type="text" value="$Agenzia"></td>
<td><br><br><br></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend>DATI ANAGRAFICI</legend>
<td><br></td>
<TABLE>
<tr>
<td>Nome
<input type="text" value="$Nome"></td>
<td>Cognome
<input type="text" value="$Cognome"></td>
<td>Data di nascita
<input type="text" value="$Data_di_nascita"></td>
<td>Codice fiscale
<input type="text" value="$Codice_fiscale"></td>
</tr>
<td><br></td>
<tr>
<td>Indirizzo
<input type="text" value="$Indirizzo"></td>
<td>Comune
<input type="text" value="$Comune"></td>
<td>Indirizzo email
<input type="text" value="$Indirizzo_email"></td>
<td>Telefono
<input type="text" value="$Telefono"></td>
</tr>
</TABLE>
</fieldset>
</div>';
mysql_close($conn);
}else {
?>