Problemer med active i menu
Kære eksperter, jeg har en ting jeg græmmer mig over, min menu, som jeg er sikker på rimelig nemt, kan laves meget smartere!Menuen skal markere det aktive link med "active" og pt ser den sådan her ud:
<?
$server1 = $_SERVER['PHP_SELF'];
if ($server1 == '/index.php')
{
?>
<div class="container">
<ul id="nav">
<!-- CSS Tabs -->
<li><a class="active" href="../index.php">Forside</a></li>
<li><a href="../shop/products.php">Produkter</a></li>
<li><a href="../member/">Medlemmer</a></li>
<li><a href="../support.php">Support</a></li>
<li><a href="../faq.php">FAQ</a></li>
<li><a href="../about.php">Kontakt os</a></li>
<?
}
else if($server1 == '/shop/products.php')
{
?>
<div class="container">
<ul id="nav">
<!-- CSS Tabs -->
<li><a href="../index.php">Forside</a></li>
<li><a class="active" href="../shop/products.php">Produkter</a></li>
<li><a href="../member/">Medlemmer</a></li>
<li><a href="../support.php">Support</a></li>
<li><a href="../faq.php">FAQ</a></li>
<li><a href="../about.php">Kontakt os</a></li>
<?
}
else if($server1 == '/showproduct.php')
{
?>
<div class="container">
<ul id="nav">
<!-- CSS Tabs -->
<li><a href="../index.php">Forside</a></li>
<li><a class="active" href="../shop/products.php">Produkter</a></li>
<li><a href="../member/">Medlemmer</a></li>
<li><a href="../support.php">Support</a></li>
<li><a href="../faq.php">FAQ</a></li>
<li><a href="../about.php">Kontakt os</a></li>
<?
}
else if ($server1 == '/about.php')
{
?>
<div class="container">
<ul id="nav">
<!-- CSS Tabs -->
<li><a href="../index.php">Forside</a></li>
<li><a href="../shop/products.php">Produkter</a></li>
<li><a href="../member/">Medlemmer</a></li>
<li><a href="../support.php">Support</a></li>
<li><a href="../faq.php">FAQ</a></li>
<li><a class="active" href="../about.php">Kontakt os</a></li>
<?
}
else if ($server1 == '/about.php')
{
?>
<div class="container">
<ul id="nav">
<!-- CSS Tabs -->
<li><a href="../index.php">Forside</a></li>
<li><a href="../shop/products.php">Produkter</a></li>
<li><a href="../member/">Medlemmer</a></li>
<li><a href="../support.php">Support</a></li>
<li><a href="../faq.php">FAQ</a></li>
<li><a href="../about.php">Kontakt os</a></li>
</ul>
</div>
<?
}
else if ($server1 == '/faq.php')
{
?>
<div class="container">
<ul id="nav">
<!-- CSS Tabs -->
<li><a href="../index.php">Forside</a></li>
<li><a href="../shop/products.php">Produkter</a></li>
<li><a href="../member/">Medlemmer</a></li>
<li><a href="../support.php">Support</a></li>
<li><a class="active" href="../faq.php">FAQ</a></li>
<li><a href="../about.php">Kontakt os</a></li>
<?
}
else if ($server1 == '/member/index.php')
{
?>
<div class="container">
<ul id="nav">
<!-- CSS Tabs -->
<li><a href="../index.php">Forside</a></li>
<li><a href="../shop/products.php">Produkter</a></li>
<li><a class="active" href="../member/">Medlemmer</a></li>
<li><a href="../support.php">Support</a></li>
<li><a href="../faq.php">FAQ</a></li>
<li><a href="../about.php">Kontakt os</a></li>
<?
}
else if ($server1 == '/support.php')
{
?>
<div class="container">
<ul id="nav">
<!-- CSS Tabs -->
<li><a href="../index.php">Forside</a></li>
<li><a href="../shop/products.php">Produkter</a></li>
<li><a href="../member/">Medlemmer</a></li>
<li><a class="active" href="../support.php">Support</a></li>
<li><a href="../faq.php">FAQ</a></li>
<li><a href="../about.php">Kontakt os</a></li>
<?
}
else
{
?>
<div class="container">
<ul id="nav">
<!-- CSS Tabs -->
<li><a href="../index.php">Forside</a></li>
<li><a href="../shop/products.php">Produkter</a></li>
<li><a href="../member/">Medlemmer</a></li>
<li><a href="../support.php">Support</a></li>
<li><a href="../faq.php">FAQ</a></li>
<li><a href="../about.php">Kontakt os</a></li>
<?
}
?>