aboutsummaryrefslogtreecommitdiffstats
path: root/_nav/html/index.php
blob: 7297f84ecdcffc43d91d19727fd34b4c5199fe58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
*/

/** Below variables are defined after the document variables. */

/** URL of the document calling the service. */
$url  = isset($_GET['u']) ? trim($_GET['u']) : null;

/** html[lang] of the doc. */
$lang = isset($_GET['l']) ? trim($_GET['l']) : null;
if ($lang == 'undefined' ||
    $lang == '') {

    $lang = 'en';
}

/** body[class] of the doc. */
$body = isset($_GET['b']) ? trim($_GET['b']) : null;

/** meta[name=context] */
$context = isset($_GET['c']) ? trim($_GET['c']) : null;

/** wrap the returned HTML in <header id="hmgn" />? */
$wrap = isset($_GET['w']) ? true : false;

include '../lib.php';

header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET');
header('Content-Type: text/html;charset=utf-8');
header(sprintf('Expires: %s', gmdate('r', strtotime('+1 day'))));
echo _mgnav_html($wrap, $lang);