function validaForm(form1)
{
if(form1.cognome.value.length == 0)
{
alert("Inserire il cognome");
form1.cognome.focus();
return false;
}
// TODO: validare in modo analogo gli altri campi
// se sono arrivato qui il form è ok:
return true;
}
function btnSalva_onclick() {
FORM1.action="UtentiCisl.asp?newpage=yes";
FORM1.submit();
}
</script>
<title></title>
<link href="CSS/Accessible_Design.css" rel="stylesheet" type="text/css">
<link href="CSS/colors5.css" rel="stylesheet" type="text/css">
<link href="CSS/colors3.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style3 {color: #FF0000; font-weight: bold; }
.style5 {font-size: 12px}
.style8 {color: #FF0000; font-weight: bold; font-family: Verdana, Arial, Helvetica, sans-serif; }
-->
</style>
</head>
<%
dim vntDati(2)
dim objCnt
dim objCmd
dim objRst
dim strSQL
dim CatID
dim RsProd
dim dcnDB
sub main
dim salvo
salvo=Request.QueryString("newpage")
set objCnt = CreateObject("ADODB.Connection")
set objCmd = CreateObject("ADODB.Command")
set objRst = CreateObject("ADODB.Recordset")
if salvo="yes" then
salva
else
end if
end sub
sub salva
dim AnnoIscrizione, Cognome, Nome, Sesso, NascitaGiorno, NascitaMese, NascitaAnno, Ente, IndirizzoUff, cittaUff, ProvUff, CapUff, Categoria, PosizioneEconomica, EMailUff, TelefonoUff, CellUff, IndirizzoRes, CittaRes, ProvRes, CapRes, EmailRes, TelefonoRes, CellPers, Dimesso, AnnoDimissioni
'IDIscr=Request.Form("txtIDIscr")
AnnoIscrizione=Request.Form("txtAnnoIscrizione")
Cognome=Request.Form("txtCognome")
Nome=Request.Form("txtNome")
Sesso=Request.Form("txtSesso")
NascitaGiorno=Request.Form("txtNascitaGiorno")
NascitaMese=Request.Form("txtNascitaMese")
NascitaAnno=Request.Form("txtNascitaAnno")
Ente=Request.Form("txtEnte")
IndirizzoUff=Request.Form("txtIndirizzoUff")
cittaUff=Request.Form("txtcittaUff")
ProvUff=Request.Form("txtProvUff")
CapUff=Request.Form("txtCapUff")
Categoria=Request.Form("txtCategoria")
PosizioneEconomica=Request.Form("txtPosizioneEconomica")
EMailUff=Request.Form("txtEMailUff")
TelefonoUff=Request.Form("txtTelefonoUff")
CellUff=Request.Form("txtCellUff")
IndirizzoRes=Request.Form("txtIndirizzoRes")
CittaRes=Request.Form("txtCittaRes")
ProvRes=Request.Form("txtProvRes")
CAPRes=Request.Form("txtCapRes")
EMailRes=Request.Form("txtEMailRes")
TelefonoRes=Request.Form("txtTelefonoRes")
CellPers=Request.Form("txtCellPers")
Dimesso=Request.Form("txtDimesso")
AnnoDimissioni=Request.Form("txtAnnoDimissioni")
if Cognome ="" then Cognome= " "
if Nome="" then nome= " "
if IndirizzoUFF="" then IndirizzoUFF= " "
if CittaUff="" then CittaUff=" "
if ProvUff="" then ProvUff=" "
if CapUff="" then CapUff=" "
if EmailUff="" then EmailUff=" "
if TelefonoUff="" then TelefonoUff=" "
if CellUff="" then CellUff=" "
if IndirizzoRes="" then IndirizzoRes= " "
if CittaRes="" then CittaRes=" "
if ProvRes="" then ProvRes=" "
if CapRes="" then CapRes=" "
if EmailRes="" then EmailRes=" "
if TelefonoRes="" then TelefonoRes=" "
if CellPers="" then CellPers=" "
objCnt.Open = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\wwwroot\sindacato\cisl.mdb;Persist Security Info=False"
objCmd.ActiveConnection=objCnt
objCmd.CommandText= "insert into DatiAnagrafici (AnnoIscrizione, Cognome, Nome, Sesso, NascitaGiorno, NascitaMese, NascitaAnno, Ente, IndirizzoUff, cittaUff, ProvUff, CapUff, Categoria, PosizioneEconomica, EMailUff, TelefonoUff, CellUff, IndirizzoRes, CittaRes, ProvRes, CapRes, EmailRes, TelefonoRes, CellPers, Dimesso, AnnoDimissioni) values ('" & AnnoIscrizione & "', '"& Replace(Cognome, "'", "''") &"','" & Nome & "', '" & Sesso & "', '" & NascitaGiorno & "', '" & NascitaMese & "', '" & NascitaAnno & "', '"& Replace(Ente, "'", "''") &"', '"& Replace(IndirizzoUff, "'", "''") &"', '"& Replace(CittaUff, "'", "''") &"', '" & ProvUff & "', '" & CapUff & "', '" & Categoria & "' , '" & PosizioneEconomica & "', '" & EMailUff & "', '" & TelefonoUff & "', '" & CellUff & "', '"& Replace(IndirizzoRes, "'", "''") &"', '"& Replace(CittaRes, "'", "''") &"', '" & ProvRes & "', '" & CapRes & "', '" & EmailRes & "', '" & TelefonoRes & "', '" & CellPers & "', '" & Dimesso & "', '" & AnnoDimissioni & "')"
objCmd.Execute
end sub
main
%>
<body>
<form id="FORM1" name="FORM1" action method="post">
<div align="left">
<p align="left"> <img width="144" height="113" src="Anagrafica_clip_image002.jpg"> <strong><em> Coordinamento Ente Regione ed Enti Regionali </em></strong> </p>
<table width="789" height="400" border="2" cellpadding="1" cellspacing="1" bordercolor="#008000"
bordercolorlight="#008000" bordercolordark="#008000">
<tr>
<td colspan="11" align="right"><div align="center" class="style3"><font face="Verdana, Arial, Helvetica, sans-serif">Inserimento Iscritti</font></div></td>
</tr>
<tr class="DataColor">
<td align="center" width="73"><span class="style5"><font face="Arial" color="#008000">Sesso</font></span></td>
<td align="left"><span class="style5"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000">
<select name="txtSesso" id="txtSesso">
<option>M</option>
<option>F</option>
</select>
</font></font>
</font>
</font></span></td>
<td align="right"><span class="style5"><font face="Arial" color="#008000">Cognome</font></span></td>
<td colspan="2" align="left"><span class="style5"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000">
<input id="txtCognome" name="txtCognome"
size="20">
</font></font></font></font></font></span><span class="style5"></span></td>
<td width="38" align="right"><span class="style5"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font face="Arial" color="#008000">Nome</font>
</font></font></font></font>
</font></span></td>
<td width="120" align="right"><span class="style5"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000">
<input name="txtNome" id="txtNome" size="20">
</font></font></font></font></font></font></font></span></td>
<td colspan="2" align="right"><span class="style5"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font face="Arial" color="#008000">Iscrizione</font></font></font></font></font></font></font></font>
</font></font></font></font></font></font></font></span></td>
<td colspan="2" align="right"><div align="left"><span class="style5"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000">
</font></font></font></font></font></font></font></span><span class="style5"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000">
<select name="txtAnnoIscrizione" id="txtAnnoIscrizione">
<option>2005</option>
<option>2006</option>
</select>
</font></font></font></font></font></font>
</font></font></font></font></font>
</font>
</span></div></td>
</tr>
<tr class="DataColor">
<td width="73" height="36" align="center"><span class="style5"><font color="#008000" face="Arial">DataNascita </font></span></td>
<td align="center" width="78"><span class="style5"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000">
<select name="txtNascitaGiorno" id="txtNascitaGiorno">
<option>Giorno...</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
<option>12</option>
<option>13</option>
<option>14</option>
<option>15</option>
<option>16</option>
<option>17</option>
<option>18</option>
<option>19</option>
<option>20</option>
<option>21</option>
<option>22</option>
<option>23</option>
<option>24</option>
<option>25</option>
<option>26</option>
<option>27</option>
<option>28</option>
<option>29</option>
<option>30</option>
<option>31</option>
</select>
</font>
</font></font>
</font></span></td>
<td align="center" width="85"><span class="style5"><font color="#008000"><font color="#008000">
<select name="txtNascitaMese" id="txtNascitaMese">
<option>Mese...</option>
<option>Gennaio</option>
<option>Febbraio</option>
<option>Marzo</option>
<option>Aprile</option>
<option>Maggio</option>
<option>Giugno</option>
<option>Luglio</option>
<option>Agosto</option>
<option>Settembre</option>
<option>Ottobre</option>
<option>Novembre</option>
<option>Dicembre</option>
</select>
</font></font></span></td>
<td align="center" width="72"><span class="style5"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000">
<select name="txtNascitaAnno" id="txtNascitaAnno">
<option>Anno...</option>
<option>1930</option>
<option>1931</option>
<option>1932</option>
<option>1933</option>
<option>1934</option>
<option>1935</option>
<option>1936</option>
<option>1937</option>
<option>1938</option>
<option>1939</option>
<option>1940</option>
<option>1941</option>
<option>1942</option>
<option>1943</option>
<option>1944</option>
<option>1945</option>
<option>1946</option>
<option>1947</option>
<option>1948</option>
<option>1949</option>
<option>1950</option>
<option>1951</option>
<option>1952</option>
<option>1953</option>
<option>1954</option>
<option>1955</option>
<option>1956</option>
<option>1957</option>
<option>1958</option>
<option>1959</option>
<option>1960</option>
<option>1961</option>
<option>1962</option>
<option>1963</option>
<option>1964</option>
<option>1965</option>
<option>1966</option>
<option>1967</option>
<option>1968</option>
<option>1969</option>
<option>1970</option>
<option>1971</option>
<option>1972</option>
<option>1973</option>
<option>1974</option>
<option>1975</option>
<option>1976</option>
<option>1977</option>
<option>1978</option>
<option>1979</option>
<option>1980</option>
<option>1981</option>
<option>1982</option>
<option>1983</option>
<option>1985</option>
<option>1986</option>
<option>1987</option>
<option>1988</option>
<option>1990</option>
</select>
</font></font></font></font></font></font></font></font></font></span></td>
<td align="right" width="51"><div align="right"><span class="style5"><font face="Arial" color="#008000">Dimesso</font></span></div></td>
<td colspan="2" align="left"><span class="style5"><font color="#008000">
<select name="txtDimesso" id="txtDimesso">
<option>NO</option>
<option>SI</option>
</select>
</font></span></td>
<td colspan="2" align="right"><span class="style5"><font color="#008000" face="Arial">AnnoDimissioni </font></span></td>
<td colspan="2" align="left"><div align="right"><span class="style5"></span></div> <span class="style5"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000"><font color="#008000">
<select name="txtAnnoDimissioni" id="txtAnnoDimissioni">
<option>Iscritto</option>
<option>2005</option>
<option>2006</option>
</select>
</font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font>
</font></font></font></font></font></font></font></font></font></font>
</span> <div align="right"><span class="style5"></span></div></td>
</tr>
<tr class="DataColor">
<td height="36" colspan="5" align="right"><div align="center" class="style5">
<div align="left">
<select name="txtEnte" class="ListFooterColor" id="txtEnte">
<option>Scegli Ente di Appartenenza...</option>
<option>Giunta Regionale</option>
<option>Consiglio Regionale</option>
<option>Agenzia Regionale del Lavoro</option>
<option>Ente Regionale per i Servizi Agricoltura e alle Foreste</option>
<option>Istituto Regionale Lombardo di Formazione Amministrazione Pubblica</option>
</select>
</div>
</div></td>
<td height="36" colspan="2" align="center"><span class="style5">
<select name="TxtCategoria" id="TxtCategoria">
<option>Categoria...</option>
<option>A</option>
<option>B1</option>
<option>B3</option>
<option>C</option>
<option>D1</option>
<option>D3</option>
</select>
</span></td>
<td height="36" colspan="4" align="right"><div align="left"><span class="style5">
<select name="txtPosizioneEconomica" id="txtPosizioneEconomica">
<option>Posizione Economica...</option>
<option>A1</option>
<option>A2</option>
<option>A3</option>
<option>A4</option>
<option>A5</option>
<option>B1</option>
<option>B2</option>
<option>B3</option>
<option>B4</option>
<option>B5</option>
<option>B6</option>
<option>B7</option>
<option>C1</option>
<option>C2</option>
<option>C3</option>
<option>C4</option>
<option>C5</option>
<option>D1</option>
<option>D2</option>
<option>D3</option>
<option>D4</option>
<option>D5</option>
<option>D6</option>
</select>
</span><span class="style5">
</span></div></td>
</tr>
<tr>
<td colspan="11" align="right"><div align="center" class="style8">Recapito della sede di lavoro </div></td>
</tr>
<tr>
<td align="center" width="73"><span class="style5"><font face="Arial" color="#008000">Indirizzo</font></span></td>
<td colspan="3" align="left"><input name="txtIndirizzoUff" id="txtIndirizzoUff" size="27"></td>
<td align="right" width="51"><div align="right"><span class="style5"><font face="Arial" color="#008000">Città</font></span></div></td>
<td colspan="2" align="left"><input name="txtCittaUff" id="txtCittaUff" size="25"></td>
<td width="47" align="right"><span class="style5"><font face="Arial" color="#008000">Prov</font></span></td>
<td width="78" align="left"><span class="style5">
<select name="txtProvUff" id="txtProvUff">
<option>BG</option>
<option>BS</option>
<option>CO</option>
<option>CR</option>
<option>LC</option>
<option>LO</option>
<option>MI</option>
<option>MN</option>
<option>PV</option>
<option>SO</option>
<option>VA</option>
</select>
</span></td>
<td align="left" width="23"><div align="right"><span class="style5"><font face="Arial" color="#008000">Cap</font></span></div></td>
<td align="left"><span class="style5">
<input name="txtCapUff" id="txtCapUff" size="8">
</span> <div align="right"><span class="style5"></span></div></td>
</tr>
<tr>
<td align="center" width="73"><span class="style5"><font face="Arial" color="#008000">Email</font></span></td>
<td colspan="3" align="left"><input name="txtEmailUff" id="txtEmailUff" size="40"></td>
<td align="right" width="51"><div align="right"><span class="style5"><font face="Arial" color="#008000">Telefono</font></span></div></td>
<td colspan="2" align="left"><input name="txtTelefonoUff" id="txtTelefonoUff" size="25"></td>
<td align="right"><span class="style5"><font face="Arial" color="#008000">Cell</font></span></td>
<td colspan="3" align="left"><input name="txtCellUff" id="txtCellUff" size="15"> <div align="right"><span class="style5"></span></div></td>
</tr>
<tr>
<td colspan="11" align="right"><div align="center" class="style8">Recapito di residenza </div></td>
</tr>
<tr>
<td align="center" width="73"><span class="style5"><font face="Arial" color="#008000">Indirizzo</font></span></td>
<td colspan="3" align="left"><input name="txtIndirizzoRes" id="txtIndirizzoRes" size="27"></td>
<td align="right" width="51"><div align="right"><span class="style5"><font face="Arial" color="#008000">Città</font></span></div></td>
<td colspan="2" align="left"><input name="txtCittaRes" id="txtCittaRes" size="27"></td>
<td align="right"><span class="style5"><font face="Arial" color="#008000">Prov</font></span></td>
<td align="left"><span class="style5">
<select name="txtProvRes" id="txtProvRes">
<option>BG</option>
<option>BS</option>
<option>CO</option>
<option>CR</option>
<option>LC</option>
<option>LO</option>
<option>MI</option>
<option>MN</option>
<option>PV</option>
<option>SO</option>
<option>VA</option>
</select>
</span></td>
<td align="left" width="23"><div align="right"><span class="style5"><font face="Arial" color="#008000">Cap</font></span></div></td>
<td align="left" width="64"><span class="style5">
<input name="txtCapRes" id="txtCapRes" size="8">
</span></td>
</tr>
<tr>
<td align="center" width="73"><span class="style5"><font face="Arial" color="#008000">EMail</font></span></td>
<td colspan="3" align="left"><input name="txtEMailres" id="txtEMailres" size="40"></td>
<td align="right" width="51"><div align="right"><span class="style5"><font face="Arial" color="#008000">Telefono</font></span></div></td>
<td colspan="2" align="left"><input name="txtTelefonoRes" id="txtTelefonoRes" size="15"></td>
<td align="right"><span class="style5"><font face="Arial" color="#008000">Cell</font></span></td>
<td colspan="3" align="left"><input name="txtCellPers" id="txtCellPers" size="15"> <div align="right"><span class="style5"></span></div> <div align="right"><span class="style5"></span></div></td>
</tr>
<tr>
<td colspan="11" align="right"><input id="btnSalva"
type="button" value="SALVA" name="btnSalva" language="javascript"
onClick="return btnSalva_onclick()"></td>
</tr>
</table>
<p align="left"> <font color="#008000" size="5"> </font></p>
</div>
</form>
<a href="Show.asp"> Elenco Iscritti </a>
<a href="InserimentoAggregazione.asp"> Elimina </a>
</body>
</html>