%@ 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)
%>
![]() |
|||
|
|
![]() |
![]() |
![]() |
|
|
|||
|
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 <%=correct%> out of <%=total%> correct!
|
||