From e7359ccf2db89b1feec820d1c97583f720ae0d7a Mon Sep 17 00:00:00 2001 From: neoraider Date: Mon, 17 Apr 2006 23:17:05 +0000 Subject: Seiten verschoben. --- code/modules.inc.php | 43 +++++++---- code/pages.inc.php | 4 +- pages/Login.c.xml | 32 -------- pages/Login.n.xml | 43 ----------- pages/Logout.c.xml | 27 ------- pages/Pages.c.xml | 59 -------------- pages/Pages/Copy.c.xml | 36 --------- pages/Pages/Delete.c.xml | 35 --------- pages/Pages/Edit.c.xml | 44 ----------- pages/Pages/Handle.c.xml | 160 -------------------------------------- pages/Pages/New.c.xml | 39 ---------- pages/Pages/Privs.c.xml | 62 --------------- pages/Pages/Rename.c.xml | 36 --------- pages/Users.c.xml | 42 ---------- pages/Users/Delete.c.xml | 32 -------- pages/Users/Group.c.xml | 32 -------- pages/Users/Handle.c.xml | 132 -------------------------------- pages/Users/New.c.xml | 35 --------- pages/Users/Password.c.xml | 35 --------- pages/Users/Rename.c.xml | 33 -------- pages/content/Login.xml | 32 ++++++++ pages/content/Logout.xml | 27 +++++++ pages/content/Modules.xml | 36 +++++++++ pages/content/Pages.xml | 59 ++++++++++++++ pages/content/Pages:Copy.xml | 36 +++++++++ pages/content/Pages:Delete.xml | 35 +++++++++ pages/content/Pages:Edit.xml | 44 +++++++++++ pages/content/Pages:Handle.xml | 161 +++++++++++++++++++++++++++++++++++++++ pages/content/Pages:New.xml | 39 ++++++++++ pages/content/Pages:Privs.xml | 62 +++++++++++++++ pages/content/Pages:Rename.xml | 36 +++++++++ pages/content/Users.xml | 42 ++++++++++ pages/content/Users:Delete.xml | 32 ++++++++ pages/content/Users:Group.xml | 32 ++++++++ pages/content/Users:Handle.xml | 132 ++++++++++++++++++++++++++++++++ pages/content/Users:New.xml | 35 +++++++++ pages/content/Users:Password.xml | 35 +++++++++ pages/content/Users:Rename.xml | 33 ++++++++ pages/default.e.xml | 32 -------- pages/editor/default.xml | 32 ++++++++ pages/editor/phpexec.xml | 29 +++++++ pages/nav/Login.xml | 43 +++++++++++ pages/phpexec.e.xml | 29 ------- styles/TheWhiteOne/style.css | 39 ++++------ 44 files changed, 1057 insertions(+), 1016 deletions(-) delete mode 100644 pages/Login.c.xml delete mode 100644 pages/Login.n.xml delete mode 100644 pages/Logout.c.xml delete mode 100644 pages/Pages.c.xml delete mode 100644 pages/Pages/Copy.c.xml delete mode 100644 pages/Pages/Delete.c.xml delete mode 100644 pages/Pages/Edit.c.xml delete mode 100644 pages/Pages/Handle.c.xml delete mode 100644 pages/Pages/New.c.xml delete mode 100644 pages/Pages/Privs.c.xml delete mode 100644 pages/Pages/Rename.c.xml delete mode 100644 pages/Users.c.xml delete mode 100644 pages/Users/Delete.c.xml delete mode 100644 pages/Users/Group.c.xml delete mode 100644 pages/Users/Handle.c.xml delete mode 100644 pages/Users/New.c.xml delete mode 100644 pages/Users/Password.c.xml delete mode 100644 pages/Users/Rename.c.xml create mode 100644 pages/content/Login.xml create mode 100644 pages/content/Logout.xml create mode 100644 pages/content/Modules.xml create mode 100644 pages/content/Pages.xml create mode 100644 pages/content/Pages:Copy.xml create mode 100644 pages/content/Pages:Delete.xml create mode 100644 pages/content/Pages:Edit.xml create mode 100644 pages/content/Pages:Handle.xml create mode 100644 pages/content/Pages:New.xml create mode 100644 pages/content/Pages:Privs.xml create mode 100644 pages/content/Pages:Rename.xml create mode 100644 pages/content/Users.xml create mode 100644 pages/content/Users:Delete.xml create mode 100644 pages/content/Users:Group.xml create mode 100644 pages/content/Users:Handle.xml create mode 100644 pages/content/Users:New.xml create mode 100644 pages/content/Users:Password.xml create mode 100644 pages/content/Users:Rename.xml delete mode 100644 pages/default.e.xml create mode 100644 pages/editor/default.xml create mode 100644 pages/editor/phpexec.xml create mode 100644 pages/nav/Login.xml delete mode 100644 pages/phpexec.e.xml diff --git a/code/modules.inc.php b/code/modules.inc.php index 02aa9f2..605f8ca 100644 --- a/code/modules.inc.php +++ b/code/modules.inc.php @@ -1,5 +1,6 @@ code[$file])) @@ -11,16 +12,13 @@ } class Modules { - var $modules; - var $pages; - var $code; - var $templates; + var $modules = array(); + var $modules_enabled = array(); + var $pages = array(); + var $code = array(); + var $templates = array(); function Modules() { - $this->modules = array(); - $this->code = array(); - $this->templates = array(); - $dir = opendir('modules'); while($moddir = readdir($dir)) { @@ -36,11 +34,15 @@ if(!$name) continue; if(count($name['children']) != 1) continue; if(!is_string($name['children'][0])) continue; - $name = $name['children'][0]; - $this->module[$name] = array('name' => $name, 'code' => array(), - 'templates' => array()); + $desc = $GLOBALS['xmlparser']->FindTag($info, 'desc'); + if(!$desc) continue; + if(count($desc['children']) != 1) continue; + if(!is_string($desc['children'][0])) continue; + $desc = $desc['children'][0]; + + $this->modules[$name] = array('name' => $name, 'desc' => $desc, 'code' => array(), 'templates' => array()); $files = $GLOBALS['xmlparser']->FindTag($data, 'files'); if(!$files) continue; @@ -56,24 +58,21 @@ if(!$type) $type = 'c'; $pagename = $file['children'][0] . '.' . $type; - $realname = 'modules/' . $moddir . '/pages/' . strtr($file['children'][0], array(':' => '/')) - . '.' . $type . '.xml'; + $realname = 'modules/' . $moddir . '/pages/' . strtr($type, array('c' => 'content', 'e' => 'editor', 'n' => 'nav')) + . '/' . $file['children'][0] . '.xml'; - $this->pages[$pagename] = $realname; $this->modules[$name]['pages'][$pagename] = $realname; break; case 'code': $filename = 'code/' . $file['children'][0] . '.inc.php'; $realname = 'modules/' . $moddir . '/code/' . $file['children'][0] . '.inc.php'; - $this->code[$filename] = $realname; $this->modules[$name]['code'][$filename] = $realname; break; case 'template': $filename = 'templates/' . $file['children'][0] . '.inc.php'; $realname = 'modules/' . $moddir . '/templates/' . $file['children'][0] . '.inc.php'; - $this->templates[$filename] = $realname; $this->modules[$name]['templates'][$filename] = $realname; } } @@ -81,6 +80,18 @@ } closedir($dir); + + $res = $GLOBALS['db']->Execute('SELECT name FROM modules WHERE enabled = 1'); + + while($row = $res->FetchRow()) { + if(!array_key_exists($row[0], $this->modules)) continue; + + $this->modules_enabled[$row[0]] = $this->modules[$row[0]]; + + $this->pages = array_merge($this->pages, $this->modules[$row[0]]['pages']); + $this->code = array_merge($this->code, $this->modules[$row[0]]['code']); + $this->templates = array_merge($this->templates, $this->modules[$row[0]]['templates']); + } } } diff --git a/code/pages.inc.php b/code/pages.inc.php index 129167a..a6d9085 100644 --- a/code/pages.inc.php +++ b/code/pages.inc.php @@ -9,6 +9,7 @@ var $pages = array( 'Login.c' => null, 'Logout.c' => null, + 'Modules.c' => null, 'Pages.c' => null, 'Pages:Copy.c' => null, 'Pages:Delete.c' => null, @@ -115,7 +116,8 @@ } else { $filename = $GLOBALS['modules']->pages[$page . '.' . $type]; - if(!$filename) $filename = 'pages/' . strtr($page, array(':' => '/')) . '.' . $type . '.xml'; + if(!$filename) $filename = 'pages/' . strtr($type, array('c' => 'content', 'e' => 'editor', 'n' => 'nav')) + . '/' . $page . '.xml'; $xmldata = $GLOBALS['xmlparser']->ParseFile($filename); if(!$xmldata) return null; diff --git a/pages/Login.c.xml b/pages/Login.c.xml deleted file mode 100644 index 3f69400..0000000 --- a/pages/Login.c.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - Login - - 1:0 - c - - - - Login(Unquote($_POST['name']), Unquote($_POST['password']))) { - header('Location: ' . $GLOBALS['links']->GetNeonLink($_POST['page'], null, false)); - exit(); - } - } - - $title = Message('Error'); - - echo '' . Message('LoginError') . ''; -?> - ]]> - - - diff --git a/pages/Login.n.xml b/pages/Login.n.xml deleted file mode 100644 index 71fb2b3..0000000 --- a/pages/Login.n.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - Login - - 1:0 - n - - - - uid) { - require_once('code/user.inc.php'); - require_once('code/links.inc.php'); - require_once('code/util.inc.php'); - - echo '
'; - ?> - -
- - ]]> -
-
-
diff --git a/pages/Logout.c.xml b/pages/Logout.c.xml deleted file mode 100644 index 9447dca..0000000 --- a/pages/Logout.c.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - Logout - - 8:0 - c - - - - Logout(); - - header('Location: ' . $GLOBALS['links']->GetNeonLink($GLOBALS['config']['home'], null, false)); - - exit(); -?> - ]]> - - - diff --git a/pages/Pages.c.xml b/pages/Pages.c.xml deleted file mode 100644 index f9db838..0000000 --- a/pages/Pages.c.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - Pages - - 0:0 - c - - - - Seiten'; - - $type = $_GET['type']; - if($type != 'c' && $type != 'n' && $type != 'e') $type = 'c'; - - echo 'Seitentyp: '; - echo 'Inhalt | '; - echo 'Navigation | '; - echo 'Editor

'; - - echo '
'; - - echo ''; - - echo ''; - echo '
'; - if($type == 'c') - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo ''; - echo '
'; -?> - ]]> -
-
-
diff --git a/pages/Pages/Copy.c.xml b/pages/Pages/Copy.c.xml deleted file mode 100644 index 79becca..0000000 --- a/pages/Pages/Copy.c.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - Pages:Copy - - 0:0 - c - - - - GetNeonLink('Pages', 'type=' . $_POST['type'], false)); - exit(); - } - - if(!$_POST['name'] || !$_POST['newname']) exit(); - - $GLOBALS['pages']->Copy(Unquote($_POST['name']), $_POST['type'], Unquote($_POST['newname'])); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', 'type=' . $_POST['type'], false)); - exit(); -?> - ]]> - - - diff --git a/pages/Pages/Delete.c.xml b/pages/Pages/Delete.c.xml deleted file mode 100644 index 07e6ff3..0000000 --- a/pages/Pages/Delete.c.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - Pages:Delete - - 0:0 - c - - - - GetNeonLink('Pages', 'type=' . $_POST['type'], false)); - exit(); - } - - if(!$_POST['name']) exit(); - - $GLOBALS['pages']->Delete(Unquote($_POST['name']), $_POST['type']); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', 'type=' . $_POST['type'], false)); - exit(); -?> - ]]> - - - diff --git a/pages/Pages/Edit.c.xml b/pages/Pages/Edit.c.xml deleted file mode 100644 index dfe9a51..0000000 --- a/pages/Pages/Edit.c.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - Pages:Edit - - 0:0 - c - - - - GetNeonLink('Pages', 'type=' . $_POST['type'], false)); - exit(); - } - - if(!$_POST['name']) exit(); - - $data = array(); - - foreach($_POST as $key => $val) { - if(substr($key, 0, 5) != 'data_') continue; - - $data[substr($key, 5)] = Unquote($val); - } - - $GLOBALS['pages']->Edit(Unquote($_POST['name']), $_POST['type'], $data); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', 'type=' . $_POST['type'], false)); - exit(); -?> - ]]> - - - diff --git a/pages/Pages/Handle.c.xml b/pages/Pages/Handle.c.xml deleted file mode 100644 index 734c62d..0000000 --- a/pages/Pages/Handle.c.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - Pages:Handle - - 0:0 - c - - - - GetNeonLink(Unquote($_POST['name']), null, false)); - exit(); - } - } - elseif(isset($_POST['new'])) { - $title = 'Neue Seite'; - ?> -

Neue Seite

- -
- - Name:
- Template:
- - -
- GetEditor(Unquote($_POST['name']), $_POST['type']); - - $title = $data['title']; - - echo $data['content']; - } - } - elseif(isset($_POST['privs'])) { - if($_POST['name']) { - $name = htmlspecialchars(Unquote($_POST['name'])); - - $title = 'Rechte von \'' . $name . '\' ändern'; - - echo '

Rechte von \'' . $name . '\' ändern

'; - - $access = $GLOBALS['pages']->GetAccess(Unquote($_POST['name']), $_POST['type']); - $groups = $GLOBALS['user']->ListGroups(); - - array_unshift($groups, array(0, 'Gast')); - - echo '
'; - - echo ''; - echo ''; - - echo ''; - - foreach($groups as $group) { - echo ''; - } - - echo '
' . htmlspecialchars($group[1]) . ''; - - echo '
'; - - echo ' '; - echo ''; - - echo '
'; - } - } - elseif(isset($_POST['copy'])) { - if($_POST['name']) { - $name = htmlspecialchars(Unquote($_POST['name'])); - - $title = '\'' . $name . '\' kopieren'; - - echo '

\'' . $name . '\' kopieren

'; - - echo '
'; - echo ''; - echo ''; - echo 'Neuer Name:
'; - echo ' '; - echo ''; - echo '
'; - } - } - elseif(isset($_POST['rename'])) { - if($_POST['name']) { - $name = htmlspecialchars(Unquote($_POST['name'])); - - $title = '\'' . $name . '\' umbenennen'; - - echo '

\'' . $name . '\' umbenennen

'; - - echo '
'; - echo ''; - echo ''; - echo 'Neuer Name:
'; - echo '
'; - echo ' '; - echo ''; - echo '
'; - } - } - elseif(isset($_POST['delete'])) { - if($_POST['name']) { - $name = htmlspecialchars(Unquote($_POST['name'])); - - $title = '\'' . $name . '\' löschen'; - - echo '

\'' . $name . '\' löschen

'; - - echo '
'; - echo ''; - echo ''; - echo 'Wollen Sie die Seite \'' . $name . '\' wirklich löschen?
'; - echo ' '; - echo ''; - echo '
'; - } - } -?> - ]]> -
-
-
diff --git a/pages/Pages/New.c.xml b/pages/Pages/New.c.xml deleted file mode 100644 index 6dd1b68..0000000 --- a/pages/Pages/New.c.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - Pages:New - - 0:0 - c - - - - GetNeonLink('Pages', 'type=' . $_POST['type'], false)); - exit(); - } - - if(!$_POST['name'] || !$_POST['template']) exit(); - - $GLOBALS['pages']->Add(Unquote($_POST['name']), $_POST['type'], Unquote($_POST['template'])); - - $data = $GLOBALS['pages']->GetEditor(Unquote($_POST['name']), $_POST['type']); - - $title = $data['title']; - - echo $data['content']; -?> - ]]> - - - diff --git a/pages/Pages/Privs.c.xml b/pages/Pages/Privs.c.xml deleted file mode 100644 index 5023d1e..0000000 --- a/pages/Pages/Privs.c.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - Pages:Privs - - 0:0 - c - - - - GetNeonLink('Pages', 'type=' . $_POST['type'], false)); - exit(); - } - - if(!$_POST['name']) exit(); - - $groups = $GLOBALS['user']->ListGroups(); - array_unshift($groups, array(0)); - - $group_max = $groups[count($groups)-1][0]; - - $readaccess = implode('', array_fill(0, $group_max/4 + 1, '0')); - $writeaccess = $readaccess; - - foreach($groups as $group) { - if(!isset($_POST['group_' . $group[0]])) exit(); - - switch($_POST['group_' . $group[0]]) { - case 0: - break; - case 1: - $readaccess[$group[0]/4] = dechex(hexdec($readaccess[$group[0]/4]) | (1 << ($group[0]%4))); - break; - case 2: - $readaccess[$group[0]/4] = dechex(hexdec($readaccess[$group[0]/4]) | (1 << ($group[0]%4))); - $writeaccess[$group[0]/4] = dechex(hexdec($writeaccess[$group[0]/4]) | (1 << ($group[0]%4))); - break; - default: - exit(); - } - } - - $GLOBALS['pages']->SetAccess(Unquote($_POST['name']), $_POST['type'], array($readaccess, $writeaccess)); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', 'type=' . $_POST['type'], false)); - exit(); -?> - ]]> - - - diff --git a/pages/Pages/Rename.c.xml b/pages/Pages/Rename.c.xml deleted file mode 100644 index 236b709..0000000 --- a/pages/Pages/Rename.c.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - Pages:Rename - - 0:0 - c - - - - GetNeonLink('Pages', 'type=' . $_POST['type'], false)); - exit(); - } - - if(!$_POST['name'] || !$_POST['newname']) exit(); - - $GLOBALS['pages']->Rename(Unquote($_POST['name']), $_POST['type'], Unquote($_POST['newname'])); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', 'type=' . $_POST['type'], false)); - exit(); -?> - ]]> - - - diff --git a/pages/Users.c.xml b/pages/Users.c.xml deleted file mode 100644 index 2dcd181..0000000 --- a/pages/Users.c.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - Users - - 0:0 - c - - - - Benutzer'; - - $res = $GLOBALS['db']->Execute('SELECT id, user FROM users ORDER BY user'); - - echo '
'; - - echo ''; - echo '
'; - echo ' '; - echo ' '; - echo ' '; - echo ' '; - echo ''; - echo '
'; -?> - ]]> -
-
-
diff --git a/pages/Users/Delete.c.xml b/pages/Users/Delete.c.xml deleted file mode 100644 index 8c32935..0000000 --- a/pages/Users/Delete.c.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - Users:Delete - - 0:0 - c - - - - GetNeonLink('Users', null, false)); - exit(); - } - - if(!$_POST['id']) exit(); - - $GLOBALS['user']->Delete($_POST['id']); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false)); - exit(); - ?> - ]]> - - - diff --git a/pages/Users/Group.c.xml b/pages/Users/Group.c.xml deleted file mode 100644 index b48e369..0000000 --- a/pages/Users/Group.c.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - Users:Group - - 0:0 - c - - - - GetNeonLink('Users', null, false)); - exit(); - } - - if(!isset($_POST['id']) || !isset($_POST['gid'])) exit(); - - $GLOBALS['user']->ChangeGroup($_POST['id'], $_POST['gid']); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false)); - exit(); - ?> - ]]> - - - diff --git a/pages/Users/Handle.c.xml b/pages/Users/Handle.c.xml deleted file mode 100644 index abed354..0000000 --- a/pages/Users/Handle.c.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - Users:Handle - - 0:0 - c - - - - -

Neuer Benutzer

- -
-
Name:
- Gruppe:
-
- Passwort:
-
- Bestätigen:
-
- - -
- GetName($_POST['id']), array('<' => '<', '>' => '>', '&' => '&', '"' => '"')); - $gid = $GLOBALS['user']->GetGid($_POST['id']); - - $title = 'Gruppe von \'' . $name . '\' ändern'; - - echo '

Gruppe von \'' . $name . '\' ändern

'; - - echo '
'; - echo ''; - echo 'Neue Gruppe:
'; - - echo '
'; - - echo ' '; - echo ''; - echo '
'; - } - } - elseif(isset($_POST['password'])) { - if($_POST['id']) { - $name = strtr($GLOBALS['user']->GetName($_POST['id']), array('<' => '<', '>' => '>', '&' => '&', '"' => '"')); - - $title = 'Passwort von \'' . $name . '\' ändern'; - - echo '

Passwort von \'' . $name . '\' ändern

'; - - echo '
'; - echo ''; - echo 'Neues Passwort:
'; - echo '
'; - echo 'Bestätigen:
'; - echo '
'; - echo ' '; - echo ''; - echo '
'; - } - } - elseif(isset($_POST['rename'])) { - if($_POST['id']) { - $name = strtr($GLOBALS['user']->GetName($_POST['id']), array('<' => '<', '>' => '>', '&' => '&', '"' => '"')); - - $title = '\'' . $name . '\' umbenennen'; - - echo '

\'' . $name . '\' umbenennen

'; - - echo '
'; - echo ''; - echo 'Neuer Name: '; - echo '
'; - echo ' '; - echo ''; - echo '
'; - } - } - elseif(isset($_POST['delete'])) { - if($_POST['id']) { - $name = strtr($GLOBALS['user']->GetName($_POST['id']), array('<' => '<', '>' => '>', '&' => '&', '"' => '"')); - - $title = '\'' . $name . '\' löschen'; - - echo '

\'' . $name . '\' löschen

'; - - echo '
'; - echo ''; - echo 'Wollen Sie den Benutzer \'' . $name . '\' wirklich löschen?
'; - echo ' '; - echo ''; - echo '
'; - } - } - ?> - ]]> -
-
-
diff --git a/pages/Users/New.c.xml b/pages/Users/New.c.xml deleted file mode 100644 index ac6bed9..0000000 --- a/pages/Users/New.c.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - Users:New - - 0:0 - c - - - - GetNeonLink('Users', null, false)); - exit(); - } - - if(!$_POST['name'] || !isset($_POST['gid']) || !$_POST['password'] || !$_POST['password2']) exit(); - - if($_POST['password'] != $_POST['password2']) exit(); - - $GLOBALS['user']->Add(Unquote($_POST['name']), $_POST['gid'], Unquote($_POST['password'])); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false)); - exit(); - ?> - ]]> - - - diff --git a/pages/Users/Password.c.xml b/pages/Users/Password.c.xml deleted file mode 100644 index c08cd02..0000000 --- a/pages/Users/Password.c.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - Users:Password - - 0:0 - c - - - - GetNeonLink('Users', null, false)); - exit(); - } - - if(!$_POST['id'] || !$_POST['password'] || !$_POST['password2']) exit(); - - if($_POST['password'] != $_POST['password2']) exit(); - - $GLOBALS['user']->ChangePassword($_POST['id'], Unquote($_POST['password'])); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false)); - exit(); - ?> - ]]> - - - diff --git a/pages/Users/Rename.c.xml b/pages/Users/Rename.c.xml deleted file mode 100644 index def6aa4..0000000 --- a/pages/Users/Rename.c.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - Users:Rename - - 0:0 - c - - - - GetNeonLink('Users', null, false)); - exit(); - } - - if(!$_POST['id'] || !$_POST['name']) exit(); - - $GLOBALS['user']->Rename($_POST['id'], Unquote($_POST['name'])); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false)); - exit(); - ?> - ]]> - - - diff --git a/pages/content/Login.xml b/pages/content/Login.xml new file mode 100644 index 0000000..3f69400 --- /dev/null +++ b/pages/content/Login.xml @@ -0,0 +1,32 @@ + + + + Login + + 1:0 + c + + + + Login(Unquote($_POST['name']), Unquote($_POST['password']))) { + header('Location: ' . $GLOBALS['links']->GetNeonLink($_POST['page'], null, false)); + exit(); + } + } + + $title = Message('Error'); + + echo '' . Message('LoginError') . ''; +?> + ]]> + + + diff --git a/pages/content/Logout.xml b/pages/content/Logout.xml new file mode 100644 index 0000000..9447dca --- /dev/null +++ b/pages/content/Logout.xml @@ -0,0 +1,27 @@ + + + + Logout + + 8:0 + c + + + + Logout(); + + header('Location: ' . $GLOBALS['links']->GetNeonLink($GLOBALS['config']['home'], null, false)); + + exit(); +?> + ]]> + + + diff --git a/pages/content/Modules.xml b/pages/content/Modules.xml new file mode 100644 index 0000000..4aa2cda --- /dev/null +++ b/pages/content/Modules.xml @@ -0,0 +1,36 @@ + + + + Modules + + 0:0 + c + + + + Module'; + + $modules = array_keys($GLOBALS['modules']->modules); + sort($modules); + + foreach($modules as $module) { + echo '
'; + + echo '

' . htmlspecialchars($module) . '

'; + + echo htmlspecialchars($GLOBALS['modules']->modules[$module]['desc']); + + echo '
'; + } +?> + ]]> +
+
+
diff --git a/pages/content/Pages.xml b/pages/content/Pages.xml new file mode 100644 index 0000000..f9db838 --- /dev/null +++ b/pages/content/Pages.xml @@ -0,0 +1,59 @@ + + + + Pages + + 0:0 + c + + + + Seiten'; + + $type = $_GET['type']; + if($type != 'c' && $type != 'n' && $type != 'e') $type = 'c'; + + echo 'Seitentyp: '; + echo 'Inhalt | '; + echo 'Navigation | '; + echo 'Editor

'; + + echo '
'; + + echo ''; + + echo ''; + echo '
'; + if($type == 'c') + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo ''; + echo '
'; +?> + ]]> +
+
+
diff --git a/pages/content/Pages:Copy.xml b/pages/content/Pages:Copy.xml new file mode 100644 index 0000000..79becca --- /dev/null +++ b/pages/content/Pages:Copy.xml @@ -0,0 +1,36 @@ + + + + Pages:Copy + + 0:0 + c + + + + GetNeonLink('Pages', 'type=' . $_POST['type'], false)); + exit(); + } + + if(!$_POST['name'] || !$_POST['newname']) exit(); + + $GLOBALS['pages']->Copy(Unquote($_POST['name']), $_POST['type'], Unquote($_POST['newname'])); + + header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', 'type=' . $_POST['type'], false)); + exit(); +?> + ]]> + + + diff --git a/pages/content/Pages:Delete.xml b/pages/content/Pages:Delete.xml new file mode 100644 index 0000000..07e6ff3 --- /dev/null +++ b/pages/content/Pages:Delete.xml @@ -0,0 +1,35 @@ + + + + Pages:Delete + + 0:0 + c + + + + GetNeonLink('Pages', 'type=' . $_POST['type'], false)); + exit(); + } + + if(!$_POST['name']) exit(); + + $GLOBALS['pages']->Delete(Unquote($_POST['name']), $_POST['type']); + + header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', 'type=' . $_POST['type'], false)); + exit(); +?> + ]]> + + + diff --git a/pages/content/Pages:Edit.xml b/pages/content/Pages:Edit.xml new file mode 100644 index 0000000..dfe9a51 --- /dev/null +++ b/pages/content/Pages:Edit.xml @@ -0,0 +1,44 @@ + + + + Pages:Edit + + 0:0 + c + + + + GetNeonLink('Pages', 'type=' . $_POST['type'], false)); + exit(); + } + + if(!$_POST['name']) exit(); + + $data = array(); + + foreach($_POST as $key => $val) { + if(substr($key, 0, 5) != 'data_') continue; + + $data[substr($key, 5)] = Unquote($val); + } + + $GLOBALS['pages']->Edit(Unquote($_POST['name']), $_POST['type'], $data); + + header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', 'type=' . $_POST['type'], false)); + exit(); +?> + ]]> + + + diff --git a/pages/content/Pages:Handle.xml b/pages/content/Pages:Handle.xml new file mode 100644 index 0000000..c2b6602 --- /dev/null +++ b/pages/content/Pages:Handle.xml @@ -0,0 +1,161 @@ + + + + Pages:Handle + + 0:0 + c + + + + GetNeonLink(Unquote($_POST['name']), null, false)); + exit(); + } + } + elseif(isset($_POST['new'])) { + $title = 'Neue Seite'; + ?> +

Neue Seite

+ +
+ + Name:
+ Template:
+ + +
+ GetEditor(Unquote($_POST['name']), $_POST['type']); + + $title = $data['title']; + + echo $data['content']; + } + } + elseif(isset($_POST['privs'])) { + if($_POST['name']) { + $name = htmlspecialchars(Unquote($_POST['name'])); + + $title = 'Rechte von \'' . $name . '\' ändern'; + + echo '

Rechte von \'' . $name . '\' ändern

'; + + $access = $GLOBALS['pages']->GetAccess(Unquote($_POST['name']), $_POST['type']); + $groups = $GLOBALS['user']->ListGroups(); + + array_unshift($groups, array(0, 'Gast')); + + echo '
'; + + echo ''; + echo ''; + + echo ''; + + foreach($groups as $group) { + echo ''; + } + + echo '
' . htmlspecialchars($group[1]) . ''; + + echo '
'; + + echo ' '; + echo ''; + + echo '
'; + } + } + elseif(isset($_POST['copy'])) { + if($_POST['name']) { + $name = htmlspecialchars(Unquote($_POST['name'])); + + $title = '\'' . $name . '\' kopieren'; + + echo '

\'' . $name . '\' kopieren

'; + + echo '
'; + echo ''; + echo ''; + echo 'Neuer Name:
'; + echo ' '; + echo ''; + echo '
'; + } + } + elseif(isset($_POST['rename'])) { + if($_POST['name']) { + $name = htmlspecialchars(Unquote($_POST['name'])); + + $title = '\'' . $name . '\' umbenennen'; + + echo '

\'' . $name . '\' umbenennen

'; + + echo '
'; + echo ''; + echo ''; + echo 'Neuer Name:
'; + echo '
'; + echo ' '; + echo ''; + echo '
'; + } + } + elseif(isset($_POST['delete'])) { + if($_POST['name']) { + $name = htmlspecialchars(Unquote($_POST['name'])); + + $title = '\'' . $name . '\' löschen'; + + echo '

\'' . $name . '\' löschen

'; + + echo '
'; + echo ''; + echo ''; + echo 'Wollen Sie die Seite \'' . $name . '\' wirklich löschen?
'; + echo ' '; + echo ''; + echo '
'; + } + } +?> + ]]> +
+
+
diff --git a/pages/content/Pages:New.xml b/pages/content/Pages:New.xml new file mode 100644 index 0000000..6dd1b68 --- /dev/null +++ b/pages/content/Pages:New.xml @@ -0,0 +1,39 @@ + + + + Pages:New + + 0:0 + c + + + + GetNeonLink('Pages', 'type=' . $_POST['type'], false)); + exit(); + } + + if(!$_POST['name'] || !$_POST['template']) exit(); + + $GLOBALS['pages']->Add(Unquote($_POST['name']), $_POST['type'], Unquote($_POST['template'])); + + $data = $GLOBALS['pages']->GetEditor(Unquote($_POST['name']), $_POST['type']); + + $title = $data['title']; + + echo $data['content']; +?> + ]]> + + + diff --git a/pages/content/Pages:Privs.xml b/pages/content/Pages:Privs.xml new file mode 100644 index 0000000..5023d1e --- /dev/null +++ b/pages/content/Pages:Privs.xml @@ -0,0 +1,62 @@ + + + + Pages:Privs + + 0:0 + c + + + + GetNeonLink('Pages', 'type=' . $_POST['type'], false)); + exit(); + } + + if(!$_POST['name']) exit(); + + $groups = $GLOBALS['user']->ListGroups(); + array_unshift($groups, array(0)); + + $group_max = $groups[count($groups)-1][0]; + + $readaccess = implode('', array_fill(0, $group_max/4 + 1, '0')); + $writeaccess = $readaccess; + + foreach($groups as $group) { + if(!isset($_POST['group_' . $group[0]])) exit(); + + switch($_POST['group_' . $group[0]]) { + case 0: + break; + case 1: + $readaccess[$group[0]/4] = dechex(hexdec($readaccess[$group[0]/4]) | (1 << ($group[0]%4))); + break; + case 2: + $readaccess[$group[0]/4] = dechex(hexdec($readaccess[$group[0]/4]) | (1 << ($group[0]%4))); + $writeaccess[$group[0]/4] = dechex(hexdec($writeaccess[$group[0]/4]) | (1 << ($group[0]%4))); + break; + default: + exit(); + } + } + + $GLOBALS['pages']->SetAccess(Unquote($_POST['name']), $_POST['type'], array($readaccess, $writeaccess)); + + header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', 'type=' . $_POST['type'], false)); + exit(); +?> + ]]> + + + diff --git a/pages/content/Pages:Rename.xml b/pages/content/Pages:Rename.xml new file mode 100644 index 0000000..236b709 --- /dev/null +++ b/pages/content/Pages:Rename.xml @@ -0,0 +1,36 @@ + + + + Pages:Rename + + 0:0 + c + + + + GetNeonLink('Pages', 'type=' . $_POST['type'], false)); + exit(); + } + + if(!$_POST['name'] || !$_POST['newname']) exit(); + + $GLOBALS['pages']->Rename(Unquote($_POST['name']), $_POST['type'], Unquote($_POST['newname'])); + + header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', 'type=' . $_POST['type'], false)); + exit(); +?> + ]]> + + + diff --git a/pages/content/Users.xml b/pages/content/Users.xml new file mode 100644 index 0000000..2dcd181 --- /dev/null +++ b/pages/content/Users.xml @@ -0,0 +1,42 @@ + + + + Users + + 0:0 + c + + + + Benutzer'; + + $res = $GLOBALS['db']->Execute('SELECT id, user FROM users ORDER BY user'); + + echo '
'; + + echo ''; + echo '
'; + echo ' '; + echo ' '; + echo ' '; + echo ' '; + echo ''; + echo '
'; +?> + ]]> +
+
+
diff --git a/pages/content/Users:Delete.xml b/pages/content/Users:Delete.xml new file mode 100644 index 0000000..8c32935 --- /dev/null +++ b/pages/content/Users:Delete.xml @@ -0,0 +1,32 @@ + + + + Users:Delete + + 0:0 + c + + + + GetNeonLink('Users', null, false)); + exit(); + } + + if(!$_POST['id']) exit(); + + $GLOBALS['user']->Delete($_POST['id']); + + header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false)); + exit(); + ?> + ]]> + + + diff --git a/pages/content/Users:Group.xml b/pages/content/Users:Group.xml new file mode 100644 index 0000000..b48e369 --- /dev/null +++ b/pages/content/Users:Group.xml @@ -0,0 +1,32 @@ + + + + Users:Group + + 0:0 + c + + + + GetNeonLink('Users', null, false)); + exit(); + } + + if(!isset($_POST['id']) || !isset($_POST['gid'])) exit(); + + $GLOBALS['user']->ChangeGroup($_POST['id'], $_POST['gid']); + + header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false)); + exit(); + ?> + ]]> + + + diff --git a/pages/content/Users:Handle.xml b/pages/content/Users:Handle.xml new file mode 100644 index 0000000..abed354 --- /dev/null +++ b/pages/content/Users:Handle.xml @@ -0,0 +1,132 @@ + + + + Users:Handle + + 0:0 + c + + + + +

Neuer Benutzer

+ +
+
Name:
+ Gruppe:
+
+ Passwort:
+
+ Bestätigen:
+
+ + +
+ GetName($_POST['id']), array('<' => '<', '>' => '>', '&' => '&', '"' => '"')); + $gid = $GLOBALS['user']->GetGid($_POST['id']); + + $title = 'Gruppe von \'' . $name . '\' ändern'; + + echo '

Gruppe von \'' . $name . '\' ändern

'; + + echo '
'; + echo ''; + echo 'Neue Gruppe:
'; + + echo '
'; + + echo ' '; + echo ''; + echo '
'; + } + } + elseif(isset($_POST['password'])) { + if($_POST['id']) { + $name = strtr($GLOBALS['user']->GetName($_POST['id']), array('<' => '<', '>' => '>', '&' => '&', '"' => '"')); + + $title = 'Passwort von \'' . $name . '\' ändern'; + + echo '

Passwort von \'' . $name . '\' ändern

'; + + echo '
'; + echo ''; + echo 'Neues Passwort:
'; + echo '
'; + echo 'Bestätigen:
'; + echo '
'; + echo ' '; + echo ''; + echo '
'; + } + } + elseif(isset($_POST['rename'])) { + if($_POST['id']) { + $name = strtr($GLOBALS['user']->GetName($_POST['id']), array('<' => '<', '>' => '>', '&' => '&', '"' => '"')); + + $title = '\'' . $name . '\' umbenennen'; + + echo '

\'' . $name . '\' umbenennen

'; + + echo '
'; + echo ''; + echo 'Neuer Name: '; + echo '
'; + echo ' '; + echo ''; + echo '
'; + } + } + elseif(isset($_POST['delete'])) { + if($_POST['id']) { + $name = strtr($GLOBALS['user']->GetName($_POST['id']), array('<' => '<', '>' => '>', '&' => '&', '"' => '"')); + + $title = '\'' . $name . '\' löschen'; + + echo '

\'' . $name . '\' löschen

'; + + echo '
'; + echo ''; + echo 'Wollen Sie den Benutzer \'' . $name . '\' wirklich löschen?
'; + echo ' '; + echo ''; + echo '
'; + } + } + ?> + ]]> +
+
+
diff --git a/pages/content/Users:New.xml b/pages/content/Users:New.xml new file mode 100644 index 0000000..ac6bed9 --- /dev/null +++ b/pages/content/Users:New.xml @@ -0,0 +1,35 @@ + + + + Users:New + + 0:0 + c + + + + GetNeonLink('Users', null, false)); + exit(); + } + + if(!$_POST['name'] || !isset($_POST['gid']) || !$_POST['password'] || !$_POST['password2']) exit(); + + if($_POST['password'] != $_POST['password2']) exit(); + + $GLOBALS['user']->Add(Unquote($_POST['name']), $_POST['gid'], Unquote($_POST['password'])); + + header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false)); + exit(); + ?> + ]]> + + + diff --git a/pages/content/Users:Password.xml b/pages/content/Users:Password.xml new file mode 100644 index 0000000..c08cd02 --- /dev/null +++ b/pages/content/Users:Password.xml @@ -0,0 +1,35 @@ + + + + Users:Password + + 0:0 + c + + + + GetNeonLink('Users', null, false)); + exit(); + } + + if(!$_POST['id'] || !$_POST['password'] || !$_POST['password2']) exit(); + + if($_POST['password'] != $_POST['password2']) exit(); + + $GLOBALS['user']->ChangePassword($_POST['id'], Unquote($_POST['password'])); + + header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false)); + exit(); + ?> + ]]> + + + diff --git a/pages/content/Users:Rename.xml b/pages/content/Users:Rename.xml new file mode 100644 index 0000000..def6aa4 --- /dev/null +++ b/pages/content/Users:Rename.xml @@ -0,0 +1,33 @@ + + + + Users:Rename + + 0:0 + c + + + + GetNeonLink('Users', null, false)); + exit(); + } + + if(!$_POST['id'] || !$_POST['name']) exit(); + + $GLOBALS['user']->Rename($_POST['id'], Unquote($_POST['name'])); + + header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false)); + exit(); + ?> + ]]> + + + diff --git a/pages/default.e.xml b/pages/default.e.xml deleted file mode 100644 index 3c0c79e..0000000 --- a/pages/default.e.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - phpexec - - 0:0 - e - - - - ' . $title . ''; -?> -
- - - Titel: '"')); - ?>" size="70" />
-
- - -
- ]]> -
-
-
diff --git a/pages/editor/default.xml b/pages/editor/default.xml new file mode 100644 index 0000000..3c0c79e --- /dev/null +++ b/pages/editor/default.xml @@ -0,0 +1,32 @@ + + + + phpexec + + 0:0 + e + + + + ' . $title . ''; +?> +
+ + + Titel: '"')); + ?>" size="70" />
+
+ + +
+ ]]> +
+
+
diff --git a/pages/editor/phpexec.xml b/pages/editor/phpexec.xml new file mode 100644 index 0000000..a2c390d --- /dev/null +++ b/pages/editor/phpexec.xml @@ -0,0 +1,29 @@ + + + + phpexec + + 0:0 + e + + + + ' . $title . ''; +?> +
+ + +
+ + +
+ ]]> +
+
+
diff --git a/pages/nav/Login.xml b/pages/nav/Login.xml new file mode 100644 index 0000000..71fb2b3 --- /dev/null +++ b/pages/nav/Login.xml @@ -0,0 +1,43 @@ + + + + Login + + 1:0 + n + + + + uid) { + require_once('code/user.inc.php'); + require_once('code/links.inc.php'); + require_once('code/util.inc.php'); + + echo '
'; + ?> + +
+ + ]]> +
+
+
diff --git a/pages/phpexec.e.xml b/pages/phpexec.e.xml deleted file mode 100644 index a2c390d..0000000 --- a/pages/phpexec.e.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - phpexec - - 0:0 - e - - - - ' . $title . ''; -?> -
- - -
- - -
- ]]> -
-
-
diff --git a/styles/TheWhiteOne/style.css b/styles/TheWhiteOne/style.css index b64835b..7aa8062 100644 --- a/styles/TheWhiteOne/style.css +++ b/styles/TheWhiteOne/style.css @@ -7,7 +7,12 @@ body { margin-left:0; } +h1, h3, h4, h5, h6 { + margin-top:0; +} + h2 { + margin-top:0; font-size:x-large; font-weight:normal; border-bottom:solid #AAAAAA 1px; @@ -32,6 +37,12 @@ a.active_page_link { font-weight:bold; } +a.editlink { + position:absolute; + top:2em; + right:1em; +} + .spaced-top { margin-top:0.8em; } @@ -48,26 +59,10 @@ textarea.pageedit { width:100%; } -table.privtab { - border-collapse:collapse; -} - -table.privtab tr.line2 { - background-color:#DDDDDD; -} - -table.privtab tr td { - text-align:center; - padding-left:15px; -} - -table.privtab tr.group td { - font-weight:bold; -} - -table.privtab tr td.page, table.privtab tr td.submit { - text-align:left; - padding-left:0; +div.modinfo { + border:solid #AAAAAA 1px; + padding:1.5em; + margin:1em 3em; } div#content { @@ -135,10 +130,6 @@ div#nav li.nav_\%21Login { list-style-image:none; } -h1, h2, h3, h4, h5, h6 { - margin-top:0; -} - .error { color:#FF0000; } -- cgit v1.2.3