2014-01-23 23:08:42 -05:00
|
|
|
<?php include_once("common.php"); ?>
|
2011-02-24 14:25:26 -05:00
|
|
|
<div id="tabs">
|
|
|
|
<ul>
|
2011-04-15 23:33:30 -04:00
|
|
|
<?php
|
|
|
|
$tabs = array(
|
2018-05-08 20:40:21 -04:00
|
|
|
"Home" => array("aclindsay.com", "", "%^/?$%"),
|
|
|
|
"Blog" => array("blog.aclindsay.com", "", "%.*%"),
|
|
|
|
"Contact" => array("aclindsay.com", "/contact", "%^/contact(/.*)?%"),
|
|
|
|
"Projects" => array("aclindsay.com", "/projects", "%^/projects(/.*)?%"),
|
|
|
|
"Resume" => array("aclindsay.com", "/resume", "%^/resume(/.*)?%")
|
2011-04-15 23:33:30 -04:00
|
|
|
);
|
2014-01-24 22:44:19 -05:00
|
|
|
$protocol = get_protocol();
|
2014-01-24 22:08:37 -05:00
|
|
|
$http_host = $_SERVER['HTTP_HOST'];
|
|
|
|
$request_uri = $_SERVER['REQUEST_URI'];
|
2011-03-22 13:32:57 -04:00
|
|
|
|
2014-01-24 22:08:37 -05:00
|
|
|
foreach ($tabs as $name => $tab_info) {
|
|
|
|
if ($tab_info[0] == $http_host && preg_match($tab_info[2], $request_uri))
|
|
|
|
$class="current";
|
2011-04-15 23:33:30 -04:00
|
|
|
else
|
2014-01-24 22:08:37 -05:00
|
|
|
$class="inactive";
|
|
|
|
echo "\t\t<li><a href=\"".$protocol.$tab_info[0].$tab_info[1]."\" class=\"".$class."\">".$name."</a></li>\n";
|
2011-04-15 23:33:30 -04:00
|
|
|
}
|
|
|
|
?>
|
2011-02-24 14:25:26 -05:00
|
|
|
</ul>
|
|
|
|
</div>
|