<% 'dBlog 2.0 CMS Open Source 'Versione file 2.0.0 %> <% Dim SQLFotografia, RSFotografia, SQLModifica, RSModifica, FID, FNomeFile, FSezione, FAutore, FDescrizione, FData, FOra, FLetture, FHeader, Errore, FilSezioneFotografie, SezioneFotografie, SQLSezioneFotografie, RSSezioneFotografie, SQLListBox, RSListBox If Request.QueryString("id") <> "" AND Request.QueryString("id") <> "0" AND IsNumeric(Request.QueryString("id")) = True Then FID = Request.QueryString("id") Else FID = 0 End If %>

\\ <%=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_Modulo_CampoNomeFileFotografia%> * <% If NOT Abilita_ResizeASPNET Then %> <%=Testo_Modulo_CampoNomeFileFotografiaSpiegazione%> <% Else %> <%=Testo_Modulo_CampoNomeFileFotografiaSpiegazioneConResizeASPNET%> <% End If %>
    " size="50" maxlength="100"> ', 570, 400, 'preview');"><%=Testo_Modulo_LinkPopupPreviewFotografia%> o <%=Testo_Modulo_LinkPopupCampoFileFotografia%> <% If Session("BLOGAdmin") = True Then SQLListBox = " SELECT [Nick] FROM [Autori] GROUP BY Autori.Nick " Set RSListBox = Server.CreateObject("ADODB.Recordset") RSListBox.Open SQLListBox, Conn, 1, 3 %>
<%=Testo_Modulo_CampoAutore%> <%=Testo_Modulo_SpiegazioneCampoAutore%>
     <% End If %>
<%=Testo_Modulo_CampoSezione%> * <%=Testo_Modulo_SpiegazioneCampoSezione%>
    " size="50" maxlength="100"> <%=Testo_SceltaOppure%> <%=Testo_Modulo_LinkPopupCampoSezione%>
<%=Testo_Modulo_CampoDescrizione%> * <%=Testo_Modulo_SpiegazioneCampoDescrizione%>
    " size="50" maxlength="250">
<%=Testo_Modulo_CampoData%> <%=Testo_Modulo_SpiegazioneCampoData%>
    " size="50" maxlength="8"> o <%=Testo_Modulo_LinkPopupCampoData%>
<%=Testo_Modulo_CampoOra%> <%=Testo_Modulo_SpiegazioneCampoOra%>
    " size="50" maxlength="6"> o <%=Testo_Modulo_LinkPopupCampoOra%>
<%=Testo_Modulo_CampoLetture%> <%=Testo_Modulo_SpiegazioneCampoLetture%>
    " size="50" maxlength="5">
<%=Testo_Modulo_CampoHeader%> <%=Testo_Modulo_SpiegazioneCampoHeader%>
    <%=Testo_Modulo_CampoHeaderSi%> > <%=Testo_Modulo_CampoHeaderNo%> >

<%=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 %>
<% Conn.Close Set Conn = Nothing %>