aboutsummaryrefslogtreecommitdiffstats
path: root/en/2/nav.php
blob: 891c71957dcaf237fce6431bf6637c7473133c98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

$nav = array(
    "/{$locale}/2/"          => _r('Mageia 2'),
    "/{$locale}/2/download_index.php"  => _r('Download'),
    "/{$locale}/2/for-pc/"     => _r('For PC'),
    "/{$locale}/2/for-server/" => _r('For server'),
);

$sru = trim($_SERVER['REQUEST_URI']);

$pnav = array();
foreach ($nav as $k => $v) {
    $pnav[] = sprintf('<li><a href="%s"%s>%s</a></li>',
        $k,
        $k == $sru ? ' class="sel"' : null,
        $v);
}
$pnav = implode($pnav);

echo <<<S
<div id="mgnavsub"><ul id="mgnavsubl">{$pnav}</ul></div>
S;