Current Path : /web/htdocs/www.entinoprofit.org/home/database/
Upload File :
Current File : /web/htdocs/www.entinoprofit.org/home/database/addsinistro.php

<?php

session_start(); 
include_once("include/config.php");
include_once("include/auth.lib.php");

$id = $_GET['idsocio'];

list($status, $user) = auth_get_status();

if($status == AUTH_LOGGED & auth_get_option("TRANSICTION METHOD") == AUTH_USE_LINK){
	$link = "?uid=".$_GET['uid'];
}else	$link = '';

if($status == AUTH_LOGGED){

?>
<!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 rel="stylesheet" type="text/css" href="css/dashboard.css" media="screen" />

<link href="style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/mootools.js"></script>

<script type="text/javascript" src="js/calendar.js"></script>

<script type="text/javascript">
		window.addEvent('domready', function() { new Calendar({ date: 'Y-m-d' }, { classes: ['dashboard'] });  });
</script>

<script type="text/javascript">
var num=1;

function accoda(){

tipologia=document.addticket.tipologia.value;

	if(tipologia == "tessera") {
	
		if(document.createElement && document.getElementById && document.getElementsByTagName) {
			// crea elementi
			
			var oTr2=document.createElement("TR");
			var oTd3=document.createElement("TD");
			var oTd4=document.createElement("TD");
			var oField2=document.createElement("INPUT");
			var oText3=document.createTextNode("Quantita");
	
			// setta attributi
			oField2.setAttribute("type","text");
			oField2.setAttribute("name","quantita");
			
	
			// appendi al relativo padre
			oTd4.appendChild(oField2);
			oTd3.appendChild(oText3);
			oTr2.appendChild(oTd3);
			oTr2.appendChild(oTd4);

			
			var oTr=document.createElement("TR");
			var oTd1=document.createElement("TD");
			var oTd2=document.createElement("TD");
			var oField=document.createElement("INPUT");
			var oText=document.createTextNode("Tessere dal ");
			var oField2=document.createElement("INPUT");
			var oText2=document.createTextNode(" al ");

	
			// setta attributi
			oField.setAttribute("type","text");
			oField.setAttribute("name","texdal");
			
			// setta attributi
			oField2.setAttribute("type","texdal");
			oField2.setAttribute("name","texal");
	
			// appendi al relativo padre
			oTd1.appendChild(oText);
            oTd2.appendChild(oField);
			oTd2.appendChild(oText2);
			oTd2.appendChild(oField2);
			oTr.appendChild(oTd1);
			oTr.appendChild(oTd2);
			
			document.getElementById('addticket').getElementsByTagName('TBODY')[0].appendChild(oTr2);
			document.getElementById('addticket').getElementsByTagName('TBODY')[0].appendChild(oTr);
	
			// incrementa variabile globale
			num++

		}
		
	} 
	
	if(tipologia == "varie") {
	
		if(document.createElement && document.getElementById && document.getElementsByTagName) {
			// crea elementi
			
			var oTr5=document.createElement("TR");
			var oTd6=document.createElement("TD");
			var oTd7=document.createElement("TD");
			var oField5=document.createElement("INPUT");
			var oText6=document.createTextNode("Specificare Varie");
	
			// setta attributi
			oField5.setAttribute("type","text");
			oField5.setAttribute("name","desc_altro");
	        oField5.setAttribute("maxlength","40");
			// appendi al relativo padre
			oTd7.appendChild(oField5);
			oTd6.appendChild(oText6);
			oTr5.appendChild(oTd6);
			oTr5.appendChild(oTd7);
			
			document.getElementById('addticket').getElementsByTagName('TBODY')[0].appendChild(oTr5);
	
			// incrementa variabile globale
			num++

		}
		
	} 
}

</script>
</head>

<body>
<table width="100%" 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>
<p></p>

<div id="main">
<?php
if ($user["admin"] != 1) {
$query = "SELECT * FROM socio WHERE id = '$id' AND club = '".$user["username"]."'";
} else {
$query = "SELECT * FROM socio WHERE id = '$id'";

}

$risultato = mysql_query($query) or die("Query 1 failed");
$array = mysql_fetch_array($risultato, MYSQL_BOTH)

?>

<div id="box-1">
<table width="100%" class="table3">
  <!--DWLayoutTable-->
	<thead>
		<tr><th height="22" colspan="3"><div align="center">
<?php
echo "$array[cognome] $array[nome] - $array[club]" ;

echo "";


?>

        </div></th>
  </tr></thead>
  <tr>
    <td height="20" colspan="3" valign="top" class="desc">Dati anagrafici</td>
  </tr>
  <tr>
    <td height="26" valign="baseline" ><div align="justify" >Nome</div></td>
    <td colspan="2" class="desc"><?php echo "$array[nome]" ;?></td>
  </tr>
  <tr bordercolor="#3333CC" >
    <td height="26" valign="baseline"><div align="justify" >Cognome</div></td>
    <td colspan="2" class="desc"><?php echo "$array[cognome]" ;?></td>
  </tr>
  <tr bordercolor="#3333CC" >
    <td height="26" valign="baseline"><div align="justify" >Indirizzo</div></td>
    <td colspan="2" class="desc"><?php echo "$array[indirizzo] , $array[cap] $array[citta] ($array[pvres])" ;?></td>
  </tr>
  <tr bordercolor="#3333CC" >
    <td height="26" valign="baseline"><span >Nato a</span></td>
    <td colspan="2" class="desc"><?php echo "$array[natoa] ($array[natopv]) il $array[giorno]/$array[mese]/$array[anno]" ;?></td>
  </tr>
  <tr bordercolor="#3333CC" >
    <td height="26" valign="baseline"><div align="justify"> N&deg; documento</div></td>
    <td colspan="2" class="desc"><?php echo "$array[numdoc]" ;?></td>
  </tr>
    <tr bordercolor="#3333CC" >
    <td height="26" valign="baseline"><div align="justify"> Data documento</div></td>
    <td colspan="2" class="desc"><?php echo "$array[datadoc]" ;?></td>
  </tr>
  <tr bordercolor="#3333CC" >
    <td height="26" valign="baseline">Telefono</td>
    <td colspan="2" class="desc"><?php echo "$array[tel]" ;?></td>
  </tr>
  <tr bordercolor="#3333CC" >
    <td height="26" valign="baseline">Cellulare</td>
    <td colspan="2" class="desc"><?php echo "$array[cel]" ;?></td>
  </tr>
  <tr bordercolor="#3333CC" >
    <td height="26" valign="baseline">Email</td>
    <td colspan="2" class="desc"><?php echo "$array[email]" ;?></td>
  </tr>
  <tr bordercolor="#3333CC" >
    <td height="26" valign="baseline">Fax</td>
    <td colspan="2" class="desc"><?php echo "$array[fax]" ;?></a></td>
  </tr>
  <tr>
    <td height="26" valign="baseline">Note</td>
    <td colspan="2" class="desc"><?php echo "$array[note]" ;?></a></td>
  </tr>
</table>
</div>

<div id="box-2">
	  <form name="addsinistro" method="post" action="schedasocio.php?id=<?php print "$id"; ?>">
	  <table id="addticket"  width="100%" class="table3">
		<!--DWLayoutTable-->
	  
	<thead>
		<tr><th height="22" colspan="3"><div align="center">DATI DEL SINISTRO </div></th>
  </tr></thead>
	  <tr>
		<td height="23" colspan="2" valign="baseline" class="desc">Modulo Aggiunta sinistro </td>
	  </tr>
	  <tr >
		<td width="286" height="26" valign="baseline">Stato del sinistro </td>
		<td width="464" class="desc">
		<select name="stato" id="stato">
       <option value="" >Seleziona:</option>
      <option value="aperto" >Aperto</option>
	  <option value="chiuso">Chiuso</option>

      </select></td>
	  </tr>
	<tbody>
	</tbody> 

	  <tr >
		<td width="286" height="26" valign="baseline">Spesa </td>
		<td width="464" class="desc"><input name="spesa" type="text" id="spesa" size="10" maxlength="10">
		  &euro; </td>
	  </tr>
	  <tr >
		<td height="26" valign="baseline">Tessera </td>
		<td class="desc"><input name="tessera" type="text" id="tessera" size="25" maxlength="25"></td>
	  </tr>
		<!--DWLayoutTable-->
	  <tr >
		<td height="26" valign="baseline">Data del sinistro </td>
		<td class="desc"><input name="date" type="text" id="date" size="20" maxlength="20"></td>
	  </tr>
	  <tr valign="middle" >
	    <td height="26">Descrizione</td>
	    <td class="desc"><label>
	      <textarea name="descrizione" cols="70" rows="12" wrap="virtual" id="descrizione"></textarea>
	    </label></td>
	    </tr>

	  <tr>
		<td height="28" colspan="2" valign="top" class="desc"><div align="right">
			  <input type="submit" name="addsinistro" value="Prosegui">
		</div></td>
	  </tr>
	</table>
    </form>
</div>

</div> 

</body>
</html>
<?php }else echo "Non hai i diritti per visualizzare la pagina"; ?>