diff options
author | neoraider <devnull@localhost> | 2006-12-14 01:06:02 +0100 |
---|---|---|
committer | neoraider <devnull@localhost> | 2006-12-14 01:06:02 +0100 |
commit | 543336aef16562369c01992817f58e17144c9cad (patch) | |
tree | d49cd8549a836c740df7096ddcf7788ed7920c37 /pages/content | |
parent | 93e1133ee88b03e7cae7318cb19761e698e57b86 (diff) | |
download | neon-543336aef16562369c01992817f58e17144c9cad.tar neon-543336aef16562369c01992817f58e17144c9cad.zip |
Base-Type durch Subst-Erweiterungen unnoetig gemacht; Type-Konzept entfernt.
Diffstat (limited to 'pages/content')
-rw-r--r-- | pages/content/Login.xml | 29 | ||||
-rw-r--r-- | pages/content/Logout.xml | 24 | ||||
-rw-r--r-- | pages/content/Modules.xml | 51 | ||||
-rw-r--r-- | pages/content/Modules:Config.xml | 18 | ||||
-rw-r--r-- | pages/content/Modules:Enable.xml | 29 | ||||
-rw-r--r-- | pages/content/Pages.xml | 44 | ||||
-rw-r--r-- | pages/content/Pages:Copy.xml | 33 | ||||
-rw-r--r-- | pages/content/Pages:Delete.xml | 34 | ||||
-rw-r--r-- | pages/content/Pages:Edit.xml | 45 | ||||
-rw-r--r-- | pages/content/Pages:Handle.xml | 158 | ||||
-rw-r--r-- | pages/content/Pages:New.xml | 37 | ||||
-rw-r--r-- | pages/content/Pages:Privs.xml | 60 | ||||
-rw-r--r-- | pages/content/Pages:Rename.xml | 34 | ||||
-rw-r--r-- | pages/content/Users.xml | 42 | ||||
-rw-r--r-- | pages/content/Users:Delete.xml | 31 | ||||
-rw-r--r-- | pages/content/Users:Group.xml | 31 | ||||
-rw-r--r-- | pages/content/Users:Handle.xml | 129 | ||||
-rw-r--r-- | pages/content/Users:New.xml | 33 | ||||
-rw-r--r-- | pages/content/Users:Password.xml | 33 | ||||
-rw-r--r-- | pages/content/Users:Rename.xml | 31 |
20 files changed, 0 insertions, 926 deletions
diff --git a/pages/content/Login.xml b/pages/content/Login.xml deleted file mode 100644 index 4a6471a..0000000 --- a/pages/content/Login.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Login</name> - <template>phpexec</template> - <access>1:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?PHP - Uses('user', 'links', 'util'); - - if($_POST['name'] && $_POST['password'] && $_POST['page']) { - if($GLOBALS['user']->Login(Unquote($_POST['name']), Unquote($_POST['password']))) { - header('Location: ' . $GLOBALS['links']->GetNeonLink($_POST['page'], null, false)); - exit(); - } - } - - $title = '{{Error}}'; - - echo '<span class="error">{{Login failed. Username or password is wrong.}}</span>'; -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Logout.xml b/pages/content/Logout.xml deleted file mode 100644 index 5f2b95c..0000000 --- a/pages/content/Logout.xml +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Logout</name> - <template>phpexec</template> - <access>8:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?PHP - Uses('user', 'links'); - - $GLOBALS['user']->Logout(); - - header('Location: ' . $GLOBALS['links']->GetNeonLink($GLOBALS['config']['home'], null, false)); - - exit(); -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Modules.xml b/pages/content/Modules.xml deleted file mode 100644 index f8f52e2..0000000 --- a/pages/content/Modules.xml +++ /dev/null @@ -1,51 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Modules</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?PHP - Uses('links'); - - $title = '{{Modules}}'; - - echo '<h2>{{Modules}}</h2>'; - - $modules = array_keys($GLOBALS['modules']->modules); - unset($modules[array_search('base', $modules)]); - sort($modules); - - foreach($modules as $module) { - echo '<div class="modinfo">'; - - //if($GLOBALS['modules']->HasConfig($module)) - // echo '<h3><a href="' . $GLOBALS['links']->GetNeonLink('Modules:Config', 'name=' . urlencode($module)) . '">' . htmlspecialchars($module) . '</a></h3>'; - //else - echo '<h3>' . htmlspecialchars($module) . '</h3>'; - - echo htmlspecialchars($GLOBALS['modules']->modules[$module]['version']); - - if($GLOBALS['modules']->Enabled($module)) - echo '<span class="mod_disable">(<a href="' . $GLOBALS['links']->GetNeonLink('Modules:Enable', - 'name=' . urlencode($module) . '&enable=false') . '" class="mod_disable">Deaktivieren</a>)</span>'; - - else - echo '<span class="mod_disable">(<a href="' . $GLOBALS['links']->GetNeonLink('Modules:Enable', - 'name=' . urlencode($module) . '&enable=true') . '" class="mod_enable">Aktivieren</a>)</span>'; - - echo '<br /><br />'; - - echo htmlspecialchars($GLOBALS['modules']->modules[$module]['desc']); - - echo '</div>'; - } -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Modules:Config.xml b/pages/content/Modules:Config.xml deleted file mode 100644 index c0940bb..0000000 --- a/pages/content/Modules:Config.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Modules:Config</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?PHP - -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Modules:Enable.xml b/pages/content/Modules:Enable.xml deleted file mode 100644 index d12f63a..0000000 --- a/pages/content/Modules:Enable.xml +++ /dev/null @@ -1,29 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Modules:Enable</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?PHP - Uses('links', 'util'); - - if(!$_GET['name']) exit(); - - if($_GET['enable'] == 'true') $enable = true; - elseif($_GET['enable'] == 'false') $enable = false; - else exit(); - - $GLOBALS['modules']->Enable(Unquote($_GET['name']), $enable); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Modules', null, false)); - exit(); -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Pages.xml b/pages/content/Pages.xml deleted file mode 100644 index 6db0710..0000000 --- a/pages/content/Pages.xml +++ /dev/null @@ -1,44 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Pages</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?PHP - Uses('links', 'pages'); - - - $title = '{{Pages}}'; - - echo '<h2>{{Pages}}</h2>'; - - 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 '</select>'; - echo '<br />'; - echo '<input type="submit" name="view" value="{{Display}}" /> '; - echo '<input type="submit" name="new" value="{{New}}" /> '; - echo '<input type="submit" name="edit" value="{{Edit}}" /> '; - echo '<input type="submit" name="privs" value="{{Change access}}" /> '; - echo '<input type="submit" name="copy" value="{{Copy}}" /> '; - echo '<input type="submit" name="rename" value="{{Rename}}" /> '; - echo '<input type="submit" name="delete" value="{{Delete}}" />'; - echo '</form>'; -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Pages:Copy.xml b/pages/content/Pages:Copy.xml deleted file mode 100644 index a8925f2..0000000 --- a/pages/content/Pages:Copy.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Pages:Copy</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?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(); - } - - if(!$_POST['name'] || !$_POST['newname']) exit(); - - $GLOBALS['pages']->Copy(Unquote($_POST['name']), $_POST['type'], Unquote($_POST['newname'])); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false)); - exit(); -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Pages:Delete.xml b/pages/content/Pages:Delete.xml deleted file mode 100644 index 26da0bf..0000000 --- a/pages/content/Pages:Delete.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Pages:Delete</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?PHP - Uses('pages', 'links'); - - - if($_POST['type'] != 'c' && $_POST['type'] != 'b') - exit(); - - if($_POST['back']) { - header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false)); - exit(); - } - - if(!$_POST['name']) exit(); - - $GLOBALS['pages']->Delete(Unquote($_POST['name']), $_POST['type']); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false)); - exit(); -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Pages:Edit.xml b/pages/content/Pages:Edit.xml deleted file mode 100644 index f61084b..0000000 --- a/pages/content/Pages:Edit.xml +++ /dev/null @@ -1,45 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Pages:Edit</name> - <template>phpexec</template> - <access>9:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?PHP - Uses('pages', 'links', 'util'); - - - if($_POST['type'] != 'c' && $_POST['type'] != 'b') - exit(); - - if($_POST['back']) { - header('Location: ' . Unquote($_POST['backlink'])); - exit(); - } - - if(!$_POST['name'] || !$_POST['backlink']) exit(); - - if(!$GLOBALS['pages']->HasWriteAccess(Unquote($_POST['name']), $_POST['type'])) - 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: ' . Unquote($_POST['backlink'])); - exit(); -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Pages:Handle.xml b/pages/content/Pages:Handle.xml deleted file mode 100644 index 9abc7d9..0000000 --- a/pages/content/Pages:Handle.xml +++ /dev/null @@ -1,158 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Pages:Handle</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?PHP - 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)); - exit(); - } - } - elseif(isset($_POST['new'])) { - $title = '{{New page}}'; - ?> - <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 - foreach(array_keys($GLOBALS['templates']) as $key) - echo '<option>' . $key . '</option>'; - ?> - </select><br /> - <input type="submit" class="spaced-top" value="{{New}}" /> - <input type="submit" class="spaced-top" name="back" value="{{Back}}" /> - </form> - <?PHP - } - elseif(isset($_POST['edit'])) { - if($_POST['name']) { - $data = $GLOBALS['pages']->GetEditor(Unquote($_POST['name']), $_POST['type'], $GLOBALS['links']->GetNeonLink('Pages', null, false)); - - $title = $data['title']; - - echo $data['content']; - } - } - elseif(isset($_POST['privs'])) { - if($_POST['name']) { - $name = htmlspecialchars(Unquote($_POST['name'])); - - $title = '{{Change access to \'' . $name . '\'}}'; - - echo '<h2>{{Change access to \'' . $name . '\'}}</h2>'; - - $access = $GLOBALS['pages']->GetAccess(Unquote($_POST['name']), $_POST['type']); - $groups = $GLOBALS['user']->ListGroups(); - - array_unshift($groups, array(0, '{{Guest}}')); - - 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>'; - - foreach($groups as $group) { - echo '<tr><td>' . htmlspecialchars($group[1]) . '</td><td>'; - - echo '<select size="1" name="group_' . $group[0] . '">'; - - echo '<option value="0"'; - if((hexdec($access[0][$group[0]/4]) & (1 << ($group[0]%4))) == 0) echo ' selected="selected"'; - echo '>{{No access}}</option>'; - - echo '<option value="1"'; - if(((hexdec($access[0][$group[0]/4]) & (1 << ($group[0]%4))) != 0) - && ((hexdec($access[1][$group[0]/4]) & (1 << ($group[0]%4))) == 0)) - echo ' selected="selected"'; - echo '>{{Read only}}</option>'; - - echo '<option value="2"'; - if((hexdec($access[1][$group[0]/4]) & (1 << ($group[0]%4))) != 0) echo ' selected="selected"'; - echo '>{{Read and write}}</option>'; - - echo '</select></td></tr>'; - } - - echo '</table>'; - - echo '<input type="submit" class="spaced-top" value="{{Change}}" /> '; - echo '<input type="submit" class="spaced-top" name="back" value="{{Back}}" />'; - - echo '</form>'; - } - } - elseif(isset($_POST['copy'])) { - if($_POST['name']) { - $name = htmlspecialchars(Unquote($_POST['name'])); - - $title = '{{Copy \'' . $name . '\'}}'; - - echo '<h2>{{Copy \'' . $name . '\'}}</h2>'; - - 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}}" />'; - echo '</form>'; - } - } - elseif(isset($_POST['rename'])) { - if($_POST['name']) { - $name = htmlspecialchars(Unquote($_POST['name'])); - - $title = '{{Rename \'' . $name . '\'}}'; - - echo '<h2>{{Rename \'' . $name . '\'}}</h2>'; - - 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}}" />'; - echo '</form>'; - } - } - elseif(isset($_POST['delete'])) { - if($_POST['name']) { - $name = htmlspecialchars(Unquote($_POST['name'])); - - $title = '{{Delete \'' . $name . '\'}}'; - - echo '<h2>{{Delete \'' . $name . '\'}}</h2>'; - - 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}}" />'; - echo '</form>'; - } - } -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Pages:New.xml b/pages/content/Pages:New.xml deleted file mode 100644 index b6673b7..0000000 --- a/pages/content/Pages:New.xml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Pages:New</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?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(); - } - - 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'], $GLOBALS['links']->GetNeonLink('Pages', null, false)); - - $title = $data['title']; - - echo $data['content']; -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Pages:Privs.xml b/pages/content/Pages:Privs.xml deleted file mode 100644 index 318e7a2..0000000 --- a/pages/content/Pages:Privs.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Pages:Privs</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?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(); - } - - 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', null, false)); - exit(); -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Pages:Rename.xml b/pages/content/Pages:Rename.xml deleted file mode 100644 index 2169c57..0000000 --- a/pages/content/Pages:Rename.xml +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Pages:Rename</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?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(); - } - - if(!$_POST['name'] || !$_POST['newname']) exit(); - - $GLOBALS['pages']->Rename(Unquote($_POST['name']), $_POST['type'], Unquote($_POST['newname'])); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false)); - exit(); -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Users.xml b/pages/content/Users.xml deleted file mode 100644 index 9833701..0000000 --- a/pages/content/Users.xml +++ /dev/null @@ -1,42 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Users</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ -<?PHP - Uses('links'); - - - $title = 'Benutzer'; - - echo '<h2>Benutzer</h2>'; - - $res = $GLOBALS['db']->Execute('SELECT id, user FROM users ORDER BY user'); - - echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Users:Handle') . '">'; - - echo '<select name="id" size="15" class="userlist spaced-bottom">'; - - while($row = $res->FetchRow()) { - echo '<option value="' . $row[0] . '">' . $row[1] . '</option>'; - } - - echo '</select>'; - echo '<br />'; - echo '<input type="submit" name="new" value="{{New}}" /> '; - echo '<input type="submit" name="group" value="{{Change group}}" /> '; - echo '<input type="submit" name="password" value="{{Change password}}" /> '; - echo '<input type="submit" name="rename" value="{{Rename}}" /> '; - echo '<input type="submit" name="delete" value="{{Delete}}" />'; - echo '</form>'; -?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Users:Delete.xml b/pages/content/Users:Delete.xml deleted file mode 100644 index b6db8b4..0000000 --- a/pages/content/Users:Delete.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Users:Delete</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ - <?PHP - Uses('user', 'links'); - - - if($_POST['back']) { - header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false)); - exit(); - } - - if(!$_POST['id']) exit(); - - $GLOBALS['user']->Delete($_POST['id']); - - header('Location: ' . $GLOBALS['links']->GetNeonLink('Users', null, false)); - exit(); - ?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Users:Group.xml b/pages/content/Users:Group.xml deleted file mode 100644 index 4a4b004..0000000 --- a/pages/content/Users:Group.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Users:Group</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ - <?PHP - Uses('user', 'links'); - - - if($_POST['back']) { - header('Location: ' . $GLOBALS['links']->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(); - ?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Users:Handle.xml b/pages/content/Users:Handle.xml deleted file mode 100644 index 9e949c1..0000000 --- a/pages/content/Users:Handle.xml +++ /dev/null @@ -1,129 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Users:Handle</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ - <?PHP - Uses('links', 'user'); - - - if(isset($_POST['new'])) { - $title = '{{New user}}'; - ?> - <h2>{{New user}}</h2> - - <form method="post" action="<?PHP echo $GLOBALS['links']->GetNeonLink('Users:New'); ?>"> - <div class="spaced-bottom">Name: <input type="text" id="username" name="name" size="70" /></div> - {{Group}}:<br /> - <select name="gid" size="15" class="grouplist spaced-bottom"> - <?PHP - $res = $GLOBALS['db']->Execute('SELECT * FROM groups ORDER BY id'); - - while($group = $res->FetchRow()) { - echo '<option value="' . $group[0] . '">' . htmlspecialchars($group[1]) . '</option>'; - } - ?> - </select><br /> - {{Password}}:<br /> - <input type="password" class="spaced-bottom" name="password" size="30" /><br /> - {{Confirm}}:<br /> - <input type="password" class="spaced-bottom" name="password2" size="30" /><br /> - <input type="submit" value="{{New}}" /> - <input type="submit" name="back" value="{{Back}}" /> - </form> - <?PHP - } - elseif(isset($_POST['group'])) { - if($_POST['id']) { - $name = htmlspecialchars($GLOBALS['user']->GetName($_POST['id'])); - $gid = $GLOBALS['user']->GetGid($_POST['id']); - - $title = '{{Change group of \'' . $name . '\'}}'; - - echo '<h2>{{Change group of \'' . $name . '\'}}</h2>'; - - echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Users:Group') . '">'; - echo '<input type="hidden" name="id" value="' . $_POST['id'] . '" />'; - echo '{{New group}}:<br />'; - - echo '<select name="gid" size="15" class="grouplist spaced-bottom">'; - - $res = $GLOBALS['db']->Execute('SELECT * FROM groups ORDER BY id'); - $groups = $res->GetArray(); - - foreach($groups as $group) { - echo '<option value="' . $group[0] . '"'; - if($group[0] == $gid) echo ' selected="selected"'; - echo '>' . htmlspecialchars($group[1]) . '</option>'; - } - - echo '</select><br />'; - - echo '<input type="submit" value="{{Change}}" /> '; - echo '<input type="submit" name="back" value="{{Back}}" />'; - echo '</form>'; - } - } - elseif(isset($_POST['password'])) { - if($_POST['id']) { - $name = htmlspecialchars($GLOBALS['user']->GetName($_POST['id'])); - - $title = '{{Change password of \'' . $name . '\'}}'; - - echo '<h2>{{Change password of \'' . $name . '\'}}</h2>'; - - echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Users:Password') . '">'; - echo '<input type="hidden" name="id" value="' . $_POST['id'] . '" />'; - echo '{{New password}}:<br />'; - echo '<input type="password" name="password" class="spaced-bottom" size="30" /><br />'; - echo '{{Confirm}}:<br />'; - echo '<input type="password" name="password2" class="spaced-bottom" size="30" /><br />'; - echo '<input type="submit" value="{{Change}}" /> '; - echo '<input type="submit" name="back" value="{{Back}}" />'; - echo '</form>'; - } - } - elseif(isset($_POST['rename'])) { - if($_POST['id']) { - $name = htmlspecialchars($GLOBALS['user']->GetName($_POST['id'])); - - $title = '{{Rename \'' . $name . '\'}}'; - - echo '<h2>{{Rename \'' . $name . '\'}}</h2>'; - - echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Users:Rename') . '">'; - echo '<input type="hidden" name="id" value="' . $_POST['id'] . '" />'; - echo '{{New name}}: '; - echo '<input type="text" name="name" 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}}" />'; - echo '</form>'; - } - } - elseif(isset($_POST['delete'])) { - if($_POST['id']) { - $name = htmlspecialchars($GLOBALS['user']->GetName($_POST['id'])); - - $title = '{{Delete \'' . $name . '\'}}'; - - echo '<h2>{{Delete \'' . $name . '\'}}</h2>'; - - echo '<form method="post" action="' . $GLOBALS['links']->GetNeonLink('Users:Delete') . '">'; - echo '<input type="hidden" name="id" value="' . $_POST['id'] . '" />'; - echo '{{Do you really want to delete the user \'' . $name . '\'?}}<br />'; - echo '<input type="submit" class="spaced-top" value="{{Delete}}" /> '; - echo '<input type="submit" class="spaced-top" name="back" value="{{Back}}" />'; - echo '</form>'; - } - } - ?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Users:New.xml b/pages/content/Users:New.xml deleted file mode 100644 index 098644f..0000000 --- a/pages/content/Users:New.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Users:New</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ - <?PHP - Uses('user', 'links', 'util'); - - - if($_POST['back']) { - header('Location: ' . $GLOBALS['links']->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(); - ?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Users:Password.xml b/pages/content/Users:Password.xml deleted file mode 100644 index da7db38..0000000 --- a/pages/content/Users:Password.xml +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Users:Password</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ - <?PHP - Uses('user', 'links', 'util'); - - - if($_POST['back']) { - header('Location: ' . $GLOBALS['links']->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(); - ?> - ]]> - </code> - </data> -</page> diff --git a/pages/content/Users:Rename.xml b/pages/content/Users:Rename.xml deleted file mode 100644 index 13f2ae0..0000000 --- a/pages/content/Users:Rename.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<page> - <info> - <name>Users:Rename</name> - <template>phpexec</template> - <access>0:0</access> - <type>c</type> - </info> - <data> - <code> - <![CDATA[ - <?PHP - Uses('user', 'links', 'util'); - - - if($_POST['back']) { - header('Location: ' . $GLOBALS['links']->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(); - ?> - ]]> - </code> - </data> -</page> |