summaryrefslogtreecommitdiffstats
path: root/pages/content/Pages:New.xml
blob: 3421ff1e6bb1b44faa74453c1274b4c9f1f3ffa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?xml version="1.0" encoding="UTF-8" ?>
<page>
  <info>
    <name>Pages:New</name>
    <template>phpexec</template>
    <access>0:0</access>
    <type>c</type>
  </info>
  <data>
    <code>
      <![CDATA[
<?PHP
  Uses('pages', 'links', 'util');
  
  
  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>