<% theme = Request.Cookies("theme") IF theme = "" THEN theme="bg-theme1" END IF Dim idfid, isNewRecord idfid = Request.QueryString("id") If idfid = "" Or idfid = "0" Then isNewRecord = True idfid = 0 Else isNewRecord = False End If ' If editing, fetch existing data Dim rs, idfname, description, maptop, mapleft, isactive If Not isNewRecord Then Dim strSQL strSQL = "SELECT mac.machineid, mac.alias AS idfname, mac.machinenotes AS description, " & _ "mac.maptop, mac.mapleft, mac.isactive " & _ "FROM machines mac " & _ "WHERE mac.machineid = " & idfid & " AND mac.machinetypeid = 17" Set rs = objConn.Execute(strSQL) If rs.EOF Then Response.Write("IDF not found") Response.End End If If Not IsNull(rs("idfname")) Then idfname = rs("idfname") Else idfname = "" If Not IsNull(rs("description")) Then description = rs("description") Else description = "" If Not IsNull(rs("maptop")) Then maptop = rs("maptop") Else maptop = "" If Not IsNull(rs("mapleft")) Then mapleft = rs("mapleft") Else mapleft = "" If Not IsNull(rs("isactive")) Then isactive = rs("isactive") Else isactive = 1 rs.Close Set rs = Nothing Else ' New record defaults idfname = "" description = "" maptop = "" mapleft = "" isactive = 1 ' Active by default for new records End If %>
<%If isNewRecord Then Response.Write("Add IDF") Else Response.Write("Edit IDF: " & Server.HTMLEncode(idfname))%>

Short name to identify this IDF location
Optional: Location details, access information, or other notes
>
Inactive devices are hidden from most lists and the network map
<%If maptop <> "" And mapleft <> "" Then Response.Write("Current position: X=" & mapleft & ", Y=" & maptop) Else Response.Write("No position set - click button to select") End If%>
Click to select this IDF's position on the network map

Cancel <%If Not isNewRecord Then%> <%End If%>
<% objConn.Close %>