<!DOCTYPE html>
<html lang="en">
<head>
  <!--#include file="./includes/header.asp"-->
  <!--#include file="./includes/sql.asp"-->
  <!--#include file="./includes/validation.asp"-->
  <title>Test With Includes</title>
</head>
<%
Dim theme
theme = Request.Cookies("theme")
IF theme = "" THEN
    theme="bg-theme1"
END IF

Dim switchid, rs, switchname
switchid = 5411

Dim strSQL
strSQL = "SELECT mac.alias AS switchname FROM machines mac WHERE mac.machineid = " & switchid
Set rs = objConn.Execute(strSQL)

If Not rs.EOF Then
    If Not IsNull(rs("switchname")) Then switchname = rs("switchname") Else switchname = ""
Else
    switchname = "NOT FOUND"
End If

rs.Close
Set rs = Nothing
%>

<body class="bg-theme <%=theme%>">
<h1>Test With Includes</h1>
<p>Switch Name: <%=Server.HTMLEncode(switchname)%></p>
<%
objConn.Close
%>
</body>
</html>
