% 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 %>