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/Pages:Privs.xml | 62 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 pages/content/Pages:Privs.xml (limited to 'pages/content/Pages:Privs.xml') 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(); +?> + ]]> + + + -- cgit v1.2.3