Sub FrmModArticolo
id = GetHttpVariable("id",1)
if id>0 then
q = " Select * from Articoli where idArticolo="&id
Set rs = Conn.Execute(q)
if not rs.Eof then
titolo = rs("Titolo")
autore = rs("autore")
emailAutore = rs("emailAutore")
FileXsl = rs("FileXsl")
breve = rs("breve")
testo = rs("testo")
NomeFile = rs("NomeFile")
%>
Torna all'elenco degli articoli - Vedi XML
Modifica Articolo: |
<%
else
response.redirect "articoli.asp"
End if
Else
response.redirect "articoli.asp"
End if
End Sub
Sub ModArticolo
titolo = replace(getHttpVariable("titolo",2),"'","''")
FileXsl = replace(getHttpVariable("FileXsl",2),"'","''")
breve = replace(getHttpVariable("breve",2),"'","''")
testo = replace(getHttpVariable("testo",2),"'","''")
NomeFile = replace(getHttpVariable("NomeFile",2),"'","''")
autore = replace(getHttpVariable("autore",2),"'","''")
emailAutore = replace(getHttpVariable("emailAutore",2),"'","''")
id = getHttpVariable("id",1)
canInsert = True
if not(len(titolo)>0) or not(len(breve)>0) or not(len(testo)>0) then
canInsert = False
End if
if not(len(FileXsl)>0) then
canInsert = False
End if
if not(len(NomeFile)>0) then
canInsert = False
End if
if canInsert= True then
response.write "ID:"&id
if id>0 then
UpdateSQL "articoli","titolo='"&titolo&"',FileXsl='"&FileXsl&"',Breve='"&breve&"',testo='"&testo&"',NomeFile='"&nomeFile&"',autore='"& autore &"',emailAutore='"&emailAutore&"'"," idArticolo="&id
response.redirect("articoli.asp?a=3&id="&id)
Else
response.redirect("articoli.asp")
End if
Else
%>Impossibile salvare i seguenti dati!! Completare tutti i campi.
Premere qui per tornare indietro!<%
End if
End Sub