setlocale(LC_ALL, 'nl_NL.ISO8859-1'); //error_reporting(E_ALL); include_once("lockdown.php"); $hide_reclame = 1; $lockdownacces = date("m")."123".date("d")."abz"; session_start(); $loc = $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']; $loc__ = $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; $loc_ = "?".$_SERVER['QUERY_STRING']; if ($_GET['error_reporting']=="E_ALL" && (!empty($LOCKDOWN) || $_COOKIE['ignore']==$lockdownacces)){ error_reporting(E_ALL); } else if ($_GET['error_reporting']=="1" && (!empty($LOCKDOWN) || $_COOKIE['ignore']==$lockdownacces)){ error_reporting(1); } else { error_reporting(0); } if ($_GET['ignore'] == $lockdownacces){ setcookie("ignore",$lockdownacces,time()+100000000); header("Location: http://www.breiner.nl/"); exit(); } else if (!empty ($_GET['ignore']) && $_GET['ignore'] != $lockdownacces){ setcookie("ignore",""); header("Location: http://www.breiner.nl/"); exit(); } if ($LOCKDOWN && ($_GET['ignore'] != $lockdownacces) && ($_COOKIE['ignore'] != $lockdownacces)){ include_once("lockdownpage.php"); exit(); } if ($_GET['language'] == "EN" || $_GET['language'] == "NL"){ setcookie('breiner_lang',$_GET['language'], time()+60*60*24*100); header("Location: ".$_SERVER['HTTP_REFERER']); } include_once("defaults.php"); $default_theme = "Breiner"; $dimages = 'theme/'.$default_theme.'/images/'; include_once("includes/smileys.php"); //-------------------------------------------------------------------------------------- //################################### THEME and LANGUAGE ############################### //-------------------------------------------------------------------------------------- //error_reporting(E_ALL); include_once("language/".$language.".php"); if (!$_COOKIE['breiner_theme']){ setcookie('breiner_theme',$default_theme); $_COOKIE['breiner_theme'] = $default_theme; $theme = $default_theme; } else { $theme = addslashes($_COOKIE['breiner_theme']); } $theme = $default_theme; //-------------------------------------------------------------------------------------- //################################### CONNECTION #################################### //-------------------------------------------------------------------------------------- include_once("config.php"); mysql_connect("localhost", $dbusername, $dbpassword) or die(mysql_error()); //met MySQL connecten mysql_select_db($dbname) or die(mysql_error()); //met de database connecten include_once("dbc.php"); //-------------------------------------------------------------------------------------- //################################### BLOCKING #################################### //-------------------------------------------------------------------------------------- $blocks = mysql_query("SELECT * FROM block_ip"); $ip = $_SERVER['REMOTE_ADDR']; while ($block = mysql_fetch_array($blocks)) { if ($block['ip'] == $ip) { exit("website down."); } } function endsWith($haystack, $needle) { // search forward starting from end minus needle length characters return $needle === "" || strpos($haystack, $needle, strlen($haystack) - strlen($needle)) !== FALSE; } //-------------------------------------------------------------------------------------- //################################### LOGIN and OUT #################################### //-------------------------------------------------------------------------------------- $result = mysql_query("SELECT * FROM users WHERE loginnaam='".mysql_real_escape_string($_COOKIE['breiner_username'])."' OR nickname='".mysql_real_escape_string($_COOKIE['breiner_username'])."'"); $user = mysql_fetch_assoc( $result ); $dontenterdatabase = 1; if (endsWith($user['email'], ".pl") || endsWith($user['profile_url'], ".pl") || endsWith($user['profile_url'], ".pl/")) { $_ip = $user['ip']; mysql_query("DELETE FROM users WHERE ip='".mysql_real_escape_string($_ip)."'"); mysql_query("INSERT INTO `block_ip`(`ip`) VALUES ('".mysql_real_escape_string($_ip)."')"); exit("website down."); } if ($_GET['clean'] == '1') { mysql_query("DELETE FROM users WHERE hulp='99'"); mysql_query("DELETE FROM users WHERE pages='6'"); } include_once("includes/login.php"); include_once("includes/logincheck.php"); //---------------------------------- My Profile if ($_GET['page']=="myprofile"){ if ($user['nickname']){ header("location: ?user=".$user['nickname']); } else { header("location: ?page=register"); } } if ($_GET['page'] == "activate"){ include_once("includes/activate.php"); } //---------------------------------- HISTORY /*$loc = $_SERVER['PHP_SELF']."?".$_SERVER['QUERY_STRING']; $mysql = mysql_query("INSERT INTO history (ip, username, loginname, url, time) VALUES('".$_SERVER['REMOTE_ADDR']."', '".$user['nickname']."', '".$user['loginnaam']."', '".mysql_real_escape_string($loc)."', '".time()."') ") or die(mysql_error()); */ ################################################################################################################ ################################################################################################################ //////////////////////////////////////////////////////////////////////////////////////////////////////////////// include_once("includes/indexfunctions.php"); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// ################################################################################################################ ################################################################################################################ if (empty($user['uitleg']) && $login){ $update = "UPDATE users SET uitleg='1' WHERE loginnaam='".$user['loginnaam']."'"; mysql_query($update); $user['uitleg'] = 1; } if ($_GET['uitleg']=="uit" && $login){ ///// uitleg = 2 = uitleg = uit $update = "UPDATE users SET uitleg='2' WHERE loginnaam='".$user['loginnaam']."'"; mysql_query($update); header("location: ".$_SERVER['HTTP_REFERER']); } else if ($_GET['uitleg']=="aan" && $login){ ///// uitleg = 1 = uitleg = aan $update = "UPDATE users SET uitleg='1' WHERE loginnaam='".$user['loginnaam']."'"; mysql_query($update); header("location: ".$_SERVER['HTTP_REFERER']); } else if ($_GET['uitleg']=="switch" && $login){ ///// uitleg = 1 = uitleg = aan if ($user['uitleg'] == "1"){ $update = "UPDATE users SET uitleg='2' WHERE loginnaam='".$user['loginnaam']."'"; } else { $update = "UPDATE users SET uitleg='1' WHERE loginnaam='".$user['loginnaam']."'"; } mysql_query($update); header("location: ?uitleg=switched"); } else if ($_GET['uitleg'] && !$login){ header("location: ".$_SERVER['HTTP_REFERER']); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////// //if ($_GET['limit']=="uit"){ if ($_GET['limit']=="aan"){ setcookie('limit',"uit"); header("location: ".$_SERVER['HTTP_REFERER']); //} else if ($_GET['limit']=="aan"){ } else if ($_GET['limit']=="uit"){ setcookie('limit',""); header("location: ".$_SERVER['HTTP_REFERER']); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////// if ($_GET['grafieken']=="uit"){ setcookie('geen_grafieken',"1",time()+60*60*24*30); header("location: ".$_SERVER['HTTP_REFERER']); } else if ($_GET['grafieken']=="aan"){ setcookie('geen_grafieken',""); header("location: ".$_SERVER['HTTP_REFERER']); } ################################################################################################################ ################################################################################################################ //////////////////////////////////////////////////////////////////////////////////////////////////////////////// include_once("includes/includelist.php"); //////////////////////////////////////////////////////////////////////////////////////////////////////////////// ################################################################################################################ ################################################################################################################ ?>
Help ons verbeteren en vul onze enquete in! |