ho omesso il javascript
codice:
<%
Response.Expires = 0
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
Response.buffer=False
if session("auut")<>"admin_sito" then response.redirect("esci.asp") end if
if Instr(session("privilegi"),";35;")=0 then
response.redirect("gestione_sistema.asp")
end if
Function CheckString2(strInput)
if strInput<>"" then
strTemp = Replace(strInput, "``",""")
strTemp = Replace(strTemp, "`","'")
strTemp = Replace(strTemp, "
",vbcr)
CheckString2 = strTemp
else
CheckString2 = ""
end if
End Function
id=request.querystring("id")
statov=request.querystring("statov")
s1=request.querystring("s1")
%>
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="SELECT * FROM eventi WHERE IDEvento="&id
response.write sql
rs.Open sql, conn
%>
<html>
<head>
<link rel="stylesheet" href="../css/body.css">
<title>AMMINISTRAZIONE - Scheda Eventi</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%if not rs.eof then %>
<div align="center">
<span class="TITOLOVERDEC">AMMINISTRAZIONE
Scheda Eventi</span></p>
<form name="Form1" method="post" onsubmit="return Registra_Validator(this)" action="modifica_eventi.asp">
<table border="2" cellspacing="1" bordercolor="#336600" width="539">
<tr>
<td bgcolor="#E2ECD9" align="center" width="89"><font color="#336600">Nome
Evento/tipologia</font></td>
<td width="122">
<input type="text" name="nome" value="<%=CheckString2(CStr(rs("nome")))%>">
</td>
<td bgcolor="#E2ECD9" align="center" width="80"><font color='#336600'>Priorità</font></td>
<td width="186">
<input type="text" name="sortorder" value="<%=rs("SortOrder")%>">
</td>
</tr>
<tr>
<td bgcolor="#E2ECD9" align="center" width="89"><font color="#336600">Tema</font></td>
<td width="122">
<input type="text" name="titolo" value="<%=CheckString2(CStr(rs("Tema")))%>">
</td>
<td bgcolor="#E2ECD9" align="center" width="89"><font color="#336600">Luogo/data/dove</font></td>
<td width="122">
<input type="text" name="comune" value="<%=CheckString2(rs("IDComune"))%>">
</td>
</tr>
<tr>
<td bgcolor="#E2ECD9" align="center" width="80"><font color='#336600'>Tipo</font></td>
<td width="186">
<input type="text" name="tipo" value="<%=CheckString2(rs("TipoEvento"))%>">
</td>
<td bgcolor="#E2ECD9" align="center" width="80"> </td>
<td width="186"> </td>
</tr>
<tr>
<td bgcolor="#E2ECD9" align="center" width="89"><font color="#336600">Visualizzazione
in Agenda</font></td>
<td width="122" colspan="3">
<input type="checkbox" name="agenda" value="on">
</td>
</tr>
<tr>
<td bgcolor="#E2ECD9" align="center" width="89"><font color="#336600">Testo
evento</font></td>
<td colspan="3">
<%
if rs("DescrizioneEvento")<> "" then
descrizionetemp= rs("DescrizioneEvento")
if not (isnull(descrizionetemp)) then
descrizione=CheckString2(CStr(descrizion
etemp))
else
descrizione=""
end if
end if
%>
<textarea name="tema" cols="30" rows="3"><%=descrizione%></textarea>
</td>
</tr>
<tr>
<td bgcolor="#E2ECD9" align="center" rowspan="2" width="89"><font color='#336600'>Immagine</font></td>
<td width="122" rowspan="2">
<select name="img">
<option value="">Seleziona Immagine</option>
<%
strPath = "../img/img_eve/"
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(Server.MapPath(strPath))
For Each objItem In objFolder.Files
if lcase(right(objItem.Name,4))=".gif" or lcase(right(objItem.Name,4))=".jpg" then
response.write("<option value=" & chr(34) & objItem.Name & chr(34))
if CheckString2(rs("LinkImmagine"))=objItem.Name then
response.write(" selected")
end if
response.write(">"& objItem.Name & "</option>")
end if
Next
Set objItem = Nothing
Set objFolder = Nothing
Set objFSO = Nothing
%>
</select>
</p>
</td>
<td bgcolor="#E2ECD9" align="center" width="80"> <font color='#336600'>Link</font>
</td>
<td width="186">
<input type="text" name="linko" value="<%=CheckString2(rs("Link"))%>">
</td>
</tr>
<tr>
<td bgcolor="#E2ECD9" width="80" height="69" align="center"><font color='#336600'>Descrizione</font></td>
<td width="186">
<textarea name="descrizione" cols="30" rows="3"><%=CheckString2(rs("DescrizioneImmagine"))%></textarea>
</td>
</tr>
</table>
<input type="hidden" name="id" value="<%=rs("IDEvento")%>">
<input type="hidden" name="statov" value="<%=statov%>">
<input type="hidden" name="s1" value="<%=s1%>">
<input type="submit" name="Modifica" value="Applica">
</p>
</form>
<table border="2" cellspacing="1" bordercolor="#336600" width="600">
<tr>
<td bgcolor="#E2ECD9" align="center" colspan="5"><font color='#336600'>ALLEGATI</font></td>
</tr>
<tr>
<td colspan="5"> <form method="POST" onSubmit="return Controlla_Upload(this)" enctype="multipart/form-data" action="upload.asp">
<font color="#336600">File: </font>
<input type="file" name="blob" size=30>
<font color="#336600">Priorità: </font>
<input name="sortfile" type="text" value="5" size="5">
<font color="#336600">Descrizione: </font>
<input name="descrizionefile" type="text" size="80" maxlength="100">
<div align="center">
<input type="hidden" name="percorso" value="../all/all_even">
<input type="hidden" name="id" value="<%=rs("IDEvento")%>">
<input type="hidden" name="info" value="z">
<input type="hidden" name="statov" value="<%=statov%>">
<input type="hidden" name="s1" value="<%=s1%>">
<input type="submit" name="Enter" value="Aggiungi">
</div>
</form></td>
</tr>
<%
sql="SELECT IDEventoFile,Descrizione,LinkToFile,Sort
Order FROM eventifile WHERE IDEvento="&id&" ORDER BY SortOrder"
set rs2=conn.execute(sql)
if not rs2.eof then
arrayrecord=rs2.GetRows
num=ubound(arrayrecord,2)
%>
<tr>
<td bgcolor="#E2ECD9" align="center" colspan="5"><font color='#336600'>File
già allegati</font></td>
</tr>
<tr>
<td width="41" align="center" bgcolor="#E2ECD9"><font color='#336600'>N.</font></td>
<td bgcolor="#E2ECD9" align="center"><font color='#336600'>Descrizione</font></td>
<td width="44" align="center" bgcolor="#E2ECD9"><font color='#336600'>Priorità</font></td>
<td width="64" align="center" bgcolor="#E2ECD9"> </td>
<td width="59" align="center" bgcolor="#E2ECD9"> </td>
</tr>
<form name="Form3" method="post" onsubmit="return Controlla_Allegati(this,<%=num+1%> )" action="modifica_stato_allegati.asp">
<%
for j=0 to num
%>
<tr>
<td width="41" align="center"><span class="TESTONERO"><%=(j+1)%></span></td>
<td width="362" align="justify"><span class="TESTONERO"><%=CheckString2(arrayrecord(1,j))%></span></td>
<td width="44" align="center"><input name="sortfile" type="text" id="sortfile" value="<%=arrayrecord(3,j)%>" size="5"></td>
<td width="64" align="center"> <input onClick='Replace(1,<%=rs("IDEvento")%>,<%=arrayrecord(0,j)%>,"<%=statov%>","<%=s1%>")' type="button" value="Modifica">
</td>
<td width="59"> <input onClick='Replace(2,<%=rs("IDEvento")%>,<%=arrayrecord(0,j)%>,"<%=statov%>","<%=s1%>")' type="button" value="Elimina">
</td>
</tr>
<%
next
%>
<tr>
<td align="center" colspan="5">
<input type="hidden" name="num" value="<%=num%>">
<input type="hidden" name="sortlist">
<input type="hidden" name="info" value="z">
<input type="hidden" name="id" value="<%=rs("IDEvento")%>">
<input type="hidden" name="statov" value="<%=statov%>">
<input type="hidden" name="s1" value="<%=s1%>">
<input type="submit" value="Applica">
</td>
</tr>
</form>
<%
end if
if rs2.State<>0 then
rs2.close
end if
set rs2=nothing
%>
</table>
<span class="TESTONERO"><font color='#336600'>Indietro</font></span></p>
</div>
<%
if rs.State<>0 then
rs.close
end if
set rs=nothing
%>
<%end if %>
</body>
</html>