last changes
[ayans.git] / index.php
blob76f60a1ab79e6af7569656ff5540af484a9ecfae
1 <?php
3 require 'includes/config.inc.php';
4 require INCLUDES_PATH.'prepend.php';
6 try {
7 $pdo = new PDO(DBH);
8 } catch (PDOException $e) {
9 die("pdo error: ".$e->getMessage());
12 $tpl = new templates();
13 $tpl->addFile('_begin','header.tpl.php');
14 $tpl->addFile('_end','footer.tpl.php');
15 $tpl->addFile('index','index.tpl.php');
17 $tpl->title = "AYANS";
20 $news = new news_node();
21 $news->setPDO($pdo);
22 $news->setView(news_node::DEFAULT_VIEW);
23 $news->add_filter('Markdown','text');
25 // Comment this if you have some charset problems in cache
26 $news->add_filter('utf8_decode','title');
27 // -----
29 $news->add_filter('htmlentities','title');
30 $news->add_filter('set_bolder','author');
31 $tpl->content = $news->render(isset($_GET['reload']) ? true : false);
35 $tpl->render('index');