[제나플러스] 지난달 포인트 랭킹
본문
<?
include_once("./_common.php");
include_once("$g4[path]/head.sub.php");
echo "<script language=\"javascript\" src=\"$g4[path]/js/sideview.js\"></script>\n";
$year = date("Y");
$month = date("m");
$day = date("d");
$tmp = mktime(0, 0, 0, $month - 1, $day, $year, 0);
$nowdate = date("Y-m",$tmp); // 今月
$sYear = substr($nowdate, 0, 4)."年";
$sMonth = substr($nowdate,5,2)."月";
$sql = "SELECT * , COUNT(B.mb_id ) AS count, SUM( B.po_point ) AS point
FROM $g4[member_table] as A
LEFT JOIN $g4[point_table] as B ON ( A.mb_id = B.mb_id AND A.mb_level > 1 AND A.mb_level < 10 AND A.mb_point >= 0) where date_format(B.po_datetime,'%Y-%m') = '$nowdate' group by B.mb_id order by point desc LIMIT 0, 5 ";
$result = sql_query($sql);
?>
<table width=100% cellpadding=0 cellspacing=0 bgcolor="721625">
<tr>
<td height='25' align="left" style="padding:0 0 0 10;">
<font color=ffffff>■ <?=$sMonth?> 랭킹</font>
</td>
</tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="2" bgcolor="646464">
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="3" bgcolor="FFFFFF">
<tr>
<td align="center" valign="top" bgcolor="FFFFFF" style="padding:0px">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<?
for ($i=1; $row=sql_fetch_array($result); $i++)
{
$name = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
$point = number_format($row[point]);
$mb_point= number_format($row[mb_point]);
?>
<tr>
<td width="5" height="24"></td>
<td align="left">
<img src="<?=$g4['path']?>/include/point_new_rank/rank/<?=$i?>.gif" border="0" align=absmiddle>
<?=$row[mb_id]?></td>
</tr>
<?}?>
</table>
</td></tr>
</table>
</td></tr>
</table>
댓글목록 0
등록된 댓글이 없습니다.