<!--#include file="header.inc"-->
<%
' #### This script Copyright (c) 2001 ASPjar.com, All Rights Reserved.  NO WARRANTEE.
' #### You need CDONTS installed to be able to send mail
' #### Your sites information starts here ####
' Email Subject
EmailSubject="visita www.sbattimento.com"
' Footer Messages sent with each email
EmailFooter1="Un tuo amico ti invita a visitare:"
EmailFooter2="www.sbattimento.com"
EmailFooter3="Potrai diverterti Gratis! Vieni a scaricare video, calendari, file eseguibili, file audio divertentissimi, foto trash...e ancora giochi GRATIS, suonerie, loghi, sms animati,screenmates, testi folli, e tante altre chicche"

' Do you also want to recieve all emails? YES or NO
WebmasterMail="YES"
' Your Email Address - must be a valid domain or the mail will not send
sYourEmail="webmaster@sbattimento.com"

' Heading font color
FontColor="#5e007f"
' Heading Background Color
HeadColor="#ffc500"
' Form Font Color
FormFontColor="#ffc500"
' Form Background Color
FormBackColor="#5e007f"
'Error Message Color
ErrorColor="red"
' That's it! - you may now wish to customize the header and footer files to suit your site.
' ####################################################################################

Function ValidateField(sFieldValue, sFieldType)
Dim bFieldIsOkay, Email, Friend, Message
bFieldIsOkay = true
Select Case LCase(sFieldType)
Case "uemail"
If Len(sFieldValue) < 5 Then
bFieldIsOkay = False
Else
If InStr(1, sFieldValue, "@", 1) < 2 Then
bFieldIsOkay = False
Else
If InStr(1, sFieldValue, ".", 1) < 4 Then
bFieldIsOkay = False
End If
End If
End If
		Case "name"
		If Len(sFieldValue) = 0 Then bFieldIsOkay = False
		Case "fname"
		If Len(sFieldValue) = 0 Then bFieldIsOkay = False
Case "email"
If Len(sFieldValue) < 5 Then
bFieldIsOkay = False
Else
If InStr(1, sFieldValue, "@", 1) < 2 Then
bFieldIsOkay = False
Else
If InStr(1, sFieldValue, ".", 1) < 4 Then
bFieldIsOkay = False
End If
End If
End If
Case "message"
If Len(sFieldValue) = 0 Then bFieldIsOkay = False
Case "else"
bFieldIsOkay = False
End Select
ValidateField = bFieldIsOkay
End Function
Sub ShowFormField(Bert)
%><center>
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<form action="<%= Request.ServerVariables("Script_Name") %>" METHOD="post">
<table border="0" CELLSPACING="0" WIDTH="230">
<tr bgcolor="<%=HeadColor%>">
      <td align="left"><font color="<%=FontColor%>" face="verdana,arial,sans-serif" size="-1"><B>Il 
        tuo nome:</B>&nbsp;</td>
    </tr>
<tr><td>
        <input name="name" TYPE="text" VALUE="<%= Request.Form("name") %>" size="46" style="FONT-SIZE: 10px; COLOR: <%=FormFontColor%>; FONT-FAMILY: verdana, helvetica, arial; BACKGROUND-COLOR: <%=FormBackColor%>">
        </INPUT></td>
</tr><tr><td><%
		If dictFields(LCase("name")) Then
		Response.Write "<font color=""#ff6b00"" face=""verdana,arial,helvetica"" size=-2>Non hai inserito il tuo nome</font>"
	Else		
		Response.Write "&nbsp;"
		End If
		%>
</td></tr>
<tr bgcolor="<%=HeadColor%>">
      <td align="left"><font color="<%=FontColor%>" face="verdana,arial,sans-serif" size="-1"><B>La 
        tua E-mail:</B>&nbsp;</td>
    </tr>
<tr><td>
        <input name="uemail" TYPE="text" VALUE="<%= Request.Form("uemail") %>" size="46" style="FONT-SIZE: 10px; COLOR: <%=FormFontColor%>; FONT-FAMILY: verdana, helvetica, arial; BACKGROUND-COLOR: <%=FormBackColor%>">
        </INPUT></td>
		</tr><tr><td><%
		If dictFields(LCase("uemail")) Then
		Response.Write "<font color=""#ff6b00"" face=""verdana,arial,helvetica"" size=-2>Non hai inserito una e-mail valida</font>"
	Else		
		Response.Write "&nbsp;"
		End If
		%>
</td></tr>
<tr bgcolor="<%=HeadColor%>">
      <td align="left"><font color="<%=FontColor%>" face="verdana,arial,sans-serif" size="-1"><B>Il 
        nome del tuo amico:</B>&nbsp;</td>
    </tr><tr><td>
        <input name="fname" TYPE="text" VALUE="<%= Request.Form("fname") %>" size="46" style="FONT-SIZE: 10px; COLOR: <%=FormFontColor%>; FONT-FAMILY: verdana, helvetica, arial; BACKGROUND-COLOR: <%=FormBackColor%>">
        </INPUT></td>
</tr>
<tr><td><%
		If dictFields(LCase("fname")) Then
		Response.Write "<font color=""#ff6b00"" face=""verdana,arial,helvetica"" size=-2>Non hai inserito il nome del tuo amico</font>"
	Else		
		Response.Write "&nbsp;"
		End If
		%>
</td></tr>
<tr bgcolor="<%=HeadColor%>">
      <td align="left"><font color="<%=FontColor%>" face="verdana,arial,sans-serif" size="-1"><B>L'E-mail 
        del tuo amico:</B>&nbsp;</td>
    </tr><tr><td>
        <input name="email" TYPE="text" VALUE="<%= Request.Form("email") %>" size="46" style="FONT-SIZE: 10px; COLOR: <%=FormFontColor%>; FONT-FAMILY: verdana, helvetica, arial; BACKGROUND-COLOR: <%=FormBackColor%>">
        </INPUT></td>
</tr>
<tr><td><%
		If dictFields(LCase("email")) Then
		Response.Write "<font color=""#ff6b00"" face=""verdana,arial,helvetica"" size=-2>Non hai inserito l'e-mail del tuo amico</font>"
	Else		
		Response.Write "&nbsp;"
		End If
		%>
</td></tr>
<tr bgcolor="<%=HeadColor%>">
      <td align="left"><font color="<%=FontColor%>" face="verdana,arial,sans-serif" size="-1"><B>Il 
        tuo messaggio:</B>&nbsp;</td>
    </tr>
</tr><tr><td>
        <TEXTAREA NAME="message" WRAP=VIRTUAL COLS="44" ROWS="6" style="FONT-SIZE: 10px; COLOR: <%=FormFontColor%>; FONT-FAMILY: verdana, helvetica, arial; BACKGROUND-COLOR: <%=FormBackColor%>"><%= Request.Form("message") %></TEXTAREA>
      </td><tr><td><%
		If dictFields(LCase("message")) Then
		Response.Write "<font color=""#ff6b00"" face=""verdana,arial,helvetica"" size=-2> Non hai inserito nessun messaggio</font>"
	Else		
		Response.Write "&nbsp;"
		End If
%>
</td></tr></table>
  <p> 
    <INPUT TYPE="submit" VALUE="Invia Messaggio"></INPUT>
  <p align="center"><font face="Verdana"><font color="#000000" size="2">
    <a href="mailto:webmaster@sbattimento.com">Il webmaster</a> </font>
</FORM><P>
<%
End Sub
Sub Send
sPunterFriend = Request.Form("name")
sPunterEmail = Request.Form("uemail")
fName = Request.Form("fname")
femail= Request.Form("email")
Message = Request.Form("message")

sSubject = "Check out all this Free Stuff"
sMessage = "Salve " & fName & vbcrlf _
        & "Hai ricevuto questo messaggio da parte del tuo amico " & sPunterFriend & " ( " & sPunterEmail & " ) Messaggio:" & vbcrlf _
		& vbcrlf _
		& Message & vbcrlf _
		& vbcrlf _
		& "_____________________________________________ " & vbcrlf _
		& EmailFooter1 & vbcrlf _
		& EmailFooter2 & vbcrlf _
		& EmailFooter3 & vbcrlf
		
Set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.Send sPunterEmail, femail, EmailSubject, sMessage
Set objNewMail = Nothing
If WebmasterMail="YES" then
Set objNewMail = CreateObject("CDONTS.NewMail")
objNewMail.Send sPunterEmail, sYourEmail, EmailSubject, sMessage
Set objNewMail = Nothing
End IF
Response.Write sPunterEmail
End Sub
Dim Field
Dim dictFields
Set dictFields = Server.CreateObject("Scripting.Dictionary")
For Each Field in Request.Form
If ValidateField(Request.Form(Field), Field) = False Then
dictFields.Add LCase(Field), true
End If
Next
If Request.Form.Count <> 0 And dictFields.Count  = 0 Then
%>
<p>
<b>Il tuo messaggio &egrave; stato inviato!<br>
dal seguente e-mail: 
<p></b>
<%
Call Send
%>
<p><b><i>Grazie per avere segnalato il nostro sito.</i></b><br>
<%
Else
ShowFormField("Bert")
End If
%>
<!--#include file="footer.inc"-->
