|
\\ <%=Testo_Path_Pannello%> : <%=Testo_Sezione_Fotografie%> : <%=Testo_Modulo_PulsanteModifica%>
<%=Testo_Fotografie_IntroduzioneModifica%>
<%
If Request.QueryString("a") = "modifica" Then
FNomeFile = DoppioApice(Request.Form("NomeFile"))
FSezione = DecodeEntities(SostituisciCaratteri(DoppioApice(Request.Form("Sezione")), "No"))
If Request.Form("Autore") = "" Then
FAutore = Session("BLOGNick")
Else
FAutore = DoppioApice(Request.Form("Autore"))
End If
FDescrizione = DoppioApice(SostituisciCaratteri(Request.Form("Descrizione"), "No"))
FData = DoppioApice(Request.Form("Data"))
FOra = DoppioApice(Request.Form("Ora"))
FLetture = DoppioApice(Request.Form("Letture"))
FHeader = Request.Form("Header")
Errore = False
If FNomeFile = "" Then
Errore = True
End If
If FSezione = "" Then
Errore = True
End If
If FDescrizione = "" Then
Errore = True
End If
If FData = "" OR Len(FData) <> 8 OR IsNumeric(FData) = False OR IsDate(StrToData(FData)) = False Then
Errore = True
End If
If FOra = "" OR Len(FOra) <> 6 OR IsNumeric(FOra) = False Then
Errore = True
End If
If FLetture = "" OR IsNumeric(FLetture) = False Then
Errore = True
End If
If Errore = False Then
SQLModifica = " UPDATE [Fotografie] SET Fotografie.NomeFile = '"& FNomeFile &"', Fotografie.Sezione = '"& FSezione &"', Fotografie.Autore = '"& FAutore &"', Fotografie.Descrizione = '"& FDescrizione &"', Fotografie.Data = '"& FData &"', Fotografie.Ora = '"& FOra &"', Fotografie.Letture = "& FLetture &", "
If FHeader = "si" Then
SQLModifica = SQLModifica & "Fotografie.Header = True "
Else
SQLModifica = SQLModifica & "Fotografie.Header = False "
End If
If Session("BLOGAdmin") = True Then
SQLModifica = SQLModifica & "WHERE Fotografie.ID = "& FID &" "
Else
SQLModifica = SQLModifica & "WHERE Fotografie.ID = "& FID &" AND Fotografie.Autore = '"& Session("BLOGNick") &"' "
End If
Set RSModifica = Server.CreateObject("ADODB.Recordset")
RSModifica.Open SQLModifica, Conn, 1, 3
Set RSModifica = Nothing
%>
<%=Testo_Fotografie_ModificaABuonFine%>
<%=Testo_Fotografie_LinkTornaIndietro%>, <%=Testo_Fotografie_LinkVaiElenco%> <%=Testo_SceltaOppure%> <%=Testo_Link_AvviaUploadFile%>.
<%
Else
%>
<%=Testo_Fotografie_ErroreModifica%>
<%=Testo_Fotografie_LinkTornaIndietro%> <%=Testo_SceltaOppure%> <%=Testo_Fotografie_LinkVaiElenco%>.
<%
End If
Else
If Session("BLOGAdmin") = True Then
SQLFotografia = " SELECT * FROM [Fotografie] WHERE ID = "& FID &" "
Else
SQLFotografia = " SELECT * FROM [Fotografie] WHERE ID = "& FID &" AND [Autore] = '"& Session("BLOGNick") &"' "
End If
Set RSFotografia = Server.CreateObject("ADODB.Recordset")
RSFotografia.Open SQLFotografia, Conn, 1, 3
If NOT RSFotografia.EOF Then
%>
<%=Testo_Legenda_CampiObbligatori%>
<%
Else
%>
<%=Testo_TabellaFotografie_ErroreNessunaFotografiaTrovata%>: <%=Testo_Errore_PassaggioParametri%>
<%=Testo_Fotografie_LinkTornaIndietro%> <%=Testo_SceltaOppure%> <%=Testo_Fotografie_LinkVaiElenco%>.
<%
End If
Set RSFotografia = Nothing
End If
%>
|
|