포인트랭킹 소스인데요 일정레벨 이상은 제외하고 싶습니다 ㅠㅠ 정보
포인트랭킹 소스인데요 일정레벨 이상은 제외하고 싶습니다 ㅠㅠ본문
여기서 소스를 얻어서 몇 가지 수정하다가 도저히 안되서 질문드립니다. ㅠㅠ
일정레벨 이상은 랭킹에서 제외하려고 하면 어떻게 해야할까요?
------------- 아래는 소스입니다 !! ------------------------
<?
include_once("./_common.php");
define("_CO_POINT_RANK_", TRUE);
$html_title = "포인트 랭킹";
$g4[title] = "" . $html_title;
?>
<script language="javascript">
// 자바스크립트에서 사용하는 전역변수 선언
var g4_path = "<?=$g4[path]?>";
var g4_bbs = "<?=$g4[bbs]?>";
var g4_bbs_img = "<?=$g4[bbs_img]?>";
var g4_admin = "<?=$g4[admin]?>";
var g4_url = "<?=$g4[url]?>";
var g4_is_member = "<?=$is_member?>";
var g4_is_admin = "<?=$is_admin?>";
var g4_bo_table = "<?=$bo_table?>";
var g4_sca = "<?=$sca?>";
var g4_charset = "<?=$g4[charset]?>";
var g4_is_gecko = navigator.userAgent.toLowerCase().indexOf("gecko") != -1;
var g4_is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
</script>
<link rel="stylesheet" href="<?=$g4[path]?>/steamstyle.css" type="text/css">
<script language="javascript" src="<?=$g4[path]?>/js/sideview.js"></script>
<script language="javascript" src="<?=$g4[path]?>/js/common.js"></script>
<style type="text/css">
<!--
td { font-family:돋움; font-size:9pt; }
-->
</style>
<table width="100%" height="50" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" bgcolor="#EBEBEB">
<table width="100%" height="40" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25" align="center" bgcolor="#FFFFFF" ><img src="<?=$g4[bbs_img_path]?>/icon_01.gif" width="5" height="5"></td>
<td width="" align="left" bgcolor="#FFFFFF" ><font color="#666666"><b><?=$g4[title]?></b></font></td>
<td bgcolor="#FFFFFF" align="right">
<table width="50%" border="0" cellpadding="0" cellspacing="0">
<tr><td bgcolor="#FFFFFF" >
<?
if ($member[mb_id])
{
$sql = " select sum(mb_point) as sum_point from $g4[member_table]";
$row = sql_fetch($sql);
$sum_point = $row[sum_point];
echo "· 현재 <b>".$member[mb_nick]."</b>님 포인트 : <B>".$member[mb_point]." 점</B>.";
}
$sql = " select count(mb_id) as cnt from $g4[member_table]
where mb_point >= '$member[mb_point]' order by mb_point desc ";
$row = sql_fetch($sql);
$sql2 = " select count(mb_id) as cnt from $g4[member_table]";
$row2 = sql_fetch($sql2);
$total_count = $row2[cnt];
echo "<br>· 랭킹은 <b>".$total_count."</b>명중 <B>".number_format($row[cnt])."등</B> 입니다.<br>";
?></td></tr></table>
</td><td width="20" bgcolor="#FFFFFF"></td> </tr>
</table></td>
</tr>
</table>
<br>
<table cellpadding="5" cellspacing="1" width="100%">
<tr>
<td height="15"><a href="<?$g4[path]?>/bbs/point.php"> 내포인트내용</a> / <a href="<?$g4[path]?>/bbs/point_rank.php">포인트순위</a></td>
<td align="center">개인별 포인트를 클릭하면 내용을 알수있습니다</td>
</tr><tr><td height="2" colspan="2" bgcolor="#808080"></td>
</tr> <tr>
<td width=50% valign=top>
<table cellpadding="5" cellspacing="1" width="100%">
<tr bgcolor=#E1E1E1>
<td width="15%" background="img/title_bg.gif" >
<p align="center"><b><font color="#66AEAD">랭킹</font></b><font color="#66AEAD"> </font>
<td width="40%" background="img/title_bg.gif" height="25">
<p align="center"><b><font color="#66AEAD">회원</font></b><font color="#66AEAD"> </font>
<td width="30%" align=center background="img/title_bg.gif" >
<p align="center"><b><font color="#66AEAD">포인트</font></b><font color="#66AEAD"> </font>
</tr>
<?
$sql = " select count(*) as cnt from $g4[member_table]";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$rows = 50;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$mod = 48;
$tbl_col =2 ;
$tbl_col_sep = (int)($mod / $tbl_col) + ($mod % $tbl_col) ;
$sql = " select * from $g4[member_table]
order by mb_point desc, mb_today_login desc
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// if ($i && $i%$mod==0)
// echo "</td><td valign=top>";
$rank = (($page - 1) * $rows) + $i + 1;
//$name = get_sideview($row[mb_id], $row[mb_id], $row[mb_name], $row[mb_email], $row[mb_homepage]);
$name = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
$point = number_format($row[mb_point]);
$id = $row[mb_id];
?>
<tr height=30 >
<td align="center" width="15%" bgcolor=#E1E1E1><?=$rank?></td>
<td align="center" width="40%"><?=$name?>님</td>
<td align="center" width="30%" align=center>
<a href="./point_list.php?sfl=a.mb_id&stx=<?=$row[mb_id]?>">
<?=$point?> 점</a></td>
<tr>
<td colspan="4" height="1" background="img/dot_line.gif"></td>
</tr>
<?
if ($i==$tbl_col_sep) {
?>
</tr>
</table>
</td>
<td width=50% valign=top>
<table cellpadding="5" cellspacing="1" width="100%">
<tr bgcolor=#E1E1E1>
<td width="15%" >
<p align="center"><b><font color="#66AEAD">랭킹</font></b><font color="#66AEAD"> </font>
<td width="40%" background="img/title_bg.gif" height="25">
<p align="center"><b><font color="#66AEAD">아이디</font></b><font color="#66AEAD"> </font>
<td width="30%" align=center background="img/title_bg.gif" >
<p align="center"><b><font color="#66AEAD">포인트</font></b><font color="#66AEAD"> </font>
</tr>
<? }else { ?>
</tr>
<? }
} ?>
</table>
</td>
</tr>
</table>
<?
$page = get_paging($config[cf_write_pages], $page, $total_page, "?$qstr&page=");
echo "<p><table width=100% cellpadding=0 cellspacing=0><tr><td align=center>$page</td></tr></table><br>";
?>
<table width='100%' cellpadding=3 cellspacing=0>
<tr><td colspan=2 height=45 align=center><a href='javascript:window.close();'><img src='<?=$g4[bbs_img_path]?>/btn_close.gif' border=0></a></td></tr>
</table>
일정레벨 이상은 랭킹에서 제외하려고 하면 어떻게 해야할까요?
------------- 아래는 소스입니다 !! ------------------------
<?
include_once("./_common.php");
define("_CO_POINT_RANK_", TRUE);
$html_title = "포인트 랭킹";
$g4[title] = "" . $html_title;
?>
<script language="javascript">
// 자바스크립트에서 사용하는 전역변수 선언
var g4_path = "<?=$g4[path]?>";
var g4_bbs = "<?=$g4[bbs]?>";
var g4_bbs_img = "<?=$g4[bbs_img]?>";
var g4_admin = "<?=$g4[admin]?>";
var g4_url = "<?=$g4[url]?>";
var g4_is_member = "<?=$is_member?>";
var g4_is_admin = "<?=$is_admin?>";
var g4_bo_table = "<?=$bo_table?>";
var g4_sca = "<?=$sca?>";
var g4_charset = "<?=$g4[charset]?>";
var g4_is_gecko = navigator.userAgent.toLowerCase().indexOf("gecko") != -1;
var g4_is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
</script>
<link rel="stylesheet" href="<?=$g4[path]?>/steamstyle.css" type="text/css">
<script language="javascript" src="<?=$g4[path]?>/js/sideview.js"></script>
<script language="javascript" src="<?=$g4[path]?>/js/common.js"></script>
<style type="text/css">
<!--
td { font-family:돋움; font-size:9pt; }
-->
</style>
<table width="100%" height="50" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" bgcolor="#EBEBEB">
<table width="100%" height="40" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25" align="center" bgcolor="#FFFFFF" ><img src="<?=$g4[bbs_img_path]?>/icon_01.gif" width="5" height="5"></td>
<td width="" align="left" bgcolor="#FFFFFF" ><font color="#666666"><b><?=$g4[title]?></b></font></td>
<td bgcolor="#FFFFFF" align="right">
<table width="50%" border="0" cellpadding="0" cellspacing="0">
<tr><td bgcolor="#FFFFFF" >
<?
if ($member[mb_id])
{
$sql = " select sum(mb_point) as sum_point from $g4[member_table]";
$row = sql_fetch($sql);
$sum_point = $row[sum_point];
echo "· 현재 <b>".$member[mb_nick]."</b>님 포인트 : <B>".$member[mb_point]." 점</B>.";
}
$sql = " select count(mb_id) as cnt from $g4[member_table]
where mb_point >= '$member[mb_point]' order by mb_point desc ";
$row = sql_fetch($sql);
$sql2 = " select count(mb_id) as cnt from $g4[member_table]";
$row2 = sql_fetch($sql2);
$total_count = $row2[cnt];
echo "<br>· 랭킹은 <b>".$total_count."</b>명중 <B>".number_format($row[cnt])."등</B> 입니다.<br>";
?></td></tr></table>
</td><td width="20" bgcolor="#FFFFFF"></td> </tr>
</table></td>
</tr>
</table>
<br>
<table cellpadding="5" cellspacing="1" width="100%">
<tr>
<td height="15"><a href="<?$g4[path]?>/bbs/point.php"> 내포인트내용</a> / <a href="<?$g4[path]?>/bbs/point_rank.php">포인트순위</a></td>
<td align="center">개인별 포인트를 클릭하면 내용을 알수있습니다</td>
</tr><tr><td height="2" colspan="2" bgcolor="#808080"></td>
</tr> <tr>
<td width=50% valign=top>
<table cellpadding="5" cellspacing="1" width="100%">
<tr bgcolor=#E1E1E1>
<td width="15%" background="img/title_bg.gif" >
<p align="center"><b><font color="#66AEAD">랭킹</font></b><font color="#66AEAD"> </font>
<td width="40%" background="img/title_bg.gif" height="25">
<p align="center"><b><font color="#66AEAD">회원</font></b><font color="#66AEAD"> </font>
<td width="30%" align=center background="img/title_bg.gif" >
<p align="center"><b><font color="#66AEAD">포인트</font></b><font color="#66AEAD"> </font>
</tr>
<?
$sql = " select count(*) as cnt from $g4[member_table]";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$rows = 50;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$mod = 48;
$tbl_col =2 ;
$tbl_col_sep = (int)($mod / $tbl_col) + ($mod % $tbl_col) ;
$sql = " select * from $g4[member_table]
order by mb_point desc, mb_today_login desc
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// if ($i && $i%$mod==0)
// echo "</td><td valign=top>";
$rank = (($page - 1) * $rows) + $i + 1;
//$name = get_sideview($row[mb_id], $row[mb_id], $row[mb_name], $row[mb_email], $row[mb_homepage]);
$name = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
$point = number_format($row[mb_point]);
$id = $row[mb_id];
?>
<tr height=30 >
<td align="center" width="15%" bgcolor=#E1E1E1><?=$rank?></td>
<td align="center" width="40%"><?=$name?>님</td>
<td align="center" width="30%" align=center>
<a href="./point_list.php?sfl=a.mb_id&stx=<?=$row[mb_id]?>">
<?=$point?> 점</a></td>
<tr>
<td colspan="4" height="1" background="img/dot_line.gif"></td>
</tr>
<?
if ($i==$tbl_col_sep) {
?>
</tr>
</table>
</td>
<td width=50% valign=top>
<table cellpadding="5" cellspacing="1" width="100%">
<tr bgcolor=#E1E1E1>
<td width="15%" >
<p align="center"><b><font color="#66AEAD">랭킹</font></b><font color="#66AEAD"> </font>
<td width="40%" background="img/title_bg.gif" height="25">
<p align="center"><b><font color="#66AEAD">아이디</font></b><font color="#66AEAD"> </font>
<td width="30%" align=center background="img/title_bg.gif" >
<p align="center"><b><font color="#66AEAD">포인트</font></b><font color="#66AEAD"> </font>
</tr>
<? }else { ?>
</tr>
<? }
} ?>
</table>
</td>
</tr>
</table>
<?
$page = get_paging($config[cf_write_pages], $page, $total_page, "?$qstr&page=");
echo "<p><table width=100% cellpadding=0 cellspacing=0><tr><td align=center>$page</td></tr></table><br>";
?>
<table width='100%' cellpadding=3 cellspacing=0>
<tr><td colspan=2 height=45 align=center><a href='javascript:window.close();'><img src='<?=$g4[bbs_img_path]?>/btn_close.gif' border=0></a></td></tr>
</table>
댓글 전체
예를들어 레벨7이상을 제외한다면
쿼리문에 where mb_level > '7'를 넣어주면 되겠지요.
즉,
$sql2 = " select count(mb_id) as cnt from $g4[member_table]";
$row2 = sql_fetch($sql2);
을
$sql2 = " select count(mb_id) as cnt from $g4[member_table] where mb_level > '7'";
$row2 = sql_fetch($sql2);
로 하시고
$tbl_col_sep = (int)($mod / $tbl_col) + ($mod % $tbl_col) ;
$sql = " select * from $g4[member_table]
order by mb_point desc, mb_today_login desc
limit $from_record, $rows ";
$result = sql_query($sql);
을
$tbl_col_sep = (int)($mod / $tbl_col) + ($mod % $tbl_col) ;
$sql = " select * from $g4[member_table] where mb_level > '7'
order by mb_point desc, mb_today_login desc
limit $from_record, $rows ";
$result = sql_query($sql);
로 하시면 될듯합니다.
쿼리문에 where mb_level > '7'를 넣어주면 되겠지요.
즉,
$sql2 = " select count(mb_id) as cnt from $g4[member_table]";
$row2 = sql_fetch($sql2);
을
$sql2 = " select count(mb_id) as cnt from $g4[member_table] where mb_level > '7'";
$row2 = sql_fetch($sql2);
로 하시고
$tbl_col_sep = (int)($mod / $tbl_col) + ($mod % $tbl_col) ;
$sql = " select * from $g4[member_table]
order by mb_point desc, mb_today_login desc
limit $from_record, $rows ";
$result = sql_query($sql);
을
$tbl_col_sep = (int)($mod / $tbl_col) + ($mod % $tbl_col) ;
$sql = " select * from $g4[member_table] where mb_level > '7'
order by mb_point desc, mb_today_login desc
limit $from_record, $rows ";
$result = sql_query($sql);
로 하시면 될듯합니다.
아..반대군요..
mb_level<'7'이렇게 하세요^^
mb_level<'7'이렇게 하세요^^
우아 감사합니다 ㅠㅠ 정말 고맙습니다!!!
근데 해보니
1065 : Query was empty 이렇게 에러가 나는데용 ㅠㅠ
근데 해보니
1065 : Query was empty 이렇게 에러가 나는데용 ㅠㅠ
아..반대군요..
mb_level<'7'이렇게 하세요^^
mb_level<'7'이렇게 하세요^^
북학님 에러가 위에 처럼 나는데 한번만 더 봐주세용 ㅠㅠ
아...넵...고맙습니다. 제가 다른 파일을 불러오면서 그런건지 ㅠㅠ 다시 한번 해보겠습니다 너무감사합니다 !!
링크건 곳에 적용된 소스 그대로 적어 놓을 께요^^
<?
include_once("./_common.php");
define("_CO_POINT_RANK_", TRUE);
$html_title = "포인트 랭킹";
$g4[title] = "" . $html_title;
?>
<script language="javascript">
// 자바스크립트에서 사용하는 전역변수 선언
var g4_path = "<?=$g4[path]?>";
var g4_bbs = "<?=$g4[bbs]?>";
var g4_bbs_img = "<?=$g4[bbs_img]?>";
var g4_admin = "<?=$g4[admin]?>";
var g4_url = "<?=$g4[url]?>";
var g4_is_member = "<?=$is_member?>";
var g4_is_admin = "<?=$is_admin?>";
var g4_bo_table = "<?=$bo_table?>";
var g4_sca = "<?=$sca?>";
var g4_charset = "<?=$g4[charset]?>";
var g4_is_gecko = navigator.userAgent.toLowerCase().indexOf("gecko") != -1;
var g4_is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
</script>
<link rel="stylesheet" href="<?=$g4[path]?>/steamstyle.css" type="text/css">
<script language="javascript" src="<?=$g4[path]?>/js/sideview.js"></script>
<script language="javascript" src="<?=$g4[path]?>/js/common.js"></script>
<style type="text/css">
<!--
td { font-family:돋움; font-size:9pt; }
-->
</style>
<table width="100%" height="50" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" bgcolor="#EBEBEB">
<table width="100%" height="40" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25" align="center" bgcolor="#FFFFFF" ><img src="<?=$g4[bbs_img_path]?>/icon_01.gif" width="5" height="5"></td>
<td width="" align="left" bgcolor="#FFFFFF" ><font color="#666666"><b><?=$g4[title]?></b></font></td>
<td bgcolor="#FFFFFF" align="right">
<table width="50%" border="0" cellpadding="0" cellspacing="0">
<tr><td bgcolor="#FFFFFF" >
<?
if ($member[mb_id])
{
$sql = " select sum(mb_point) as sum_point from $g4[member_table]";
$row = sql_fetch($sql);
$sum_point = $row[sum_point];
echo "· 현재 <b>".$member[mb_nick]."</b>님 포인트 : <B>".$member[mb_point]." 점</B>.";
}
$sql = " select count(mb_id) as cnt from $g4[member_table]
where mb_level <'7' and mb_point >= '$member[mb_point]' order by mb_point desc ";
$row = sql_fetch($sql);
$sql2 = " select count(mb_id) as cnt from $g4[member_table] where mb_level <'7'";
$row2 = sql_fetch($sql2);
$total_count = $row2[cnt];
echo "<br>· 랭킹은 <b>".$total_count."</b>명중 <B>".number_format($row[cnt])."등</B> 입니다.<br>";
?></td></tr></table>
</td><td width="20" bgcolor="#FFFFFF"></td> </tr>
</table></td>
</tr>
</table>
<br>
<table cellpadding="5" cellspacing="1" width="100%">
<tr>
<td height="15"><a href="<?$g4[path]?>/bbs/point.php"> 내포인트내용</a> / <a href="<?$g4[path]?>/bbs/point_rank.php">포인트순위</a></td>
<td align="center">개인별 포인트를 클릭하면 내용을 알수있습니다</td>
</tr><tr><td height="2" colspan="2" bgcolor="#808080"></td>
</tr> <tr>
<td width=50% valign=top>
<table cellpadding="5" cellspacing="1" width="100%">
<tr bgcolor=#E1E1E1>
<td width="15%" background="img/title_bg.gif" >
<p align="center"><b><font color="#66AEAD">랭킹</font></b><font color="#66AEAD"> </font>
<td width="40%" background="img/title_bg.gif" height="25">
<p align="center"><b><font color="#66AEAD">회원</font></b><font color="#66AEAD"> </font>
<td width="30%" align=center background="img/title_bg.gif" >
<p align="center"><b><font color="#66AEAD">포인트</font></b><font color="#66AEAD"> </font>
</tr>
<?
$sql = " select count(*) as cnt from $g4[member_table]";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$rows = 50;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$mod = 48;
$tbl_col =2 ;
$tbl_col_sep = (int)($mod / $tbl_col) + ($mod % $tbl_col) ;
$sql = " select * from $g4[member_table] where mb_level <'7'
order by mb_point desc, mb_today_login desc
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// if ($i && $i%$mod==0)
// echo "</td><td valign=top>";
$rank = (($page - 1) * $rows) + $i + 1;
//$name = get_sideview($row[mb_id], $row[mb_id], $row[mb_name], $row[mb_email], $row[mb_homepage]);
$name = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
$point = number_format($row[mb_point]);
$id = $row[mb_id];
?>
<tr height=30 >
<td align="center" width="15%" bgcolor=#E1E1E1><?=$rank?></td>
<td align="center" width="40%"><?=$name?>님</td>
<td align="center" width="30%" align=center>
<a href="./point_list.php?sfl=a.mb_id&stx=<?=$row[mb_id]?>">
<?=$point?> 점</a></td>
<tr>
<td colspan="4" height="1" background="img/dot_line.gif"></td>
</tr>
<?
if ($i==$tbl_col_sep) {
?>
</tr>
</table>
</td>
<td width=50% valign=top>
<table cellpadding="5" cellspacing="1" width="100%">
<tr bgcolor=#E1E1E1>
<td width="15%" >
<p align="center"><b><font color="#66AEAD">랭킹</font></b><font color="#66AEAD"> </font>
<td width="40%" background="img/title_bg.gif" height="25">
<p align="center"><b><font color="#66AEAD">아이디</font></b><font color="#66AEAD"> </font>
<td width="30%" align=center background="img/title_bg.gif" >
<p align="center"><b><font color="#66AEAD">포인트</font></b><font color="#66AEAD"> </font>
</tr>
<? }else { ?>
</tr>
<? }
} ?>
</table>
</td>
</tr>
</table>
<?
$page = get_paging($config[cf_write_pages], $page, $total_page, "?$qstr&page=");
echo "<p><table width=100% cellpadding=0 cellspacing=0><tr><td align=center>$page</td></tr></table><br>";
?>
<table width='100%' cellpadding=3 cellspacing=0>
<tr><td colspan=2 height=45 align=center><a href='javascript:window.close();'><img src='<?=$g4[bbs_img_path]?>/btn_close.gif' border=0></a></td></tr>
</table>
<?
include_once("./_common.php");
define("_CO_POINT_RANK_", TRUE);
$html_title = "포인트 랭킹";
$g4[title] = "" . $html_title;
?>
<script language="javascript">
// 자바스크립트에서 사용하는 전역변수 선언
var g4_path = "<?=$g4[path]?>";
var g4_bbs = "<?=$g4[bbs]?>";
var g4_bbs_img = "<?=$g4[bbs_img]?>";
var g4_admin = "<?=$g4[admin]?>";
var g4_url = "<?=$g4[url]?>";
var g4_is_member = "<?=$is_member?>";
var g4_is_admin = "<?=$is_admin?>";
var g4_bo_table = "<?=$bo_table?>";
var g4_sca = "<?=$sca?>";
var g4_charset = "<?=$g4[charset]?>";
var g4_is_gecko = navigator.userAgent.toLowerCase().indexOf("gecko") != -1;
var g4_is_ie = navigator.userAgent.toLowerCase().indexOf("msie") != -1;
</script>
<link rel="stylesheet" href="<?=$g4[path]?>/steamstyle.css" type="text/css">
<script language="javascript" src="<?=$g4[path]?>/js/sideview.js"></script>
<script language="javascript" src="<?=$g4[path]?>/js/common.js"></script>
<style type="text/css">
<!--
td { font-family:돋움; font-size:9pt; }
-->
</style>
<table width="100%" height="50" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" bgcolor="#EBEBEB">
<table width="100%" height="40" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="25" align="center" bgcolor="#FFFFFF" ><img src="<?=$g4[bbs_img_path]?>/icon_01.gif" width="5" height="5"></td>
<td width="" align="left" bgcolor="#FFFFFF" ><font color="#666666"><b><?=$g4[title]?></b></font></td>
<td bgcolor="#FFFFFF" align="right">
<table width="50%" border="0" cellpadding="0" cellspacing="0">
<tr><td bgcolor="#FFFFFF" >
<?
if ($member[mb_id])
{
$sql = " select sum(mb_point) as sum_point from $g4[member_table]";
$row = sql_fetch($sql);
$sum_point = $row[sum_point];
echo "· 현재 <b>".$member[mb_nick]."</b>님 포인트 : <B>".$member[mb_point]." 점</B>.";
}
$sql = " select count(mb_id) as cnt from $g4[member_table]
where mb_level <'7' and mb_point >= '$member[mb_point]' order by mb_point desc ";
$row = sql_fetch($sql);
$sql2 = " select count(mb_id) as cnt from $g4[member_table] where mb_level <'7'";
$row2 = sql_fetch($sql2);
$total_count = $row2[cnt];
echo "<br>· 랭킹은 <b>".$total_count."</b>명중 <B>".number_format($row[cnt])."등</B> 입니다.<br>";
?></td></tr></table>
</td><td width="20" bgcolor="#FFFFFF"></td> </tr>
</table></td>
</tr>
</table>
<br>
<table cellpadding="5" cellspacing="1" width="100%">
<tr>
<td height="15"><a href="<?$g4[path]?>/bbs/point.php"> 내포인트내용</a> / <a href="<?$g4[path]?>/bbs/point_rank.php">포인트순위</a></td>
<td align="center">개인별 포인트를 클릭하면 내용을 알수있습니다</td>
</tr><tr><td height="2" colspan="2" bgcolor="#808080"></td>
</tr> <tr>
<td width=50% valign=top>
<table cellpadding="5" cellspacing="1" width="100%">
<tr bgcolor=#E1E1E1>
<td width="15%" background="img/title_bg.gif" >
<p align="center"><b><font color="#66AEAD">랭킹</font></b><font color="#66AEAD"> </font>
<td width="40%" background="img/title_bg.gif" height="25">
<p align="center"><b><font color="#66AEAD">회원</font></b><font color="#66AEAD"> </font>
<td width="30%" align=center background="img/title_bg.gif" >
<p align="center"><b><font color="#66AEAD">포인트</font></b><font color="#66AEAD"> </font>
</tr>
<?
$sql = " select count(*) as cnt from $g4[member_table]";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$rows = 50;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$mod = 48;
$tbl_col =2 ;
$tbl_col_sep = (int)($mod / $tbl_col) + ($mod % $tbl_col) ;
$sql = " select * from $g4[member_table] where mb_level <'7'
order by mb_point desc, mb_today_login desc
limit $from_record, $rows ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
// if ($i && $i%$mod==0)
// echo "</td><td valign=top>";
$rank = (($page - 1) * $rows) + $i + 1;
//$name = get_sideview($row[mb_id], $row[mb_id], $row[mb_name], $row[mb_email], $row[mb_homepage]);
$name = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
$point = number_format($row[mb_point]);
$id = $row[mb_id];
?>
<tr height=30 >
<td align="center" width="15%" bgcolor=#E1E1E1><?=$rank?></td>
<td align="center" width="40%"><?=$name?>님</td>
<td align="center" width="30%" align=center>
<a href="./point_list.php?sfl=a.mb_id&stx=<?=$row[mb_id]?>">
<?=$point?> 점</a></td>
<tr>
<td colspan="4" height="1" background="img/dot_line.gif"></td>
</tr>
<?
if ($i==$tbl_col_sep) {
?>
</tr>
</table>
</td>
<td width=50% valign=top>
<table cellpadding="5" cellspacing="1" width="100%">
<tr bgcolor=#E1E1E1>
<td width="15%" >
<p align="center"><b><font color="#66AEAD">랭킹</font></b><font color="#66AEAD"> </font>
<td width="40%" background="img/title_bg.gif" height="25">
<p align="center"><b><font color="#66AEAD">아이디</font></b><font color="#66AEAD"> </font>
<td width="30%" align=center background="img/title_bg.gif" >
<p align="center"><b><font color="#66AEAD">포인트</font></b><font color="#66AEAD"> </font>
</tr>
<? }else { ?>
</tr>
<? }
} ?>
</table>
</td>
</tr>
</table>
<?
$page = get_paging($config[cf_write_pages], $page, $total_page, "?$qstr&page=");
echo "<p><table width=100% cellpadding=0 cellspacing=0><tr><td align=center>$page</td></tr></table><br>";
?>
<table width='100%' cellpadding=3 cellspacing=0>
<tr><td colspan=2 height=45 align=center><a href='javascript:window.close();'><img src='<?=$g4[bbs_img_path]?>/btn_close.gif' border=0></a></td></tr>
</table>
와 북학인님 ㅠㅠ 너무 감사합니다. 올려주신 소스 덕분에 한방에 해결되었습니다. 오늘 점심먹고 오후내내 주물럭거리다 질문한거였는데요 전 해결 못했습니다. 친절한 답변에 너무 감사드립니다. 이제 집에 갈 수 있겠어요^^ 역시 고수의 길은 힘들군요 ㅎㅎ 다시한번 감사합니다 !!!