• Login
  • Register
  • Zoek
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Filebase Entry
  • More Options

ICTscripters

Dé plek voor IT

Dé plek voor IT

Login

Geavanceerde opties
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Home
  2. Forum
    1. Alle berichten
    2. Recente activiteiten
  3. ICT Nieuws
  4. Blog
  5. Marktplaats
    1. Werk
    2. Advertenties
    3. Domeinnamen
    4. Websites
    5. Design & lay-outs
    6. Scripts
    7. Overige
  6. Design
  7. Leden
    1. Actieve bezoekers
    2. Team
    3. Leden zoeken
  8. Downloads
  9. Goedkope domeinnamen
  1. Dé plek voor IT - ICTscripters
  2. Forum
  3. Scripting & programmeren
  4. Overige
  5. Archief
  6. Request

Forum

  • Beta-testers gezocht voor Crypto-oefenplatform

    Syntax 29 januari 2026 om 16:11
  • Na 15 jaar terug van weggeweest: iCriminals.nl is terug (BETA)!

    Syntax 19 januari 2026 om 09:34
  • Developer Gezocht

    Mikevdk 10 januari 2026 om 18:57
  • Op zoek naar de legends

    Syntax 5 januari 2026 om 13:50
  • [FREE] WeFact Hosting module

    Jeroen.G 13 oktober 2025 om 14:09
  • Help testers nodig voor android app Urgent

    urgentotservices 26 september 2025 om 10:21
  • Versio vervanger

    Jeroen.G 25 augustus 2025 om 15:56
  • Afspraken systeem met planbeperking

    Lijno 1 augustus 2025 om 23:04

Marktplaats

  • 321 Nieuwe Domeinnamen December 2025

    shiga 1 januari 2026 om 10:26
  • Meerdere mafia game template te koop

    Syntax 26 december 2025 om 00:07
  • Van een pixelige afbeelding naar een strakke, moderne website

    Syntax 21 december 2025 om 17:05

Tijd error

  • bboy
  • 19 mei 2010 om 18:13
  • bboy
    Professional
    Berichten
    1.166
    • 19 mei 2010 om 18:13
    • #1

    Hallo cp'ers,
    Ik krijg errors in mijn script,
    Ik heb al gezocht maar vind geen probleem?
    Errors:

    PHP
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 77
    
    
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 78
    
    
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 79
    
    
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 80
    
    
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 81
    
    
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 82
    
    
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 83
    
    
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 84
    
    
    Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 88
    
    
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 88
    
    
    Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 89
    
    
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 89
    
    
    Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 90
    
    
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 90
    
    
    Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 91
    
    
    Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:\xampp\htdocs\core.php on line 91
    Toon Meer


    Script:

    PHP
    <?php
    /*===================================================+
    || # HoloCMS - Website and Content Management System
    |+===================================================+
    || # Copyright © 2008 Meth0d. All rights reserved.
    || # http://www.meth0d.org
    |+===================================================+
    || # HoloCMS is provided "as is" and comes without
    || # warrenty of any kind. HoloCMS is free software!
    |+===================================================*/
    
    
    /** HOLOCMS MAINCORE
    * @author	Meth0d
    * @desc		Main HoloCMS Processor
    * @usage	N/A
    */
    
    
    define("IN_HOLOCMS", TRUE);
    session_start();
    
    
    // #########################################################################
    // Start the initalization process
    
    
    @include('./config.php');
    @include('../config.php');
    
    
    // Launch the installer if needed
    if(empty($sqlpassword) || empty($sqlusername) || empty($sqldb) || empty($sqlhostname)){
    	
    	header("location:install.php");
    	exit;
    	
    } else {
    	
    	if(file_exists('install.php')){
    		
    		echo "<h1>Security Alert</h1><hr>It appears you have already executed the installation script or written your configuration file. To start using your site, for security reasons, please delete install.php and/or upgrade.php from the HoloCMS directory to proceed. If you have not yet completed installation or wish to execute it again, please <a href='install.php'>click here</a>.<hr><i>HoloCMS</i>";
    		exit;
    		
    	} else {
    		
    		include('includes/mysql.php');
    		
    	}
    	
    }
    
    
    // Validate the langauge
    $language_path = "./".$language."index.php";
    $language_path_2 = "../".$language."index.php";
    
    
    if(file_exists($language_path) || file_exists($language_path_2)){
    	$valid_language = true;
    } else {
    	$language = "en";
    	$valid_language = false;
    } 
    
    
    // #########################################################################
    // Define the variables HoloCMS wants to use later on
    
    
    $remote_ip = $_SERVER[REMOTE_ADDR];
    $configsql = mysql_query("SELECT * FROM cms_system LIMIT 1") or die(mysql_error());
    $config = mysql_fetch_assoc($configsql);
    $enable_sso = $config['enable_sso'];
    $language = $config['language'];
    $sitename = $config['sitename'];
    $shortname = $config['shortname'];
    $ip = $config['ip'];
    $dcr = $config['dcr'];
    $port = FetchServerSetting('server_game_port');
    $fport = FetchServerSetting('server_mus_port');
    $texts = $config['texts'];
    $variables = $config['variables'];
    $reload_url = $config['reload_url'];
    $maintenance = $config['site_closed'];
    $H = date('H');
    $i = date('i');
    $s = date('s');
    $m = date('m');
    $d = date('d');
    $Y = date('Y');
    $j = date('j');
    $n = date('n');
    $today = $d;
    $month = $m;
    $year = $Y;
    $date_normal = date('d-m-Y',mktime($m,$d,$Y));
    $date_reversed = date('Y-m-d', mktime($m,$d,$y));
    $date_full = date('d-m-Y H:i:s',mktime($H,$i,$s,$m,$d,$Y));
    $date_time = date('H:i:s',mktime($H,$i,$s));
    $date_hc = "".$j."-".$n."-".$Y."";
    $regdate = $date_normal;
    $s1ql = mysql_query("SELECT * FROM system LIMIT 1");
    $r1ow = mysql_fetch_assoc($s1ql);
    $online_count = $r1ow['onlinecount'];
    $server_on_localhost = $config['localhost'];
    $habboversion = "23_deebb3529e0d9d4e847a31e5f6fb4c5b/9";
    
    
    // #########################################################################
    
    
    function FetchServerSetting($strSetting, $switch = false){
    
    
    	$tmp = mysql_query("SELECT sval FROM system_config WHERE skey = '".$strSetting."' LIMIT 1") or die(mysql_error());
    	$tmp = mysql_fetch_assoc($tmp);
    	
    	if($switch !== true){
    		return $tmp['sval'];
    	} elseif($switch == true && $tmp['sval'] == "1"){
    		return "Enabled";
    	} elseif($switch == true && $tmp['sval'] !== "1"){
    		return "Disabled";
    	}
    
    
    }
    
    
    // #########################################################################
    
    
    function getContent($strKey){
    
    
    	$tmp = mysql_query("SELECT contentvalue FROM cms_content WHERE contentkey = '".addslashes($strKey)."' LIMIT 1") or die(mysql_error());
    	$tmp = mysql_fetch_assoc($tmp);
    	return $tmp['contentvalue'];
    
    
    }
    
    
    // #########################################################################
    
    
    function FetchCMSSetting($strSetting){
    
    
    	$tmp = mysql_query("SELECT ".$strSetting." FROM cms_system LIMIT 1") or die(mysql_error());
    	$tmp = mysql_fetch_assoc($tmp);
    	return $tmp[$strSetting];
    
    
    }
    
    
    // #########################################################################
    // If a user is logged out and has a 'remember me' cookie, validate the information
    // in the cookie and log the user in if everything's valid.
    // Please do not mess with this. It is a fairly simple process, but if it doesn't work
    // properly it can cause a huge mess. Everything in this function is commented.
    
    
    if(!session_is_registered(username) && $_COOKIE['remember'] == "remember"){
    
    
    	// Get variables stored in cookies; the username and sha1 hashed password
    	$cname = addslashes($_COOKIE['rusername']);
    	$cpass_hash = $_COOKIE['rpassword'];
    
    
    	// Now fetch the password that belongs to this user from the database
    	$csql = mysql_query("SELECT password FROM users WHERE name = '".$cname."' LIMIT 1") or die(mysql_error());
    	$cnum = mysql_num_rows($csql);
    
    
    		// If no results are returned (invalid username, destroy the cookie
    		if($cnum < 1){
    			setcookie("remember", "", time()-60*60*24*100, "/"); setcookie("cookpass", "", time()-60*60*24*100, "/");
    			setcookie("rusername", "", time()-60*60*24*100, "/"); setcookie("cookpass", "", time()-60*60*24*100, "/");
    			setcookie("rpassword", "", time()-60*60*24*100, "/"); setcookie("cookpass", "", time()-60*60*24*100, "/");
    		} else {
    
    
    			// We found a user, now get his password and hash it
    			$crow = mysql_fetch_assoc($csql);
    			$correct_pass = sha1("zomq".$crow['password']);
    
    
    			// Check if the hashed database password and hash in the cookie match
    			// If no, destroy the cookie. If yes, log the user in.
    			if($cpass_hash == $correct_pass){
    				$_SESSION['username'] = $cname;
    				$_SESSION['password'] = $crow['password'];
    				mysql_query("UPDATE users SET lastvisit = '".$date_full."' WHERE name = '" . $cname . "'") or die(mysql_error());
    				header("Location: security_check.php");
    				exit;
    			} else {
    				setcookie("remember", "", time()-60*60*24*100, "/"); setcookie("cookpass", "", time()-60*60*24*100, "/");
    				setcookie("rusername", "", time()-60*60*24*100, "/"); setcookie("cookpass", "", time()-60*60*24*100, "/");
    				setcookie("rpassword", "", time()-60*60*24*100, "/"); setcookie("cookpass", "", time()-60*60*24*100, "/");
    			}
    
    
    		}
    
    
    }
    
    
    // #########################################################################
    
    
    function IsEven($intNumber)
    {
    	if($intNumber % 2 == 0){
    		return true;
    	} else {
    		return false;
    	}
    }
    
    
    // #########################################################################
    
    
    function bbcode_format($str){
    	
    	// Parse smilies
    	if(getContent('enable-smilies') == "1"){
    		$str = str_replace(":)", " <img src='./web-gallery/smilies/smile.gif' alt='Smiley' title='Smiley' border='0'> ", $str);
    		$str = str_replace(";)", " <img src='./web-gallery/smilies/wink.gif' alt='Smiley' title='Smiley' border='0'> ", $str);
    		$str = str_replace(":P", " <img src='./web-gallery/smilies/tongue.gif' alt='Smiley' title='Smiley' border='0'> ", $str);
    		$str = str_replace(";P", " <img src='./web-gallery/smilies/winktongue.gif' alt='Smiley' title='Smiley' border='0'> ", $str);
    		$str = str_replace(":p", " <img src='./web-gallery/smilies/tongue.gif' alt='Smiley' title='Smiley' border='0'> ", $str);
    		$str = str_replace(";p", " <img src='./web-gallery/smilies/winktongue.gif' alt='Smiley' title='Smiley' border='0'> ", $str);
    		$str = str_replace("(L)", " <img src='./web-gallery/smilies/heart.gif' alt='Smiley' title='Smiley' border='0'> ", $str);
    		$str = str_replace("(l)", " <img src='./web-gallery/smilies/heart.gif' alt='Smiley' title='Smiley' border='0'> ", $str);
    		$str = str_replace(":o", " <img src='./web-gallery/smilies/shocked.gif' alt='Smiley' title='Smiley' border='0'> ", $str);
    		$str = str_replace(":O", " <img src='./web-gallery/smilies/shocked.gif' alt='Smiley' title='Smiley' border='0'> ", $str);
    	}
    
    
    	// Parse BB code
            $simple_search = array(
                                    '/\[b\](.*?)\[\/b\]/is',                                
                                    '/\[i\](.*?)\[\/i\]/is',                                
                                    '/\[u\](.*?)\[\/u\]/is',                                
                                    '/\[s\](.*?)\[\/s\]/is',                                                                
                                    '/\[quote\](.*?)\[\/quote\]/is',
                                    '/\[link\=(.*?)\](.*?)\[\/link\]/is',
                                    '/\[url\=(.*?)\](.*?)\[\/url\]/is',
                                    '/\[color\=(.*?)\](.*?)\[\/color\]/is',
                                    '/\[size=small\](.*?)\[\/size\]/is',                                
                                    '/\[size=large\](.*?)\[\/size\]/is',
                                    '/\[code\](.*?)\[\/code\]/is'
                                    );
    
    
            $simple_replace = array(
                                    '<strong>$1</strong>',
                                    '<em>$1</em>',
                                    '<u>$1</u>',
                                    '<s>$1</s>',
                                    "<div class='bbcode-quote'>$1</div>",
                                    "<a href='$1'>$2</a>",
                                    "<a href='$1'>$2</a>",
                                    "<font color='$1'>$2</font>",
                                    "<font size='1'>$1</font>",
                                    "<font size='3'>$1</font>",
                                    '<pre>$1</pre>'
                                    );
    
    
            $str = preg_replace ($simple_search, $simple_replace, $str);
    
    
            return $str;
    }
    
    
    // #########################################################################
    
    
    function GenerateTicket(){
    	
    	$data = "ST-";
    	
    	for ($i=1; $i<=6; $i++){
    		$data = $data . rand(0,9);		
    	}
    	
    	$data = $data . "-";
    	
    	for ($i=1; $i<=20; $i++){
    		$data = $data . rand(0,9);	
    	}
    	
    	$data = $data . "-holo-fe";
    	$data = $data . rand(0,5);
    	
    	return $data;
    }
    
    
    // #########################################################################
    
    
    if(session_is_registered('username')){
    
    
    	$rawname = $_SESSION['username']; // Has slashes added and lacking proper capitals
    	$rawpass = $_SESSION['password']; // HoloHash()'ed user password
    
    
    	$usersql = mysql_query("SELECT * FROM users WHERE name = '".$rawname."' AND password = '".$rawpass."' LIMIT 1");
    	$myrow = mysql_fetch_assoc($usersql);
    
    
    	$password_correct = mysql_num_rows($usersql);
    
    
    	$my_id = $myrow['id'];
    	$user_rank = $myrow['rank'];
    
    
    	$check = mysql_query("SELECT * FROM users_bans WHERE userid = '".$my_id."' OR ipaddress = '".$remote_ip."' LIMIT 1") or die(mysql_error());
    	$is_banned = mysql_num_rows($check);
    
    
    	if($password_correct !== 1){ // Invalid credentials. Possible session hijack attempt, so we log the user out.
    		
    		session_destroy();
    		header("location:index.php?error=1");
    		exit;
    		
    	} elseif($is_banned > 0){
    		
    		$bandata = mysql_fetch_assoc($check);
    		$reason = $bandata['descr'];
    		$expire = $bandata['date_expire'];
    
    
    		$xbits = explode(" ", $expire);
    		$xtime = explode(":", $xbits[1]);
    		$xdate = explode("-", $xbits[0]);
    
    
    		$stamp_now = time();
    		$stamp_expire = mktime($xtime[0], $xtime[1], $xtime[2], $xdate[0], $xdate[1], $xdate[2]);
    	
    		if($stamp_now < $stamp_expire){
    			
    			$login_error = "You have been banned! The reason for this ban is \"" . $reason . "\". The ban will expire at " . $expire . ".";
    			include('logout.php');
    			session_destroy();
    			exit;
    			
    		} else {
    			
    			// ban expired
    			mysql_query("DELETE FROM users_bans WHERE userid = '".$my_id."' OR ipaddress = '".$remote_ip."' LIMIT 1") or die(mysql_error());
    			
    		}
    	}
    
    
    	if($enable_sso == 1 && $password_correct == 1){
    		
    		$myticket = $myrow['ticket_sso'];
    
    
    		if(empty($myticket) || $myticket == "0" || strlen($myticket) < 39){
    			$myticket = GenerateTicket();
    			mysql_query("UPDATE users SET ticket_sso = '".$myticket."', ipaddress_last = '".$remote_ip."' WHERE id = '".$my_id."' LIMIT 1") or die(mysql_error());
    		}
    
    
    	} else {
    		$myticket = "ST-NoTicketToGenerate-holo-fe";
    	}
    	
    	$logged_in = true;
    	$name = stripslashes($myrow['name']);
    	
    } else {
    	
    	$user_rank = 0;
    	$name = "Guest";
    	$my_id = "GUEST";
    	$myticket = "ST-Guest-holo-fe";
    	$logged_in = false;
    	
    }
    
    
    // #########################################################################
    
    
    if($enable_status_image == 1){
    	if($server_on_localhost !== 0 || $ip == "127.0.0.1"){
    		$server = "127.0.0.1";
    	} else {
    		$fip = $ip;
    	}
    	
    	$fp = @fsockopen($fip, $fport, $errno, $errstr, 1);
    	
    	if($fp){
    		$online = "online";
    		fclose($fp);
    	} else {
    		$online = "offline";
    	}
    } else {
    	$online = "online";
    }
    
    
    // #########################################################################
    
    
    if($user_rank > 5){
    	if(session_is_registered(hkusername) && session_is_registered(hkpassword)){
    		$rank['iAdmin'] = "1";
    	} else {
    		$rank['iAdmin'] = "0";
    	}
    } else {
    	$rank['iAdmin'] = "0";
    }
    
    
    // #########################################################################
    
    
    function GetUserBadge($strName){ // supports user IDs also
    	
    	if(is_numeric($strName)){
    		$check = mysql_query("SELECT id FROM users WHERE id = '".$strName."' AND badge_status = '1' LIMIT 1") or die(mysql_error());
    	} else {
    		$check = mysql_query("SELECT id FROM users WHERE name = '".addslashes($strName)."' AND badge_status = '1' LIMIT 1") or die(mysql_error());
    	}
    	
    	$exists = mysql_num_rows($check);
    
    
    		if($exists > 0){
    			$usrrow = mysql_fetch_assoc($check);
    			$check = mysql_query("SELECT * FROM users_badges WHERE userid = '".$usrrow['id']."' AND iscurrent = '1' LIMIT 1") or die(mysql_error());
    			$hasbadge = mysql_num_rows($check);
    			if($hasbadge > 0){
    				$badgerow = mysql_fetch_assoc($check);
    				return $badgerow['badgeid'];
    			} else {
    				return false;
    			}
    		} else {
    			return false;
    		}
    }
    
    
    // #########################################################################
    
    
    function GetUserGroup($my_id){
    $check = mysql_query("SELECT groupid FROM groups_memberships WHERE userid = '".$my_id."' AND is_current = '1' LIMIT 1") or die(mysql_error());
    $has_fave = mysql_num_rows($check);
    
    
    	if($has_fave > 0){
    
    
    		$row = mysql_fetch_assoc($check);
    		$groupid = $row['groupid'];
    
    
    		return $groupid;
    
    
    	} else {
    
    
    		return false;
    
    
    	}
    }
    
    
    // #########################################################################
    
    
    function GetUserGroupBadge($my_id){
    $check = mysql_query("SELECT groupid FROM groups_memberships WHERE userid = '".$my_id."' AND is_current = '1' LIMIT 1") or die(mysql_error());
    $has_badge = mysql_num_rows($check);
    
    
    	if($has_badge > 0){
    
    
    		$row = mysql_fetch_assoc($check);
    		$groupid = $row['groupid'];
    
    
    		$check = mysql_query("SELECT badge FROM groups_details WHERE id = '".$groupid."' LIMIT 1") or die(mysql_error());
    
    
    		$row = mysql_fetch_assoc($check);
    		$badge = $row['badge'];
    
    
    		return $badge;
    
    
    	} else {
    
    
    		return false;
    
    
    	}
    }
    
    
    // #########################################################################
    
    
    // Calculate the amount of HC Days left
    function HCDaysLeft($my_id){
    
    
    	// Query for the info we need to calculate
    	$sql = mysql_query("SELECT months_left,date_monthstarted FROM users_club WHERE userid = '".$my_id."' LIMIT 1") or die(mysql_error());
    	$tmp = mysql_fetch_assoc($sql);
    	$valid = mysql_num_rows($sql);
    
    
    	if($valid > 0){
    
    
    		// Collect the variables we need from the query result
    		$months_left = $tmp['months_left'];
    		$month_started = $tmp['date_monthstarted'];
    
    
    		// We take 31 days for every month left, assuming each month has 31 days
    		$days_left = $months_left * 31;
    
    
    		// Split up the day/month/year so we can use it with mktime
    		$tmp = explode("-", $month_started);
    		$day = $tmp[0];
    		$month = $tmp[1];
    		$year = $tmp[2];
    
    
    		// First of all make the dates we want to compare, do some math
    		$then = mktime(0, 0, 0, $month, $day, $year, 0);
    		$now = time();
    		$difference = $now - $then;
    
    
    		// If this month expired already
    		if ($difference < 0){
    			$difference = 0;
    		}
    
    
    		// Now do some math
    		$days_expired = floor($difference/60/60/24);
    
    
    		// $days_expired stands for the days we already wasted in this month
    		// 31 days for each month added together, minus the days we've wasted in the current month, is the amount of days we have left, totally
    		$days_left = $days_left - $days_expired;
    
    
    		return $days_left;
    
    
    	} else {
    		return 0;
    	}
    }
    
    
    // #########################################################################
     
    if($maintenance == "1" && !$is_maintenance && $rank['iAdmin'] < 1){
    	header("Location: maintenance.php");
    	exit;
    } elseif($rank['iAdmin'] == 1 && $maintenance == 1){
    	$notify_maintenance = true;
    }
    
    
    // #########################################################################
    
    
    function IsHCMember($my_id){
    	if(HCDaysLeft($my_id) > 0 ){
    		return true;
    	} else {
    		// Make sure that HC members are _not_ rank 2 and that they do not have their gay little badge
    		$check = mysql_query("SELECT * FROM users_club WHERE userid = '".$my_id."' LIMIT 1");
    		$clubrecord = mysql_num_rows($check);
    		if($clubrecord > 0){
    			mysql_query("UPDATE users SET badge_status = '0' WHERE id = '".$my_id."' LIMIT 1") or die(mysql_error());
    			mysql_query("UPDATE users SET rank = '1' WHERE id = '".$my_id."' AND rank = '2' LIMIT 1") or die(mysql_error());
    			mysql_query("DELETE FROM users_badges WHERE badgecode = 'HC1' OR badgeid = 'HC2' AND userid = '".$my_id."' LIMIT 1");
    			mysql_query("DELETE FROM users_club WHERE userid = '".$my_id."' LIMIT 1") or die(mysql_error());
    			if(function_exists(SendMUSData) !== true){ include('includes/mus.php'); }
    			@SendMUSData('UPRS' . $my_id);
    		}
    		return false;
    	}
    }
    
    
    // #########################################################################
    
    
    function GiveHC($user_id, $months){
    	
    $sql = mysql_query("SELECT * FROM users_club WHERE userid = '".$user_id."' LIMIT 1") or die(mysql_error());
    $valid = mysql_num_rows($sql);
    
    
    	if($valid > 0){
    		mysql_query("UPDATE users SET rank = '2' WHERE rank = '1' AND id = '".$user_id."' LIMIT 1") or die(mysql_error());
    		mysql_query("UPDATE users_club SET months_left = months_left + ".$months." WHERE userid = '".$user_id."' LIMIT 1") or die(mysql_error());
    		$check = mysql_query("SELECT * FROM users_badges WHERE badgeid = 'HC1' AND userid = '".$user_id."' LIMIT 1") or die(mysql_error());
    		$found = mysql_num_rows($check);
    		if($found !== 1){ // No badge. Poor thing.
    			mysql_query("UPDATE users SET badge_status = '0' WHERE id = '".$user_id."' LIMIT 1") or die(mysql_error());
    			mysql_query("UPDATE users_badges SET iscurrent = '0' WHERE userid = '".$user_id."'") or die(mysql_error());
    			mysql_query("INSERT INTO users_badges (userid,badgeid,iscurrent) VALUES ('".$user_id."','HC1','1')") or die(mysql_error());
    		}
    	} else {
    		$m = date('m');
    		$d = date('d');
    		$Y = date('Y');
    		$date = date('d-m-Y', mktime($m,$d,$Y));
    		mysql_query("INSERT INTO users_club (userid,date_monthstarted,months_expired,months_left) VALUES ('".$user_id."','".$date."','0','0')") or die(mysql_error());
    		GiveHC($user_id, $months);
    	}
    	
    	if(function_exists(SendMUSData) !== true){ include('includes/mus.php'); }
    	@SendMUSData('UPRS' . $user_id);
    	@SendMUSData('UPRC' . $user_id);
    }
    
    
    // #########################################################################
    
    
    if(session_is_registered(username)){
    $blob = time();
    mysql_query("UPDATE users SET online = '".$blob."', ipaddress_last = '".$remote_ip."' WHERE id = '".$my_id."' LIMIT 1") or die(mysql_error());
    	//if($phail == true){
    	//echo "<b>Please wait..</b><br />Please wait while we update your HoloDB compatability..<br />";
    	//mysql_query("ALTER TABLE `users` ADD `online` TEXT NOT NULL ;") or die(mysql_error());
    	//echo "Done! Please reload this page to proceed. You will not see this message again.";
    	//exit;
    	//}
    }
    
    
    // #########################################################################
    
    
    function IsUserOnline($intUID){
    $result = mysql_query("SELECT online FROM users WHERE id = '".$intUID."' LIMIT 1") or die(mysql_error());
    $timeout = 600; // 10 minutes ?
    
    
    	if(mysql_num_rows($result) < 1){
    		return false;
    	} else {
    		$result = mysql_fetch_array($result);
    		$result = $result[0];
    		$result = $result + $timeout;
    		if($result >= time()){
    			return true;
    		} else {
    			return false;
    		}
    	}	
    }
    
    
    // #########################################################################
    
    
    function IsUserBanned($my_id){
    	
    	$check = mysql_query("SELECT * FROM users_bans WHERE userid = '".$my_id."' LIMIT 1") or die(mysql_error());
    	$is_banned = mysql_num_rows($check);
    	
    	if(!is_numeric($my_id)){ return false; }
    
    
    	if($is_banned > 0){
    		$bandata = mysql_fetch_assoc($check);
    		$reason = $bandata['descr'];
    		$expire = $bandata['date_expire'];
    
    
    		$xbits = explode(" ", $expire);
    		$xtime = explode(":", $xbits[1]);
    		$xdate = explode("-", $xbits[0]);
    
    
    		$stamp_now = time();
    		$stamp_expire = mktime($xtime[0], $xtime[1], $xtime[2], $xdate[0], $xdate[1], $xdate[2]);
    	
    		if($stamp_now < $stamp_expire){
    			return true;
    		} else { // ban expired
    			mysql_query("DELETE FROM users_bans WHERE userid = '".$my_id."' LIMIT 1") or die(mysql_error());
    			return false;
    		}
    	} else {
    		return false;
    	}
    }
    
    
    // #########################################################################
    
    
    function mysql_evaluate($query, $default_value="undefined") {
    	$result = mysql_query($query) or die(mysql_error());
    
    
    	if(mysql_num_rows($result) < 1){
    		return $default_value;
    	} else {
    		return mysql_result($result, 0);
    	}
    }
    
    
    // #########################################################################
    
    
    @include('./includes/inc.crypt.php');
    @include('../includes/inc.crypt.php');
    @include('./includes/version.php');
    @include('../includes/version.php'); 
    
    
    ?>
    Toon Meer


    Groeten, Bboy

    Groeten bboy,

  • Guest, wil je besparen op je domeinnamen? (ad)
  • R.Jipping
    ex Administrator
    Ontvangen Reacties
    1
    Berichten
    1.660
    • 19 mei 2010 om 19:16
    • #2

    Bij de foutmeldings staat precies wat je moet doen?

    This is ten percent luck, twenty percent skill
    Fifteen percent concentrated power of will
    Five percent pleasure, fifty percent pain
    And a hundred percent reason to remember the name!

  • diestro
    Professional
    Ontvangen Reacties
    7
    Berichten
    850
    • 19 mei 2010 om 19:29
    • #3

    Ik snap inderdaad niet waarom je dit vraagt als de error precies verteld wat je moet doen om het optelossen.

    JooFa - Webdesign Assen

  • bboy
    Professional
    Berichten
    1.166
    • 19 mei 2010 om 19:53
    • #4

    hoezo?

    Groeten bboy,

  • Stefan.J
    Master
    Ontvangen Reacties
    9
    Berichten
    2.358
    • 19 mei 2010 om 20:01
    • #5

    Ik zal je helpen:

    Citaat

    It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Paris' for '2.0/DST' instead in C:xampphtdocscore.php on line 77

    Het is niet veilig om te vertrouwen op de standaard tijdzone instellingen. Je bent 'verplicht' om gebruik te maken date.timezone instelling, of de functie date_default_timezone_set(). Wanneer je al gebruik maakt van de instelling of de functie, heb je waarschijnlijk een spellingsfout gemaakt in de tijdzone definitie. We hebben 'Europe/Paris' voor '2.0/DST' geselecteerd in plaats van de (ontbrekende) instelling.

  • bboy
    Professional
    Berichten
    1.166
    • 20 mei 2010 om 17:06
    • #6

    Maar ik begrijp niet hoe ik het moet oplossen?

    Groeten bboy,

  • Jannick
    nyan nyan nyan nyan
    Berichten
    1.972
    • 20 mei 2010 om 18:02
    • #7

    bboy Kom op kind, zoek op Google naar "Tijdzone PHP", eventueel op Europa of Europa/Amsterdam

    Na 20 seconden speurwerk - en tig geërgerde CP'ers - kom je dit tegen:

    PHP
    date_default_timezone_set('Europe/Amsterdam');

    Tadah

  • bboy
    Professional
    Berichten
    1.166
    • 20 mei 2010 om 18:14
    • #8

    Weet ik maar ik ken niks van php,
    Ik weet dus niet waar ik dit moet veranderen?En hoe veranderen?

    Groeten bboy,

  • Extreme
    Intermediate
    Berichten
    474
    • 20 mei 2010 om 18:36
    • #9

    dat stukje code van jannick plaats je bovenaan je phpcode.
    De eerste pagina die wordt geladen. Vermoedelijk je config plaats je dat in.

    Hosting Network Services. Special Firewalled hosting for crime games.
    ******
    Msn:** Stuur maar PM.

Participate now!

Heb je nog geen account? Registreer je nu en word deel van onze community!

Maak een account aan Login

ICT Nieuws

  • Fijne feestdagen

    tcbhome 28 december 2025 om 13:55
  • Kritieke update voor Really Simple Security-plug-in

    K.Rens 16 november 2024 om 16:12
  • ING Nederland streeft naar ondersteuning van Google Pay tegen eind februari

    K.Rens 2 november 2024 om 16:09

Blogs

  • Functioneel ontwerp

    Dees 28 december 2014 om 12:38
  • Access Control List implementatie in PHP/MySQL - deel 1/2

    FangorN 28 december 2018 om 12:35
  • Access Control List implementatie in PHP/MySQL - deel 2/2

    FangorN 29 december 2018 om 12:37

Gebruikers die dit topic bekijken

  • 1 Gasten
  1. Marktplaats
  2. Design
  3. Voorwaarden
  4. Ons team
  5. Leden
  6. Geschiedenis
  7. Regels
  8. Links
  9. Privacy Policy
ICTscripters ©2005 - 2026 , goedkope hosting door DiMoWeb.com, BE0558.915.582
Sponsors: Beste kattenhotel provincie Antwerpen | Beste Zetes eid kaartlezer webshop
Style: Nexus by cls-design
Stylename
Nexus
Manufacturer
cls-design
Licence
Commercial styles
Help
Supportforum
Visit cls-design