<% lingua = Request.Querystring("lingua") Response.Buffer = True Dim strUrlSfondo Dim cartella, txtSubject Dim intLung Dim strHTMLBody DIM iMsg, Flds, iConf Dim strSQL, strID, strSqlIdMax, strSql_Controllo, strAppo Dim oConn, objRs, flag, iDNuovo, Errore, strNow Dim Messaggio, flagLogin, strAppoLogin flag = Request.Querystring("flag") If flag then Set oConn = Server.CreateObject("ADODB.Connection") oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("mdb-database\link.mdb")) login = Request.Form("login") nome_sito = Request.Form("nome_sito") email = Request.Form("email") password = Request.Form("password") url_sito = Request.Form("url_sito") url_banner = Request.Form("url_banner") link_exchange = Request.Form("link_exchange") tipo_link = Request.Form("tipo_link") 'Controllo dei dati inseriti nel form. Errore = 0 if login = "" then Errore = 1 end if if password = "" then Errore = Errore + 2 end if if url_sito = "" then Errore = Errore + 5 elseif url_sito = "http://" then Errore = Errore + 5 end if if nome_sito = "" then Errore = Errore + 9 end if if email = "" then Errore = Errore + 20 end if if link_exchange = "" then Errore = Errore + 40 end if 'Verifica se la Login è già presente nel DB. strSql_Controllo = "SELECT login FROM linknew WHERE login = '"&login&"'" Set objRs = oConn.Execute(strSql_Controllo) flagLogin = 0 If not objRs.EOF Then strAppoLogin = objRs.Fields("login").Value if StrComp(strAppoLogin, login, 1) = 0 Then flagLogin = 1 end if end if ' StrComp il parametro 1 non tiene conto delle maiuscole minuscole if flagLogin = 1 or Errore <> 0 Then 'Login trovata strAppo = "insert_banner_photo.asp?flag=false&password="&password strAppo = strAppo& "&url_sito="&url_sito strAppo = strAppo& "&email="&email strAppo = strAppo& "&link_exchange="&link_exchange strAppo = strAppo& "&nome_sito="&nome_sito strAppo = strAppo& "&url_banner="&url_banner strAppo = strAppo& "&tipo_link="&tipo_link strAppo = strAppo& "&login=true" If lingua = "it" then strAppo = strAppo& "&lingua=it" end if If Errore > 0 then If lingua = "it" then strAppo = strAppo& "&errore="&Errore&"&lingua=it" 'Response.Redirect("insert_banner_new.asp?errore="&Errore&"&lingua=it") else strAppo = strAppo& "&errore="&Errore 'Response.Redirect("insert_banner_new.asp?errore="&Errore) end if end if objRs.Close Set objRs = Nothing oConn.Close Set oConn = Nothing response.redirect strAppo end if 'objRs(0) contiene il max id della tabella login_db 'Preparo l'INSERT 'strNow = DateAdd("s",21600, FormatDateTime(Now,0)) strNow = FormatDateTime(Now,0) strSQL = "INSERT INTO linknew (login,email,link_exchange,nome_sito,password,url_sito,data_creazione,data_modifica,url_banner,tipo_link,buffer1testo)" strSQL= strSQL& " VALUES " strSQL= strSQL& "('"&login&"'," strSQL= strSQL& "'"&email&"'," strSQL= strSQL& "'"&link_exchange&"'," strSQL= strSQL& "'"&nome_sito&"'," strSQL= strSQL& "'"&password&"'," strSQL= strSQL& "'"&url_sito&"'," strSQL= strSQL& "'"&strNow&"'," strSQL= strSQL& "'"&strNow&"'," strSQL= strSQL& "'"&url_banner&"'," strSQL= strSQL& "'"&tipo_link&"'," strSQL= strSQL& "'si')" 'response.Write strSQL oConn.Execute(strSQL) Set objRs = Nothing oConn.Close Set oConn = Nothing Set iMsg = CreateObject("CDO.Message") Set iConf = CreateObject("CDO.Configuration") Set Flds = iConf.Fields Flds(cdoSendUsingMethod) = cdoSendUsingPort Flds(cdoSMTPServer) = "smtp.aruba.it" Flds(cdoSMTPServerPort) = 25 Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0 Flds.Update If lingua = "it" then ' -------------------------------------------------------- strHTMLBody = "

Grazie per aver partecipato allo scambio link con il sito www.photolandscapes.net" strHTMLBody = strHTMLBody & "" strHTMLBody = strHTMLBody & "
" strHTMLBody = strHTMLBody & "
"
strHTMLBody = strHTMLBody & "

Questi sono i dati di autenticazione del sito "&url_sito&" sono


" strHTMLBody = strHTMLBody & "

Login :"&login&"


" strHTMLBody = strHTMLBody & "

Password :"&Password&"


" strHTMLBody = strHTMLBody & "

Ciao


" strHTMLBody = strHTMLBody & "

Qui puoi trovare il codice HTML da inserire nelle tue pagine di scambio link.


" strHTMLBody = strHTMLBody & "

Visualizza codice


" strHTMLBody = strHTMLBody & "


" strHTMLBody = strHTMLBody & "
" strHTMLBody = strHTMLBody & "
" txtSubject = "Scambio Link" ' -------------------------------------------------------- ' -------------------------------------------------------- strTxtBody = "Grazie per aver partecipato allo scambio link con il sito www.photolandscapes.net" & vbCrLf strTxtBody = strTxtBody & "Questi sono i dati di autenticazione del sito "&url_sito&" sono" & vbCrLf & vbCrLf strTxtBody = strTxtBody & "Login :"&login & vbCrLf strTxtBody = strTxtBody & "Password :"&Password & vbCrLf strTxtBody = strTxtBody & "Ciao" & vbCrLf & vbCrLf txtSubject = "Scambio Link" ' -------------------------------------------------------- else ' -------------------------------------------------------- strHTMLBody = "

Thanks to have participated to the exchange link with the web site www.photolandscapes.net" strHTMLBody = strHTMLBody & "" strHTMLBody = strHTMLBody & "
" strHTMLBody = strHTMLBody & "
"
strHTMLBody = strHTMLBody & "

These are your parameters of authentication for the web site: "&url_sito&"


" strHTMLBody = strHTMLBody & "

Login :"&login&"


" strHTMLBody = strHTMLBody & "

Password :"&Password&"


" strHTMLBody = strHTMLBody & "

Thanks


" strHTMLBody = strHTMLBody & "

Here you can find the HTML code for your's exchange link pages.


" strHTMLBody = strHTMLBody & "

View code


" strHTMLBody = strHTMLBody & "
" strHTMLBody = strHTMLBody & "
" txtSubject = "Exchange Link" ' -------------------------------------------------------- end if With iMsg Set .Configuration = iConf '.To = "gianlucafalzone@vodafone.it" '.To = "gianluca.falzone@gmail.com" .To = email .Bcc = "gianlucafalzone@vodafone.it" .From = "info@photolandscapes.net" .Subject = txtSubject '.TextBody = strTxtBody .HTMLBody = strHTMLBody '.AddAttachment (cartella & "/" & strUrlSfondo) .Send End With response.redirect "lista_photo.asp" else %> <% If lingua="it" Then %>

<% Errore = Request.QueryString("errore") If Errore > 0 then Response.Write("") Response.Write("") Response.Write("") end if %>

Inserisci il tuo Sito Web

") Response.Write("

") Select Case Errore Case "1" Messaggio = "Il campo Login non è stato debitamente compilato" Case "2" Messaggio = "Il campo Password non è stato debitamente compilato" Case "3" Messaggio = "I campi Login e Password non sono stati debitamente compilati" Case "5" Messaggio = "Il campo Url Sito non è stato debitamente compilato" Case "6" Messaggio = "I campi Login e Url Sito non sono stati debitamente compilati" Case "7" Messaggio = "I campi Password e Url Sito non sono stati debitamente compilati" Case "8" Messaggio = "I campi Login, Password e Url Sito non sono stati debitamente compilati" Case "9" Messaggio = "Il campo Nome del Sito non è stato debitamente compilato" Case "10" Messaggio = "I campi Login e Nome del Sito non sono stati debitamente compilati" Case "11" Messaggio = "I campi Password e Nome del Sito non sono stati debitamente compilati" Case "12" Messaggio = "I campi Login, Password e Nome del Sito non sono stati debitamente compilati" Case "14" Messaggio = "I campi Url Sito e Nome del Sito non sono stati debitamente compilati" Case "15" Messaggio = "I campi Login, Url Sito e Nome del Sito non sono stati debitamente compilati" Case "16" Messaggio = "I campi Password, Url Sito e Nome del Sito non sono stati debitamente compilati" Case "17" Messaggio = "I campi Login, Password, Url Sito e Nome del Sito non sono stati debitamente compilati" Case "20" Messaggio = "E-mail non presente." Case else Messaggio = "Attenzione Controllare i dati immessi." End Select Response.Write(Messaggio) Response.Write("

*Login:

<% login = Request.Querystring("login") response.write "" If login then 'Login esistente If Errore = 0 then response.write " Attenzione Login Esistente!!!!" end if Else 'OK login corretta end if %>
*Password: <% password = Request.Querystring("password") response.write "" %>
*E-Mail: <% email = Request.Querystring("email") response.write "" %>
*Titolo del Sito:

Max 100 caratteri

<% nome_sito = Request.Querystring("nome_sito") response.write "" %>
*URL Sito: <% If login then url_sito = Request.Querystring("url_sito") response.write "" else response.write "" end if %>
*Link ExChange: <% If login then link_exchange = Request.Querystring("link_exchange") response.write "" else response.write "" end if %>
URL Banner: <% If login then url_banner = Request.Querystring("url_banner") response.write "" else response.write "" end if %>
Tipo di Sito: <% tipo_link = Request.Querystring("tipo_link") response.write "" elseif tipo_link = "photography" then response.write "

* = Campi Obbligatori.

Versione in Inglese

<% else %>
<% Errore = Request.QueryString("errore") If Errore > 0 then Response.Write("") Response.Write("") Response.Write("") end if %>

Add Your Web Site

") Response.Write("

") Select Case Errore Case "1" Messaggio = "The Login is Empty" Case "2" Messaggio = "The Password is Empty" Case "3" Messaggio = "The Login and Password are Empty" Case "5" Messaggio = "The Url Site is Empty" Case "6" Messaggio = "The Login and Url Site are Empty" Case "7" Messaggio = "The Password and Url Site are Empty" Case "8" Messaggio = "The Login, Password and Url Site are Empty" Case "9" Messaggio = "The Title of the Site is Empty" Case "10" Messaggio = "The Login and Title of the Site are Empty" Case "11" Messaggio = "The Password and Title of the Site are Empty" Case "12" Messaggio = "The Login, Password and Title of the Site are Empty" Case "14" Messaggio = "The Url Site and Title of the Site are Empty" Case "15" Messaggio = "The Login, Url Site and Title of the Site are Empty" Case "16" Messaggio = "The Password, Url Site and Title of the Site are Empty" Case "17" Messaggio = "The Login, Password, Url Site and Title of the Site are Empty" Case "20" Messaggio = "The E-mail of the Site are Empty" Case "21" Messaggio = "The E-mail, Login of the Site are Empty" Case "22" Messaggio = "The E-mail, Password of the Site are Empty" Case "23" Messaggio = "The E-mail,Login,Password of the Site are Empty" Case "24" Messaggio = "The E-mail or Login or Password or Url Site or Title of the Site are Empty" Case else Messaggio = "The Filds of the Site are Empty" End Select Response.Write(Messaggio) Response.Write("

*Login:

<% login = Request.Querystring("login") response.write "" If login then 'Login esistente If Errore = 0 then response.write " Attenzione Login Esistente!!!!" end if Else 'OK login corretta end if %>
*Password: <% password = Request.Querystring("password") response.write "" %>
*E-Mail: <% email = Request.Querystring("email") response.write "" %>
*Title of the Site:

Length Max 100

<% nome_sito = Request.Querystring("nome_sito") response.write "" %>
*URL Site: <% If login then url_sito = Request.Querystring("url_sito") response.write "" else response.write "" end if %>
*Link ExChange: <% If login then link_exchange = Request.Querystring("link_exchange") response.write "" else response.write "" end if %>
URL banner: <% If login then url_banner = Request.Querystring("url_banner") response.write "" else response.write "" end if %>
Type of Site Web: <% tipo_link = Request.Querystring("tipo_link") response.write "" elseif tipo_link = "photography" then response.write "

* = Mandatory fields.

Italian Version

<% end if %> <% end if Response.end Response.Clear %>