<%@ 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("caltype")="" Then caltype_inp="" Else caltype_inp= CStr(Request("caltype")) 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 & " rs.run_type,ca.caltype,ca.calmethod,ca.calversion,dbms_lob.getlength(ca.caldata) calsize,ca.valid,ca.logid " SQLStmt= SQLStmt & " from phoffline.fbcalibrations 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 If caltype_inp<>"" Then SQLStmt = SQLStmt & " and ca.caltype='" & caltype_inp & "' " End If SQLStmt= SQLStmt & " order by rs.run desc,le.log_date" ' response.write(SQLStmt & "
" ) Set RS = Connection.Execute(SQLStmt) %> Fastbus Calibrations

List of Fastbus 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")) rcolor="#7BC618" 'green logid=RS("logid") %> <% RS.Movenext Loop total_size=total_size/1024 'get MBytes Connection.Close %>
Run Creation Date Validity Date Run Type Type Method Version Valid Size [kB]
<%=RS("run")%> <%=RS("crdate")%> <%=RS("vdate")%> <%=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