summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php26
1 files changed, 22 insertions, 4 deletions
diff --git a/index.php b/index.php
index 0da673f..e933274 100644
--- a/index.php
+++ b/index.php
@@ -11,10 +11,28 @@
if($_GET['page']) $page = Unquote($_GET['page']);
else $page = $GLOBALS['config']['home'];
- if($_GET['mode'] == 'edit') $data = $GLOBALS['pages']->GetEditor($page, 'c', $GLOBALS['links']->GetNeonLink($page, null, false));
- else $data = $GLOBALS['pages']->Get($page, 'c');
+ $res = $GLOBALS['db']->Execute('SELECT code FROM base ORDER BY id');
- $base = $pages->Get($GLOBALS['config']['default_base'], 'b');
+ $base = '';
+ while(!$res->EOF) {
+ $base .= $res->fields[0];
+ $res->MoveNext();
+ }
- echo $base['content'];
+ $env = array('current_page' => $page);
+ if($_GET['mode'] == 'edit') $env['current_page'] = '$editor:' . $page;
+
+ $content = Subst($base, $env);
+
+ echo '<?xml version="1.0" encoding="UTF-8" ?>';
?>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <?PHP
+ echo $content;
+ ?>
+ </body>
+</html>