summaryrefslogtreecommitdiffstats
path: root/pages/Pages/New.c.xml
diff options
context:
space:
mode:
Diffstat (limited to 'pages/Pages/New.c.xml')
-rw-r--r--pages/Pages/New.c.xml39
1 files changed, 39 insertions, 0 deletions
diff --git a/pages/Pages/New.c.xml b/pages/Pages/New.c.xml
new file mode 100644
index 0000000..8ee794e
--- /dev/null
+++ b/pages/Pages/New.c.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<page>
+ <info>
+ <name>Pages:New</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'] || !$_POST['template']) exit();
+
+ $GLOBALS['pages']->Add(Unquote($_POST['name']), $_POST['type'], Unquote($_POST['template']));
+
+ $data = $GLOBALS['pages']->GetEditor(Unquote($_POST['name']), $_POST['type']);
+
+ $title = $data['title'];
+
+ echo $data['content'];
+?>
+ ]]>
+ </code>
+ </data>
+</page>