<%@ LANGUAGE="VBScript" %> <% timedate=Request("timedate") Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd If timedate="" Then SQLStmtX = " select to_char(sysdate,'MM/DD/YYYY HH24:MI:SS') timedate from dual " Set RSX = Connection.Execute(SQLStmtX) timedate = CStr(RSX("timedate")) End If ' response.write(SQLStmtX) If Not IsDate(timedate) Then message="Wrong Time/Date format " & timedate %> <% End If timedate_par=replace(timedate," ","%20") %> Cable Connections

Connected Cables <%=timedate%>

1) Adjust validity time (or leave as is if you just changed any configuration)
2) REFRESH the page by clicking Change/Refresh button. The parameters corresponding to the specified validity time will be read  from the database and displayed
3) Click on FEC number to change its parameters
4) Connect or disconnect the cables by clicking on C or D respectively



<% Set Cmd = Server.CreateObject("ADODB.Command") Cmd.ActiveConnection = Connection SQLStmt = " select fd.fec_number,fd.fec_port,fca.fec_number fconn,geo_mod,hybrid_npos from " SQLStmt = SQLStmt & " (select fc.fec_number,(round((fc.fec_string-0.01)/2,0)) fec_port, " SQLStmt = SQLStmt & " fc.geo_mod,sr.hybrid_npos from assembly.fec_connect fc, " SQLStmt = SQLStmt & " (select max(startdate) startdate,max(geo_mod) geo_mod, max(shybrid_npos) shybrid_npos,max(swurst_id) swurst_id from " SQLStmt = SQLStmt & " assembly.fec_connect where to_date( ? ,'MM/DD/YYYY HH24:MI:SS')>=startdate " SQLStmt = SQLStmt & " group by geo_mod,shybrid_npos,swurst_id) fcs, (select max(smod_type) smod_type,max(shybrid_npos) shybrid_npos,max(hybrid_npos) hybrid_npos " SQLStmt = SQLStmt & " from assembly.smod_readout group by smod_type,shybrid_npos) sr, " SQLStmt = SQLStmt & " (select max(startdate) startdate,max(fec_number) fec_number,max(fec_string) fec_string from assembly.fec_connect " SQLStmt = SQLStmt & " where to_date( ? ,'MM/DD/YYYY HH24:MI:SS')>=startdate " SQLStmt = SQLStmt & " group by fec_number,fec_string) fcn, " SQLStmt = SQLStmt & " assembly.geo_mods gm " SQLStmt = SQLStmt & " where gm.startdate<=to_date( ? ,'MM/DD/YYYY HH24:MI:SS') " SQLStmt = SQLStmt & " and gm.stopdate>to_date( ? ,'MM/DD/YYYY HH24:MI:SS') " SQLStmt = SQLStmt & " and gm.smod_type=sr.smod_type and fcs.startdate=fc.startdate " SQLStmt = SQLStmt & " and fcn.startdate=fc.startdate and fcn.fec_number=fc.fec_number and fcn.fec_string=fc.fec_string " SQLStmt = SQLStmt & " and fcs.geo_mod=fc.geo_mod and fcs.shybrid_npos=fc.shybrid_npos " SQLStmt = SQLStmt & " and fcs.swurst_id=fc.swurst_id and fc.fec_number>0 and mod(fc.fec_string,2)=0 " SQLStmt = SQLStmt & " and gm.geo_mod=fc.geo_mod and sr.shybrid_npos=fc.shybrid_npos) fcx, " SQLStmt = SQLStmt & " (select fc1.fec_number from ASSEMBLY.FEC_CONFIG fc1, " SQLStmt = SQLStmt & " (select max(startdate) startdate,max(abs(fec_number)) afec_number " SQLStmt = SQLStmt & " from assembly.fec_config " SQLStmt = SQLStmt & " where startdate<=to_date( ? ,'MM/DD/YYYY HH24:MI:SS') " SQLStmt = SQLStmt & " group by abs(fec_number) ) fcs1 " SQLStmt = SQLStmt & " where fc1.startdate=fcs1.startdate " SQLStmt = SQLStmt & " and abs(fc1.fec_number)=fcs1.afec_number and fc1.fec_number>0) fca, " SQLStmt = SQLStmt & " (select distinct abs(fec_number) fec_number,fec_port from assembly.fec_parameters) fd " SQLStmt = SQLStmt & " where fcx.fec_number (+)= fd.fec_number " SQLStmt = SQLStmt & " and fcx.fec_port (+)= fd.fec_port " SQLStmt = SQLStmt & " and fca.fec_number (+)= fd.fec_number " SQLStmt = SQLStmt & " order by fec_number,fec_port " ' response.write(SQLStmt) Cmd.CommandText = SQLStmt Cmd.CommandType = 1 for i=0 To 4 Set prm = cmd.CreateParameter("Input" & CStr(i),adBSTR,adParamInput,20,timedate) Cmd.Parameters.Append prm Set prm=nothing Next Set RS = Cmd.Execute() If Not RS.EOF Then %><% response.write("

" & vbCrLf) response.write(" " & vbCrLf) response.write("" & vbCrLf) response.write(" " & vbCrLf) response.write(" " & vbCrLf) response.write(" " & vbCrLf) response.write(" " & vbCrLf) response.write(" " & vbCrLf) response.write("") fec_old=-999999 Do While Not RS.EOF If CInt(RS("FEC_NUMBER"))<>fec_old Then If fec_old<>-999999 Then Response.write("" & vbCrLf) End If Response.write("" & vbCrLf) fec_number=CStr(RS("FEC_NUMBER")) If Not IsNull(RS("FCONN")) Then fcolor="#008000" fstate="On" Else fcolor="#FF0000" fstate="Off" End If response.write("" & vbCrLf) response.write(" " & vbCrLf) fec_old=CInt(RS("FEC_NUMBER")) End If If Not IsNull(RS("GEO_MOD")) Then If Left(CStr(RS("GEO_MOD")),2)="GS" Or Left(CStr(RS("GEO_MOD")),2)="GV" Then If CInt(RS("HYBRID_NPOS"))=0 Then side="(L)" Else side="(R)" End If Else side="" End If geo_mod= CStr(RS("GEO_MOD")) & side response.write(" " & vbCrLf) response.write(" " & vbCrLf) Else geo_mod= "________" response.write(" " & vbCrLf) response.write(" " & vbCrLf) End If RS.Movenext Loop response.write(" " & vbCrLf) response.write("
FEC #Port 0Port 1Port 2Port 3
" & vbCrLf) response.write(" " & fec_number & "" & vbCrLf) response.write(" " & fstate &" " & geo_mod & " " & vbCrLf) response.write("D ") response.write(" " & geo_mod & " " & vbCrLf) response.write("C ") response.write("
" & vbCrLf) response.write("
" & vbCrLf) Else %>

There are no defined Front End Controllers <% End If Connection.Close Set RS = nothing Set Cmd = nothing Set Connection = nothing %>