NagpurPulse.com Top Contributors

“.date(“M Y”).”

“;
if($_GET[“m”]) {
$monthStart = mktime(0,0,0,$_GET[“m”],1,date(“Y”));
$monthEnd = mktime(0,0,-1,$_GET[“m”]+1,1,date(“Y”));
} else {
$monthStart = mktime(0,0,0,date(“m”),1,date(“Y”));
$monthEnd = mktime(0,0,-1,date(“m”)+1,1,date(“Y”));
}

$header = array(“User”,”Points”);
$sql = “SELECT uid, SUM(points) as points FROM userpoints_txn WHERE status = 0 AND uid>1
AND (time_stamp > $monthStart AND time_stamp< $monthEnd) GROUP BY uid ORDER BY points DESC LIMIT 0,25 "; $res = db_query($sql); while($nd = db_fetch_object($res)) { $uid = $nd->uid;
$usr = user_load(array(“uid”=>$uid));
$points = $nd->points;

$rows[] = array(l($usr->name,”user/{$usr->uid}”),$points);
}
echo theme(‘table’, $header, $rows);

echo “

All Time

{$allTime[content]}

“;
?>

“.date(“M Y”).”

“;
if($_GET[“m”]) {
$monthStart = mktime(0,0,0,$_GET[“m”],1,date(“Y”));
$monthEnd = mktime(0,0,-1,$_GET[“m”]+1,1,date(“Y”));
} else {
$monthStart = mktime(0,0,0,date(“m”),1,date(“Y”));
$monthEnd = mktime(0,0,-1,date(“m”)+1,1,date(“Y”));
}

$header = array(“User”,”Points”);
$sql = “SELECT uid, SUM(points) as points FROM userpoints_txn WHERE status = 0 AND uid>1
AND (time_stamp > $monthStart AND time_stamp< $monthEnd) GROUP BY uid ORDER BY points DESC LIMIT 0,25 "; $res = db_query($sql); while($nd = db_fetch_object($res)) { $uid = $nd->uid;
$usr = user_load(array(“uid”=>$uid));
$points = $nd->points;

$rows[] = array(l($usr->name,”user/{$usr->uid}”),$points);
}
echo theme(‘table’, $header, $rows);

echo “

All Time

{$allTime[content]}

“;
?>