Whatsup Gold public satus page

Here is a simple example of a WhatsUp Gold public status page to show to end users. It will show the status of devices without giving them extra information they do not need.


<% @LANGUAGE="VBScript"%>

<% publicview = "Group To Show" Set adoCon = Server.CreateObject("ADODB.Connection") adoCon.Open "DSN=WhatsUp" Set rs = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT * FROM DeviceGroup where sGroupName = '" & publicview & "';" rs.open strSQL,adoCon groupid = rs("nDeviceGroupID") rs.close strSQL = "Select * from PivotDeviceToGroup where nDeviceGroupID = " & groupid rs.open strSQL,adoCon deviceswewant = "" do while not rs.eof if not deviceswewant = "" then deviceswewant = deviceswewant & " OR " end if deviceswewant = deviceswewant & "(nDeviceID=" & rs("nDeviceID") & ")" rs.movenext loop rs.close strSQL = "select * from Device where " & deviceswewant & ";" rs.open strSQL,adoCon %>
<% do while not rs.eof 'accessing null data seems to corrupt the recordset. Put all your values into variabled before checking maintenacemode status = rs("sStatus") name = rs("sDisplayName") maintenancemode = rs("bManualMaintenanceMode") response.write "" response.write "" if not isnull(maintenancemode) then response.write "" elseif status = "" then response.write "" else response.write "" end if response.write "" rs.movenext loop rs.close %>
name status
" & name & "" & "Maintenace Mode :|" & "" & "Happy Camper :)" & "" & "Experiencing Problems :(" & "