<%@ LANGUAGE="VBScript" %> <% Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd SQLStmt = "select measurement_type,description from sitester.sensor_measurement_list where action = 'Logging'" Set log_type_list = Connection.Execute(SQLStmt) SQLStmt = "select distinct batch from sitester.batch_info where status = 1" Set batch_list = Connection.Execute(SQLStmt) username=Trim(Request.ServerVariables("LOGON_USER")) If InStr(username,"\")<>0 Then ' Windows name username=Right(username,Len(Request.ServerVariables("LOGON_USER"))-InStr(username,"\")) End If username=LCase(username) ipaddr=Trim(Request.ServerVariables("REMOTE_ADDR")) If InStr(ipaddr,"18.77.")<>0 Then ' MIT guess_location="MIT" ElseIf InStr(ipaddr,"198.125.160.")<>0 Then guess_location="MIT" ElseIf InStr(ipaddr,"131.193.191.")<>0 Then guess_location="UIC" ElseIf InStr(ipaddr,"146.139.")<>0 Then guess_location="ANL" ElseIf InStr(ipaddr,"130.199.")<>0 Then guess_location="BNL" Else guess_location="MIT" End If sensor=Cint(Request("Sensor")) %> Sensor Logging

Update Sensor Log in Phobos Database

">
Batch Sensor Location Logger Log Type Comments
<%= Request("BATCH")%> <%=sensor%>
<%Connection.Close%>