<%@ LANGUAGE="VBScript" %> <% registered=0 If Request.Cookies("PHOBOSPORTAL").HasKeys Then strCookie1=Request.Cookies("PHOBOSPORTAL")("OPERATOR1") If Not (IsNull(strCookie1) OR ( Len(strCookie1) = 0)) Then registered=1 End If End if If Request("run_min")="" Then Run_min=0 Else Run_min= CLng(Request("run_min")) End If If Request("run_max")="" Then Run_max=9999999 Else Run_max= CLng(Request("run_max")) End If Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd If Request("nruns")<>"" Then SQLStmt0 = "select max(RUN) maxrun from phoffline.runs " ' response.write(SQLStmt0 & "
" ) Set RS0 = Connection.Execute(SQLStmt0) run_min=CLng(RS0("maxrun"))-CLng(Request("nruns"))+1 run_max=9999999 If run_min<0 Then run_min=0 End If Set RS0=nothing End If SQLStmt = " select rs.run,to_char(le.log_date,'MM/DD/YYYY HH24:MI:SS') crdate, " SQLStmt= SQLStmt & " to_char(ca.validity_date,'MM/DD/YYYY HH24:MI:SS') vdate,to_char(ca.validity_date,'YYYYMMDDHH24MISS') svdate, " SQLStmt= SQLStmt & " to_char(ca.mapcrdate,'MM/DD/YYYY HH24:MI:SS') mapcrdate, " SQLStmt= SQLStmt & " to_char(ca.mapdate,'MM/DD/YYYY HH24:MI:SS') mapdate, " SQLStmt= SQLStmt & " rs.run_type,ca.caltype,ca.calmethod,ca.calversion,dbms_lob.getlength(ca.caldata) calsize,ca.valid,ca.logid " SQLStmt= SQLStmt & " from phoffline.calibrations ca,phoffline.runs rs,phoffline.log_entries le " SQLStmt= SQLStmt & " where ca.logid=le.logid and ca.validity_date=rs.run_date " SQLStmt = SQLStmt & " and rs.RUN>=" & run_min & " and rs.RUN<=" & run_max SQLStmt= SQLStmt & " order by rs.run desc,le.log_date" ' response.write(SQLStmt & "
" ) Set RS = Connection.Execute(SQLStmt) %> Complete list of tables

Complete List of Calibrations

<% total_size=0 Do While Not RS.EOF size=CDbl(RS("calsize"))/1024 total_size=total_size+size run_type=CStr(RS("run_type")) caltype=CStr(RS("caltype")) valid=CLng(RS("valid")) If run_type="SIPED" Then If caltype="SIPED" Or Caltype="SINOISE" Then rcolor="#7BC618" 'green Else If valid>0 Then rcolor="#FF0000" 'red Else rcolor="#E0E0E0" 'red End If End If Elseif run_type="SICAL" Then If caltype="SICAL" Then rcolor="#7BC618" 'green Else If valid>0 Then rcolor="#FF0000" 'red Else rcolor="#E0E0E0" 'red End If End If Else If valid>0 Then rcolor="#FF0000" 'red Else rcolor="#E0E0E0" 'red End If End if logid=RS("logid") %> <% RS.Movenext Loop total_size=total_size/1024 'get MBytes Connection.Close %>
Run Creation Date Validity Date Map Creation Date Map Validity Date Run Type Type Method Version Valid Size [kB]
<%=RS("run")%> <%=RS("crdate")%> <%=RS("vdate")%> <%=RS("mapcrdate")%> <%=RS("mapdate")%> <%=run_type%> <%=caltype%> <%=RS("calmethod")%> <%=RS("calversion")%> <% If registered=1 Then %> <%=valid%> <% Else%> <%=valid%> <% End If%> <%=Round(size,0) %>
Total size of listed calibration files in the DB is <%=Round(total_size,0)%> Mbytes