session_start(); $page_title = "Sjeffff.nl"; $location['css'] = "css/"; $location['img'] = "images/"; $location['img_upload'] = "images/uploads/"; $location['js'] = "js/"; $location['scripts'] = "scripts/"; $location['pages'] = "pages/"; $pages['list'] = array ("home", "contact", "privacy statement"); $pages['free'] = array ("opsporingen","bericht"); include($location['scripts']."connect_db.php"); include($location['scripts']."functies.php"); foreach($_GET AS $key => $value) { $_GET[$key] = addslashes(htmlentities($value)); } foreach($_POST AS $key => $value) { $_POST[$key] = addslashes(htmlentities($value)); } foreach($_COOKIE AS $key => $value) { $_COOKIE[$key] = addslashes(htmlentities($value)); } if (isset($_GET['log_uit'])) { $_SESSION['admin_account'] = false; } if (isset($_POST['login']) && $_SESSION['admin_account'] == false && ($_POST['accountnaam'] == "sjaak" && $_POST['password'] =="trekhaak")) { $_SESSION['admin_account'] = true;} if (isset($_POST['voeg_toe'])) { add_msg($_POST,"blog"); } #if (isset($_POST['gastenboek_voeg_toe'])) { add_msg($_POST,"gastenboek");} if(isset($_GET['huh'])){ $rnd = floor(rand(0,3)); if (is_numeric($_GET['huh'])) { $colors = $_GET['huh']; } elseif ($rnd == 0) { $colors = array(round(rand(0,255)),round(rand(0,255)),round(rand(0,255))); } elseif ($rnd == 1) { $colors = 33; } elseif ($rnd == 2) { $colors = 2; } } else { $colors = 2;//Terug zetten naar 1 om fade`s weer te geven. } if (in_array(str_replace("_"," ",$_GET['p']),$pages['list']) || in_array(str_replace("_"," ",$_GET['p']),$pages['free'])) { if (file_exists($location['pages'].str_replace(" ","_",$_GET['p']).".php")) { $cur_page = $location['pages'].$_GET['p'].".php"; } else { $cur_page = $location['pages']."home.php"; } } else { $cur_page = $location['pages']."home.php"; } if ($_SESSION['admin_account']==true) { ob_start(); include($location['scripts']."logged_in.php"); $logged_in = ob_end_flush(); } if(function_exists(load_cats)) { $categorieen = load_cats(); } if(function_exists(max_clicks)) { $clicks['max'] = max_clicks(); } # $clicks['avg'] = avg_clicks(); #################################################################### /**/if (is_array($clicks)) { /**/ /**/foreach ($clicks AS $srt => $arr) /**/ /**/{ /**/ /**/ foreach($arr AS $key=>$val) { /**/ /**/ $new_clicks[$srt][$key] = $val[strtoupper($srt)]; /**/ /**/ } /**/ /**/} /**/ /**/$clicks = $new_clicks; /**/ /**/} /**/ /**/unset($srt); /**/ /**/unset($arr); /**/ /**/unset($key); /**/ /**/unset($new_clicks); /**/ #################################################################### if(function_exists(load_tags)) { $tags = load_tags(); } ?>