diff options
Diffstat (limited to 'pages/Pages/Handle.c.xml')
-rw-r--r-- | pages/Pages/Handle.c.xml | 110 |
1 files changed, 110 insertions, 0 deletions
diff --git a/pages/Pages/Handle.c.xml b/pages/Pages/Handle.c.xml new file mode 100644 index 0000000..55aae8b --- /dev/null +++ b/pages/Pages/Handle.c.xml @@ -0,0 +1,110 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<page> + <info> + <name>Pages:Handle</name> + <template>phpexec</template> + <access>00</access> + <type>c</type> + </info> + <data> + <code> + <![CDATA[ +<?PHP + require_once('code/pages.inc.php'); + require_once('code/links.inc.php'); + require_once('code/templates.inc.php'); + + if($_POST['type'] != 'c' && $_POST['type'] != 'n' && $_POST['type'] != 'e') + exit(); + + if(isset($_POST['view'])) { + if($_POST['name']) { + header('Location: ' . $GLOBALS['links']->GetNeonLink(Unquote($_POST['name']), null, false)); + exit(); + } + } + elseif(isset($_POST['new'])) { + $title = 'Neue Seite'; + ?> + <h2>Neue Seite</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="Neu" /> + <input type="submit" class="spaced-top" name="back" value="Zurück" /> + </form> + <?PHP + } + elseif(isset($_POST['edit'])) { + if($_POST['name']) { + $data = $GLOBALS['pages']->GetEditor(Unquote($_POST['name']), $_POST['type']); + + $title = $data['title']; + + echo $data['content']; + } + } + elseif(isset($_POST['copy'])) { + if($_POST['name']) { + $name = strtr(Unquote($_POST['name']), array('<' => '<', '>' => '>', '&' => '&', '"' => '"')); + + $title = '\'' . $name . '\' kopieren'; + + echo '<h2>\'' . $name . '\' kopieren</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 'Neuer Name: <input type="text" name="newname" value="' . $name . '" size="70" /><br />'; + echo '<input type="submit" class="spaced-top" value="Kopieren" /> '; + echo '<input type="submit" class="spaced-top" name="back" value="Zurück" />'; + echo '</form>'; + } + } + elseif(isset($_POST['rename'])) { + if($_POST['name']) { + $name = strtr(Unquote($_POST['name']), array('<' => '<', '>' => '>', '&' => '&', '"' => '"')); + + $title = '\'' . $name . '\' umbenennen'; + + echo '<h2>\'' . $name . '\' umbenennen</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 'Neuer Name:<br />'; + echo '<input type="text" name="newname" value="' . $name . '" size="70" /><br />'; + echo '<input type="submit" class="spaced-top" value="Umbenennen" /> '; + echo '<input type="submit" class="spaced-top" name="back" value="Zurück" />'; + echo '</form>'; + } + } + elseif(isset($_POST['delete'])) { + if($_POST['name']) { + $name = strtr(Unquote($_POST['name']), array('<' => '<', '>' => '>', '&' => '&', '"' => '"')); + + $title = '\'' . $name . '\' löschen'; + + echo '<h2>\'' . $name . '\' löschen</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 'Wollen Sie die Seite \'' . $name . '\' wirklich löschen?<br />'; + echo '<input type="submit" class="spaced-top" value="Löschen" /> '; + echo '<input type="submit" class="spaced-top" name="back" value="Zurück" />'; + echo '</form>'; + } + } +?> + ]]> + </code> + </data> +</page> |