2.65 버전 현재 접속 회원 리스트 관리자님꺼 랑 다른 분?꺼 수정

· 2003-10-01 (수) 16:28:15 · 1997
현재 접속자 이런 형태는
<!-- new 현재 접속자 -->
<?
$sql = " select COUNT(*), SUM(IF(mb_id<>'',1,0)), SUM(IF(mb_id='',1,0)) from $cfg[table_login] ";
$row = sql_fetch($sql);
?> <b>
<a href='<?=$gnu_path?>member.php'>현재접속자 : <? echo "{$row[0]}명 <br>(회원{$row[1]}/손님{$row[2]})";?></a></b>
<!-- new 현재 접속자  끝-->

====================================
그 다음에 member.php 는
=====================================

<?
$gnu_path = "./";
include($gnu_path . 'config.php');
include($gnu_path . 'lib.php');

$subject = "접속회원";
//echo head($subject);
//include_once "_defaulthead.php";
include($gnu_path . 'bbs/gblayer.php');

$html_title = "HIT 현재 접속회원 표시";
include($gnu_path . 'head.sub.php');
include($gnu_path . 'head.php');
?>    

 <p>
<table width='100%'>
<tr><td height=3 bgcolor=DADADA></td></tr>
<tr>
<td height=30>  <b>현재 접속 회원</b></td>
</tr>
<tr><td height=1 bgcolor=DADADA></td></tr>
</table>

<br>

<table width=95% align=center>
<tr><td valign=top style='line-height:150%;'>
                   <?

$sql = " select COUNT(*), SUM(IF(mb_id<>'',1,0)), SUM(IF(mb_id='',1,0)) from $cfg[table_login] ";
$row = sql_fetch($sql);

$total_count = $row[0];

$rows = 90;
$total_page  = ceil($total_count / $rows);  // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함

$mod = 30;


                       include($gnu_path . 'bbs/gblayer.php');
                       $sql = " select a.mb_id, b.mb_name, b.mb_icon, b.mb_open, a.lo_ip, mb_point
                                  from $cfg[table_login] a
                                  left join $cfg[table_member] b on (a.mb_id = b.mb_id)
                                 where a.mb_id <> ''
                                 order by mb_point desc";
                       $result = sql_query_error($sql);



for ($i=0; $row=mysql_fetch_array($result); $i++) {
   if ($i && $i%$mod==0) {
       echo "</td><td valign=top style='line-height:150%;'>";
   }

   $name = gblayer($row[mb_id], cut_str($row[mb_name],12), $row[mb_email], $row[mb_homepage], "$gnu_path/bbs");
   $point = number_format($row[mb_point]);


    echo "<table width=85% align=center><tr>";
   echo "<td height=20><font color=777777>".((($page-1)*$rows)+$i+1).".</font>$mb_level_icon  $name</td>";
   echo "<td align=right><font color=777777>{$point}점</font></td>";
   echo "</tr></table>";
}
?>
<!-- 53번째 줄인 <font color=777777>".((($page-1)*$rows)+$i+1).".</font>을 /*  */ 처리 하시면 현재 그누보드포인트조회처럼 표현 됩니다. 즉 숫자(순위)표시가 안됩니다. -->
</td></tr>
</table>
                     

<?
$page = get_paging($default[de_write_pages], $page, $total_page, $rows, "$HTTP_SERVER_VARS[PHP_SELF]?$qstr&page=");
echo "<p><table width=100% cellpadding=0 cellspacing=0><tr><td align=center>$page</td></tr></table>";

include($gnu_path . 'tail.php');
include($gnu_path . 'tail.sub.php');
?>


이상입니다.
이상하면 질문.... 근데 2.65 버전을 아직도 사용하시는 분이 계실려나 ? ㅠㅠ
|
댓글을 작성하시려면 로그인이 필요합니다.

그누3 팁자료실

1,026건
+
제목 글쓴이 날짜 조회
03-10-16 조회 2,984
03-10-16 조회 3,010
03-10-14 조회 4,658
03-10-14 조회 1,958
03-10-14 조회 2,488
03-10-13 조회 1,734
03-10-13 조회 2,165
03-10-12 조회 2,766
03-10-08 조회 3,921
03-10-07 조회 3,624
03-10-06 조회 2,357
03-10-02 조회 2,982
03-10-02 조회 2,605
03-10-01 조회 1,998
03-10-01 조회 2,119
03-09-30 조회 2,705
03-09-30 조회 2,779
03-09-28 조회 2,075
03-09-27 조회 2,191
03-09-26 조회 4,298