<% '=========================== 'subjects/categories are added by ..::LvL admin and are top level 'topics can be added by registered users 'anyone can post, but registered users can have a *tag* line instead of an ip display under they nick '=========================== 'session("schk") is just a little secruity check to stop loser trying to guess user login 'session("schk") = 0 dim error, error_msg, new_topic_added if (Request.Cookies("lvl")("forumid") <> "") and (Request.QueryString("newtop") = "yes") then 'a registered user has hit the site AND want to make a new topic - COOL! '1st do data check '================= 'do an 'untitled' test '================= if trim(Request.Form("topic_subject")) = "" then error = true error_msg = error_msg & "
  • Please select a subject from the pulldown list
  • " end if if lcase(trim(Request.Form("newtopic"))) = "untitled" then error = true error_msg = error_msg & "
  • You can not have a topic title called " & trim(Request.Form("newtopic")) & ", please use a different title, sorry
  • " end if if trim(Request.Form("newtopic")) = "" then error = true error_msg = error_msg & "
  • Please enter a topic title for your post below
  • " end if if trim(Request.Form("topic_body")) = "" then error = true error_msg = error_msg & "
  • Hehe.. you should really enter something into body of your post below
  • " end if if len(trim(Request.Form("topic_body"))) > 4000 then error = true error_msg = error_msg & "
  • The length of your post is too long. Shorten the body of the post below by "& (len(trim(Request.Form("topic_body"))) - 4000) &" characters, thanx
  • " end if '=================== 'do the insert here! '=================== if not error then 'Response.Write("ready to post!") 'cool! now insert the new topic call insert_new_topic(Request.Form("topic_subject"), trim(Request.Form("newtopic")), trim(Request.Form("topic_body")), Request.Form("show_sig")) end if end if if (Request.QueryString("login") = "yes") then 'they want to login, first check for *stuff* session("schk") = session("schk") + 1 if trim(Request.Form("login")) = "" then error = true error_msg = error_msg & "
  • In order to login you need to enter a login name :]
  • " end if if trim(Request.Form("pass")) = "" then error = true error_msg = error_msg & "
  • You seem to have forgotten to enter a password, lets try that again!
  • " end if if not error then 'call the login function and see who they are call forum_login(trim(Request.Form("login")), trim(Request.Form("pass"))) end if end if %> [ comments ] <% if error then Response.Write("Looks like there was a problem:") end if if new_topic_added then Response.Write("

    Your post titled " & Request.Form("newtopic") & " has been added.

    ") end if if session("schk") > 2 then %>

    Looks like you have forgotten your login details. You can have your login detals sent out to you by visiting the password page right here

    <% end if '===================================== 'become a registered user is displayed if a user cookie is not found if (Request.Cookies("lvl")("forumid") = "") and (not session("schk") > 2) then 'Response.Write("Request.Cookies(""lvl"")(""fourmid"")=[" & Request.Cookies("lvl")("fourmid") &"]") %>

    If you are already registered, please login as your ..::LvL login cookie was not found :[ (this will reset your cookie and allow you to add new topics)

    ?login=yes" method="post">
    login:  " maxlength="48" />
    pass: " maxlength="48" />

    Only registered users are able to make a Topic. Registered users also have a tag line instead of an encoded ip under their nick. Click here and signup now!

    <% end if %> <% '============================ 'display the most current topics and forum subjects 'dim category_titles (function stored in proesspage.asp) if cint(Request.QueryString("p_id")) > 0 then 'they are only interested in one thread grab_titles(cint(Request.QueryString("p_id"))) else 'ok, nothing special grab_titles(0) end if %>
    +---------------------
    subjects/topics post by last post no. posts
    +---------------------
    <% '===================================== 'a registered cookie was found, cool! say hi! if (Request.Cookies("lvl")("forumid") <> "") and (not session("schk") > 2) then %>

    <% if switch = 0 then Response.Write("Good to see ya " & Request.Cookies("lvl")("forumuser_name") & vbcrlf) elseif switch = 1 then Response.Write(Request.Cookies("lvl")("forumuser_name") & " is in the da HOUSE! " & vbcrlf) elseif switch = 2 then Response.Write("Where you been " & Request.Cookies("lvl")("forumuser_name") & "?" & vbcrlf) elseif switch = 3 then Response.Write("Alright! " & Request.Cookies("lvl")("forumuser_name") & " is back!!!" & vbcrlf) elseif switch = 4 then Response.Write("Can't get enough of us hey " & Request.Cookies("lvl")("forumuser_name") & "?" & vbcrlf) elseif switch = 5 then Response.Write("I wanted to tell you something " & Request.Cookies("lvl")("forumuser_name") & " but I've forgotten what it was :[" & vbcrlf) elseif switch = 6 then Response.Write("I've run out of things to say " & Request.Cookies("lvl")("forumuser_name") & "!" & vbcrlf) elseif switch = 7 then Response.Write("Hey " & Request.Cookies("lvl")("forumuser_name") & ", what's the time? My clock says " & funkdate(now()) & vbcrlf) end if %>

    +---------------------

    Make a new topic:

    ?newtop=yes<% if cint(Request.QueryString("p_id")) <> "" then Response.Write("&p_id=" & cint(Request.QueryString("p_id"))) end if %>" method="post"> <% 'we are going to use the array that was generated above 'when we used the *grab_titles 'we also don't want to show and option pull down if there is only one 'option to select (seems pointless to me) if isarray(category_titles) then '1st check the contents if not ubound(category_titles,2) = 0 then 'only write an option if there is more than one record %> <% else 'we still need the value if there is only one record, just don't need to display it Response.Write("") end if end if %> <% if Request.Cookies("lvl")("forumid") > 0 then %> <% end if %>
    Subject:
    Topic:  " maxlength="48" />
    Body:
    Signature?: <% if Request.Form("show_sig") = "no" then %> Yes, show my signature file | No, not with this post <% else %> Yes, show my signature file | No, not with this post <% end if %>

    <% end if %>