summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorneoraider <devnull@localhost>2006-12-14 01:06:02 +0100
committerneoraider <devnull@localhost>2006-12-14 01:06:02 +0100
commit543336aef16562369c01992817f58e17144c9cad (patch)
treed49cd8549a836c740df7096ddcf7788ed7920c37
parent93e1133ee88b03e7cae7318cb19761e698e57b86 (diff)
downloadneon-543336aef16562369c01992817f58e17144c9cad.tar
neon-543336aef16562369c01992817f58e17144c9cad.zip
Base-Type durch Subst-Erweiterungen unnoetig gemacht; Type-Konzept entfernt.
-rw-r--r--base.xml41
-rw-r--r--code/links.inc.php2
-rw-r--r--code/nav.inc.php6
-rw-r--r--code/pages.inc.php155
-rw-r--r--code/subst.inc.php39
-rw-r--r--code/user.inc.php2
-rw-r--r--config/SQL/base.sql21
-rw-r--r--config/SQL/pages.sql11
-rw-r--r--config/SQL/privs.sql9
-rw-r--r--core/modules.inc.php10
-rw-r--r--index.php26
-rw-r--r--lang/de.inc.php1
-rw-r--r--pages/Login.xml (renamed from pages/content/Login.xml)1
-rw-r--r--pages/Logout.xml (renamed from pages/content/Logout.xml)1
-rw-r--r--pages/Modules.xml (renamed from pages/content/Modules.xml)1
-rw-r--r--pages/Modules:Config.xml (renamed from pages/content/Modules:Config.xml)1
-rw-r--r--pages/Modules:Enable.xml (renamed from pages/content/Modules:Enable.xml)1
-rw-r--r--pages/Pages.xml (renamed from pages/content/Pages.xml)6
-rw-r--r--pages/Pages:Copy.xml (renamed from pages/content/Pages:Copy.xml)6
-rw-r--r--pages/Pages:Delete.xml (renamed from pages/content/Pages:Delete.xml)6
-rw-r--r--pages/Pages:Edit.xml (renamed from pages/content/Pages:Edit.xml)8
-rw-r--r--pages/Pages:Handle.xml (renamed from pages/content/Pages:Handle.xml)13
-rw-r--r--pages/Pages:New.xml (renamed from pages/content/Pages:New.xml)8
-rw-r--r--pages/Pages:Privs.xml (renamed from pages/content/Pages:Privs.xml)6
-rw-r--r--pages/Pages:Rename.xml (renamed from pages/content/Pages:Rename.xml)6
-rw-r--r--pages/Users.xml (renamed from pages/content/Users.xml)5
-rw-r--r--pages/Users:Delete.xml (renamed from pages/content/Users:Delete.xml)1
-rw-r--r--pages/Users:Group.xml (renamed from pages/content/Users:Group.xml)1
-rw-r--r--pages/Users:Handle.xml (renamed from pages/content/Users:Handle.xml)1
-rw-r--r--pages/Users:New.xml (renamed from pages/content/Users:New.xml)1
-rw-r--r--pages/Users:Password.xml (renamed from pages/content/Users:Password.xml)1
-rw-r--r--pages/Users:Rename.xml (renamed from pages/content/Users:Rename.xml)1
-rw-r--r--pages/base/default.xml45
-rw-r--r--templates/default.inc.php8
-rw-r--r--templates/phpexec.inc.php10
35 files changed, 230 insertions, 231 deletions
diff --git a/base.xml b/base.xml
index cdc3003..8dce219 100644
--- a/base.xml
+++ b/base.xml
@@ -13,27 +13,26 @@
<code>user</code>
<code>util</code>
- <page type="b">default</page>
- <page type="c">Login</page>
- <page type="c">Logout</page>
- <page type="c">Modules</page>
- <page type="c">Modules:Config</page>
- <page type="c">Modules:Enable</page>
- <page type="c">Pages</page>
- <page type="c">Pages:Copy</page>
- <page type="c">Pages:Delete</page>
- <page type="c">Pages:Edit</page>
- <page type="c">Pages:Handle</page>
- <page type="c">Pages:New</page>
- <page type="c">Pages:Privs</page>
- <page type="c">Pages:Rename</page>
- <page type="c">Users</page>
- <page type="c">Users:Delete</page>
- <page type="c">Users:Group</page>
- <page type="c">Users:Handle</page>
- <page type="c">Users:New</page>
- <page type="c">Users:Password</page>
- <page type="c">Users:Rename</page>
+ <page>Login</page>
+ <page>Logout</page>
+ <page>Modules</page>
+ <page>Modules:Config</page>
+ <page>Modules:Enable</page>
+ <page>Pages</page>
+ <page>Pages:Copy</page>
+ <page>Pages:Delete</page>
+ <page>Pages:Edit</page>
+ <page>Pages:Handle</page>
+ <page>Pages:New</page>
+ <page>Pages:Privs</page>
+ <page>Pages:Rename</page>
+ <page>Users</page>
+ <page>Users:Delete</page>
+ <page>Users:Group</page>
+ <page>Users:Handle</page>
+ <page>Users:New</page>
+ <page>Users:Password</page>
+ <page>Users:Rename</page>
<template>default</template>
<template>phpexec</template>
diff --git a/code/links.inc.php b/code/links.inc.php
index 6c6fcd8..54d1dd9 100644
--- a/code/links.inc.php
+++ b/code/links.inc.php
@@ -3,7 +3,7 @@
class Links {
function GetNeonLink($page, $extra = '', $html = true) {
- if($GLOBALS['pages']->HasReadAccess($page, 'c')) {
+ if($GLOBALS['pages']->HasReadAccess($page)) {
if($GLOBALS['user']->login_type == 'url')
$ret = 'index.php?page=' . $page . '&login=' . $GLOBALS['user']->login_key
. ($extra ? '&' . $extra : '');
diff --git a/code/nav.inc.php b/code/nav.inc.php
index 940ced2..7d1e38b 100644
--- a/code/nav.inc.php
+++ b/code/nav.inc.php
@@ -1,5 +1,5 @@
<?PHP
- Uses('links');
+ Uses('links', 'user');
class Nav {
var $entries = array();
@@ -21,7 +21,9 @@
$this->entries[$entry->parent]->Add(&$this->entries[$key]);
}
- function ParseNav($gid, $name) {
+ function ParseNav($name, $gid = NULL) {
+ if($gid === NULL) $gid = $GLOBALS['user']->getGid();
+
$ret = '<ul>';
foreach($this->root_entries[$gid][$name]->children as $entry)
diff --git a/code/pages.inc.php b/code/pages.inc.php
index 549e24c..8ffe008 100644
--- a/code/pages.inc.php
+++ b/code/pages.inc.php
@@ -1,99 +1,108 @@
<?PHP
- Uses('user', 'templates', 'subst');
+ Uses('user', 'templates');
class Pages {
var $pages = array();
- function Get($page, $type) {
- if(!$this->Exists($page, $type))
+ function GetTitle($page) {
+ if(!$this->Exists($page))
+ return $page;
+
+ $pagedata = $this->GetPageData($page);
+
+ $data = $pagedata['data'];
+ $data['_page'] = $page;
+
+ return $GLOBALS['templates'][$pagedata['template']]->GetTitle($data);
+ }
+
+ function GetPage($page) {
+ if(!$this->Exists($page))
return array('title' => $page,
- 'content' => Subst('<span class="error">{{The page \'' . $page . '\' does not exist.}}</span>'));
+ 'content' => '<span class="error">{{The page \'' . $page . '\' does not exist.}}</span>');
- if(!$this->HasReadAccess($page, $type))
+ if(!$this->HasReadAccess($page))
return array('title' => $page,
- 'content' => Subst('<span class="error">{{The page \'' . $page . '\' is protected.}}</span>'));
+ 'content' => '<span class="error">{{The page \'' . $page . '\' is protected.}}</span>');
- $pagedata = $this->GetPageData($page, $type);
+ $pagedata = $this->GetPageData($page);
$data = $pagedata['data'];
- if($extra) $data = array_merge($data, $extra);
$data['_page'] = $page;
- $data['_type'] = $type;
$ret = $GLOBALS['templates'][$pagedata['template']]->GetPage($data);
- return array('title' => Subst($ret['title']), 'content' => Subst($ret['content']));
+ return array('title' => $ret['title'], 'content' => $ret['content']);
}
- function GetEditor($page, $type, $backlink) {
- if(!$this->Exists($page, $type))
+ function GetEditor($page, $backlink) {
+ if(!$this->Exists($page))
return array('title' => $page,
- 'content' => Subst('<span class="error">{{The page \'' . $page . '\' does not exist.}}</span>'));
+ 'content' => '<span class="error">{{The page \'' . $page . '\' does not exist.}}</span>');
- if(!$this->HasWriteAccess($page, $type))
+ if(!$this->HasWriteAccess($page))
return array('title' => $page,
- 'content' => Subst('<span class="error">{{The page \'' . $page . '\' is protected.}}</span>'));
+ 'content' => '<span class="error">{{The page \'' . $page . '\' is protected.}}</span>');
- $pagedata = $this->GetPageData($page, $type);
+ $pagedata = $this->GetPageData($page);
$data = $pagedata['data'];
$data['_page'] = $page;
- $data['_type'] = $type;
$data['_backlink'] = $backlink;
$ret = $GLOBALS['templates'][$pagedata['template']]->GetEditor($data);
- return array('title' => Subst($ret['title']), 'content' => Subst($ret['content']));
+ return array('title' => $ret['title'], 'content' => $ret['content']);
}
- function Exists($page, $type) {
- if(array_key_exists($page . '.' . $type, $GLOBALS['modules']->pages))
+ function Exists($page) {
+ if(array_key_exists($page, $GLOBALS['modules']->pages))
return true;
- $res = $GLOBALS['db']->Execute('SELECT id FROM pages WHERE name = ? AND type = ?', array($page, $type));
+ $res = $GLOBALS['db']->Execute('SELECT id FROM pages WHERE name = ?', $page);
return ($res->RecordCount() > 0);
}
- function HasReadAccess($page, $type) {
- if(!$this->Exists($page, $type)) return false;
+ function HasReadAccess($page) {
+ if(!$this->Exists($page)) return false;
if($GLOBALS['user']->IsAdmin()) return true;
$gid = $GLOBALS['user']->gid;
- $access = $this->GetAccess($page, $type);
+ $access = $this->GetAccess($page);
return ((hexdec($access[0][$gid/4]) & (1 << ($gid%4))) != 0);
}
- function HasWriteAccess($page, $type) {
- if(!$this->Exists($page, $type)) return false;
+ function HasWriteAccess($page) {
+ if(!$this->Exists($page)) return false;
if($GLOBALS['user']->IsAdmin()) return true;
$gid = $GLOBALS['user']->gid;
- $access = $this->GetAccess($page, $type);
+ $access = $this->GetAccess($page);
return ((hexdec($access[1][$gid/4]) & (1 << ($gid%4))) != 0);
}
- function GetPageData($page, $type) {
- if(!$this->Exists($page, $type)) return null;
+ function GetPageData($page) {
+ if(!$this->Exists($page)) return null;
- if(!array_key_exists($page . '.' . $type, $this->pages)) {
- $res = $GLOBALS['db']->Execute('SELECT template, data FROM pages WHERE name = ? AND type = ?', array($page, $type));
+ if(!array_key_exists($page, $this->pages)) {
+ $res = $GLOBALS['db']->Execute('SELECT template, data FROM pages WHERE name = ?', $page);
if($res->RecordCount()) {
parse_str($res->fields[1], $data);
$data = array_map('Unquote', $data);
- $this->pages[$page . '.' . $type] = array('name' => $page, 'type' => $type, 'template' => $res->fields[0],
+ $this->pages[$page] = array('name' => $page, 'template' => $res->fields[0],
'access' => '', 'data' => $data);
}
else {
- $xmldata = $GLOBALS['xmlparser']->ParseFile($GLOBALS['modules']->GetPagePath($page, $type));
+ $xmldata = $GLOBALS['xmlparser']->ParseFile($GLOBALS['modules']->GetPagePath($page));
if(!$xmldata) return null;
$info = $GLOBALS['xmlparser']->FindTag($xmldata, 'info');
@@ -122,94 +131,94 @@
$data[$field['tag']] = $field['children'][0];
}
- $this->pages[$page . '.' . $type] = array('name' => $page, 'type' => $type, 'template' => $template,
+ $this->pages[$page] = array('name' => $page, 'template' => $template,
'access' => $access, 'data' => $data);
}
- $res = $GLOBALS['db']->Execute('SELECT readaccess, writeaccess FROM privs WHERE name = ? AND type = ?', array($page, $type));
+ $res = $GLOBALS['db']->Execute('SELECT readaccess, writeaccess FROM privs WHERE name = ?', $page);
if($res->RecordCount())
- $this->pages[$page . '.' . $type]['access'] = array($res->fields[0], $res->fields[1]);
+ $this->pages[$page]['access'] = array($res->fields[0], $res->fields[1]);
}
- return $this->pages[$page . '.' . $type];
+ return $this->pages[$page];
}
- function Add($name, $type, $template) {
- if($this->Exists($name, $type)) return false;
+ function Add($name, $template) {
+ if($this->Exists($name)) return false;
- $GLOBALS['db']->Execute('INSERT INTO pages (name, template, data, type) VALUES (?, ?, "", ?)',
- array($name, $template, $type));
+ $GLOBALS['db']->Execute('INSERT INTO pages (name, template, data) VALUES (?, ?, "")',
+ array($name, $template));
return ($GLOBALS['db']->Affected_Rows() > 0);
}
- function Edit($page, $type, $data) {
+ function Edit($page, $data) {
$string = '';
foreach($data as $key => $val)
$string .= urlencode($key) . '=' . urlencode($val) . '&';
- $res = $GLOBALS['db']->Execute('SELECT id FROM pages WHERE name = ? AND type = ?',
- array($page, $type));
+ $res = $GLOBALS['db']->Execute('SELECT id FROM pages WHERE name = ?', $page);
if($res->RecordCount()) {
- $GLOBALS['db']->Execute('UPDATE pages SET data = ? WHERE name = ? AND type = ?',
- array(substr($string, 0, -1), $page, $type));
+ $GLOBALS['db']->Execute('UPDATE pages SET data = ? WHERE name = ?',
+ array(substr($string, 0, -1), $page));
return true;
}
- $pagedata = $this->GetPageData($page, $type);
+ $pagedata = $this->GetPageData($page);
- $GLOBALS['db']->Execute('INSERT INTO privs (name, type, readaccess, writeaccess) VALUES (?, ?, ?, ?)',
- array($page, $type, $pagedata['access'][0], $pagedata['access'][1]));
- $GLOBALS['db']->Execute('INSERT INTO pages (name, template, data, type) VALUES (?, ?, ?, ?)',
- array($page, $pagedata['template'], $string, $type));
+ $GLOBALS['db']->Execute('INSERT INTO privs (name, readaccess, writeaccess) VALUES (?, ?, ?)',
+ array($page, $pagedata['access'][0], $pagedata['access'][1]));
+ $GLOBALS['db']->Execute('INSERT INTO pages (name, template, data) VALUES (?, ?, ?)',
+ array($page, $pagedata['template'], $string));
return ($GLOBALS['db']->Affected_Rows() > 0);
}
- function Rename($page, $type, $new_name) {
- if($this->Exists($new_name, $type)) return false;
+ function Rename($page, $new_name) {
+ if($this->Exists($new_name)) return false;
+ if(!$this->Exists($page)) return false;
- $GLOBALS['db']->Execute('UPDATE privs SET name = ? WHERE name = ? AND type = ?', array($new_name, $page, $type));
- $GLOBALS['db']->Execute('UPDATE pages SET name = ? WHERE name = ? AND type = ?', array($new_name, $page, $type));
+ $GLOBALS['db']->Execute('UPDATE privs SET name = ? WHERE name = ?', array($new_name, $page));
+ $GLOBALS['db']->Execute('UPDATE pages SET name = ? WHERE name = ?', array($new_name, $page));
return ($GLOBALS['db']->Affected_Rows() > 0);
}
- function Copy($page, $type, $new_name) {
- if($this->Exists($new_name, $type)) return false;
- if(!$this->Exists($page, $type)) return false;
+ function Copy($page, $new_name) {
+ if($this->Exists($new_name)) return false;
+ if(!$this->Exists($page)) return false;
- $pagedata = $this->GetPageData($page, $type);
+ $pagedata = $this->GetPageData($page);
$string = '';
foreach($pagedata['data'] as $key => $val)
$string .= urlencode($key) . '=' . urlencode($val) . '&';
- $GLOBALS['db']->Execute('INSERT INTO pages (name, template, data, type) VALUES (?, ?, ?, ?)',
- array($new_name, $pagedata['template'], $string, $type));
+ $GLOBALS['db']->Execute('INSERT INTO pages (name, template, data) VALUES (?, ?, ?)',
+ array($new_name, $pagedata['template'], $string));
return ($GLOBALS['db']->Affected_Rows() > 0);
}
- function Delete($page, $type) {
- $GLOBALS['db']->Execute('DELETE FROM privs WHERE name = ? AND type = ?', array($page, $type));
- $GLOBALS['db']->Execute('DELETE FROM pages WHERE name = ? AND type = ?', array($page, $type));
+ function Delete($page) {
+ $GLOBALS['db']->Execute('DELETE FROM privs WHERE name = ?', $page);
+ $GLOBALS['db']->Execute('DELETE FROM pages WHERE name = ?', $page);
return ($GLOBALS['db']->Affected_Rows() > 0);
}
function GetList() {
- $res = $GLOBALS['db']->Execute('SELECT name, type FROM pages');
+ $res = $GLOBALS['db']->Execute('SELECT name FROM pages');
$pages = array();
while($row = $res->FetchRow())
- $pages[$row[0] . '.' . $row[1]] = null;
+ $pages[$row[0]] = null;
$pages = array_keys(array_merge($pages, $this->pages, $GLOBALS['modules']->pages));
@@ -218,27 +227,27 @@
return $pages;
}
- function GetAccess($page, $type) {
- $res = $GLOBALS['db']->Execute('SELECT readaccess, writeaccess FROM privs WHERE name = ? AND type = ?', array($page, $type));
+ function GetAccess($page) {
+ $res = $GLOBALS['db']->Execute('SELECT readaccess, writeaccess FROM privs WHERE name = ?', $page);
if($res->RecordCount())
return array($res->fields[0], $res->fields[1]);
- $pagedata = $this->GetPageData($page, $type);
+ $pagedata = $this->GetPageData($page);
return $pagedata['access'];
}
- function SetAccess($page, $type, $access) {
- $res = $GLOBALS['db']->Execute('SELECT id FROM privs WHERE name = ? AND type = ?', array($page, $type));
+ function SetAccess($page, $access) {
+ $res = $GLOBALS['db']->Execute('SELECT id FROM privs WHERE name = ?', $page);
if($res->RecordCount()) {
- $GLOBALS['db']->Execute('UPDATE privs SET readaccess = ?, writeaccess = ? WHERE name = ? AND type = ?', array($access[0], $access[1], $page, $type));
+ $GLOBALS['db']->Execute('UPDATE privs SET readaccess = ?, writeaccess = ? WHERE name = ?', array($access[0], $access[1], $page));
return ($GLOBALS['db']->Affected_Rows() > 0);
}
- $GLOBALS['db']->Execute('INSERT INTO privs (name, type, readaccess, writeaccess) VALUES (?, ?, ?, ?)', array($page, $type, $access[0], $access[1]));
+ $GLOBALS['db']->Execute('INSERT INTO privs (name, readaccess, writeaccess) VALUES (?, ?, ?)', array($page, $access[0], $access[1]));
return ($GLOBALS['db']->Affected_Rows() > 0);
}
diff --git a/code/subst.inc.php b/code/subst.inc.php
index 9696ec9..fc999ff 100644
--- a/code/subst.inc.php
+++ b/code/subst.inc.php
@@ -1,13 +1,48 @@
<?PHP
+ Uses('pages', 'nav');
+
+
$GLOBALS['messages'] = array();
if($GLOBALS['config']['language'] != 'en') @include('lang/' . $GLOBALS['config']['language'] . '.inc.php');
- function Subst($data) {
+ function Subst($data, $env = array()) {
$subst = array_map(create_function('$key', 'return \'(\\{\\{\' . $key . \'\\}\\})\';'), array_keys($GLOBALS['messages']));
+ while(preg_match('((?:^|[^\\{])\\{\\{\\$(?:config|nav|page|title):.+?\\}\\})', $data)) {
+ while(preg_match('((?:^|[^\\{])\\{\\{\\$nav:.+?\\}\\})', $data)) {
+ $data = preg_replace('((^|[^\\{])\\{\\{\\$config:([^\\{\\}]+?)\\}\\})e', '\'$1\' . $GLOBALS[\'config\'][\'$2\']', $data);
+ $data = preg_replace('((^|[^\\{])\\{\\{\\$([^:\\{\\}]+?)\\}\\})e', '\'$1\' . $env[\'$2\']', $data);
+
+ $data = preg_replace('((^|[^\\{])\\{\\{\\$nav:(.+?)\\}\\})e', '\'$1\' . $GLOBALS[\'nav\']->ParseNav(\'$2\')', $data);
+ }
+
+ while(preg_match('((?:^|[^\\{])\\{\\{\\$title:.+?\\}\\})', $data)) {
+ $data = preg_replace('((^|[^\\{])\\{\\{\\$config:([^\\{\\}]+?)\\}\\})e', '\'$1\' . $GLOBALS[\'config\'][\'$2\']', $data);
+ $data = preg_replace('((^|[^\\{])\\{\\{\\$([^:\\{\\}]+?)\\}\\})e', '\'$1\' . $env[\'$2\']', $data);
+
+ $data = preg_replace('((^|[^\\{])\\{\\{\\$title:(.+?)\\}\\})e', '\'$1\' . $GLOBALS[\'pages\']->GetTitle(\'$2\')', $data);
+ }
+
+ while(preg_match('((?:^|[^\\{])\\{\\{\\$page:\\$editor:.+?\\}\\})', $data)) {
+ $data = preg_replace('((^|[^\\{])\\{\\{\\$config:([^\\{\\}]+?)\\}\\})e', '\'$1\' . $GLOBALS[\'config\'][\'$2\']', $data);
+ $data = preg_replace('((^|[^\\{])\\{\\{\\$([^:\\{\\}]+?)\\}\\})e', '\'$1\' . $env[\'$2\']', $data);
+
+ $data = preg_replace_callback('((^|[^\\{])\\{\\{\\$page:\\$editor:(.+?)\\}\\})', create_function('$match', '$ret = $GLOBALS[\'pages\']->GetEditor($match[2], $GLOBALS[\'links\']->GetNeonLink($match[2])); return $match[1] . $ret[\'content\'];'), $data);
+ }
+
+ while(preg_match('((?:^|[^\\{])\\{\\{\\$page:.+?\\}\\})', $data)) {
+ $data = preg_replace('((^|[^\\{])\\{\\{\\$config:([^\\{\\}]+?)\\}\\})e', '\'$1\' . $GLOBALS[\'config\'][\'$2\']', $data);
+ $data = preg_replace('((^|[^\\{])\\{\\{\\$([^:\\{\\}]+?)\\}\\})e', '\'$1\' . $env[\'$2\']', $data);
+
+ $data = preg_replace_callback('((^|[^\\{])\\{\\{\\$page:(.+?)\\}\\})', create_function('$match', '$ret = $GLOBALS[\'pages\']->GetPage($match[2]); return $match[1] . $ret[\'content\'];'), $data);
+ }
+
+ $data = preg_replace('((^|[^\\{])\\{\\{\\$config:(.+?)\\}\\})e', '\'$1\' . $GLOBALS[\'config\'][\'$2\']', $data);
+ }
+
$data = preg_replace($subst, $GLOBALS['messages'], $data);
- return preg_replace('({{(.+?)}})', '$1', $data);
+ return preg_replace(array('((^|[^\\{])\\{\\{([^\\{]|$))', '((^|[^\\}])\\}\\}([^\\}]|$))', '((\\{)\\{(\\{))', '((\\})\\}(\\}))'), '$1$2', $data);
}
?>
diff --git a/code/user.inc.php b/code/user.inc.php
index cc04268..bbcf4ed 100644
--- a/code/user.inc.php
+++ b/code/user.inc.php
@@ -15,7 +15,7 @@
$this->gid = $res->fields[1];
$this->name = $res->fields[3];
- $this->type = 'cookie';
+ $this->login_type = 'cookie';
$this->login_key = $_COOKIE['login'];
}
}
diff --git a/config/SQL/base.sql b/config/SQL/base.sql
new file mode 100644
index 0000000..3d970d4
--- /dev/null
+++ b/config/SQL/base.sql
@@ -0,0 +1,21 @@
+--
+-- Tabellenstruktur für Tabelle `base`
+--
+
+CREATE TABLE `base` (
+ `id` bigint(20) NOT NULL auto_increment,
+ `code` text NOT NULL,
+ PRIMARY KEY (`id`)
+) TYPE=MyISAM AUTO_INCREMENT=6 ;
+
+--
+-- Daten für Tabelle `base`
+--
+
+INSERT INTO `base` (`id`, `code`) VALUES (1, '<div id="nav">{{$nav:default}}</div>');
+INSERT INTO `base` (`id`, `code`) VALUES (0, '</head><body>');
+INSERT INTO `base` (`id`, `code`) VALUES (-2, '<title>{{$config:title}}{{$title:{{$current_page}}}}</title>');
+INSERT INTO `base` (`id`, `code`) VALUES (-1, '<link rel="stylesheet" type="text/css" href="styles/{{$config:default_style}}/style.css" />');
+INSERT INTO `base` (`id`, `code`) VALUES (3, '<div id="content">');
+INSERT INTO `base` (`id`, `code`) VALUES (4, '{{$page:{{$current_page}}}}');
+INSERT INTO `base` (`id`, `code`) VALUES (5, '</div>');
diff --git a/config/SQL/pages.sql b/config/SQL/pages.sql
index 781480f..ecf7924 100644
--- a/config/SQL/pages.sql
+++ b/config/SQL/pages.sql
@@ -7,15 +7,14 @@ CREATE TABLE `pages` (
`name` varchar(255) NOT NULL default '',
`template` varchar(255) NOT NULL,
`data` longtext NOT NULL,
- `type` enum('c','n','e','b') NOT NULL default 'c',
PRIMARY KEY (`id`),
- UNIQUE KEY `name` (`name`,`type`)
-) TYPE=MyISAM AUTO_INCREMENT=59 ;
+ UNIQUE KEY `name` (`name`)
+) TYPE=MyISAM AUTO_INCREMENT=50 ;
--
-- Daten für Tabelle `pages`
--
-INSERT INTO `pages` (`id`, `name`, `template`, `data`, `type`) VALUES (47, 'Home:Startseite', 'default', 'title=Startseite&content=Welcome+to+Neon', 'c');
-INSERT INTO `pages` (`id`, `name`, `template`, `data`, `type`) VALUES (48, 'Test:LoremIpsum', 'default', 'title=Lorem+Ipsum&content=Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Ut+a+sapien.+Aliquam+aliquet+purus+molestie+dolor.+Integer+quis+eros+ut+erat+posuere+dictum.+Curabitur+dignissim.+Integer+orci.+Fusce+vulputate+lacus+at+ipsum.+Quisque+in+libero+nec+mi+laoreet+volutpat.+Aliquam+eros+pede%2C+scelerisque+quis%2C+tristique+cursus%2C+placerat+convallis%2C+velit.+Nam+condimentum.+Nulla+ut+mauris.+Curabitur+adipiscing%2C+mauris+non+dictum+aliquam%2C+arcu+risus+dapibus+diam%2C+nec+sollicitudin+quam+erat+quis+ligula.+Aenean+massa+nulla%2C+volutpat+eu%2C+accumsan+et%2C+fringilla+eget%2C+odio.+Nulla+placerat+porta+justo.+Nulla+vitae+turpis.+Praesent+lacus.%0AVestibulum+ante+ipsum+primis+in+faucibus+orci+luctus+et+ultrices+posuere+cubilia+Curae%3B+Aliquam+ultricies+lacus+eu+dui.+Duis+viverra+risus+et+eros.+Aenean+odio+dolor%2C+tristique+quis%2C+commodo+id%2C+posuere+sit+amet%2C+dui.+Pellentesque+velit.+Aliquam+erat+volutpat.+Duis+sagittis+nibh+sed+justo.+Sed+ultrices+nisl+sed+pede.+Sed+tempor+lorem+in+leo.+Integer+gravida+tincidunt+nunc.+Vivamus+ut+quam+vel+ligula+tristique+condimentum.+Proin+facilisis.+Aliquam+sagittis+lacinia+mi.+Donec+sagittis+luctus+dui.+Maecenas+quam+ante%2C+vestibulum+auctor%2C+blandit+in%2C+iaculis+in%2C+velit.+Aliquam+at+ligula.+Nam+a+tellus.+Aliquam+eu+nulla+at+turpis+vulputate+hendrerit.+Proin+at+diam.+Curabitur+euismod.%0ALorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Pellentesque+habitant+morbi+tristique+senectus+et+netus+et+malesuada+fames+ac+turpis+egestas.+Quisque+vel+erat+eget+diam+consectetuer+iaculis.+Cras+ante+velit%2C+suscipit+et%2C+porta+tempus%2C+dignissim+quis%2C+magna.+Vivamus+viverra%2C+turpis+nec+rhoncus+ultricies%2C+diam+turpis+eleifend+nisl%2C+a+eleifend+ante+felis+ac+sapien.+Integer+bibendum.+Suspendisse+in+mi+non+neque+bibendum+convallis.+Suspendisse+potenti.+Sed+sit+amet+purus+at+felis+adipiscing+aliquam.+Vivamus+et+nisl+sit+amet+mauris+aliquet+molestie.+Integer+tortor+massa%2C+aliquam+a%2C+lacinia+nonummy%2C+sagittis+nec%2C+eros.+Nunc+non+mauris+id+eros+venenatis+adipiscing.+Cras+et+lectus+ut+nisl+pharetra+ornare.+Proin+leo+risus%2C+elementum+eget%2C+ultrices+vitae%2C+molestie+sed%2C+erat.+Curabitur+et+lectus+in+tellus+egestas+hendrerit.+Sed+dapibus+ipsum.+Quisque+sit+amet+ligula.+Suspendisse+odio+dolor%2C+semper+id%2C+feugiat+quis%2C+sodales+id%2C+mauris.+Curabitur+id+ligula+ac+libero+malesuada+pharetra.%0ASuspendisse+potenti.+Cras+ut+mi+sit+amet+quam+consequat+consequat.+Aenean+ut+lectus.+Cum+sociis+natoque+penatibus+et+magnis+dis+parturient+montes%2C+nascetur+ridiculus+mus.+Suspendisse+vel+sapien.+Nullam+non+turpis.+Pellentesque+elementum+pharetra+ligula.+In+rhoncus.+Aliquam+vel+enim+consequat+sem+aliquet+hendrerit.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Nam+felis.%0ACum+sociis+natoque+penatibus+et+magnis+dis+parturient+montes%2C+nascetur+ridiculus+mus.+Maecenas+tortor+metus%2C+pellentesque+nec%2C+vehicula+vitae%2C+suscipit+sed%2C+quam.+Aenean+scelerisque+sodales+tortor.+Sed+purus.+Curabitur+turpis+est%2C+bibendum+tristique%2C+porttitor+tempor%2C+pulvinar+vitae%2C+tortor.+Nullam+malesuada+dapibus+orci.+Vivamus+aliquet+tempus+velit.+Curabitur+interdum+posuere+risus.+Duis+egestas%2C+ipsum+sit+amet+molestie+tincidunt%2C+ligula+libero+pretium+risus%2C+non+faucibus+tellus+felis+mattis+sapien.+Ut+eu+velit+at+massa+auctor+mattis.+Nam+tristique+velit+quis+nisl.%0AVivamus+neque+velit%2C+ornare+vitae%2C+tempor+vel%2C+ultrices+et%2C+wisi.+Cras+pede.+Phasellus+nunc+turpis%2C+cursus+non%2C+rhoncus+vitae%2C+sollicitudin+vel%2C+velit.+Vivamus+suscipit+lorem+sed+felis.+Vestibulum+vestibulum+ultrices+turpis.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Praesent+ornare+nulla+nec+justo.+Sed+nec+risus+ac+risus+fermentum+vestibulum.+Etiam+viverra+viverra+sem.+Etiam+molestie+mi+quis+metus+hendrerit+tristique.%0AQuisque+lobortis+euismod+metus.+Nam+ante.+Nulla+fermentum%2C+risus+non+pulvinar+porttitor%2C+enim+pede+egestas+nibh%2C+sit+amet+posuere+metus+tortor+id+enim.+Donec+at+sem.+Vestibulum+in+lectus+ut+diam+lacinia+lacinia.+Maecenas+sit+amet+nulla.+Suspendisse+vel+dolor.+Nunc+hendrerit+elit+vitae+quam.+In+nonummy+velit+nec+lorem.+Etiam+rhoncus+felis+a+turpis.+Aliquam+vel+nulla.+Ut+nonummy%2C+nisl+non+sodales+iaculis%2C+mi+tellus+viverra+diam%2C+eget+euismod+dui+turpis+at+mi.+Class+aptent+taciti+sociosqu+ad+litora+torquent+per+conubia+nostra%2C+per+inceptos+hymenaeos.+Vestibulum+nec+quam+ac+lectus+sagittis+tincidunt.%0ANulla+facilisi.+Nam+varius+ante+dignissim+arcu.+Suspendisse+molestie+dignissim+neque.+Suspendisse+leo+ipsum%2C+rutrum+cursus%2C+malesuada+id%2C+dapibus+sed%2C+urna.+Fusce+sollicitudin+laoreet+diam.+Mauris+eu+quam+eget+nulla+fermentum+adipiscing.+In+hac+habitasse+platea+dictumst.+Morbi+ut+odio+vitae+eros+luctus+luctus.+Ut+diam.+Phasellus+ullamcorper+arcu+vitae+wisi.+Pellentesque+urna+odio%2C+varius+eget%2C+dignissim+quis%2C+vehicula+placerat%2C+nunc.+Ut+nec+metus+quis+nulla+posuere+eleifend.%0ASuspendisse+nibh.+Nunc+vulputate+leo+id+urna.+Donec+dictum.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Suspendisse+dictum%2C+magna+consectetuer+hendrerit+volutpat%2C+sapien+felis+faucibus+justo%2C+ac+dictum+lacus+pede+in+metus.+Nam+commodo.+Sed+consequat%2C+leo+pretium+sagittis+congue%2C+ante+nunc+laoreet+nisl%2C+ac+aliquam+risus+tellus+commodo+elit.+Cras+at+elit.+Pellentesque+suscipit+erat+vitae+mauris.+Sed+iaculis+eros+vitae+mauris.+Vestibulum+ante+ipsum+primis+in+faucibus+orci+luctus+et+ultrices+posuere+cubilia+Curae%3B+Suspendisse+id+ante+et+elit+accumsan+semper.+Sed+et+nibh+eget+purus+scelerisque+volutpat.+Sed+mi.+Proin+tellus+felis%2C+tincidunt+eget%2C+dictum+et%2C+adipiscing+et%2C+urna.+Cras+accumsan+diam+sed+turpis.+Etiam+sollicitudin+lacus.%0ANam+iaculis+blandit+purus.+Mauris+odio+nibh%2C+hendrerit+id%2C+cursus+vel%2C+sagittis+a%2C+dolor.+Nullam+turpis+lacus%2C+ultrices+vel%2C+sagittis+vitae%2C+dapibus+vel%2C+elit.+Suspendisse+auctor%2C+sapien+et+suscipit+tempor%2C+turpis+enim+consequat+sem%2C+eu+dictum+nunc+lorem+at+massa.+Pellentesque+scelerisque+purus.+Etiam+sed+enim.+Maecenas+sed+tortor+id+turpis+consequat+consequat.+Curabitur+fringilla.+Sed+risus+wisi%2C+dictum+a%2C+sagittis+nec%2C+luctus+ac%2C+neque.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Sed+nibh+neque%2C+aliquam+ut%2C+sagittis+id%2C+gravida+et%2C+est.+Aenean+consectetuer+pretium+enim.+Aenean+tellus+quam%2C+condimentum+a%2C+adipiscing+et%2C+lacinia+vel%2C+ante.+Praesent+faucibus+dignissim+enim.+Aliquam+tincidunt.+Mauris+leo+ante%2C+condimentum+eget%2C+vestibulum+sit+amet%2C+fringilla+eget%2C+diam.+Nam+ultricies+ullamcorper+nibh.+Etiam+neque.+Ut+posuere+laoreet+pede.&', 'c');
-INSERT INTO `pages` (`id`, `name`, `template`, `data`, `type`) VALUES (49, 'Test:BBCode', 'bbcode', 'title=BBCode&code=Test%0D%0A%5Bb%5DTest%5B%2Fb%5D%0D%0A%5Bi%5DTest%5B%2Fi%5D%0D%0A%5Bu%5DTest%5B%2Fu%5D%0D%0A%5Burl%3Dhttp%3A%2F%2Fwww.heise.de%2F%5DHeise%5B%2Furl%5D%0D%0A%5Blist%3Da%5D%0D%0A%5B%2A%5DTest%0D%0A%5B%2A%5DTest%0D%0A%5B%2A%5DTest%0D%0A%5B%2Flist%5D%0D%0A%5Bcolor%3D%23000%5DTest%5B%2Fcolor%5D%0D%0A', 'c');
+INSERT INTO `pages` (`id`, `name`, `template`, `data`) VALUES (47, 'Home:Startseite', 'default', 'title=Startseite&content=Welcome+to+Neon');
+INSERT INTO `pages` (`id`, `name`, `template`, `data`) VALUES (48, 'Test:LoremIpsum', 'default', 'title=Lorem+Ipsum&content=Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Ut+a+sapien.+Aliquam+aliquet+purus+molestie+dolor.+Integer+quis+eros+ut+erat+posuere+dictum.+Curabitur+dignissim.+Integer+orci.+Fusce+vulputate+lacus+at+ipsum.+Quisque+in+libero+nec+mi+laoreet+volutpat.+Aliquam+eros+pede%2C+scelerisque+quis%2C+tristique+cursus%2C+placerat+convallis%2C+velit.+Nam+condimentum.+Nulla+ut+mauris.+Curabitur+adipiscing%2C+mauris+non+dictum+aliquam%2C+arcu+risus+dapibus+diam%2C+nec+sollicitudin+quam+erat+quis+ligula.+Aenean+massa+nulla%2C+volutpat+eu%2C+accumsan+et%2C+fringilla+eget%2C+odio.+Nulla+placerat+porta+justo.+Nulla+vitae+turpis.+Praesent+lacus.%0AVestibulum+ante+ipsum+primis+in+faucibus+orci+luctus+et+ultrices+posuere+cubilia+Curae%3B+Aliquam+ultricies+lacus+eu+dui.+Duis+viverra+risus+et+eros.+Aenean+odio+dolor%2C+tristique+quis%2C+commodo+id%2C+posuere+sit+amet%2C+dui.+Pellentesque+velit.+Aliquam+erat+volutpat.+Duis+sagittis+nibh+sed+justo.+Sed+ultrices+nisl+sed+pede.+Sed+tempor+lorem+in+leo.+Integer+gravida+tincidunt+nunc.+Vivamus+ut+quam+vel+ligula+tristique+condimentum.+Proin+facilisis.+Aliquam+sagittis+lacinia+mi.+Donec+sagittis+luctus+dui.+Maecenas+quam+ante%2C+vestibulum+auctor%2C+blandit+in%2C+iaculis+in%2C+velit.+Aliquam+at+ligula.+Nam+a+tellus.+Aliquam+eu+nulla+at+turpis+vulputate+hendrerit.+Proin+at+diam.+Curabitur+euismod.%0ALorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Pellentesque+habitant+morbi+tristique+senectus+et+netus+et+malesuada+fames+ac+turpis+egestas.+Quisque+vel+erat+eget+diam+consectetuer+iaculis.+Cras+ante+velit%2C+suscipit+et%2C+porta+tempus%2C+dignissim+quis%2C+magna.+Vivamus+viverra%2C+turpis+nec+rhoncus+ultricies%2C+diam+turpis+eleifend+nisl%2C+a+eleifend+ante+felis+ac+sapien.+Integer+bibendum.+Suspendisse+in+mi+non+neque+bibendum+convallis.+Suspendisse+potenti.+Sed+sit+amet+purus+at+felis+adipiscing+aliquam.+Vivamus+et+nisl+sit+amet+mauris+aliquet+molestie.+Integer+tortor+massa%2C+aliquam+a%2C+lacinia+nonummy%2C+sagittis+nec%2C+eros.+Nunc+non+mauris+id+eros+venenatis+adipiscing.+Cras+et+lectus+ut+nisl+pharetra+ornare.+Proin+leo+risus%2C+elementum+eget%2C+ultrices+vitae%2C+molestie+sed%2C+erat.+Curabitur+et+lectus+in+tellus+egestas+hendrerit.+Sed+dapibus+ipsum.+Quisque+sit+amet+ligula.+Suspendisse+odio+dolor%2C+semper+id%2C+feugiat+quis%2C+sodales+id%2C+mauris.+Curabitur+id+ligula+ac+libero+malesuada+pharetra.%0ASuspendisse+potenti.+Cras+ut+mi+sit+amet+quam+consequat+consequat.+Aenean+ut+lectus.+Cum+sociis+natoque+penatibus+et+magnis+dis+parturient+montes%2C+nascetur+ridiculus+mus.+Suspendisse+vel+sapien.+Nullam+non+turpis.+Pellentesque+elementum+pharetra+ligula.+In+rhoncus.+Aliquam+vel+enim+consequat+sem+aliquet+hendrerit.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Nam+felis.%0ACum+sociis+natoque+penatibus+et+magnis+dis+parturient+montes%2C+nascetur+ridiculus+mus.+Maecenas+tortor+metus%2C+pellentesque+nec%2C+vehicula+vitae%2C+suscipit+sed%2C+quam.+Aenean+scelerisque+sodales+tortor.+Sed+purus.+Curabitur+turpis+est%2C+bibendum+tristique%2C+porttitor+tempor%2C+pulvinar+vitae%2C+tortor.+Nullam+malesuada+dapibus+orci.+Vivamus+aliquet+tempus+velit.+Curabitur+interdum+posuere+risus.+Duis+egestas%2C+ipsum+sit+amet+molestie+tincidunt%2C+ligula+libero+pretium+risus%2C+non+faucibus+tellus+felis+mattis+sapien.+Ut+eu+velit+at+massa+auctor+mattis.+Nam+tristique+velit+quis+nisl.%0AVivamus+neque+velit%2C+ornare+vitae%2C+tempor+vel%2C+ultrices+et%2C+wisi.+Cras+pede.+Phasellus+nunc+turpis%2C+cursus+non%2C+rhoncus+vitae%2C+sollicitudin+vel%2C+velit.+Vivamus+suscipit+lorem+sed+felis.+Vestibulum+vestibulum+ultrices+turpis.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Praesent+ornare+nulla+nec+justo.+Sed+nec+risus+ac+risus+fermentum+vestibulum.+Etiam+viverra+viverra+sem.+Etiam+molestie+mi+quis+metus+hendrerit+tristique.%0AQuisque+lobortis+euismod+metus.+Nam+ante.+Nulla+fermentum%2C+risus+non+pulvinar+porttitor%2C+enim+pede+egestas+nibh%2C+sit+amet+posuere+metus+tortor+id+enim.+Donec+at+sem.+Vestibulum+in+lectus+ut+diam+lacinia+lacinia.+Maecenas+sit+amet+nulla.+Suspendisse+vel+dolor.+Nunc+hendrerit+elit+vitae+quam.+In+nonummy+velit+nec+lorem.+Etiam+rhoncus+felis+a+turpis.+Aliquam+vel+nulla.+Ut+nonummy%2C+nisl+non+sodales+iaculis%2C+mi+tellus+viverra+diam%2C+eget+euismod+dui+turpis+at+mi.+Class+aptent+taciti+sociosqu+ad+litora+torquent+per+conubia+nostra%2C+per+inceptos+hymenaeos.+Vestibulum+nec+quam+ac+lectus+sagittis+tincidunt.%0ANulla+facilisi.+Nam+varius+ante+dignissim+arcu.+Suspendisse+molestie+dignissim+neque.+Suspendisse+leo+ipsum%2C+rutrum+cursus%2C+malesuada+id%2C+dapibus+sed%2C+urna.+Fusce+sollicitudin+laoreet+diam.+Mauris+eu+quam+eget+nulla+fermentum+adipiscing.+In+hac+habitasse+platea+dictumst.+Morbi+ut+odio+vitae+eros+luctus+luctus.+Ut+diam.+Phasellus+ullamcorper+arcu+vitae+wisi.+Pellentesque+urna+odio%2C+varius+eget%2C+dignissim+quis%2C+vehicula+placerat%2C+nunc.+Ut+nec+metus+quis+nulla+posuere+eleifend.%0ASuspendisse+nibh.+Nunc+vulputate+leo+id+urna.+Donec+dictum.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Suspendisse+dictum%2C+magna+consectetuer+hendrerit+volutpat%2C+sapien+felis+faucibus+justo%2C+ac+dictum+lacus+pede+in+metus.+Nam+commodo.+Sed+consequat%2C+leo+pretium+sagittis+congue%2C+ante+nunc+laoreet+nisl%2C+ac+aliquam+risus+tellus+commodo+elit.+Cras+at+elit.+Pellentesque+suscipit+erat+vitae+mauris.+Sed+iaculis+eros+vitae+mauris.+Vestibulum+ante+ipsum+primis+in+faucibus+orci+luctus+et+ultrices+posuere+cubilia+Curae%3B+Suspendisse+id+ante+et+elit+accumsan+semper.+Sed+et+nibh+eget+purus+scelerisque+volutpat.+Sed+mi.+Proin+tellus+felis%2C+tincidunt+eget%2C+dictum+et%2C+adipiscing+et%2C+urna.+Cras+accumsan+diam+sed+turpis.+Etiam+sollicitudin+lacus.%0ANam+iaculis+blandit+purus.+Mauris+odio+nibh%2C+hendrerit+id%2C+cursus+vel%2C+sagittis+a%2C+dolor.+Nullam+turpis+lacus%2C+ultrices+vel%2C+sagittis+vitae%2C+dapibus+vel%2C+elit.+Suspendisse+auctor%2C+sapien+et+suscipit+tempor%2C+turpis+enim+consequat+sem%2C+eu+dictum+nunc+lorem+at+massa.+Pellentesque+scelerisque+purus.+Etiam+sed+enim.+Maecenas+sed+tortor+id+turpis+consequat+consequat.+Curabitur+fringilla.+Sed+risus+wisi%2C+dictum+a%2C+sagittis+nec%2C+luctus+ac%2C+neque.+Lorem+ipsum+dolor+sit+amet%2C+consectetuer+adipiscing+elit.+Sed+nibh+neque%2C+aliquam+ut%2C+sagittis+id%2C+gravida+et%2C+est.+Aenean+consectetuer+pretium+enim.+Aenean+tellus+quam%2C+condimentum+a%2C+adipiscing+et%2C+lacinia+vel%2C+ante.+Praesent+faucibus+dignissim+enim.+Aliquam+tincidunt.+Mauris+leo+ante%2C+condimentum+eget%2C+vestibulum+sit+amet%2C+fringilla+eget%2C+diam.+Nam+ultricies+ullamcorper+nibh.+Etiam+neque.+Ut+posuere+laoreet+pede.&');
+INSERT INTO `pages` (`id`, `name`, `template`, `data`) VALUES (49, 'Test:BBCode', 'bbcode', 'title=BBCode&code=Test%0D%0A%5Bb%5DTest%5B%2Fb%5D%0D%0A%5Bi%5DTest%5B%2Fi%5D%0D%0A%5Bu%5DTest%5B%2Fu%5D%0D%0A%5Burl%3Dhttp%3A%2F%2Fwww.heise.de%2F%5DHeise%5B%2Furl%5D%0D%0A%5Blist%3Da%5D%0D%0A%5B%2A%5DTest%0D%0A%5B%2A%5DTest%0D%0A%5B%2A%5DTest%0D%0A%5B%2Flist%5D%0D%0A%5Bcolor%3D%23000%5DTest%5B%2Fcolor%5D%0D%0A');
diff --git a/config/SQL/privs.sql b/config/SQL/privs.sql
index 77342a8..0c3605e 100644
--- a/config/SQL/privs.sql
+++ b/config/SQL/privs.sql
@@ -5,17 +5,16 @@
CREATE TABLE `privs` (
`id` bigint(20) NOT NULL auto_increment,
`name` varchar(255) NOT NULL,
- `type` enum('c','n','e') NOT NULL,
`readaccess` text NOT NULL,
`writeaccess` text NOT NULL,
PRIMARY KEY (`id`),
- UNIQUE KEY `name` (`name`,`type`)
+ UNIQUE KEY `name` (`name`)
) TYPE=MyISAM AUTO_INCREMENT=9 ;
--
-- Daten für Tabelle `privs`
--
-INSERT INTO `privs` (`id`, `name`, `type`, `readaccess`, `writeaccess`) VALUES (6, 'Home:Startseite', 'c', '9', '0');
-INSERT INTO `privs` (`id`, `name`, `type`, `readaccess`, `writeaccess`) VALUES (2, 'Test:LoremIpsum', 'c', '9', '0');
-INSERT INTO `privs` (`id`, `name`, `type`, `readaccess`, `writeaccess`) VALUES (3, 'Test:BBCode', 'c', '9', '0');
+INSERT INTO `privs` (`id`, `name`, `readaccess`, `writeaccess`) VALUES (6, 'Home:Startseite', '9', '0');
+INSERT INTO `privs` (`id`, `name`, `readaccess`, `writeaccess`) VALUES (2, 'Test:LoremIpsum', '9', '0');
+INSERT INTO `privs` (`id`, `name`, `readaccess`, `writeaccess`) VALUES (3, 'Test:BBCode', '9', '0');
diff --git a/core/modules.inc.php b/core/modules.inc.php
index 62a20e9..814727b 100644
--- a/core/modules.inc.php
+++ b/core/modules.inc.php
@@ -107,10 +107,7 @@
switch($file['tag']) {
case 'page':
- $type = $file['attribs']['type'];
- if(!$type) $type = 'c';
-
- array_push($module['pages'], $file['children'][0] . '.' . $type);
+ array_push($module['pages'], $file['children'][0]);
break;
case 'code':
array_push($module['code'], $file['children'][0]);
@@ -127,9 +124,8 @@
return $this->code[$name]['path'] . 'code/' . $name . '.inc.php';
}
- function GetPagePath($name, $type) {
- return $this->pages[$name . '.' . $type]['path'] . 'pages/' .
- strtr($type, array('c' => 'content', 'b' => 'base')) . '/' . $name . '.xml';
+ function GetPagePath($name) {
+ return $this->pages[$name]['path'] . 'pages/' . $name . '.xml';
}
function GetTemplatePath($name) {
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>
diff --git a/lang/de.inc.php b/lang/de.inc.php
index 7837055..82413b4 100644
--- a/lang/de.inc.php
+++ b/lang/de.inc.php
@@ -42,4 +42,5 @@
$GLOBALS['messages']['Title'] = 'Titel';
$GLOBALS['messages']['The page \'(.+?)\' does not exist.'] = 'Die Seite \'$1\' existiert nicht.';
$GLOBALS['messages']['The page \'(.+?)\' is protected.'] = 'Die Seite \'$1\' ist geschützt.';
+ $GLOBALS['messages']['Users'] = 'Benutzer';
?>
diff --git a/pages/content/Login.xml b/pages/Login.xml
index 4a6471a..3eac6e6 100644
--- a/pages/content/Login.xml
+++ b/pages/Login.xml
@@ -4,7 +4,6 @@
<name>Login</name>
<template>phpexec</template>
<access>1:0</access>
- <type>c</type>
</info>
<data>
<code>
diff --git a/pages/content/Logout.xml b/pages/Logout.xml
index 5f2b95c..c706e2f 100644
--- a/pages/content/Logout.xml
+++ b/pages/Logout.xml
@@ -4,7 +4,6 @@
<name>Logout</name>
<template>phpexec</template>
<access>8:0</access>
- <type>c</type>
</info>
<data>
<code>
diff --git a/pages/content/Modules.xml b/pages/Modules.xml
index f8f52e2..a57d38b 100644
--- a/pages/content/Modules.xml
+++ b/pages/Modules.xml
@@ -4,7 +4,6 @@
<name>Modules</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
diff --git a/pages/content/Modules:Config.xml b/pages/Modules:Config.xml
index c0940bb..ebe848a 100644
--- a/pages/content/Modules:Config.xml
+++ b/pages/Modules:Config.xml
@@ -4,7 +4,6 @@
<name>Modules:Config</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
diff --git a/pages/content/Modules:Enable.xml b/pages/Modules:Enable.xml
index d12f63a..5788204 100644
--- a/pages/content/Modules:Enable.xml
+++ b/pages/Modules:Enable.xml
@@ -4,7 +4,6 @@
<name>Modules:Enable</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
diff --git a/pages/content/Pages.xml b/pages/Pages.xml
index 6db0710..b438efa 100644
--- a/pages/content/Pages.xml
+++ b/pages/Pages.xml
@@ -4,7 +4,6 @@
<name>Pages</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
@@ -19,13 +18,10 @@
echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Handle') . '">';
- echo '<input type="hidden" name="type" value="c" />';
-
echo '<select name="name" size="15" class="pagelist spaced-bottom">';
foreach($GLOBALS['pages']->GetList() as $page)
- if($page[strlen($page)-1] == 'c')
- echo '<option>' . substr($page, 0, -2) . '</option>';
+ echo '<option>' . $page . '</option>';
echo '</select>';
echo '<br />';
diff --git a/pages/content/Pages:Copy.xml b/pages/Pages:Copy.xml
index a8925f2..cfec18c 100644
--- a/pages/content/Pages:Copy.xml
+++ b/pages/Pages:Copy.xml
@@ -4,7 +4,6 @@
<name>Pages:Copy</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
@@ -12,9 +11,6 @@
<?PHP
Uses('pages', 'links', 'util');
- if($_POST['type'] != 'c' && $_POST['type'] != 'b')
- exit();
-
if($_POST['back']) {
header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false));
exit();
@@ -22,7 +18,7 @@
if(!$_POST['name'] || !$_POST['newname']) exit();
- $GLOBALS['pages']->Copy(Unquote($_POST['name']), $_POST['type'], Unquote($_POST['newname']));
+ $GLOBALS['pages']->Copy(Unquote($_POST['name']), Unquote($_POST['newname']));
header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false));
exit();
diff --git a/pages/content/Pages:Delete.xml b/pages/Pages:Delete.xml
index 26da0bf..7c83c44 100644
--- a/pages/content/Pages:Delete.xml
+++ b/pages/Pages:Delete.xml
@@ -4,7 +4,6 @@
<name>Pages:Delete</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
@@ -13,9 +12,6 @@
Uses('pages', 'links');
- if($_POST['type'] != 'c' && $_POST['type'] != 'b')
- exit();
-
if($_POST['back']) {
header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false));
exit();
@@ -23,7 +19,7 @@
if(!$_POST['name']) exit();
- $GLOBALS['pages']->Delete(Unquote($_POST['name']), $_POST['type']);
+ $GLOBALS['pages']->Delete(Unquote($_POST['name']));
header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false));
exit();
diff --git a/pages/content/Pages:Edit.xml b/pages/Pages:Edit.xml
index f61084b..e481258 100644
--- a/pages/content/Pages:Edit.xml
+++ b/pages/Pages:Edit.xml
@@ -4,7 +4,6 @@
<name>Pages:Edit</name>
<template>phpexec</template>
<access>9:0</access>
- <type>c</type>
</info>
<data>
<code>
@@ -13,9 +12,6 @@
Uses('pages', 'links', 'util');
- if($_POST['type'] != 'c' && $_POST['type'] != 'b')
- exit();
-
if($_POST['back']) {
header('Location: ' . Unquote($_POST['backlink']));
exit();
@@ -23,7 +19,7 @@
if(!$_POST['name'] || !$_POST['backlink']) exit();
- if(!$GLOBALS['pages']->HasWriteAccess(Unquote($_POST['name']), $_POST['type']))
+ if(!$GLOBALS['pages']->HasWriteAccess(Unquote($_POST['name'])))
exit();
$data = array();
@@ -34,7 +30,7 @@
$data[substr($key, 5)] = Unquote($val);
}
- $GLOBALS['pages']->Edit(Unquote($_POST['name']), $_POST['type'], $data);
+ $GLOBALS['pages']->Edit(Unquote($_POST['name']), $data);
header('Location: ' . Unquote($_POST['backlink']));
exit();
diff --git a/pages/content/Pages:Handle.xml b/pages/Pages:Handle.xml
index 9abc7d9..85deebc 100644
--- a/pages/content/Pages:Handle.xml
+++ b/pages/Pages:Handle.xml
@@ -4,7 +4,6 @@
<name>Pages:Handle</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
@@ -13,9 +12,6 @@
Uses('pages', 'links', 'templates');
- if($_POST['type'] != 'c' && $_POST['type'] != 'b')
- exit();
-
if(isset($_POST['view'])) {
if($_POST['name']) {
header('Location: ' . $GLOBALS['links']->GetNeonLink(Unquote($_POST['name']), null, false));
@@ -28,7 +24,6 @@
<h2>{{New page}}</h2>
<form method="post" action="<?PHP echo $GLOBALS['links']->GetNeonLink('Pages:New'); ?>">
- <input type="hidden" name="type" value="<?PHP echo $_POST['type']; ?>" />
{{Name}}: <input type="text" id="pagename" name="name" size="70" /><br />
{{Template}}: <select type="text" class="spaced-top" name="template" size="1" />
<?PHP
@@ -43,7 +38,7 @@
}
elseif(isset($_POST['edit'])) {
if($_POST['name']) {
- $data = $GLOBALS['pages']->GetEditor(Unquote($_POST['name']), $_POST['type'], $GLOBALS['links']->GetNeonLink('Pages', null, false));
+ $data = $GLOBALS['pages']->GetEditor(Unquote($_POST['name']), $GLOBALS['links']->GetNeonLink('Pages', null, false));
$title = $data['title'];
@@ -58,7 +53,7 @@
echo '<h2>{{Change access to \'' . $name . '\'}}</h2>';
- $access = $GLOBALS['pages']->GetAccess(Unquote($_POST['name']), $_POST['type']);
+ $access = $GLOBALS['pages']->GetAccess(Unquote($_POST['name']));
$groups = $GLOBALS['user']->ListGroups();
array_unshift($groups, array(0, '{{Guest}}'));
@@ -66,7 +61,6 @@
echo '<form action="' . $GLOBALS['links']->GetNeonLink('Pages:Privs') . '" method="post">';
echo '<input type="hidden" name="name" value="' . $name . '" />';
- echo '<input type="hidden" name="type" value="' . $_POST['type'] . '" />';
echo '<table>';
@@ -110,7 +104,6 @@
echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Copy') . '">';
echo '<input type="hidden" name="name" value="' . $name . '" />';
- echo '<input type="hidden" name="type" value="' . $_POST['type'] . '" />';
echo '{{New name}}: <input type="text" name="newname" value="' . $name . '" size="70" /><br />';
echo '<input type="submit" class="spaced-top" value="{{Copy}}" /> ';
echo '<input type="submit" class="spaced-top" name="back" value="{{Back}}" />';
@@ -127,7 +120,6 @@
echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Rename') . '">';
echo '<input type="hidden" name="name" value="' . $name . '" />';
- echo '<input type="hidden" name="type" value="' . $_POST['type'] . '" />';
echo '{{New name}}: <input type="text" name="newname" value="' . $name . '" size="70" /><br />';
echo '<input type="submit" class="spaced-top" value="{{Rename}}" /> ';
echo '<input type="submit" class="spaced-top" name="back" value="{{Back}}" />';
@@ -144,7 +136,6 @@
echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Delete') . '">';
echo '<input type="hidden" name="name" value="' . $name . '" />';
- echo '<input type="hidden" name="type" value="' . $_POST['type'] . '" />';
echo '{{Do you really want to delete the page \'' . $name . '\'?}}<br />';
echo '<input type="submit" class="spaced-top" value="{{Delete}}" /> ';
echo '<input type="submit" class="spaced-top" name="back" value="{{Back}}" />';
diff --git a/pages/content/Pages:New.xml b/pages/Pages:New.xml
index b6673b7..28a611f 100644
--- a/pages/content/Pages:New.xml
+++ b/pages/Pages:New.xml
@@ -4,7 +4,6 @@
<name>Pages:New</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
@@ -13,9 +12,6 @@
Uses('pages', 'links', 'util');
- if($_POST['type'] != 'c' && $_POST['type'] != 'b')
- exit();
-
if($_POST['back']) {
header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false));
exit();
@@ -23,9 +19,9 @@
if(!$_POST['name'] || !$_POST['template']) exit();
- $GLOBALS['pages']->Add(Unquote($_POST['name']), $_POST['type'], Unquote($_POST['template']));
+ $GLOBALS['pages']->Add(Unquote($_POST['name']), Unquote($_POST['template']));
- $data = $GLOBALS['pages']->GetEditor(Unquote($_POST['name']), $_POST['type'], $GLOBALS['links']->GetNeonLink('Pages', null, false));
+ $data = $GLOBALS['pages']->GetEditor(Unquote($_POST['name']), $GLOBALS['links']->GetNeonLink('Pages', null, false));
$title = $data['title'];
diff --git a/pages/content/Pages:Privs.xml b/pages/Pages:Privs.xml
index 318e7a2..875d5f4 100644
--- a/pages/content/Pages:Privs.xml
+++ b/pages/Pages:Privs.xml
@@ -4,7 +4,6 @@
<name>Pages:Privs</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
@@ -13,9 +12,6 @@
Uses('pages', 'links', 'util');
- if($_POST['type'] != 'c' && $_POST['type'] != 'b')
- exit();
-
if($_POST['back']) {
header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false));
exit();
@@ -49,7 +45,7 @@
}
}
- $GLOBALS['pages']->SetAccess(Unquote($_POST['name']), $_POST['type'], array($readaccess, $writeaccess));
+ $GLOBALS['pages']->SetAccess(Unquote($_POST['name']), array($readaccess, $writeaccess));
header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false));
exit();
diff --git a/pages/content/Pages:Rename.xml b/pages/Pages:Rename.xml
index 2169c57..050c031 100644
--- a/pages/content/Pages:Rename.xml
+++ b/pages/Pages:Rename.xml
@@ -4,7 +4,6 @@
<name>Pages:Rename</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
@@ -13,9 +12,6 @@
Uses('pages', 'links', 'util');
- if($_POST['type'] != 'c' && $_POST['type'] != 'b')
- exit();
-
if($_POST['back']) {
header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false));
exit();
@@ -23,7 +19,7 @@
if(!$_POST['name'] || !$_POST['newname']) exit();
- $GLOBALS['pages']->Rename(Unquote($_POST['name']), $_POST['type'], Unquote($_POST['newname']));
+ $GLOBALS['pages']->Rename(Unquote($_POST['name']), Unquote($_POST['newname']));
header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false));
exit();
diff --git a/pages/content/Users.xml b/pages/Users.xml
index 9833701..aa853b4 100644
--- a/pages/content/Users.xml
+++ b/pages/Users.xml
@@ -4,7 +4,6 @@
<name>Users</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
@@ -13,9 +12,9 @@
Uses('links');
- $title = 'Benutzer';
+ $title = '{{Users}}';
- echo '<h2>Benutzer</h2>';
+ echo '<h2>{{Users}}</h2>';
$res = $GLOBALS['db']->Execute('SELECT id, user FROM users ORDER BY user');
diff --git a/pages/content/Users:Delete.xml b/pages/Users:Delete.xml
index b6db8b4..9e2a362 100644
--- a/pages/content/Users:Delete.xml
+++ b/pages/Users:Delete.xml
@@ -4,7 +4,6 @@
<name>Users:Delete</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
diff --git a/pages/content/Users:Group.xml b/pages/Users:Group.xml
index 4a4b004..de06d63 100644
--- a/pages/content/Users:Group.xml
+++ b/pages/Users:Group.xml
@@ -4,7 +4,6 @@
<name>Users:Group</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
diff --git a/pages/content/Users:Handle.xml b/pages/Users:Handle.xml
index 9e949c1..b53d7cf 100644
--- a/pages/content/Users:Handle.xml
+++ b/pages/Users:Handle.xml
@@ -4,7 +4,6 @@
<name>Users:Handle</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
diff --git a/pages/content/Users:New.xml b/pages/Users:New.xml
index 098644f..e88c84b 100644
--- a/pages/content/Users:New.xml
+++ b/pages/Users:New.xml
@@ -4,7 +4,6 @@
<name>Users:New</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
diff --git a/pages/content/Users:Password.xml b/pages/Users:Password.xml
index da7db38..a83a068 100644
--- a/pages/content/Users:Password.xml
+++ b/pages/Users:Password.xml
@@ -4,7 +4,6 @@
<name>Users:Password</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
diff --git a/pages/content/Users:Rename.xml b/pages/Users:Rename.xml
index 13f2ae0..af60b12 100644
--- a/pages/content/Users:Rename.xml
+++ b/pages/Users:Rename.xml
@@ -4,7 +4,6 @@
<name>Users:Rename</name>
<template>phpexec</template>
<access>0:0</access>
- <type>c</type>
</info>
<data>
<code>
diff --git a/pages/base/default.xml b/pages/base/default.xml
deleted file mode 100644
index de2ef47..0000000
--- a/pages/base/default.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<page>
- <info>
- <name>base</name>
- <template>phpexec</template>
- <access>9:0</access>
- <type>b</type>
- </info>
- <data>
- <code>
- <![CDATA[
-<?PHP
- Uses('nav', 'pages', 'links', 'user');
-
- 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>
- <title><?PHP echo $GLOBALS['config']['title'] . $GLOBALS['data']['title']; ?></title>
- <link rel="stylesheet" type="text/css" href="styles/<?PHP echo $GLOBALS['config']['default_style']; ?>/style.css" />
- </head>
- <body>
- <div id="nav">
- <?PHP echo $GLOBALS['nav']->ParseNav($GLOBALS['user']->getGid(), 'default'); ?>
- </div>
- <div id="content">
- <?PHP
- if($GLOBALS['pages']->HasWriteAccess($GLOBALS['page'], 'c') && $_GET['mode'] != 'edit') {
- $backlink = $GLOBALS['links']->GetNeonLink($GLOBALS['page']);
-
- echo '<a class="editlink" href="' . $GLOBALS['links']->GetNeonLink($GLOBALS['page'], 'mode=edit') . '">{{Edit}}</a>';
- }
-
- echo $GLOBALS['data']['content'];
- ?>
- </div>
- </body>
-</html>
- ]]>
- </code>
- </data>
-</page>
diff --git a/templates/default.inc.php b/templates/default.inc.php
index a6fc876..9b94e66 100644
--- a/templates/default.inc.php
+++ b/templates/default.inc.php
@@ -2,6 +2,13 @@
Uses('links');
class default_template {
+ function GetTitle($data) {
+ if($data['title'])
+ return htmlspecialchars($data['title']);
+
+ return strtr($data['_page'], array(':' => ' - '));
+ }
+
function GetPage($data) {
if($data['title'])
$title = htmlspecialchars($data['title']);
@@ -19,7 +26,6 @@
$content = '<h2>' . $title . '</h2>';
$content .= '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Edit') . '">';
$content .= '<input type="hidden" name="name" value="' . $data['_page'] . '" />';
- $content .= '<input type="hidden" name="type" value="' . $data['_type'] . '" />';
$content .= '<input type="hidden" name="backlink" value="' . htmlspecialchars($data['_backlink']) . '" />';
$content .= '{{Title}}: <input type="text" name="data_title" value="';
$content .= htmlspecialchars($data['title']) . '" size="70" /><br />';
diff --git a/templates/phpexec.inc.php b/templates/phpexec.inc.php
index db8373a..52164a1 100644
--- a/templates/phpexec.inc.php
+++ b/templates/phpexec.inc.php
@@ -2,6 +2,15 @@
Uses('links');
class phpexec_template {
+ function GetTitle($data) {
+ return strtr($data['_page'], array(':' => ' - '));
+
+ //ob_start();
+
+ //$content = ob_get_contents();
+ //ob_end_clean();
+ }
+
function GetPage($data) {
$title = strtr($data['_page'], array(':' => ' - '));
@@ -21,7 +30,6 @@
$content = '<h2>' . $title . '</h2>';
$content .= '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Pages:Edit') . '">';
$content .= '<input type="hidden" name="name" value="' . $data['_page'] . '" />';
- $content .= '<input type="hidden" name="type" value="' . $data['_type'] . '" />';
$content .= '<input type="hidden" name="backlink" value="' . htmlspecialchars($data['_backlink']) . '" />';
$content .= '<textarea name="data_code" class="pageedit spaced-bottom" rows="25" cols="70">';
$content .= htmlspecialchars($data['code']) . '</textarea><br />';