% @language="JScript" %>
<%
var Print = new String(Request.QueryString("print"))
var Oggi = new Date( )
var Settimana = new Array("Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato")
var Mese = new Array("Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre")
var URL = new String(Request.ServerVariables("URL"))
var Navigatore = new String(Request.ServerVariables("HTTP_USER_AGENT"))
var Indirizzo = new String(Request.ServerVariables("REMOTE_ADDR"))
var Utente = new String(Request.ServerVariables("LOGON_USER"))
var Provenienza = new String(Request.ServerVariables("HTTP_REFERER"))
var DataSQL = Oggi.getFullYear( ) + "-" + (Oggi.getMonth( ) < 9 ? "0" + (Oggi.getMonth( ) + 1) : Oggi.getMonth( ) + 1) + "-" + (Oggi.getDate( ) < 10 ? "0" + Oggi.getDate( ) : Oggi.getDate( ))
if(Print == "true")
Print = true
else Print = false
if(Utente = "")
Utente = "guest"
if(Navigatore.toLowerCase( ).indexOf("mozilla") > -1 && !Print)
ExecuteQuery("insert into visite (indirizzo, utente, url, navigatore, data, ora, banner, provenienza, sessione) values (inet_aton(\"" + Indirizzo + "\"), \"" + Utente + "\", \"" + URL + "\", \"" + Navigatore + "\", \"" + DataSQL + "\", \"" + (Oggi.getHours( ) < 10 ? "0" + Oggi.getHours( ) : Oggi.getHours( )) + ":" + (Oggi.getMinutes( ) < 10 ? "0" + Oggi.getMinutes( ) : Oggi.getMinutes( )) + "\", NULL, \"" + Provenienza + "\", \"" + Session.SessionID + "\")")
%>
Ethnos newsletter. To receive all the informations on new ethnic jewellery products
<%
var Email = new String(Request.Form("email")).replace(/^undefined$/, "")
var Azione = new String(Request.Form("Azione"))
var Errore = new Array(0)
if(Email != "")
{
Email = Email.toLowerCase( )
if(Email.search(/^[a-z0-9\.\-\_]*\@[a-z0-9\.\-\_]*$/) != 0)
{
Errore.push("Invalid e-mail address")
}
if(Errore.length == 0)
{
var Configurazione = new ActiveXObject("CDO.Configuration")
Configurazione.Fields.item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
Configurazione.Fields.item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
Configurazione.Fields.item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.furel.it"
Configurazione.Update
var mail = new ActiveXObject("CDO.Message")
if(typeof mail == "object")
{
mail.Configuration = Configurazione
var Data = new Date( )
var IndirizzoIP = Request.ServerVariables("REMOTE_ADDR")
var corpo = "SUBSCRIPTION CONFIRMATION\n\n"
corpo += "We have received a request to insert this e-mail address into our mailing list\n"
corpo += "The request was performed on " + Data + "\nfrom the address " + IndirizzoIP + "\n\n"
corpo += "If you want to confirm the subscription, please follow this link:\n\n"
corpo += "---\n"
corpo += "http://www.ethnos.biz/m.asp?a=" + Server.UrlEncode(Email) + "&s=" + Session.SessionID + "\n"
corpo += "---\n\n"
corpo += "Note: some mail readers breaks the link above in two or more lines: by clicking you probably get an error because the link is incomplete\n"
corpo += "In this case you need to copy and paste each link line to the browser's address bar\n\n"
corpo += "If you feel that this mail is a error, please ignore the entire message\n\n"
corpo += "Best regards,"
corpo += "the \"ethnos.biz\" staff"
corpo += "info@ethnos.biz"
mail.From = "info@ethnos.biz"
mail.To = Email
mail.Subject = "[ethnos.biz] Subscription confirmation"
mail.TextBody = corpo
mail.Send( )
ExecuteQuery("insert into mailing set email = \"" + Email + "\", sessione = \"" + Session.SessionID + "\"")
Errore.push("Subscription done successfully. You will receive a confirmation message")
}
mail = null
Configurazione = null
}
}
%>