AvocadoAmber/AvocadoEdition_Light/bbs/current_connect.php

38 lines
1.3 KiB
PHP
Raw Normal View History

2022-09-17 20:50:50 +09:00
<?php
2024-09-23 11:07:19 +09:00
include_once "./_common.php";
2022-09-17 20:50:50 +09:00
$g5['title'] = '현재접속자';
2024-09-23 11:07:19 +09:00
include_once "./_head.php";
2022-09-17 20:50:50 +09:00
2024-09-23 09:37:13 +09:00
$list = [];
2022-09-17 20:50:50 +09:00
$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 {$g5['login_table']} a left join {$g5['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);
2024-09-19 20:57:39 +09:00
for ($i = 0; $row = sql_fetch_array($result); $i++) {
$row['lo_url'] = get_text($row['lo_url']);
$list[$i] = $row;
2022-09-17 20:50:50 +09:00
2024-09-19 20:57:39 +09:00
if ($row['mb_id']) {
$list[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['mb_nick'], $config['cf_cut_name']), $row['mb_email'], $row['mb_homepage']);
} else {
$ip_member = sql_fetch("select mb_name, mb_id from {$g5['member_table']} where mb_login_ip = '{$row['lo_ip']}' OR mb_ip = '{$row['lo_ip']}'");
if ($ip_member['mb_id']) {
$list[$i]['name'] = $ip_member['mb_name'];
2022-09-17 20:50:50 +09:00
} else {
2024-09-19 20:57:39 +09:00
if ($is_admin)
$list[$i]['name'] = $row['lo_ip'];
else
$list[$i]['name'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['lo_ip']);
2022-09-17 20:50:50 +09:00
}
2024-09-19 20:57:39 +09:00
}
2022-09-17 20:50:50 +09:00
2024-09-19 20:57:39 +09:00
$list[$i]['num'] = sprintf('%03d', $i + 1);
2022-09-17 20:50:50 +09:00
}
2024-09-19 20:57:39 +09:00
include_once($connect_skin_path . '/current_connect.skin.php');
2022-09-17 20:50:50 +09:00
2024-09-23 11:07:19 +09:00
include_once "./_tail.php";