<?
$next_level = fetch("SELECT * FROM `levels` WHERE `level`=".intval($pers["level"]+1));
$need_exp = $next_level["exp"]-$pers["exp"];
if ($need_exp<=0):
	query ("UPDATE users SET level=level+1, money=money+".$next_level["money"].", f_stats=f_stats+".$next_level["stats"].", p_um=p_um+".$next_level["p_um"].", m_um=m_um+".$next_level["m_um"].", f_um=f_um+".$next_level["f_um"]." WHERE uid=".UID);	
endif;
?>