include 'config.php'; ?>
Manon Jansen praktijk voor massage en bewustwording rotterdam
//set page if ?p=
if (isset($_GET['p']) && $_GET['p'] != '' || isset($_GET['p']) && strstr($_GET['p'], 'http://')){
$p = addslashes($_GET['p']) . '.inc';
$p_title = addslashes($_GET['p']);
$p_title = str_replace('_', ' ', $p_title);
}else{
$p = 'home.inc';
$p_title = 'home';
}
//set extention if ?ext= (only html, php, htm)
if (isset($_GET['ext'])){
if ($_GET['ext'] == 'html' && $_GET['ext'] == 'htm' && $_GET['ext'] == 'php' && $_GET['ext'] == 'txt'){
$p .= '.' . addslashes($_GET['ext']);
}
}else{
$p .= '.php';
}
//check if the file exists else show error paee
if (!file_exists($p)){
$p = '404.shtml'; //ERROR PAGE
}
?>
include $p; ?>