Re: Awards Mod
CREATE TABLE IF NOT EXISTS `awards` (
`userid` int(11) NOT NULL DEFAULT '0',
`type` int(11) NOT NULL,
KEY `userid` (`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
Add in header.php
$select= mysql_query(sprintf("SELECT * FROM awards WHERE userid= %u AND type= %s ", $userid , abs(@intval($ir['level'])) ));
if(mysql_num_rows($select))
{
}
else
{
$level = array(5 , 10 , 15 , 25 , 50 , 100 , 150);
$lev = $ir['level'];
if(in_array($ir['level'],$level))
{
mysql_query(sprintf("UPDATE users SET awards = awards + 2 WHERE (userid = %u) " , $userid));
mysql_query(sprintf("INSERT INTO awards values (%u , %u ) " , $userid , $lev ));
}
}
Thats for the level you can just edit that for anything else, or if you cant ill do it for you.
NOTE: I don't know of a more efficient way of doing it, If you know of a better way please post