summaryrefslogtreecommitdiffstats
path: root/pages/Pages:Copy.xml
diff options
context:
space:
mode:
Diffstat (limited to 'pages/Pages:Copy.xml')
-rw-r--r--pages/Pages:Copy.xml29
1 files changed, 29 insertions, 0 deletions
diff --git a/pages/Pages:Copy.xml b/pages/Pages:Copy.xml
new file mode 100644
index 0000000..cfec18c
--- /dev/null
+++ b/pages/Pages:Copy.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<page>
+ <info>
+ <name>Pages:Copy</name>
+ <template>phpexec</template>
+ <access>0:0</access>
+ </info>
+ <data>
+ <code>
+ <![CDATA[
+<?PHP
+ Uses('pages', 'links', 'util');
+
+ if($_POST['back']) {
+ header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false));
+ exit();
+ }
+
+ if(!$_POST['name'] || !$_POST['newname']) exit();
+
+ $GLOBALS['pages']->Copy(Unquote($_POST['name']), Unquote($_POST['newname']));
+
+ header('Location: ' . $GLOBALS['links']->GetNeonLink('Pages', null, false));
+ exit();
+?>
+ ]]>
+ </code>
+ </data>
+</page>