summaryrefslogtreecommitdiffstats
path: root/index.php
blob: 995f7e9a594419470cc0d23708250f66d89218f7 (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
  include('config/config.inc.php');
  
  include('code/message.inc.php');
  include('code/util.inc.php');
  include('code/pages.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 = $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()));
?>