<% on error resume next '***************************************************************** '* Redirect to server "www.markseducation.us" if the user used any other link (e.g. '* "markseducation.us" - this is so that session variables will remain in effect '* and the user will not have to log in again. For some reason, ASP Session '* variables don't hold when you go to a http://markseducation.us page if the '* session variable was set from a http://www.markseducation.us page and vice-versa '* if Left( Request.ServerVariables("SERVER_NAME") , 21) <> "www.markseducation.us" then Response.Redirect("http://www.markseducation.us" & Request.ServerVariables("URL") & "?" & Request.ServerVariables("QUERY_STRING") ) end if Response.Expires = -1000 'Make sure the browser doesn't cache this page Response.Buffer = True 'enables our response.redirect to work if server before Win2000 %> Marks Education: College Admission Counseling and Tutoring in Bethesda, MD
<% 'Open database connection Set db = Server.CreateObject("ADODB.Connection") db.Open = "driver={Microsoft Access Driver (*.mdb)};dbq=D:\Hosting\11059427\html\database\Satgame.mdb;uid=admin;pwd=" sql = "SELECT * FROM vocabWeeklyTtl ORDER BY weeklyTtl DESC, username ASC" Set getRows = db.execute(sql) If Not getRows.EOF Then arrDBData = getRows.GetRows() thisWeekData = 1 End If sql = "SELECT * FROM vocabLastWeeklyTtl ORDER BY weeklyTtl DESC, username ASC" Set getRows = db.execute(sql) If Not getRows.EOF Then arrDBData2 = getRows.GetRows() lastWeekData = 1 End If ' Close database connection db.Close set db = nothing %>
KWEST: The Knowledge Word Game


Want to win a $100 gift card to amazon.com? Simply "Like" Marks Education on Facebook and play KWEST. Players who earn at least 10000 points in a month will be entered into a monthly drawing for the $100 gift card to amazon.com.*

This Week's Leaders

<% If thisWeekData = 1 Then iRecFirst = LBound(arrDBData, 2) iRecLast = UBound(arrDBData, 2) iFieldFirst = LBound(arrDBData, 1) iFieldLast = UBound(arrDBData, 1) Else iRecFirst = 0 iRecLast = -1 iFieldFirst = 0 iFieldLast = 0 End If %>
UsernameScore
<% For I = iRecFirst To iRecLast Response.Write "" & vbCrLf Response.Write "" & vbCrLf If Len(arrDBData(0, I)) > 30 Then userNameAbridged = Left(arrDBData(0, I), 30) Else userNameAbridged = arrDBData(0, I) End If Response.Write vbTab & "" & vbCrLf Response.Write vbTab & "" & vbCrLf Response.Write "" & vbCrLf Response.Write "" & vbCrLf Next ' I ' if less than 3 names on leaderobard, fill remaining spots with -- (e.g. only 1 name shows, show: 1.name score / 2.-- -- / 3.-- --) For I = iRecLast+1 to 2 Response.Write "" & vbCrLf Response.Write "" & vbCrLf Response.Write vbTab & "" & vbCrLf Response.Write vbTab & "" & vbCrLf Response.Write "" & vbCrLf Response.Write "" & vbCrLf Next ' I %>
" & I+1 & ". " & userNameAbridged & "
" & Round( arrDBData(1, I)*100, 0 ) & "
" & I+1 & ". --
--

<% %>

Last Week's Leaders

<% If lastWeekData = 1 Then iRecFirst = LBound(arrDBData2, 2) iRecLast = UBound(arrDBData2, 2) iFieldFirst = LBound(arrDBData2, 1) iFieldLast = UBound(arrDBData2, 1) Else iRecFirst = 0 iRecLast = -1 iFieldFirst = 0 iFieldLast = 0 End If %>
UsernameScore
<% For I = iRecFirst To iRecLast Response.Write "" & vbCrLf Response.Write "" & vbCrLf If Len(arrDBData(0, I)) > 30 Then userNameAbridged = Left(arrDBData2(0, I), 30) Else userNameAbridged = arrDBData2(0, I) End If Response.Write vbTab & "" & vbCrLf Response.Write vbTab & "" & vbCrLf Response.Write vbTab & "" & vbCrLf Response.Write "" & vbCrLf Next ' I ' if less than 3 names on leaderobard, fill remaining spots with -- (e.g. only 1 name shows, show: 1.name score / 2.-- -- / 3.-- --) For I = iRecLast+1 to 2 Response.Write "" & vbCrLf Response.Write "" & vbCrLf Response.Write vbTab & "" & vbCrLf Response.Write vbTab & "" & vbCrLf Response.Write "" & vbCrLf Response.Write "" & vbCrLf Next ' I %>
" & I+1 & ". " & userNameAbridged & "
" & Round( arrDBData2(1, I)*100, 0 ) & "
" & I+1 & ". --
--


*KWEST contestants are eligible to win a total of no more than 7 times.