From e7359ccf2db89b1feec820d1c97583f720ae0d7a Mon Sep 17 00:00:00 2001 From: neoraider Date: Mon, 17 Apr 2006 23:17:05 +0000 Subject: Seiten verschoben. --- 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 ++++++++ 18 files changed, 908 insertions(+) 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 (limited to 'pages/content') 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(); + ?> + ]]> + + + -- cgit v1.2.3