summaryrefslogtreecommitdiffstats
path: root/pages/Privileges.c.xml
diff options
context:
space:
mode:
Diffstat (limited to 'pages/Privileges.c.xml')
-rw-r--r--pages/Privileges.c.xml89
1 files changed, 89 insertions, 0 deletions
diff --git a/pages/Privileges.c.xml b/pages/Privileges.c.xml
new file mode 100644
index 0000000..7374abb
--- /dev/null
+++ b/pages/Privileges.c.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<page>
+ <info>
+ <name>Privileges</name>
+ <template>phpexec</template>
+ <access>00</access>
+ <type>c</type>
+ </info>
+ <data>
+ <code>
+ <![CDATA[
+<?PHP
+ require_once('code/db.inc.php');
+ require_once('code/links.inc.php');
+ require_once('code/pages.inc.php');
+
+ $title = 'Rechte';
+
+ echo '<h2>Rechte</h2>';
+
+ $type = $_GET['type'];
+ if($type != 'c' && $type != 'n' && $type != 'e') $type = 'c';
+
+ echo 'Seitentyp: ';
+ echo '<a href="' . $GLOBALS['links']->GetNeonLink('Privileges', 'type=c') . '"';
+ if($type == 'c') echo ' class="active_page_link"';
+ echo '>Inhalt</a> | ';
+ echo '<a href="' . $GLOBALS['links']->GetNeonLink('Privileges', 'type=n') . '"';
+ if($type == 'n') echo ' class="active_page_link"';
+ echo '>Navigation</a> | ';
+ echo '<a href="' . $GLOBALS['links']->GetNeonLink('Privileges', 'type=e') . '"';
+ if($type == 'e') echo ' class="active_page_link"';
+ echo '>Editor</a><br /><br />';
+
+ echo '<form action="' . $GLOBALS['links']->GetNeonLink('Privileges:Update') . '" method="post">';
+
+ echo '<input type="hidden" name="type" value="' . $type . '" />';
+
+ echo '<table class="privtab">';
+
+ $groupres = $GLOBALS['db']->Execute('SELECT * FROM groups ORDER BY id');
+ $pages = $GLOBALS['pages']->GetList();
+
+ $groups = $groupres->GetArray();
+ array_unshift($groups, array(0, 'Gast'));
+
+ echo '<tr class="group">';
+
+ echo '<td></td>';
+
+ foreach($groups as $group) {
+ echo '<td>' . $group[1] . '</td>';
+ }
+
+ echo '</tr>';
+
+ $linex = true;
+
+ foreach($pages as $page) {
+ if($page[strlen($page)-1] != $type) continue;
+
+ $pagedata = $GLOBALS['pages']->GetPageData(substr($page, 0, -2), $type);
+
+ echo '<tr class="line' . ($linex ? '1' : '2') . '">';
+ $linex = !$linex;
+
+ echo '<td class="page">' . $pagedata['name'] . '</td>';
+
+ foreach($groups as $group) {
+ echo '<td><input type="checkbox" name="' . $pagedata['name'] . ':' . $group[0] . '" value="true" ';
+ if((hexdec(substr($pagedata['access'], ($group[0]/8)*2, 2)) & (1 << ($group[0]%8))) != 0) echo 'checked="checked" ';
+ echo '/></td>';
+ }
+
+ echo '</tr>';
+ }
+
+ echo '<tr><td colspan="' . (count($groups)+1) . '" class="submit">';
+ echo '<input type="submit" value="Ă„ndern" class="spaced-top" />';
+ echo '</td></tr>';
+
+ echo '</table>';
+
+ echo '</form>';
+?>
+ ]]>
+ </code>
+ </data>
+</page>