%
dim objFSO, objDrive, objFolder, objEmail, objSubscrib
dim objTextStream, colFiles, objFile, Completed, strLineText
dim intLineNum, strLineNum
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TriStateDefault = -2, TriStateTrue = -1, TriStateFalse = 0
Completed = "Get a daily quote in your email each day."
objEmail = LCase(trim(Request.Form("email")))
objSubscrib = trim(Request.Form("subscriber"))
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("D:\hosting\Gurdy55\cgi-bin\Distribution.txt")
If objSubscrib = "subscribe" then
Set objTextStream = objFile.OpenAsTextStream(ForReading, TriStateDefault)
Do While Not objTextStream.AtEndOfStream
strLineText = LCase(objTextStream.ReadLine)
If strLineText = objEmail then
Completed = objEmail + " is already subscribed"
end if
Loop
if Completed <> objEmail + " is already subscribed" then
Set objTextStream = objFile.OpenAsTextStream(ForAppending, TriStateDefault)
objTextStream.WriteLine(objEmail)
Completed = objEmail + " is now subscribed"
End if
elseif objSubscrib = "unsubscribe" then
Completed = objEmail + " was not subscribed"
Set objTextStream = objFile.OpenAsTextStream(ForReading, TriStateDefault)
Do While Not objTextStream.AtEndOfStream
strLineText = LCase(objTextStream.ReadLine)
If strLineText = "Remove" + objEmail then
Completed = objEmail + " was not subscribed"
Elseif strLineText = objEmail then
Completed = objEmail + " has been unsubscribed"
End if
Loop
If Completed = objEmail + " has been unsubscribed" then
Set objTextStream = objFile.OpenAsTextStream(ForAppending, TriStateDefault)
objTextStream.WriteLine("Remove" + objEmail)
End if
End if
%>
The Twenty Third Psalm —Resources, Daily Quote & Scripture
<%= Completed %>
Get a daily quote in your email each day.
Delight yourself in the LORD and he will give you the desires of your heart. —Psalm 37:4
The right words and the right time can change a situation. or an attitude.
Maybe you need a few words to start your day. Get an inspiring quote
in your email each day. After you subscribe you'll receive a quote from
our sister program, All About Quotes. To subscribe to the The Twenty
Third Psalm.com Daily Email Quote, just enter your e-mail address below.
We respect your privacy and your address will never be sold or given
away. Thanks for subscribing and we hope you enjoy the daily quotes.