Souvenir

오늘 로그인 한 사람 숫자 구하려면요?

오늘 접속한 자의 숫자는
<?=number_format($visit[1])?> 이렇게 하면 되잖아요!
 
그런데, 접속한 사람 중에 로그인 한 사람의 숫자만 뽑으려면 어떻게 해야 합니까?
|

댓글 3개

g4/bbs/current_connect.php

를 참고 하세요.
아래의 소스(g4/bbs/current_connect.php)를 봐도 잘 모르겠습니다. 자세히 좀 안될까요?

<?
include_once("./_common.php");
$g4[title] = "현재접속자";
include_once("./_head.php");

$list = array();

$sql = " select a.mb_id, b.mb_nick, b.mb_name, b.mb_email, b.mb_homepage, b.mb_open, a.lo_ip, a.lo_location, a.lo_url
from $g4[login_table] a left join $g4[member_table] b on (a.mb_id = b.mb_id)
where a.mb_id <> '$config[cf_admin]'
order by a.lo_datetime desc ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$list[$i] = $row;

if ($row[mb_id])
$list[$i][name] = get_sideview($row[mb_id], $row[mb_nick], $row[mb_email], $row[mb_homepage]);
else
{
if ($is_admin)
$list[$i][name] = $row[lo_ip];
else
$list[$i][name] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row[lo_ip]);
}

$list[$i][num] = sprintf("%03d",$i+1);
}

$write_pages = get_paging($config[cf_write_pages], $page, $total_page, "?gr_id=$gr_id&page=");

echo "<script language=\"javascript\" src=\"$g4[path]/js/sideview.js\"></script>\n";

$connect_skin_path = "$g4[path]/skin/connect/$config[cf_connect_skin]";
include_once("$connect_skin_path/current_connect.skin.php");

include_once("./_tail.php");
?>
$sql = " select count( a.*) cnt from $g4[login_table] a inner join $g4[member_table] b on (a.mb_id = b.mb_id)
where a.mb_id <> '$config[cf_admin]' "


나중에

<?=$row['cnt']?>
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
19년 전 조회 1,506
19년 전 조회 1,431
19년 전 조회 1,158
19년 전 조회 1,386
19년 전 조회 1,169
19년 전 조회 1,493
19년 전 조회 1,189
19년 전 조회 1,516
19년 전 조회 1,058
19년 전 조회 1,059
19년 전 조회 962
19년 전 조회 1,150
19년 전 조회 1,503
19년 전 조회 2,106
19년 전 조회 1,512
19년 전 조회 1,604
19년 전 조회 1,808
19년 전 조회 1,489
19년 전 조회 1,202
19년 전 조회 1,168
🐛 버그신고