<%@ LANGUAGE="VBScript" %> <% ' q_level=Request("q_level") if q_level="1" then variable="Monitoring, Tunnel Open" elseif q_level="2" then variable="Monitoring, Tunnel Closed" elseif q_level="3" then variable="Normal Data Taking, once per start of shift" elseif q_level="5" then variable="Normal Data Taking, regularly" else variable="Normal Data Taking, once per 2 hrs" end if ' ' Open Database ' Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd SQLt="select c.subs,cs.description, c.subs_q, c.subs_loc, c.Q_level, c.question, c.instructions, c.weblink, c.a_text, " SQLt=SQLt &" c.a_type, c.a_units from phoffline.checklist c, phoffline.chk_qs_subs cs, phoffline.chk_qs_locs cl where c.subs=cs.subs and q_level like '%"&q_level&"%' " 'notice the like form SQLt=SQLt &"and c.subs_loc=cl.subs_loc order by cl.loc_order, c.subs, c.subs_q_order " ' 'response.write(SQLt) set RS=connection.Execute(SQLt) ' '1st subroutine to replace the bad space with a
' sub addbr(example) if instr(1,example,"yes",1) and instr(1,example,"no:",1) then example=Replace(example,"no" ,"
No") example=Replace(example,"NO" ,"
No") example=Replace(example,"No" ,"
No") end if end sub ' '2nd subroutine to distinguish between the a_type ' sub a_type(variable) If variable="Quantity" then response.write("_______") elseif variable="yes/no" then response.write("
YESNO") elseif variable="done/notdone" then response.write("
DoneNot done") elseif variable="text" then response.write("______________") elseif variable="ON/OFF" then response.write("
ONOFF") end if end sub %> Checklist

Checklist: <%=variable%>

Date: __________________
Time: __________________
Person: __________________

<%Do while not RS.EOF subs=cstr(RS("subs")) description=cstr(RS("description")) subs_loc=cstr(RS("subs_loc")) if not isnull(RS("question")) then question=cstr(RS("question")) else question="" end if if not isnull(RS("instructions")) then instructions=cstr(RS("instructions")) else instructions="" end if 'call addbr(instructions) if isnull(RS("weblink")) then weblink="" else weblink=cstr(RS("weblink"))'settle that end if if isnull(RS("a_text")) then a_text="" else a_text=cstr(RS("a_text")) end if atype=cstr(RS("a_type")) if isnull(RS("a_units")) then a_units="" else a_units=cstr(RS("a_units")) end if If subs=subs_old then response.write("") response.write("") else response.write("") response.write("") response.write("") response.write("") response.write("") end if subs_old=subs RS.Movenext Loop %>
"& question &""&a_text) call a_type(atype) response.write(a_units&""& instructions&"

"&description&"

QuestionMeasurementsActions to take
"& question &""&a_text) call a_type(atype) response.write(a_units&""& instructions&"
<% Connection.Close Set RS=nothing Set Connection=nothing %>