<%@ Language=VBScript %> <% 'Option Explicit %> <% ' ################################################# ' ### Declare and Set Variables ############## ' ################################################# Dim oConn,oRS, strConn Dim strSec,strSec2,strLive,strID dim strSQLSubMenu,strSQL Dim bgColor strSec = Request.Querystring("sec") strSec2 = Request.Querystring("sec2") strID = Request.Querystring("id") if strSec = "" then strSec ="1" if strSec2 = "" then strSec2 ="1" 'response.write "admin - " & MSCSSite.AdminConnectionString & "
" 'response.write "default - " & MSCSSite.defaultconnectionString & "
" Set oConn = Server.CreateObject ("ADODB.Connection") Set oRS=Server.CreateObject("ADODB.Recordset") strConn = Application("liveConn") oConn.Open strConn if Request.ServerVariables("SERVER_PORT")="5501" then strLive =" AND fldLive='1'" else strLive ="" end if if strID<>"" then strSQL="SELECT * from siteUTBG WHERE fldID='" & strID & "'" & strLive else strSQL="SELECT * from siteUTBG WHERE fldCat1='" & strSec & "' AND fldCat2='" & strSec2 & "'" & strLive end if 'response.write strSQL 'Set oRS = oConn.Execute(strSQL) %> Ultimate Teen Book Guide







QUICK QUIZ <% if Request.Form.Count > 0 then oRS.Open "SELECT id, correct FROM UBG_QuizQuestionsTeen WHERE quizid=" & Request.QueryString("id"), oConn, 0, 1, 1 correct = 0 total = 0 do while not oRS.EOF if oRS("correct") = Request.Form("q_" & oRS("id")) then correct = correct + 1 end if total = total + 1 oRS.MoveNext loop if correct = total then %>

Well done!

You got all <%=total%> correct!

<% else %>

You got <%=correct%> out of <%=total%> correct!

Would you like to try again?

<% end if else sqlStr = "SELECT quizid, id, rank, question, answer_a, answer_b, answer_c FROM UBG_QuizQuestionsTeen WHERE quizid=" &_ "(SELECT TOP 1 id FROM UBG_QuizTeen WHERE dtgstart<=getdate() ORDER BY dtgstart DESC) ORDER BY rank" oRS.Open sqlStr, oConn, 0, 1, 1 %>
Do you know everything there is to know about teen books? Try our quiz and find out! <%do while not oRS.EOF%>

<%=oRS("rank")%>. <%=oRS("question")%>
a)<%=oRS("answer_a")%>
b)<%=oRS("answer_b")%>
c)<%=oRS("answer_c")%>
<% oRS.MoveNext loop %> Click here to see how many you got right.
<%end if%>