그누보드 [G4] 이번달 포인트 순위 보이기
페이지 정보
본문
이번달 포인트 순위를 보여줍니다.
<table width="186" border="0" cellspacing="0" cellpadding="0">
<?php
//if ($member[mb_id] == 'happyjung') {
$point_nowdate = date("Y-m",time()); // 이번달
$point_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 <= 10 and A.mb_point >= 0)
where date_format(B.po_datetime,'%Y-%m') = '$point_nowdate' group by B.mb_id order by point desc LIMIT 0, 5 ";
where date_format(B.po_datetime,'%Y-%m') = '$point_nowdate' group by B.mb_id order by point desc LIMIT 0, 5 ";
$point_result = sql_query($point_sql);
//echo $point_sql;
?>
<tr>
<td height="22"> </td>
</tr>
<tr>
<td><img src="img/ranking_title.jpg"></td>
</tr>
<tr>
<td style="padding:5px 0 5px 0;" align="right">( <?php echo substr($point_nowdate, 0, 4)."년"; ?> <?php echo substr($point_nowdate,5,2)."월"; ?> )</td>
</tr>
<tr>
<td><table width="186" border="0" cellspacing="1" cellpadding="0">
<col width="25" />
<col />
<col width="30" />
<?php
<col />
<col width="30" />
<?php
for ($i=1; $point_row=sql_fetch_array($point_result); $i++)
{
$point_name = get_sideview($point_row[mb_id], $point_row[mb_id], $point_row[mb_email], $point_row[mb_homepage]); // 아이디
//$point_name = get_sideview($point_row[mb_name], $point_row[mb_id], $point_row[mb_email], $point_row[mb_homepage]); // 이름
//$point_name = get_sideview($point_row[mb_nick], $point_row[mb_id], $point_row[mb_email], $point_row[mb_homepage]); // 닉네임
//$point_mb_point= number_format($point_row[mb_point]); // 전체포인트
?>
<tr>
<td><img src="img/ranking_<?php echo $i; ?>.jpg" alt="" /></td>
<td style="padding-left:5px;"><?php echo $point_name; ?></td>
<td align="right" style="padding-right:2px;"><?php echo number_format($point_row[point]); ?></td>
</tr>
<?php
}
?>
</table></td>
</tr>
<?php
//}
?>
</table>
참고자료
댓글목록
등록된 댓글이 없습니다.