1 |
<?php |
<?php |
2 |
/** |
/** |
3 |
|
* mageia.org global nav bar. |
4 |
|
* |
5 |
|
* PHP version 5.4 |
6 |
|
* |
7 |
|
* @category Mageia |
8 |
|
* @package Mageia\Web\nav |
9 |
|
* @author rda <rda@mageia.org> |
10 |
|
* @link http://nav.mageia.org/ |
11 |
|
* |
12 |
|
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU GPL v2+ |
13 |
|
* |
14 |
|
* This program is free software; you can redistribute it and/or modify it |
15 |
|
* under the terms of the GNU General Public License aspublished by the |
16 |
|
* Free Software Foundation; either version 2 of the License, or (at your |
17 |
|
* option) any later version. |
18 |
*/ |
*/ |
19 |
|
|
20 |
$t0 = microtime(); |
$t0 = microtime(); |
41 |
/** wrap the returned HTML in <header id="hmgn" />? */ |
/** wrap the returned HTML in <header id="hmgn" />? */ |
42 |
$wrap = isset($_GET['w']) ? true : false; |
$wrap = isset($_GET['w']) ? true : false; |
43 |
|
|
44 |
|
require 'conf.php'; |
45 |
include '../lib.php'; |
include '../lib.php'; |
46 |
|
|
47 |
header('Access-Control-Allow-Origin: *'); |
header('Access-Control-Allow-Origin: *'); |
49 |
header('Content-Type: text/html;charset=utf-8'); |
header('Content-Type: text/html;charset=utf-8'); |
50 |
header(sprintf('Expires: %s', gmdate('r', strtotime('+1 day')))); |
header(sprintf('Expires: %s', gmdate('r', strtotime('+1 day')))); |
51 |
|
|
52 |
echo _mgnav_html($wrap, $lang, null, 'www.mageia.org', NCache::build('../var/tmp/cache')); |
echo _mgnav_html($wrap, $lang, null, $www_host, NCache::build($cache_path)); |
53 |
|
|
54 |
apache_note('navMakeTime', number_format(microtime() - $t0, 6)); |
apache_note('navMakeTime', number_format(microtime() - $t0, 6)); |