IEEE Survey
<%
dim decision
dim outReachEventK12, outReachEventUG,useVideo2InClass, useVideo2InOutreach, receiveVideo2
dim reportID, userID
dim trackPage
dim finish
dim OUTRUG,OUTRK12,VIDCLASS,VIDOUTR,VIDRCVD
dim goToPage
dim errorcount
on error resume next
session.Timeout = 360
'get user id from the session object
userID = cint(session("userID"))
if userID = empty then
userID = cint(Request.Form("userID"))
end if
'if still cannot retrieve user id then automatically logged out
if userID = "" or userID = 0 then
Response.redirect("surveyLogin.asp?loginFail=yes")
end if
'get the report id from the session object
reportID =cint(session("reportID"))
if reportID= empty then
reportID= cint(Request.Form("reportID"))
end if
session("userID")=cint(userID)
session("reportID")=cint(reportID)
'make connection
set conn = server.CreateObject("ADODB.connection")
conn.Open ConnectionString
'check if the user has fill out this page
sqlQuery = "select * from tbl_IEEE_report where REID="&reportID
set RSBuffer = conn.Execute(sqlQuery)
if RSbuffer.eof = false then
if trim(RSBUFFER("REPEOUTREVENTUG")) <> "" then
OUTRUG = cint(RSBUFFER("REPEOUTREVENTUG"))
end if
if trim(RSBUFFER("REPEOUTREVENTK12")) <> "" then
OUTRK12= cint(RSBUFFER("REPEOUTREVENTK12"))
end if
if trim(RSBUFFER("RERCVDVIDEO")) <> "" then
VIDRCVD = cbool(RSBUFFER("RERCVDVIDEO"))
end if
if trim(RSBUFFER("RERCVDVIDEOCLASS")) <> "" then
VIDCLASS = cbool(RSBUFFER("RERCVDVIDEOCLASS"))
end if
if trim(RSBUFFER("RERCVDVIDEOOUTR")) <> "" then
VIDOUTR = cbool(RSBUFFER("RERCVDVIDEOOUTR"))
end if
end if
decision= trim(Request.form("decision"))
if decision <> "move" and decision <> "exit" then
if VIDRCVD= true then
vidrcvdYes = "checked"
else if VIDRCVD = false then
vidrcvdNo = "checked"
end if
end if
if VIDCLASS = true then
vidclassYes = "checked"
else if VIDCLASS = false then
vidclassNo = "checked"
end if
end if
if VIDOUTR = true then
vidoutrYes = "checked"
else if VIDOUTR = false then
vidoutrNo = "checked"
end if
end if
%>
ELECTRIC POWER
ENGINEERING EDUCATIONAL RESOURCES SURVEY Power
Engineering Education Committee of IEEE Power Engineering
Society
Reporting Period: Fiscal or Academic Year '05-'06
<%
else
if trim(Request.Form("outReachEventK12")) = "" then
outReachEventK12 = 0
else
outReachEventK12 = cint(Request.Form("outReachEventK12"))
end if
if trim(Request.Form("outReachEventUG")) = "" then
outReachEventUG = 0
else
outReachEventUG = cint(Request.Form("outReachEventUG"))
end if
if trim(Request.Form("useVideo2InClass")) = "yes" then
useVideo2InClass = 1
else
useVideo2InClass = 0
end if
if trim(Request.Form("useVideo2InOutreach")) = "yes" then
useVideo2InOutreach = 1
else
useVideo2InOutreach = 0
end if
if trim(Request.Form("receiveVideo2"))="yes" then
receiveVideo2 = 1
else
receiveVideo2 = 0
end if
sqlQuery = "update tbl_IEEE_report set RERCVDVIDEO="&receiveVideo2&",RERCVDVIDEOCLASS="&useVideo2InClass
sqlQuery = sqlQuery & ", RERCVDVIDEOOUTR="&useVideo2InOutreach&",REPEOUTREVENTUG="&outReachEventUG
sqlQuery = sqlQuery & ", REPEOUTREVENTK12="&outReachEventK12&" where REID="&reportID
'Response.Write sqlQuery
conn.Execute(sqlQuery)
if decision = "move" then
'pass these vars to the processing part
session("userID")=cint(userID)
session("reportID")=cint(reportID)
goToPage = cint(Request.Form("goToPage"))
if goToPage=6 then
errorcount=0
%>
ELECTRIC POWER
ENGINEERING EDUCATIONAL RESOURCES SURVEY Power
Engineering Education Committee of IEEE Power Engineering
Society
Reporting Period: Fiscal or Academic Year '05-'06