%@ Language=VBScript %>
<% 'Option Explicit %>
<%
' #################################################
' ### Declare and Set Variables ##############
' #################################################
Dim oConn,oRS, oRS2, strConn
Dim strSec,strSec2,strSummary,strID
dim strSQLSubMenu,strSQL,strSQLTot
Dim bgColor, strPageType
Dim strPerc
Dim x
strPollId = "2"
strQuestID = Request.Querystring("questid")
strAnsID = Request.Querystring("ansid")
strSummary = Request.Querystring("sum")
if strPollId = "" then strPollId ="2"
'response.write "admin - " & MSCSSite.AdminConnectionString & "
"
'response.write "default - " & MSCSSite.defaultconnectionString & "
"
Set oConn = Server.CreateObject ("ADODB.Connection")
Set oRS=Server.CreateObject("ADODB.Recordset")
Set oRS2=Server.CreateObject("ADODB.Recordset")
strConn = Application("liveConn")
oConn.Open strConn
if strQuestID ="" and strSummary <> "yes" then
strSQL="select * from ubg_poll where fldPollID ='" & strPollId & "'"
oRS.Open strSQL, oConn, 0, 1, 1
strPageType = "Home"
end if
if strQuestID <>"" and strSummary <> "yes" then
strSQL= "select po.fldoptid ,po.fldpollid,po.fldquestid,po.fldOption, p.fldQuestion "
strSQL= strSQL & "from ubg_polloptions as po, ubg_poll as p "
strSQL= strSQL & "where po.fldPollID ='" & strPollId & "' and po.fldQuestID='" & strQuestID & "' "
strSQL= strSQL & "and p.fldPollID ='" & strPollId & "' and p.fldQuestID='" & strQuestID & "'"
'strSQL="select * from ubg_polloptions where fldPollID ='2' and fldQuestID='" & strQuestID & "'"
oRS.Open strSQL, oConn, 0, 1, 1
strPageType = "Question"
end if
if request.form.count>0 then
if request.form("frmQuest") <> "" then
strSQL = "Insert into UBG_PollAnswers (fldPollID,fldQuestID,fldAnswer) Values ('" & strPollId & "','" & request.form("frmQuestID") & "','" & request.form("frmQuest") & "')"
end if
oConn.Execute strSQL
end if
if strSummary ="yes" then
strPageType = "Summary"
end if
'response.write strSQL
'Set oRS = oConn.Execute(strSQL)
%>
![]() |
![]() |
|
<% if strPageType = "Home" then %> Click on a link in the list below to view the options. <% do while not oRS.EOF and not oRS.BOF %> " class="clsPollQuest"><%=oRS("fldQuestion")%> <% oRS.MoveNext loop %> View Poll Summary <% end if %> <% if strPageType = "Question" then %> <%=oRS("fldQuestion")%> Back to Poll Questions | View Poll Summary <% end if %> <% if strPageType = "Summary" then %>
Back to Poll Questions <% end if %> | |||||||||||||||
Home About the book Reviews Authors Artwork Quiz Poll Buy the book