<?php

	if($cron_pass != "secretcronpassword")
	exit;

$dbres	=	mysql_query("SELECT `login`,`rank` FROM `gebruiker` WHERE `rank`!='Junkie' AND `rank`!='Straatrat' AND `rank`!='Dief' AND `level`!='-2' AND `level`!='-1' AND `level`!='0'");

mysql_query("UPDATE `gebruiker` SET `link2`='1',`link4`='1'");
	while($user = mysql_fetch_object($dbres)){

		if($user->rank == "Wietkweker"){
		$aantal		=	50;
		} else if($user->rank == "Drugsdealer"){
		$aantal		=	100;
		} else if($user->rank == "Gangster"){
		$aantal		=	150;
		} else if($user->rank == "Handelaar"){
		$aantal		=	200;
		} else if($user->rank == "Arbeider"){
		$aantal		=	250;
		} else if($user->rank == "Manager"){
		$aantal		=	300;
		} else if($user->rank == "Baas Stadsnetwerk"){
		$aantal		=	350;
		} else if($user->rank == "Huurmoordenaar"){
		$aantal		=	400;
		} else if($user->rank == "Nationaal crimineel"){
		$aantal		=	500;
		} else if($user->rank == "Internationaal Crimineel"){
		$aantal		=	600;
		} else if($user->rank == "Lid Grote Raad"){
		$aantal		=	750;
		}
	mysql_query("UPDATE `gebruiker` SET `punten`=`punten`+'$aantal' WHERE `login`='{$user->login}'");
	}

mysql_query("UPDATE `spel_statestieken` SET `link1`='0'");
mysql_query("UPDATE `spel_statestieken` SET `link2`='0'");
mysql_query("UPDATE `spel_statestieken` SET `link3`='0'");
mysql_query("UPDATE `spel_statestieken` SET `link4`='0'");


?>