summaryrefslogtreecommitdiffstats
path: root/index.php
blob: f66ba0171759846d2a5ec4825a4890a7e54ae4b1 (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
38
39
40
41
42
43
<?PHP
  require_once('code/config.inc.php');
  require_once('code/message.inc.php');
  require_once('code/util.inc.php');
  require_once('code/pages.inc.php');
  require_once('code/nav.inc.php');
  require_once('code/links.inc.php');
  
  header('Content-type: text/html;charset=UTF-8');
  
  if($_GET['page']) $page = Unquote($_GET['page']);
  else $page = $config['home'];
  
  if($_GET['mode'] == 'edit') $data = $pages->GetEditor($page, 'c', $GLOBALS['links']->GetNeonLink($page, null, false));
  else $data = $pages->Get($page, 'c');
  
  echo '<?xml version="1.0" encoding="UTF-8" ?>';
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title><?PHP echo $config['title'] . $data['title']; ?></title>
    <link rel="stylesheet" type="text/css" href="styles/<?PHP echo $config['default_style']; ?>/style.css" />
  </head>
  <body>
    <div id="nav">
      <?PHP echo $nav->ParseEntries(); ?>
    </div>
    <div id="content">
      <?PHP
        if($pages->HasWriteAccess($page, 'c') && $_GET['mode'] != 'edit') {
          $backlink = $GLOBALS['links']->GetNeonLink($page);
          
          echo '<a class="editlink" href="' . $GLOBALS['links']->GetNeonLink($page, 'mode=edit') . '">Bearbeiten</a>';
        }
        
        echo $data['content'];
      ?>
    </div>
  </body>
</html>