summaryrefslogtreecommitdiffstats
path: root/pages/Pages/Edit.c.xml
diff options
context:
space:
mode:
Diffstat (limited to 'pages/Pages/Edit.c.xml')
-rw-r--r--pages/Pages/Edit.c.xml44
1 files changed, 44 insertions, 0 deletions
diff --git a/pages/Pages/Edit.c.xml b/pages/Pages/Edit.c.xml
new file mode 100644
index 0000000..bf4ea6a
--- /dev/null
+++ b/pages/Pages/Edit.c.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<page>
+ <info>
+ <name>Pages:Edit</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/util.inc.php');
+
+
+ if($_POST['type'] != 'c' && $_POST['type'] != 'n' && $_POST['type'] != 'e')
+ exit();
+
+ if($_POST['back']) {
+ header('Location: ' . $GLOBALS['links']->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();
+?>
+ ]]>
+ </code>
+ </data>
+</page>