현재접속자 임의로 추가하는 방법을 알고싶습니다.
현재접속자를 접속을 안해도 임의로 집어넣고 싶은데요.
current_connect.php 파일에서 수정하는거 같은데 어떻게 수정해야 할가요?
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, b.mb_point, 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]);
$list[$i][name] = get_sideview($row[mb_id], cut_str($row[mb_nick], $config[cf_cut_name]), $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 type=\"text/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");
?>
current_connect.php 파일에서 수정하는거 같은데 어떻게 수정해야 할가요?
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, b.mb_point, 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]);
$list[$i][name] = get_sideview($row[mb_id], cut_str($row[mb_nick], $config[cf_cut_name]), $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 type=\"text/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");
?>
댓글 2개
13년 전
$list = array();
$virtual_user = array('user1','user2','user3'); // 항상 접속하게 할 사용자
for($uc = 0; $uc<count($virtual_user);$uc++){
$check_sql = "select count(*) as total from $g4[login_table] where mb_id = '".$virtual_user[$uc]."' ";
$check_result = sql_fetch($check_sql);
if($check_result['total']<1){
$insert_sql = " insert into $g4[login_table]
set mb_id = '$virtual_user[$uc]',
lo_datetime = '$g4[time_ymdhis]',
lo_location = '$lo_location'',
lo_url = '$lo_url',
lo_ip = '000,000,000,000' ";
sql_query($insert_sql);
}
}
$virtual_user = array('user1','user2','user3'); // 항상 접속하게 할 사용자
for($uc = 0; $uc<count($virtual_user);$uc++){
$check_sql = "select count(*) as total from $g4[login_table] where mb_id = '".$virtual_user[$uc]."' ";
$check_result = sql_fetch($check_sql);
if($check_result['total']<1){
$insert_sql = " insert into $g4[login_table]
set mb_id = '$virtual_user[$uc]',
lo_datetime = '$g4[time_ymdhis]',
lo_location = '$lo_location'',
lo_url = '$lo_url',
lo_ip = '000,000,000,000' ";
sql_query($insert_sql);
}
}
13년 전
뽈찌님 올려주신 소스가 아래처럼 넣는건가요?그리고 user1에는 아이디를 넣나요?
<?
include_once("./_common.php");
$g4[title] = "현재접속자";
include_once("./_head.php");
$list = array();
$virtual_user = array('mania','user2','user3'); // 항상 접속하게 할 사용자
for($uc = 0; $uc<count($virtual_user);$uc++){
$check_sql = "select count(*) as total from $g4[login_table] where mb_id = '".$virtual_user[$uc]."' ";
$check_result = sql_fetch($check_sql);
if($check_result['total']<1){
$insert_sql = " insert into $g4[login_table]
set mb_id = '$virtual_user[$uc]',
lo_datetime = '$g4[time_ymdhis]',
lo_location = '$lo_location'',
lo_url = '$lo_url',
lo_ip = '000,000,000,000' ";
sql_query($insert_sql);
}
}
$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");
?>
<?
include_once("./_common.php");
$g4[title] = "현재접속자";
include_once("./_head.php");
$list = array();
$virtual_user = array('mania','user2','user3'); // 항상 접속하게 할 사용자
for($uc = 0; $uc<count($virtual_user);$uc++){
$check_sql = "select count(*) as total from $g4[login_table] where mb_id = '".$virtual_user[$uc]."' ";
$check_result = sql_fetch($check_sql);
if($check_result['total']<1){
$insert_sql = " insert into $g4[login_table]
set mb_id = '$virtual_user[$uc]',
lo_datetime = '$g4[time_ymdhis]',
lo_location = '$lo_location'',
lo_url = '$lo_url',
lo_ip = '000,000,000,000' ";
sql_query($insert_sql);
}
}
$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");
?>
게시판 목록
그누4 질문답변
그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.
기존 게시물은 열람만 가능합니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 66554 | 11년 전 | 17733 | ||
| 66553 | 11년 전 | 12554 | ||
| 66552 |
alexseo
|
11년 전 | 10188 | |
| 66551 | 11년 전 | 10924 | ||
| 66550 | 11년 전 | 10496 | ||
| 66549 | 11년 전 | 11846 | ||
| 66548 | 11년 전 | 15029 | ||
| 66547 |
스타크루즈
|
11년 전 | 11493 | |
| 66546 |
kimch
|
11년 전 | 11599 | |
| 66545 | 11년 전 | 11423 | ||
| 66544 | 11년 전 | 12271 | ||
| 66543 |
별을기다리며
|
11년 전 | 14432 | |
| 66542 |
별을기다리며
|
11년 전 | 11924 | |
| 66541 | 11년 전 | 9692 | ||
| 66540 | 11년 전 | 10566 | ||
| 66539 | 11년 전 | 16399 | ||
| 66538 | 11년 전 | 10451 | ||
| 66537 | 11년 전 | 9134 | ||
| 66536 | 11년 전 | 10574 | ||
| 66535 |
alexseo
|
11년 전 | 5590 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기