%
dim sub_mit_but, section, login_required, cookie_ID
dim poster_table, poster_ID
dim topics, noTopics, numTopics, count
'tig dim zone
dim cdrom_dir
dim ftp_upload_info
dim ftp_upload_zips
dim current_IP
dim readme
dim beta_shots
dim fileplanet
dim section_ID
dim tigCON
dim query
dim tigRS
dim tmp_hour
dim tmp_min
dim tmp_time
'end tig
if switch = 0 then
sub_mit_but = "Make me famous!"
elseif switch = 1 then
sub_mit_but = "Can I really post this comment?"
elseif switch = 2 then
sub_mit_but = "Go on, post something good"
elseif switch = 3 then
sub_mit_but = "Submit it all ready!"
elseif switch = 4 then
sub_mit_but = "Go on, you can do it - HIT ME!"
elseif switch = 5 then
sub_mit_but = "Stick in the post"
elseif switch = 6 then
sub_mit_but = "You call that a comment?"
elseif switch = 7 then
sub_mit_but = "Did you check for dumb typo's?"
else
sub_mit_but = "Post it babe!"
end if
section = Request.QueryString("section")
section = "lvlbeta"
'as add sections also need to change msg/login.asp so it writes correct cookies
if section = "lvlbeta" then
section_ID = 1
poster_table = "beta_mappers"
poster_id = Cint(Request.Cookies("lvlbeta")("mapperid"))
login_required = true
end if
function goWild
Randomize
goWild = Int((10) * Rnd)
end function
function checkBanned
dim mandogCON, mandogRS, mandogQuery
set mandogCON = Server.CreateObject("ADODB.Connection")
mandogCON.Open(DSN)
mandogQuery = "SELECT id AS banned_id, datestamp " &_
"FROM q3a_banned " &_
"WHERE str_banned_ip = '" & posters_ip & "'"
'Response.Write("mandogQuery(banned)=[" & mandogQuery & "]
")
set mandogRS = mandogCON.Execute(mandogQuery)
if not mandogRS.EOF then
err_msg = "Your comment could not be added as your ip " & posters_ip & " was banned on the " & funkydate(mandogRS("datestamp"))& "."
err_msg = err_msg & "
If you feel there has been a mistake, please get in touch LvL and quote your ip number"
err_msg = err_msg & posters_ip& ") and the reason why you feel this information could be wrong."
end if
mandogRS.close
mandogCON.close
end function
function safelen(byval data)
'Response.Write("
data [" & data & "]")
if Len(data) > 11 then
safelen = left(data,9) & ".."
else
safelen = data
end if
end function
function getTopics
dim mandogCON, mandogRS, mandogQuery
set mandogCON = Server.CreateObject("ADODB.Connection")
mandogCON.Open(DSN)
' set up the query to list the topics by date Desc
mandogQuery = "SELECT top 30 id, title " &_
"FROM bullyB_topic " &_
"WHERE archive = 0 " &_
"ORDER BY datestamp DESC"
'Response.Write("mandogQuery = [" & mandogQuery & "]
")
set mandogRS = mandogCON.Execute(mandogQuery)
' make sure we have see if there is no records
if (mandogRS.EOF) Then
noTopics = true
else
topics = mandogRS.getRows()
numTopics = ubound(topics,2)
end if
mandogRS.close
mandogCON.close
end function
'terminal error so print page with error
function handleError(ohMyGosh)
%>