
이렇게 만들고 싶어서 소스 받아서 추가를 해봤는데요...
저는 이렇게 나오네요..... 으앙ㅜㅜ 왜그럴까요??
Copy
<? include_once("./_common.php"); $g5[title] = "월별 포인트 적립 순위"; include_once(G5_PATH.'/head.sub.php'); //echo "<script language=\"javascript\" src=\".G5_PATH./js/sideview.js\"></script>\n"; $nowdate = date("Y-m",time()); // 이번달 $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 {$g5[member_table]} as A LEFT JOIN {$g5[point_table]} as B ON ( A.mb_id = B.mb_id AND A.mb_level > 1 AND A.mb_id != 'admin' 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, 10 "; $result = sql_query($sql); ?> <style type="text/css"> .title_font {font-size:9pt;color:#ffffff;} </style> <table width="330" cellpadding=0 cellspacing=0> <tr> <td align="center" style="padding:5px;color:#8b5aad;"><strong><?=$sYear?> <?=$sMonth?> 적립 포인트 실시간 순위(1위~10위)</strong> </td> </tr> <tr> <td valign="top"> <table border="0" cellpadding="0" cellspacing="0"> <tr bgcolor="#8b5aad"> <td width="5"><img src="<?php echo G5_URL?>/img/rank/l_img.gif" border="0"></td> <td width="40" height="52" align="center" class="title_font">순위</td> <td width="120" class="title_font" align="center">닉네임</td> <td width="80" class="title_font" align="right" style="padding-right:10px;">1월 적립<br> 포인트</td> <td width="80" class="title_font" align="right" style="padding-right:10px;">총 적립<br> 포인트</td> <td width="5"><img src="<?php echo G5_URL?>/img/rank/r_img.gif" border="0"></td> </tr> <? 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 height="24"></td> <td><img src="<?php echo G5_URL?>/img/rank/<?=$i?>.gif" border="0" align=absmiddle> <?if ($i<=5) echo "<img src=".G5_URL."/img/rank/".$i."_icon.gif align=absmiddle>";?></td> <td align="center"><?=$name?></td> <td align="right" style="padding-right:10px;color:#FF0000;"><?=$point?></td> <td align="right" style="padding-right:10px;"><?=$mb_point?></td> <td></td> </tr> <tr> <td colspan="6" bgcolor="#d6d6d6" height="1"></td> </tr> <?}?> </table> </td> </tr> </table>
위 코드는 Point_rank.php 안에 있는 내용입니다.
head_php 에서 include_once('./point_rank.php'); 로 불러왔습니다.
뭐가 잘못된걸까요? ㅠ_ㅠ
|
답변 1개 / 댓글 1개
채택된 답변
+20 포인트
2016-05-01 (일) 19:18:41
point_rank.php 파일을 저장하실 때 utf-8로 저장해 보세요.
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.