<% 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 * FROM idfs WHERE idfid = " & idfid Set rs = objConn.Execute(strSQL) If rs.EOF Then Response.Write("IDF not found") Response.End End If idfname = rs("idfname") description = rs("description") maptop = rs("maptop") mapleft = rs("mapleft") isactive = rs("isactive") 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 %>