summaryrefslogtreecommitdiffstats
path: root/pages/content/Pages:Edit:Do.xml
diff options
context:
space:
mode:
Diffstat (limited to 'pages/content/Pages:Edit:Do.xml')
-rw-r--r--pages/content/Pages:Edit:Do.xml47
1 files changed, 47 insertions, 0 deletions
diff --git a/pages/content/Pages:Edit:Do.xml b/pages/content/Pages:Edit:Do.xml
new file mode 100644
index 0000000..15c5f51
--- /dev/null
+++ b/pages/content/Pages:Edit:Do.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<page>
+ <info>
+ <name>Pages:Edit:Do</name>
+ <template>phpexec</template>
+ <access>9:0</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: ' . 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>