summaryrefslogtreecommitdiffstats
path: root/index.php
blob: 7c8dc3c60e1d66fa5187a6b9f28d5842268eac4b (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
<?PHP
  require_once('config/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');
  
  header('Content-type: text/html;charset=UTF-8');
  
  // provisional
  $template = 'default';
  $style = $config['default_style'];
  
  if($_GET['page']) $page = Unquote($_GET['page']);
  else $page = $config['home'];
  
  $template_data = join('', file('templates/' . $template));
  
  $data = $pages->Get($page, 'c');
  
  echo Subst($template_data, array('title' => $config['title'] . $data['title'],
                                   'stylesheet' => 'styles/' . $style . '/style.css',
                                   'content' => $data['content'],
                                   'nav' => $nav->ParseEntries()));
?>