<%@ LANGUAGE="VBScript" %> <% ' ' 0 - table name ' 1 - column name ' 2 - default value ' 3 - parameter name ' 4 - fec,string,port ' Dim fec_parameter(5,40) Dim fec_value(7,40) If Request("n_refresh")="" Then n_refresh=0 Else n_refresh=CInt(Request("n_refresh"))+1 End If ' response.write(n_refresh) fec_number=Request("fec_number") If fec_number="" Then message="Specify FEC number ! " %> <% End If Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd ' ' Check if people registered for shift/logbook writing ' operator1="" operator2="" firstname1="" firstname2="" registered=0 If Request.Cookies("PHOBOSPORTAL").HasKeys Then strCookie1=Request.Cookies("PHOBOSPORTAL")("OPERATOR1") If Not (IsNull(strCookie1) OR ( Len(strCookie1) = 0)) Then registered=1 operator1=CStr(strCookie1) firstname1=CStr(Request.Cookies("PHOBOSPORTAL")("FIRSTNAME1")) strCookie2=Request.Cookies("PHOBOSPORTAL")("OPERATOR2") If Not (IsNull(strCookie2) OR ( Len(strCookie2) = 0)) Then operator2=CStr(strCookie2) firstname2=CStr(Request.Cookies("PHOBOSPORTAL")("FIRSTNAME2")) End If End If End if If Firstname1<>"" Then Fullname1=Ucase(Left(Firstname1,1)) & ". " & operator1 Else Fullname1=operator1 End If If Firstname2<>"" Then Fullname2=Ucase(Left(Firstname2,1)) & ". " & operator2 Else Fullname2=operator2 End If If registered=0 Then Fullname1="Not Registered" End If comments=Request("comments") comments= Replace(comments,"'","''") commentsbr= Replace(comments,Chr(13) & Chr(10),"
",1,-1,1) timedate=Request("timedate") 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") ' ' Prepare FEC parameters ' SQLStmtP = " select atc.owner||'.'||atc.table_name||'.'||atc.column_name fname,atc.table_name, " SQLStmtP = SQLStmtP & " atc.column_name,parameter_name,description,def_value,units " SQLStmtP = SQLStmtP & " from ASSEMBLY.FEC_HARDWARE_COLUMNS fhc,all_tab_columns atc " SQLStmtP = SQLStmtP & " where fhc.owner=atc.owner " SQLStmtP = SQLStmtP & " and fhc.table_name=atc.table_name " SQLStmtP = SQLStmtP & " and fhc.column_name=atc.column_name " SQLStmtP = SQLStmtP & " order by fhc.table_name " ' response.write(SQLStmtP) Set RSP = Connection.Execute(SQLStmtP) npp=0 Do While Not RSP.EOF fec_parameter(0,npp) = CStr(RSP("fname")) fec_parameter(1,npp) = CStr(RSP("column_name")) ' response.write(fec_parameter(1,npp) & "
" & vbCrLf) If Not IsNull(RSP("def_value")) Then fec_parameter(2,npp) = CStr(RSP("def_value")) Else fec_parameter(2,npp)= " No default " End If If Not IsNull(RSP("parameter_name")) Then fec_parameter(3,npp) = CStr(RSP("parameter_name")) fec_parameter(5,npp) = CStr(RSP("description")) Else fec_parameter(3,npp)= " Unknown " fec_parameter(5,npp) =" Unknown " End If select case CStr(RSP("table_name")) case "FEC_CONFIG" fec_parameter(4,npp)="F" case "FEC_PARAMETERS" fec_parameter(4,npp)="P" case "FEC_STRINGS" fec_parameter(4,npp)="S" end select RSP.Movenext npp=npp+1 Loop npp=npp-1 ' %> FEC Parameters

Parameters of FEC# <%=fec_number%> valid on <%=timedate%>

Warning: Before changing any parameters you MUST:

0) Register on the Portal (without registration this page is readonly)
1) Adjust validity time (or leave as is if you just changed FEC 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) You can then modify ALL the parameters that you want to change by overtyping their values. You may display Help page to help you make modifications
4) After all changes click "Update Database Button". You will have a chance to confirm your choices again

 

<% If n_refresh<1 Then %>

Adjust Time and Date of the start of validity of the new configuration and click Change/Refresh button <% End If %>

Time and Date:

Back to Cable Connection

Help describing all FEC Parameters (a separate page will open)

<% SQLStmt = " select to_char(ASSEMBLY.FEC_CONFIG.startdate,'MM/DD/YYYY HH24:MI:SS') sdate, " SQLStmt = SQLStmt & " ASSEMBLY.FEC_CONFIG.fec_number FEC_NUMBER,ASSEMBLY.FEC_STRINGS.fec_string FEC_STRING, " For i=0 To npp SQLStmt = SQLStmt & fec_parameter(0,i) & " " & fec_parameter(1,i) If i<>npp Then SQLStmt = SQLStmt & "," End If Next SQLStmt = SQLStmt & " from ASSEMBLY.FEC_CONFIG,ASSEMBLY.FEC_STRINGS,ASSEMBLY.FEC_PARAMETERS " SQLStmt = SQLStmt & " where (ASSEMBLY.FEC_CONFIG.startdate,abs(ASSEMBLY.FEC_CONFIG.fec_number))= " SQLStmt = SQLStmt & " (select max(startdate),max(abs(fec_number)) from assembly.fec_config " SQLStmt = SQLStmt & " where startdate<=to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS') " SQLStmt = SQLStmt & " and to_char(abs(fec_number))='" & CStr(fec_number) & "') " SQLStmt = SQLStmt & " and ASSEMBLY.FEC_CONFIG.startdate=ASSEMBLY.FEC_STRINGS.startdate " SQLStmt = SQLStmt & " and ASSEMBLY.FEC_CONFIG.startdate=ASSEMBLY.FEC_PARAMETERS.startdate " SQLStmt = SQLStmt & " and ASSEMBLY.FEC_CONFIG.fec_number=ASSEMBLY.FEC_STRINGS.fec_number " SQLStmt = SQLStmt & " and ASSEMBLY.FEC_CONFIG.fec_number=ASSEMBLY.FEC_PARAMETERS.fec_number " SQLStmt = SQLStmt & " and ASSEMBLY.FEC_PARAMETERS.fec_port=round((ASSEMBLY.FEC_STRINGS.fec_string-0.01)/2,0) " SQLStmt = SQLStmt & " order by ASSEMBLY.FEC_STRINGS.fec_string " Set RS = Connection.Execute(SQLStmt) ' response.write(SQLStmt) If Not RS.EOF Then %>
<% If operator1="" Then names="Operators Not Registered, no database entry possible" Else If operator2="" Then response.write("Operator: ") names= Fullname1 Else response.write("Operators: ") names=Fullname1 & " and " & Fullname2 End If End If %> <%=names %>
Comments:
<% If CInt(RS("FEC_NUMBER"))>0 Then FEC_On="ON" %>

FEC is ON
Select the new state (or leave as is):

FEC is OFF Select the new state (or leave as is):

<% For i=0 To npp If fec_parameter(4,i)="F" Then %> <% response.write(" " & vbCrLf) End If Next %>
Last Configuration Change <%=RS("sdate")%>
<%=fec_parameter(3,i)%> ") If Not IsNull(RS(fec_parameter(1,i))) Then response.write("" & vbCrLf) Else response.write("" & vbCrLf) End If response.write("

FEC Ports & Strings

<% response.write(" " & vbCrLf) response.write("" & vbCrLf) response.write(" " & vbCrLf) For i=0 To npp If fec_parameter(4,i)<>"F" Then response.write(" " & vbCrLf) End If Next response.write("") response.write("") Do While Not RS.EOF fec_string=CInt(RS("FEC_STRING")) response.write(" " & vbCrLf) For i=0 To npp fec_value(fec_string,i)=CStr(RS(fec_parameter(1,i))) If fec_parameter(4,i)="P" Then If (Cint(fec_string) mod 2)=0 Then response.write(" " & vbCrLf) Else response.write(" " & vbCrLf) End IF End If If fec_parameter(4,i)="S" Then response.write(" " & vbCrLf) End If Next response.write(" " & vbCrLf) RS.Movenext Loop response.write("
FEC Strings and Ports" & fec_parameter(3,i) & "
" & CStr(fec_string) & "") response.write("" & vbCrLf) response.write("") ' response.write("" & vbCrLf) response.write("") response.write("" & vbCrLf) response.write("
" & vbCrLf) If registered=1 Then Response.write(" " & vbCrLf) End If %>
<% Else %>

FEC # <%=fec_number%> is not defined

<% End If %> <% Connection.Close %>