<%@ LANGUAGE="VBScript" %> <% Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd 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") st_date=FormatDateTime(Date, vbshortDate) st_time=FormatDateTime(Time, vbShortTime) ' ' Check the consistency of the dates for the latest map ' SQLStmtC= " select " SQLStmtC= SQLStmtC & " to_char(max(last_config),'DD-MON-YYYY HH24:MI:SS') lcfg_p,to_char(max(last_config),'YYYYMMDDHH24MISS') lcfg_c, " SQLStmtC= SQLStmtC & " to_char(max(last_connect),'DD-MON-YYYY HH24:MI:SS') lcon_p,to_char(max(last_connect),'YYYYMMDDHH24MISS') lcon_c, " SQLStmtC= SQLStmtC & " to_char(max(last_map),'DD-MON-YYYY HH24:MI:SS') lmap_p,to_char(max(last_map),'YYYYMMDDHH24MISS') lmap_c " SQLStmtC= SQLStmtC & " from " SQLStmtC= SQLStmtC & " (select max(startdate) last_config from assembly.fec_config where startdate<=sysdate), " SQLStmtC= SQLStmtC & " (select max(startdate) last_connect from assembly.fec_connect where startdate<=sysdate)," SQLStmtC= SQLStmtC & " (select max(reqdate) last_map from assembly.fec_map_log where reqdate<=sysdate) " Set RSC = Connection.Execute(SQLStmtC) lcfg_c=CDBl(RSC("lcfg_c")) lcon_c=CDBL(RSC("lcon_c")) lmap_c=CDBL(RSC("lmap_c")) If lcfg_c>lmap_c Or lcon_c>lmap_c Then ivalid=0 If lcfg_c>lmap_c And lcon_c<=lmap_c Then mess="Latest map with validity time of " & CStr(RSC("lmap_p")) & " may not be up to date, FEC configuration has been changed on " & CStr(RSC("lcfg_p")) Elseif lcfg_c<=lmap_c And lcon_c>lmap_c Then mess="Latest map with validity time of " & CStr(RSC("lmap_p")) & " may not be up to date, Cables have been connected or disconnected on " & CStr(RSC("lcon_p")) Else mess="Latest map with validity time of " & CStr(RSC("lmap_p")) & " may not be up to date, FEC and cable configurations have been changed on " & CStr(RSC("lcfg_p")) & " and " & CStr(RSC("lcon_p")) & " respectively." End if Else ivalid=1 mess="Latest map with validity time of " & CStr(RSC("lmap_p")) & " is up to date" End If %> Form to Create Connection Maps

This form will create a connection map valid at a specified moment of time

<% If ivalid=1 Then fcolor="#008000" else fcolor="#FF0000" End If %>

For your information: <%=mess%>

Enter Date and Time of Map validity, your Name and Comments

Time and Date:   
Operator Name:  
Comments: