%
STORY_ID = Request("id")
Randomize
FLYCAST = CStr(Session.SessionId) & CStr(Int((1000000) * Rnd))
ANCHOR_END = ""
HUNDRED = false
if Request("h") = "t" then
HUNDRED = true
ANCHOR_END = "&h=t"
end if
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open CONNSTRING
STORY_BODY = ""
STORY_TELLER = ""
STORY_HOMETOWN = ""
STORY_AGE = ""
if IsNumeric(STORY_ID) and STORY_ID > 0 then
Set RS = Conn.Execute("select * from worst_date where fk_id = " & STORY_ID)
if RS.EOF then
ErrorOut "Database error. Hit back and retry."
end if
STORY_BODY = RS("fk_story")
STORY_TELLER = RS("fk_name")
STORY_HOMETOWN = RS("fk_hometown")
STORY_AGE = RS("fk_age")
RS.Close
Set RS = Nothing
end if
sql = "select fk_id, fk_name, fk_age, fk_story, fk_hometown from worst_date " & _
"where fk_valid = 1 order by fk_entrydate desc"
Set RS = Conn.Execute(sql)
if RS.EOF then
RS.Close
Set RS = Nothing
Conn.Close
Set Conn = Nothing
ErrorOut "Sorry, there is a database problem at this time. Please try again later"
end if
if HUNDRED = true then
for cnt = 1 to 20
RS.MoveNext
next
end if
%>
DatingFun.com : Stories
We just moved our server,
if you see any broken links
PLEASE let us know the URL
via email
<% if HUNDRED = true then %>
Here are the latest archived stories. We display ">20 new stories each day, but set this up to let you read more, in case you miss a day!
<% else %>
Presented below are today's Worst Date Stories. We add new stories as they are submitted, so be sure to check back!
<% end if %>
<% if IsNumeric(STORY_ID) and STORY_ID > 0 then %>
Click on the links below to read more stories. Or, submit your own Worst Date Story.
First name - hometown - age
<%
' PREP THE DATA HERE!
counter = 0
end_counter = 20
if HUNDRED = true then
end_counter = 100
end if
do while not RS.EOF
counter = counter + 1
if counter > end_counter then
exit do
end if
' DEAL WITH THE AGE
age = RS("fk_age")
if age = "0" then
age = " - N/A"
else
age = " - " & age
end if
' DEAL WITH THE HOMETOWN
hometown = RS("fk_hometown")
if Len(hometown) < 2 then
hometown = " - N/A"
else
hometown = " - " & hometown
end if
Response.Write("