<% Set databaseConnection = getDatabaseConnection() // pick a template templateID = 1 templateType = 1 // (rhyming) countTemplatesSQL = "SELECT COUNT(lim_tem_id) AS templates FROM lim_tem_templates" Set countTemplatesRS = createRecordSet(countTemplatesSQL, databaseConnection) If Not countTemplatesRS.EOF Then // get a random int in that range Randomize moveForward = Int(Rnd() * CInt(countTemplatesRS.Fields("templates"))) End If destroyRecordSet(countTemplatesRS) getTemplatesSQL = "SELECT * FROM lim_tem_templates" Set getTemplatesRS = createRecordSet(getTemplatesSQL, databaseConnection) If Not getTemplatesRS.EOF Then // move forward by the random step getTemplatesRS.Move(moveForward) // get content from this record templateID = getTemplatesRS.Fields("lim_tem_id") // decide which type of template it is templateType = CInt(getTemplatesRS.Fields("lim_tem_type")) End If destroyRecordSet(getTemplatesRS) // get hints for each word hintNames = Array("hint1", "hint2", "hint3", "hint4", "hint5") Set allHints = CreateObject("Scripting.Dictionary") // set defaults For Each fieldName In hintNames fieldValue = "No hint available." allHints.Add fieldName, fieldValue Next // now grab from db getHintsSQL = "SELECT * FROM lim_hin_hints WHERE lim_hin_templateID = " & templateID Set getHintsRS = createRecordSet(getHintsSQL, databaseConnection) While Not getHintsRS.EOF // store each hint in the dictionary slotNumber = getHintsRS.Fields("lim_hin_slotNumber") hintText = CStr(getHintsRS.Fields("lim_hin_hintText")) allHints.Item("hint" & slotNumber) = hintText getHintsRS.MoveNext WEnd destroyRecordSet(getHintsRS) destroyConnection(databaseConnection) // if user has requested no colors, turn off style sheet If Request("style") = "off" Then Session("style") = "off" ElseIf Request("style") = "on" Then Session("style") = "on" End If %> LimGen: The Limerick Generator for Limerick Fans <% If (Request("style") <> "off" And Not (Session("style") = "off")) Or Request("style") = "on" Then %> <% End If %>

LimGen: The Limerick Generator for Limerick Fans

limerick - noun. A light humorous, nonsensical, or bawdy verse of five lines usually with the rhyme scheme aabba.

Example:

The limerick is furtive and mean.
You must keep it in close quarantine,
Or she sneaks to the slums,
And promptly becomes
Disorderly, drunk and obscene.
<% If templateType = 1 Then // user must supply the rhymes %> <% End If %> <% If templateType = 1 Then // move 555 down if there is no need to rhyme %> <% End If %> <% If templateType = 1 Then // user must supply the rhymes %> <% End If %> <% If Not (templateType = 1) Then // put 555 here if there is no need to rhyme %> <% End If %>


Create a limerick right now:

All you need to do is supply five words below. Hints as to what type of words would make the most sense are included to the right, but you don't necessarily have to follow them. After all, who said limericks were required to make sense?!
The following three words should rhyme with each other:
   (<%= allHints.Item("hint1") %>)
   (<%= allHints.Item("hint2") %>)
   (<%= allHints.Item("hint5") %>)
The next two words should rhyme with each other, but do not have to rhyme with those above:
   (<%= allHints.Item("hint3") %>)
   (<%= allHints.Item("hint4") %>)
   (<%= allHints.Item("hint5") %>)


LimGen - The Limerick Generator
this site developed and maintained by Jason J. Jones Web Development, Inc.
a Bunker 306 Production
<% If (Request("style") <> "off" And Not (Session("style") = "off")) Or Request("style") = "on" Then %> Colors Off <% Else %> Colors On <% End If %>
<%= getRightBarAd() %>