<% theme = Request.Cookies("theme") IF theme = "" THEN theme="bg-theme1" END IF Dim accesspointid, isNewRecord accesspointid = Request.QueryString("id") If accesspointid = "" Or accesspointid = "0" Then isNewRecord = True accesspointid = 0 Else isNewRecord = False End If ' If editing, fetch existing data Dim rs, accesspointname, modelid, serialnumber, ipaddress, description, maptop, mapleft, isactive Dim vendorname, modelnumber If Not isNewRecord Then Dim strSQL strSQL = "SELECT s.*, m.modelnumber, v.vendor " & _ "FROM accesspoints s " & _ "LEFT JOIN models m ON s.modelid = m.modelnumberid " & _ "LEFT JOIN vendors v ON m.vendorid = v.vendorid " & _ "WHERE s.apid = " & accesspointid Set rs = objConn.Execute(strSQL) If rs.EOF Then Response.Write("Access Point not found") Response.End End If accesspointname = rs("apname") modelid = rs("modelid") serialnumber = rs("serialnumber") ipaddress = rs("ipaddress") description = rs("description") maptop = rs("maptop") mapleft = rs("mapleft") isactive = rs("isactive") vendorname = rs("vendor") modelnumber = rs("modelnumber") rs.Close Set rs = Nothing Else ' New record defaults accesspointname = "" modelid = "" serialnumber = "" ipaddress = "" description = "" maptop = "" mapleft = "" isactive = 1 ' Active by default for new records vendorname = "" modelnumber = "" End If %>
<%If isNewRecord Then Response.Write("Add Access Point") Else Response.Write("Edit Access Point: " & Server.HTMLEncode(accesspointname))%>

Short name to identify this accesspoint
Select a model or click "New" to add one
IPv4 or IPv6 address
Optional: Purpose, rack location, 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 accesspoint's position on the network map

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