aboutsummaryrefslogtreecommitdiffstats
path: root/html
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-05-15 17:27:45 +0000
committerRomain d'Alverny <rda@mageia.org>2012-05-15 17:27:45 +0000
commitc3b4ecc4803de95fa2bc5b604fd91ffdb4b90f1d (patch)
treed8510db545ece075b660dc7f10abc255324787ea /html
parent54473d1ad4ecd0695c5668698e221d4dc5fa67e4 (diff)
downloadnav-c3b4ecc4803de95fa2bc5b604fd91ffdb4b90f1d.tar
nav-c3b4ecc4803de95fa2bc5b604fd91ffdb4b90f1d.tar.gz
nav-c3b4ecc4803de95fa2bc5b604fd91ffdb4b90f1d.tar.bz2
nav-c3b4ecc4803de95fa2bc5b604fd91ffdb4b90f1d.tar.xz
nav-c3b4ecc4803de95fa2bc5b604fd91ffdb4b90f1d.zip
first import; adapted copy of www/_nav/
Diffstat (limited to 'html')
-rw-r--r--html/index.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/html/index.php b/html/index.php
new file mode 100644
index 0000000..31ba1d5
--- /dev/null
+++ b/html/index.php
@@ -0,0 +1,28 @@
+<?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;
+
+/** 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); \ No newline at end of file