<?php
include_once("$cs_base_path/include/user/auth.php");
mysql_connect("$DBhost:$DBport",$DBuser,$DBpass) or die("Unable to connect to database");
@mysql_select_db("$DBName") or die("Unable to select database $DBName");
print "
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\">
<head>
";
//Ugly hack to reload index page....
if (isset($refresh_index)) {
print "<meta http-equiv=\"refresh\" CONTENT=\"0.5;URL=$ClearsiteBaseURL\">";
};
print"
<meta http-equiv=\"Pragma\" content=\"no-cache\" />
<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />
<meta http-equiv=\"cache-control\" content=\"no-cache\" />
<meta http-equiv=\"expires\" content=\"0\" />
<meta name=\"robots\" content=\"index,follow\" />
<meta name=\"publisher\" content=\"<Company_Name>\" />
<meta name=\"copyright\" content=\"<Company_Name> 2008\" />
<meta name=\"author\" content=\"Designed by AZE\" />
<meta name=\"distribution\" content=\"global\" />
<meta name=\"description\" content=\"<Company_Name> security, voice and data management\" />
<meta name=\"keywords\" content=\"voip, security, network management, graphing, clearsite\" />
<link rel=\"icon\" type=\"image/x-icon\" href=\"/images/favicon.ico\" />
<title>$hc_page_title</title>
<link href=\"css/clearsite3.0.php\" type=\"text/css\" rel=\"stylesheet\" />
<script type=\"text/javascript\" src=\"$ClearsiteBaseURL/scripts/form-field-tooltip.js\"></script>
<script type=\"text/javascript\" src=\"$ClearsiteBaseURL/include/htmlhttprequest.js\"></script>
<script type=\"text/javascript\" src=\"$ClearsiteBaseURL/include/livesearch.js\"></script>
";
if ($pageref == "my") {
print "
<script type=\"text/JavaScript\">
<!--
function timedRefresh(timeoutPeriod) {
setTimeout(\"location.reload(true);\",timeoutPeriod);
}
// -->
</script>
";
};
print "
</head>
<!-- Global IE fix to avoid layout crash when single word size wider than column width -->
<!-- Following line MUST remain as a comment to have the proper effect -->
<!--[if IE]><style type=\"text/css\"> body {word-wrap: break-word;}</style><![endif]-->
";
if ($pageref == "my") {
print "
<body onload=\"JavaScript:timedRefresh(300000);\">
";
} else {
print "
<body>
";
};
print "
<div class=\"container\">
<div class=\"rnd-header\">
<b class=\"rhtop\">
<b class=\"rh1\"></b>
<b class=\"rh2\"></b>
<b class=\"rh3\"></b>
<b class=\"rh4\"></b>
</b>
</div>
<div class=\"header\">
<div class=\"header-top\">
<img alt=\"\" src=\"$ClearsiteBaseURL/images/clearsite86.png\" />
<div class=\"auth\">
$auth_content
</div>
</div>
</div>
<div class=\"rnd-header\">
<b class=\"rhbottom\">
<b class=\"rh4\"></b>
<b class=\"rh3\"></b>
<b class=\"rh2\"></b>
<b class=\"rh1\"></b>
</b>
</div>
<br />
<div class=\"tabs\">
<div class=\"navbar\">
<ul>
<li"; if ($pageref == "aloe") { print " class=\"current\""; }; print ">
<div class=\"rnd-tab\">
<b class=\"rhtab\">
<b class=\"rt1\"></b>
<b class=\"rt2\"></b>
<b class=\"rt3\"></b>
<b class=\"rt4\"></b>
</b>
<h3"; if ($pageref == "aloe") { print " id=\"active\""; }; print ">
<a href=\"$ClearsiteBaseURL/index.php\">Aloe</a>
</h3>
</div>
</li>
";
if (isset($_COOKIE['clearsite']['user_ID'])) {
print "
<li"; if ($pageref == "my") { print " class=\"current\""; }; print ">
<div class=\"rnd-tab\">
<b class=\"rhtab\">
<b class=\"rt1\"></b>
<b class=\"rt2\"></b>
<b class=\"rt3\"></b>
<b class=\"rt4\"></b>
</b>
<h3"; if ($pageref == "my") { print " id=\"active\""; }; print ">
<a href=\"$ClearsiteBaseURL/my.php\">My</a>
</h3>
</div>
</li>
";
$user_ID = $_COOKIE['clearsite']['user_ID'];
$user_admin_query = "SELECT userlevel FROM user_data WHERE user_ID = \"$user_ID\"";
$user_admin_result = mysql_query($user_admin_query);
$user_admin_row = mysql_fetch_assoc($user_admin_result);
if ($user_admin_row["userlevel"] >= "1") {
print "
<li"; if ($pageref == "admin") { print" class=\"current\""; }; print ">
<div class=\"rnd-tab\">
<b class=\"rhtab\">
<b class=\"rt1\"></b>
<b class=\"rt2\"></b>
<b class=\"rt3\"></b>
<b class=\"rt4\"></b>
</b>
<h3"; if ($pageref == "admin") { print " id=\"active\""; }; print ">
<a href=\"$ClearsiteBaseURL/admin.php\">Admin</a>
</h3>
</div>
</li>
";
};
};
print "
<li"; if ($pageref == "tools") { print" class=\"current\""; }; print ">
<div class=\"rnd-tab\">
<b class=\"rhtab\">
<b class=\"rt1\"></b>
<b class=\"rt2\"></b>
<b class=\"rt3\"></b>
<b class=\"rt4\"></b>
</b>
<h3"; if ($pageref == "tools") { print " id=\"active\""; }; print ">
<a href=\"$ClearsiteBaseURL/tools.php\">Tools</a>
</h3>
</div>
</li>
<li"; if ($pageref == "doc_home") { print" class=\"current\""; }; print ">
<div class=\"rnd-tab\">
<b class=\"rhtab\">
<b class=\"rt1\"></b>
<b class=\"rt2\"></b>
<b class=\"rt3\"></b>
<b class=\"rt4\"></b>
</b>
<h3"; if ($pageref =="doc_home") { print " id=\"active\""; }; print ">
<a href=\"$ClearsiteBaseURL/docs.php\">Documentation</a>
</h3>
</div>
</li>
<li"; if ($pageref == "about") { print" class=\"current\""; }; print ">
<div class=\"rnd-tab\">
<b class=\"rhtab\">
<b class=\"rt1\"></b>
<b class=\"rt2\"></b>
<b class=\"rt3\"></b>
<b class=\"rt4\"></b>
</b>
<h3"; if ($pageref == "about") { print " id=\"active\""; }; print ">
<a href=\"$ClearsiteBaseURL/about.php\">About</a>
</h3>
</div>
</li>
</ul>
</div>
</div>
<div id=\"clear\"></div>
<div class=\"rnd-header\">
<b class=\"rhtop\">
<b class=\"rh1\"></b>
<b class=\"rh2\"></b>
<b class=\"rh3\"></b>
<b class=\"rh4\"></b>
</b>
</div>
<div class=\"main\">
";
mysql_close();
?>