%@LANGUAGE="VBSCRIPT"%>
<%
if request("IDImg") <> "" then
where = " WHERE IDImg = " & request("IDImg")
end if
set rsFoto = Server.CreateObject("ADODB.Recordset")
rsFoto.ActiveConnection = "Driver={MySql ODBC 3.51 Driver}; Server=localhost; uid=root; pwd=inf75k15; database=memorial06; option=3; port=3306;"
rsFoto.Source = "Select * from TabImg " & where & " Order by IDImg desc"
rsFoto.Locktype = 3
rsFoto.Open()
recordID = rsFoto("IDImg") + 1
if request("IDImg") <> "" then
rsFoto("Dida") = request("txtDida")
if request("NomeImg") <> "" then
rsFoto("NomeImg") = request("NomeImg")
end if
rsFoto.Update()
elseif request("IDImg") = "" then
rsFoto.addnew
rsFoto("NomeImg") = request("Nome")
rsFoto("Dida") = request("txtDida")
rsFoto("IDNews") = request("IDNews")
rsFoto("user_IP") = Request.ServerVariables("REMOTE_ADDR")
if Session("Loggaterrimo") = true then
rsFoto("Publ") = "Y"
end if
rsFoto.Update()
end if
if Session("Loggaterrimo") = "" then
strCorpo = "E' stata inviata una nuova immagine:
"
strCorpo = strCorpo & "
"
strCorpo = strCorpo & "
Con la seguente didascalia: " & request("txtDida")
strCorpo = strCorpo & "
Se vuoi pubblicare, clicca qui"
Set Mail = Server.CreateObject("CDONTS.NewMail")
Mail.From = "info@memorialcimurri.com"
Mail.to = "info@memorialcimurri.com"
Mail.subject = "Nuova immagine inviata"
Mail.BodyFormat = 0
Mail.MailFormat = 0
Mail.Importance = 0
Mail.Body = strCorpo
Mail.Send
Set Mail = Nothing
'response.Write(strCorpo)
'response.Write(recordID)
end if
rsFoto.Close
set rsFoto = nothing
response.Redirect("/2006/foto.asp?publ=y")
%>