summaryrefslogtreecommitdiffstats
path: root/pages/content/Pages:Edit.xml
blob: beaa0b3c1ea34d65264e2733da9dc7494b11780c (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
<?xml version="1.0" encoding="UTF-8" ?>
<page>
  <info>
    <name>Pages:Edit</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/util.inc.php');
  
  
  if($_GET['type'] != 'c' && $_GET['type'] != 'n' && $_GET['type'] != 'e')
    exit();
  
  if(!$_GET['name'] || !$_GET['backlink']) exit();
  
  if(!$GLOBALS['pages']->HasWriteAccess(Unquote($_GET['name']), $_GET['type']))
    exit();
  
  $data = $GLOBALS['pages']->GetEditor(Unquote($_GET['name']), $_GET['type'], Unquote($_GET['backlink']));
      
  $title = $data['title'];
      
  echo $data['content'];
?>
      ]]>
    </code>
  </data>
</page>