2011-02-24 14:25:26 -05:00
|
|
|
<div id="tabs">
|
|
|
|
<ul>
|
2011-03-20 22:46:21 -04:00
|
|
|
<?php
|
2011-03-20 23:32:35 -04:00
|
|
|
$tabs = array(
|
2011-03-21 00:18:24 -04:00
|
|
|
"Home" => "/",
|
2011-03-20 23:38:57 -04:00
|
|
|
"Blog" => "/blog/",
|
2011-03-20 23:32:35 -04:00
|
|
|
"Contact" => "/contact/",
|
|
|
|
"Projects" => "/projects/",
|
|
|
|
"Resume" => "/resume/"
|
|
|
|
);
|
2011-03-22 13:32:57 -04:00
|
|
|
$base_domain = $_SERVER['HTTP_HOST'] == "aclindsay.com";
|
|
|
|
|
2011-03-20 22:46:21 -04:00
|
|
|
foreach ($tabs as $name => $url) {
|
2011-04-15 00:08:27 -04:00
|
|
|
if ($url == "/") {
|
|
|
|
if ($_SERVER['REQUEST_URI'] == "/")
|
|
|
|
echo "<li><a href=\"http://aclindsay.com/\" class=\"current\">Home</a></li>";
|
|
|
|
else
|
|
|
|
echo "<li><a href=\"http://aclindsay.com/\">Home</a></li>";
|
|
|
|
} else if ($base_domain && strncmp($url, $_SERVER['REQUEST_URI'], strlen($url)) == 0)
|
2011-03-20 22:46:21 -04:00
|
|
|
echo "<li><a href=\"http://aclindsay.com".$url."\" class=\"current\">".$name."</a></li>";
|
|
|
|
else
|
|
|
|
echo "<li><a href=\"http://aclindsay.com".$url."\">".$name."</a></li>";
|
|
|
|
}
|
|
|
|
?>
|
2011-02-24 14:25:26 -05:00
|
|
|
</ul>
|
|
|
|
</div>
|