query(" SELECT * FROM tritolonen_pages WHERE slug = '" . $db->real_escape_string($slug) . "' AND parent = '" . $db->real_escape_string($parent) . "' LIMIT 1 "); if ($pages->num_rows) { $page = $pages->fetch_assoc(); $page_title = $page["title"]; $page_description = $page["description"]; } else { if (!$page["dynamic"]) unset($page); } } // Show template include "templates/" . $page["template"]; // 404 if (!isset($page)) { header("HTTP/1.0 404 Not Found"); include "templates/404.php"; } // Close $db->close();