Lighttpd conf file added for lighttpd webservers
[atbbs.git] / url_handler.php
blobbede37ce20bf8e59c55d042fa249401b19988127
1 <?php
3 require('includes/header.php');
5 $requested_page = ltrim($_SERVER['REQUEST_URI'], '/');
7 $stmt = $link->prepare('SELECT page_title, content FROM pages WHERE url = ?');
8 $stmt->bind_param('s', $requested_page);
9 $stmt->execute();
11 $stmt->store_result();
12 if($stmt->num_rows < 1)
14 redirect('The page you requested was not found.', '');
17 $stmt->bind_result($page_title, $content);
18 $stmt->fetch();
19 $stmt->close();
21 echo $content;
23 require('includes/footer.php');