|
<%
If Request.ServerVariables("Content_Length") > 0 Then
Dim countfile, tella, recommendations, newvalue
' get current value and increment it
countfile = Request.ServerVariables("Path_Translated")
countfile = Left(countfile,InStrRev(countfile,"\")) & "tools\tellafriend.txt"
Set tella = filesys.OpenTextFile(countfile,1,0)
recommendations = Int(tella.ReadLine) + 1
tella.Close
Set newvalue = filesys.CreateTextFile(countfile)
' put new value in text file
newvalue.WriteLine(recommendations)
newvalue.Close
Set objNewMail = CreateObject("CDONTS.NewMail")
MsgFrom = "publicity@delirious.uk.net"
MsgTo = Request.Form("email")
MsgSubject = Request.Form("friend") & " welcomes you to delirious.uk.net!"
MsgMessage = "Hello there," & vbCrLf & vbCrLf & "Your friend, " & Request.Form("friend") & ", has just recommended that you visit http://www.delirious.uk.net This is an unofficial delirious? web site with info on singles, albums, words and tabs to all songs, interactive discussion forums, tour dates, pictures from videos, extensive photo gallery, media articles and more." & vbCrLf & vbCrLf & "If you are not interested then please accept our apologies." & vbCrLf & vbCrLf & vbCrLf & "------------------------------" & vbCrLf & "Regards," & vbCrLf & "The delirious.uk.net publicity team." & vbCrLf & "publicity@delirious.uk.net"
' then add an advert
MsgMessage = MsgMessage & vbCrLf & vbCrLf & "YOUR ADVERT COULD BE HERE!" & vbCrLf & "Present your company to a large audience with email marketing. Email advertising@delirious.uk.net for more info."
objNewMail.Send MsgFrom, MsgTo, MsgSubject, MsgMessage
%><% End If %>
|