멤버랭킹에서 관리자와 특정아이디 숨기는 법은 없나요? 정보
멤버랭킹에서 관리자와 특정아이디 숨기는 법은 없나요?본문
계급스킨과 회원랭킹 노출 스킨을 이용하고 있는데요.
main_class_rank.php를 수정하여 관리자 아이디인 admin 는 노출이 안됩니다만,
그 외에 운영용 몇개 아이디들도 노출 안하고 싶습니다. 방법이 없을까요?
아래는 main_class_rank.php 소스입니다.
어딜 어떻게 손봐야할지^^;
알려주세요..
<style type="text/css">
<!--
td { font-family:굴림; font-size:8pt; }
.text { font-size:8pt; font-family:굴림; color:#999999; }
.text2 { font-size:8pt; font-family:굴림; color:#333333; }
-->
</style>
<table cellpadding="5" cellspacing="5" width="75%">
<tr>
<td valign=top>
<table cellpadding="0" cellspacing="0">
<tr>
<?
$sql = " select count(*) as cnt from $g4[member_table] where mb_id <> '".$config[cf_admin]."'";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$rows = 10;
$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) ;
$sql2 = " select * from $g4[member_table]
where mb_id <> '".$config[cf_admin]."'
order by mb_point desc, mb_today_login desc
limit $from_record, 10 ";
$result2 = sql_query($sql2);
for ($i=0; $row=sql_fetch_array($result2); $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=10 >
<td width="5%" align="center"><span class="text2"><?=$rank?></span></td>
<td width="40%"><span class="text2"> <?=$row[mb_nick]?></span></td>
<td width="40%" align="right"><span class="text2">
<?=$point?> 점</span></td>
<td width="10%" align="center">
<!-- 계급장 보이는 부분 -->
<?=level_icon($row[mb_id])?>
<!-- 계급장 보이는 부분 끝-->
</td>
<tr>
<td colspan="4" height="1" background="img/dot_line2.gif"></td>
</tr>
<?
if ($i==$tbl_col_sep) {
?>
<? }
} ?>
</table>
</td>
</tr>
</table>
main_class_rank.php를 수정하여 관리자 아이디인 admin 는 노출이 안됩니다만,
그 외에 운영용 몇개 아이디들도 노출 안하고 싶습니다. 방법이 없을까요?
아래는 main_class_rank.php 소스입니다.
어딜 어떻게 손봐야할지^^;
알려주세요..
<style type="text/css">
<!--
td { font-family:굴림; font-size:8pt; }
.text { font-size:8pt; font-family:굴림; color:#999999; }
.text2 { font-size:8pt; font-family:굴림; color:#333333; }
-->
</style>
<table cellpadding="5" cellspacing="5" width="75%">
<tr>
<td valign=top>
<table cellpadding="0" cellspacing="0">
<tr>
<?
$sql = " select count(*) as cnt from $g4[member_table] where mb_id <> '".$config[cf_admin]."'";
$row = sql_fetch($sql);
$total_count = $row[cnt];
$rows = 10;
$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) ;
$sql2 = " select * from $g4[member_table]
where mb_id <> '".$config[cf_admin]."'
order by mb_point desc, mb_today_login desc
limit $from_record, 10 ";
$result2 = sql_query($sql2);
for ($i=0; $row=sql_fetch_array($result2); $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=10 >
<td width="5%" align="center"><span class="text2"><?=$rank?></span></td>
<td width="40%"><span class="text2"> <?=$row[mb_nick]?></span></td>
<td width="40%" align="right"><span class="text2">
<?=$point?> 점</span></td>
<td width="10%" align="center">
<!-- 계급장 보이는 부분 -->
<?=level_icon($row[mb_id])?>
<!-- 계급장 보이는 부분 끝-->
</td>
<tr>
<td colspan="4" height="1" background="img/dot_line2.gif"></td>
</tr>
<?
if ($i==$tbl_col_sep) {
?>
<? }
} ?>
</table>
</td>
</tr>
</table>
Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, null given in /home/kagla/new-sir/old/lib/common.lib.php:2339 Stack trace: #0 /home/kagla/new-sir/old/lib/common.lib.php(2339): mysqli_fetch_assoc() #1 /home/kagla/new-sir/old/skin/board/v16/view.skin.php(795): sql_fetch_array() #2 /home/kagla/new-sir/old/bbs/view.php(403): include_once('...') #3 /home/kagla/new-sir/old/bbs/board.php(300): include_once('...') #4 {main} thrown in /home/kagla/new-sir/old/lib/common.lib.php on line 2339