<%@ LANGUAGE="VBScript" %> <% If request("config_id")<>"" Then config_id=CStr(request("config_id")) ccrdate=CStr(request("ccrdate")) Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd SQLStmt = " select to_char(crdate,'MM/DD/YYYY HH24:MI:SS') crdate,description " SQLStmt = SQLStmt & " from phoffline.trigger_config_log tcl " SQLStmt = SQLStmt & " where tcl.config_id='" & config_id & "' and tcl.crdate=to_date('" & ccrdate & "','MMDDYYYYHH24MISS')" ' response.write(SQLStmt) Set RS = Connection.Execute(SQLStmt) If Not RS.EOF Then crdate=CStr(RS("Crdate")) If Not IsNull(RS("DESCRIPTION")) Then descr=CStr(RS("DESCRIPTION")) Else descr="no description" End If Set RS=nothing ' ' Get the full configuration ' SQLStmt0 = " select tbs.bit_name,tbs.ifscaledown,tc.bit_position,tc.bit_enabled,tc.scaledown " SQLStmt0 = SQLStmt0 & " from phoffline.trigger_config tc,phoffline.trigger_bit_setting tbs " SQLStmt0 = SQLStmt0 & " where tc.bit_position=tbs.bit_position " SQLStmt0 = SQLStmt0 & " and tc.crdate=tbs.crdate " SQLStmt0 = SQLStmt0 & " and tc.config_id='" & config_id & "' and tc.ccrdate=to_date('" & ccrdate & "','MMDDYYYYHH24MISS')" SQLStmt0 = SQLStmt0 & " order by tc.bit_position " ' response.write(SQLStmt0) Set RS0 = Connection.Execute(SQLStmt0) %> Trigger Configurations

Trigger Configuration <%=config_id%>

Start Validity time <%=crdate%>

Description: <%=descr%> 

<% Do While Not RS0.EOF bit_position=CStr(RS0("BIT_POSITION")) bit_name=CStr(RS0("BIT_NAME")) enabled=CInt(RS0("BIT_ENABLED")) scaledown=CLng(RS0("SCALEDOWN")) ifscaledown=CInt(RS0("IFSCALEDOWN")) If enabled=0 Then lfmt="" rfmt="" Else lfmt="" rfmt="" End If If bit_position=16 Then %>
Bit  Bit Name On/Off Scaledown

<% End If %> <% RS0.MoveNext Loop %>
Bit  Bit Name On/Off Scaledown
<%=bit_position%> <%=response.write(lfmt & bit_name & rfmt)%> <%=response.write(lfmt & enabled & rfmt)%> <% If ifscaledown=0 Then response.write(lfmt & "-" & rfmt) Else response.write(lfmt & scaledown & rfmt) End If %>

<% Else %> Unknown configuration <%=config_id%> <% End If Connection.Close Else %> Unknown configuration <%=config_id%> <% End If %>