summaryrefslogtreecommitdiffstats
path: root/index.php
blob: bb1fa2976a513a6a8f7d86b8beb8b26040a03b8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?PHP
  include('config/config.inc.php');
  
  include('code/message.inc.php');
  include('code/util.inc.php');
  include('code/content.inc.php');
  include('code/nav.inc.php');
  
  header('Content-type: text/html;charset=UTF-8');
  
  // provisional
  $template = 'default';
  $style = $config['default_style'];
  
  if($_GET['page']) $page = $_GET['page'];
  else $page = $config['home'];
  
  $template_data = join('', file('templates/' . $template));
  
  $data = GetPage($page);
  
  echo Subst($template_data, array('title' => $config['title'] . $data['title'], 'stylesheet' => 'styles/' . $style . '/style.css', 'content' => $data['content'], 'nav' => $nav->ParseEntries()));
?>