관리자 접속자 기능 개선
This commit is contained in:
@ -12,6 +12,7 @@ $menu['menu100'] = array (
|
||||
array('100910', '캡챠파일 일괄삭제',G5_ADMIN_URL.'/captcha_file_delete.php', 'cf_captcha', 1),
|
||||
array('100920', '썸네일파일 일괄삭제',G5_ADMIN_URL.'/thumbnail_file_delete.php', 'cf_thumbnail', 1),
|
||||
array('100500', 'phpinfo()', G5_ADMIN_URL.'/phpinfo.php', 'cf_phpinfo'),
|
||||
array('100510', 'Browscap 업데이트', G5_ADMIN_URL.'/browscap.php', 'cf_browscap'),
|
||||
array('100400', '부가서비스', G5_ADMIN_URL.'/service.php', 'cf_service')
|
||||
);
|
||||
?>
|
||||
42
adm/browscap.php
Normal file
42
adm/browscap.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
$sub_menu = "100510";
|
||||
include_once('./_common.php');
|
||||
|
||||
if ($is_admin != 'super')
|
||||
alert('최고관리자만 접근 가능합니다.');
|
||||
|
||||
$g5['title'] = 'Browscap 업데이트';
|
||||
include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div id="processing">
|
||||
<p>Browscap 정보를 업데이트하시려면 아래 업데이트 버튼을 클릭해 주세요.</p>
|
||||
<div><button type="button" id="run_update">업데이트</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$("#run_update").on("click", function() {
|
||||
$("#processing").html('<div class="update_processing"></div><p>Browscap 정보를 업데이트 중입니다.</p>');
|
||||
|
||||
$.ajax({
|
||||
url: "./browscap_update.php",
|
||||
async: true,
|
||||
cache: false,
|
||||
dataType: "html",
|
||||
success: function(data) {
|
||||
if(data != "") {
|
||||
alert(data);
|
||||
return false;
|
||||
}
|
||||
|
||||
$("#processing").html("<div class='check_processing'></div><p>Browscap 정보를 업데이트 했습니다.</p>");
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
21
adm/browscap_update.php
Normal file
21
adm/browscap_update.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
ini_set('memory_limit', '-1');
|
||||
|
||||
$sub_menu = "100510";
|
||||
include_once('./_common.php');
|
||||
|
||||
// clean the output buffer
|
||||
ob_end_clean();
|
||||
|
||||
if ($is_admin != 'super')
|
||||
die('최고관리자만 접근 가능합니다.');
|
||||
|
||||
include_once(G5_PLUGIN_PATH.'/browscap/Browscap.php');
|
||||
|
||||
$browscap = new phpbrowscap\Browscap(G5_DATA_PATH.'/cache');
|
||||
$browscap->updateMethod = 'cURL';
|
||||
$browscap->cacheFilename = 'browscap_cache.php';
|
||||
$browscap->updateCache();
|
||||
|
||||
die('');
|
||||
?>
|
||||
@ -186,6 +186,14 @@ if(!isset($config['cf_sms_type'])) {
|
||||
ADD `cf_sms_type` varchar(10) NOT NULL DEFAULT '' AFTER `cf_sms_use` ", true);
|
||||
}
|
||||
|
||||
// 접속자 정보 필드 추가
|
||||
if(!sql_query(" select vi_browser from {$g5['visit_table']} limit 1 ")) {
|
||||
sql_query(" ALTER TABLE `{$g5['visit_table']}`
|
||||
ADD `vi_browser` varchar(255) NOT NULL DEFAULT '' AFTER `vi_agent`,
|
||||
ADD `vi_os` varchar(255) NOT NULL DEFAULT '' AFTER `vi_browser`,
|
||||
ADD `vi_device` varchar(255) NOT NULL DEFAULT '' AFTER `vi_os` ", true);
|
||||
}
|
||||
|
||||
if(!$config['cf_faq_skin']) $config['cf_faq_skin'] = "basic";
|
||||
if(!$config['cf_mobile_faq_skin']) $config['cf_mobile_faq_skin'] = "basic";
|
||||
|
||||
|
||||
@ -395,6 +395,9 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
|
||||
.td_tdiv {border-bottom:1px solid #c9c9c9 !important}
|
||||
.td_tel {width:80px;text-align:center}
|
||||
.td_test {width:50px;text-align:center}
|
||||
.td_category1{width:130px;text-align:center}
|
||||
.td_category2{width:100px;text-align:center}
|
||||
.td_category3{width:80px;text-align:center}
|
||||
|
||||
.txt_true {color:#e8180c}
|
||||
.txt_false {color:#ccc}
|
||||
@ -730,7 +733,7 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
||||
#theme_list li .tmli_if:hover button.tmli_dt{display:block}
|
||||
#theme_list li .theme_sl{float:left;border:none;margin-top:5px;padding:0 5px;height:26px;background:#999;color:#fff}
|
||||
#theme_list li .theme_sl:hover{background:#ff3061}
|
||||
#theme_list li .theme_deactive{margin-left:4px}
|
||||
#theme_list li .theme_deactive{margin-left:4px}
|
||||
#theme_list li .theme_sl_use{background:#ff3061;line-height:26px}
|
||||
#theme_list li .theme_pr{float:right;margin-top:5px;padding:0 5px;height:24px;line-height:24px; border: 1px solid #ccc; background: #fafafa; }
|
||||
#theme_list li .theme_preview{ float: right; margin-top: 5px; padding:0 5px;height:26px; border: 1px solid #ccc; background: #fafafa; margin-right:3px}
|
||||
@ -763,4 +766,11 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
||||
/*전송실패 문자 재전송 내역*/
|
||||
.sms_table{padding:0 20px 40px;}
|
||||
.sms_table table th{border:1px solid #ddd;padding:9px 0}
|
||||
.sms_table table td{border:1px solid #ddd;text-align:center;width:16%;padding:9px 0}
|
||||
.sms_table table td{border:1px solid #ddd;text-align:center;width:16%;padding:9px 0}
|
||||
|
||||
/* Browscap */
|
||||
.update_processing{width:300px;height:300px;margin:0 auto;background:url(../img/ajax_loader.gif) no-repeat 0 0}
|
||||
#processing{margin: 0 auto;padding: 70px 0;max-width: 800px;border: 1px solid #eee;background: #f9f9f9;text-align:center;}
|
||||
#processing p{font-size:1.2em}
|
||||
.check_processing {width:300px;height:300px;margin:0 auto;background:url(../img/check.png) no-repeat 50% 50% }
|
||||
#processing button{background:#ff3061;border:none;color:#fff;padding: 15px;width:150px;margin-top:15px}
|
||||
BIN
adm/img/ajax_loader.gif
Normal file
BIN
adm/img/ajax_loader.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 44 KiB |
BIN
adm/img/check.png
Normal file
BIN
adm/img/check.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.2 KiB |
@ -29,6 +29,7 @@ $query_string = $qstr ? '?'.$qstr : '';
|
||||
<li><a href="./visit_domain.php<?php echo $query_string ?>">도메인</a></li>
|
||||
<li><a href="./visit_browser.php<?php echo $query_string ?>">브라우저</a></li>
|
||||
<li><a href="./visit_os.php<?php echo $query_string ?>">운영체제</a></li>
|
||||
<li><a href="./visit_device.php<?php echo $query_string ?>">접속기기</a></li>
|
||||
<li><a href="./visit_hour.php<?php echo $query_string ?>">시간</a></li>
|
||||
<li><a href="./visit_week.php<?php echo $query_string ?>">요일</a></li>
|
||||
<li><a href="./visit_date.php<?php echo $query_string ?>">일</a></li>
|
||||
|
||||
@ -15,7 +15,9 @@ $sql = " select * from {$g5['visit_table']}
|
||||
where vi_date between '{$fr_date}' and '{$to_date}' ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
$s = get_brow($row['vi_agent']);
|
||||
$s = $row['vi_browser'];
|
||||
if(!$s)
|
||||
$s = get_brow($row['vi_agent']);
|
||||
|
||||
$arr[$s]++;
|
||||
|
||||
@ -70,7 +72,7 @@ while ($row=sql_fetch_array($result)) {
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_num"><?php echo $no ?></td>
|
||||
<td class="td_category"><?php echo $key ?></td>
|
||||
<td class="td_category td_category1"><?php echo $key ?></td>
|
||||
<td>
|
||||
<div class="visit_bar">
|
||||
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||
|
||||
101
adm/visit_device.php
Normal file
101
adm/visit_device.php
Normal file
@ -0,0 +1,101 @@
|
||||
<?php
|
||||
$sub_menu = "200800";
|
||||
include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
$g5['title'] = '기기별 접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 5;
|
||||
|
||||
$max = 0;
|
||||
$sum_count = 0;
|
||||
$sql = " select * from {$g5['visit_table']}
|
||||
where vi_date between '$fr_date' and '$to_date' ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
$s = $row['vi_device'];
|
||||
if(!$s)
|
||||
$s = get_device($row['vi_agent']);
|
||||
|
||||
$arr[$s]++;
|
||||
|
||||
if ($arr[$s] > $max) $max = $arr[$s];
|
||||
|
||||
$sum_count++;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<caption><?php echo $g5['title']; ?> 목록</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">순위</th>
|
||||
<th scope="col">접속기기</th>
|
||||
<th scope="col">그래프</th>
|
||||
<th scope="col">접속자수</th>
|
||||
<th scope="col">비율(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3">합계</td>
|
||||
<td><strong><?php echo $sum_count ?></strong></td>
|
||||
<td>100%</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
<tbody>
|
||||
<?php
|
||||
$i = 0;
|
||||
$k = 0;
|
||||
$save_count = -1;
|
||||
$tot_count = 0;
|
||||
if (count($arr)) {
|
||||
arsort($arr);
|
||||
foreach ($arr as $key=>$value) {
|
||||
$count = $arr[$key];
|
||||
if ($save_count != $count) {
|
||||
$i++;
|
||||
$no = $i;
|
||||
$save_count = $count;
|
||||
} else {
|
||||
$no = '';
|
||||
}
|
||||
|
||||
if (!$key) {
|
||||
$key = 'Unknown';
|
||||
}
|
||||
|
||||
$rate = ($count / $sum_count * 100);
|
||||
$s_rate = number_format($rate, 1);
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_num"><?php echo $no ?></td>
|
||||
<td class="td_category td_category1"><?php echo $key ?></td>
|
||||
<td>
|
||||
<div class="visit_bar">
|
||||
<span style="width:<?php echo $s_rate ?>%"></span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="td_numbig"><?php echo $count ?></td>
|
||||
<td class="td_num"><?php echo $s_rate ?></td>
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
}
|
||||
} else {
|
||||
echo '<tr><td colspan="'.$colspan.'" class="empty_table">자료가 없습니다.</td></tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
@ -7,7 +7,7 @@ auth_check($auth[$sub_menu], 'r');
|
||||
$g5['title'] = '접속자집계';
|
||||
include_once('./visit.sub.php');
|
||||
|
||||
$colspan = 5;
|
||||
$colspan = 6;
|
||||
|
||||
$sql_common = " from {$g5['visit_table']} ";
|
||||
$sql_search = " where vi_date between '{$fr_date}' and '{$to_date}' ";
|
||||
@ -41,15 +41,25 @@ $result = sql_query($sql);
|
||||
<th scope="col">IP</th>
|
||||
<th scope="col">접속 경로</th>
|
||||
<th scope="col">브라우저</th>
|
||||
<th scope="col">운영체제</th>
|
||||
<th scope="col">OS</th>
|
||||
<th scope="col">접속기기</th>
|
||||
<th scope="col">일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$brow = get_brow($row['vi_agent']);
|
||||
$os = get_os($row['vi_agent']);
|
||||
$brow = $row['vi_browser'];
|
||||
if(!$brow)
|
||||
$brow = get_brow($row['vi_agent']);
|
||||
|
||||
$os = $row['vi_os'];
|
||||
if(!$os)
|
||||
$os = get_os($row['vi_agent']);
|
||||
|
||||
$device = $row['vi_device'];
|
||||
if(!$device)
|
||||
$device = get_device($row['vi_agent']);
|
||||
|
||||
$link = '';
|
||||
$link2 = '';
|
||||
@ -83,8 +93,9 @@ $result = sql_query($sql);
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_category"><?php echo $ip ?></td>
|
||||
<td><?php echo $link ?><?php echo $title ?><?php echo $link2 ?></td>
|
||||
<td class="td_category"><?php echo $brow ?></td>
|
||||
<td class="td_category"><?php echo $os ?></td>
|
||||
<td class="td_category td_category1"><?php echo $brow ?></td>
|
||||
<td class="td_category td_category3"><?php echo $os ?></td>
|
||||
<td class="td_category td_category2"><?php echo $device; ?></td>
|
||||
<td class="td_datetime"><?php echo $row['vi_date'] ?> <?php echo $row['vi_time'] ?></td>
|
||||
</tr>
|
||||
|
||||
|
||||
@ -15,7 +15,9 @@ $sql = " select * from {$g5['visit_table']}
|
||||
where vi_date between '$fr_date' and '$to_date' ";
|
||||
$result = sql_query($sql);
|
||||
while ($row=sql_fetch_array($result)) {
|
||||
$s = get_os($row['vi_agent']);
|
||||
$s = $row['vi_os'];
|
||||
if(!$s)
|
||||
$s = get_os($row['vi_agent']);
|
||||
|
||||
$arr[$s]++;
|
||||
|
||||
@ -63,7 +65,7 @@ while ($row=sql_fetch_array($result)) {
|
||||
}
|
||||
|
||||
if (!$key) {
|
||||
$key = '직접';
|
||||
$key = 'Unknown';
|
||||
}
|
||||
|
||||
$rate = ($count / $sum_count * 100);
|
||||
|
||||
@ -9,7 +9,7 @@ $g5['title'] = '접속자검색';
|
||||
include_once('./admin.head.php');
|
||||
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||
|
||||
$colspan = 5;
|
||||
$colspan = 6;
|
||||
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처음으로 (초기화용도)
|
||||
?>
|
||||
|
||||
@ -36,6 +36,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처
|
||||
<th scope="col">접속 경로</th>
|
||||
<th scope="col">브라우저</th>
|
||||
<th scope="col">OS</th>
|
||||
<th scope="col">접속기기</th>
|
||||
<th scope="col">일시</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -68,8 +69,17 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처
|
||||
$result = sql_query($sql);
|
||||
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$brow = get_brow($row['vi_agent']);
|
||||
$os = get_os($row['vi_agent']);
|
||||
$brow = $row['vi_browser'];
|
||||
if(!$brow)
|
||||
$brow = get_brow($row['vi_agent']);
|
||||
|
||||
$os = $row['vi_os'];
|
||||
if(!$os)
|
||||
$os = get_os($row['vi_agent']);
|
||||
|
||||
$device = $row['vi_device'];
|
||||
if(!$device)
|
||||
$device = get_device($row['vi_agent']);
|
||||
|
||||
$link = "";
|
||||
$referer = "";
|
||||
@ -92,16 +102,14 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처
|
||||
else
|
||||
$ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['vi_ip']);
|
||||
|
||||
if ($brow == '기타') $brow = '<span title="'.get_text($row['vi_agent']).'">'.$brow.'</span>';
|
||||
if ($os == '기타') $os = '<span title="'.get_text($row['vi_agent']).'">'.$os.'</span>';
|
||||
|
||||
$bg = 'bg'.($i%2);
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_id"><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?sfl=vi_ip&stx=<?php echo $ip; ?>"><?php echo $ip; ?></a></td>
|
||||
<td><?php echo $link.$title; ?></a></td>
|
||||
<td class="td_idsmall"><?php echo $brow; ?></td>
|
||||
<td class="td_idsmall"><?php echo $os; ?></td>
|
||||
<td class="td_idsmall td_category1"><?php echo $brow; ?></td>
|
||||
<td class="td_idsmall td_category3"><?php echo $os; ?></td>
|
||||
<td class="td_idsmall td_category2"><?php echo $device; ?></td>
|
||||
<td class="td_datetime"><a href="<?php echo $_SERVER['SCRIPT_NAME']; ?>?sfl=vi_date&stx=<?php echo $row['vi_date']; ?>"><?php echo $row['vi_date']; ?></a> <?php echo $row['vi_time']; ?></td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
Reference in New Issue
Block a user