This commit is contained in:
shim
2023-04-17 11:06:08 +09:00
parent d0b393aa97
commit 76264e09ad
4686 changed files with 552713 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
<?php
if(!defined('__KIMS__')) exit;
if ($m != 'admin' && $iframe !='Y' && !$system)
{
$g['agent'] = $_SERVER['HTTP_USER_AGENT'];
$g['ip'] = $_SERVER['REMOTE_ADDR'];
$_SESSION['location'.$s] = strip_tags($g['location']);
if(strpos($g['agent'],'Google')||strpos($g['agent'],'Yahoo')||strpos($g['agent'],'naver')||strpos($g['agent'],'bot'))
{
$_SESSION['mylog'.$s] = $g['ip'].'-'.$date['totime'];
$_SESSION['agent'.$s] = $g['agent'];
exit;
}
if ($_SESSION['mylog'.$s])
{
getDbUpdate($table['s_counter'],'page=page+1','site='.$s." and date='".$date['today']."'");
if ($_keyword && !strstr('[name][nic][id][term]',$where))
{
if (preg_match("/(http|https):\/\/(.*?)$/i", $_keyword)) exit;
$_INKEY = getDbData($table['s_inkey'],'site='.$s." and date='".$date['today']."' and keyword='".$_keyword."'",'*');
if($_INKEY['uid']) getDbUpdate($table['s_inkey'],'hit=hit+1','uid='.$_INKEY['uid']);
else getDbInsert($table['s_inkey'],'site,date,keyword,hit',"'".$s."','".$date['today']."','".$_keyword."','1'");
}
}
else {
$_referer = $referer ? urldecode($referer) : $_SERVER['HTTP_REFERER'];
$_sengine = getSearchEngine($_referer);
$_outkeyw = getKeyword($_referer);
$_browser = getBrowzer($g['agent']);
$_QKEY = 'site,mbruid,ip,referer,agent,d_regis';
$_QVAL = "'".$s."','".$my['uid']."','".$g['ip']."','".$_referer."','".$g['agent']."','".$date['totime']."'";
getDbInsert($table['s_referer'],$_QKEY,$_QVAL);
$_REFCNT = getDbRows($table['s_referer'],'');
if ($_REFCNT > 1000000)
{
$_REFOVER = getDbArray($table['s_referer'],'','*','uid','asc',($_REFCNT - 1000000),1);
while($_REFK=db_fetch_array($_REFOVER)) getDbDelete($table['s_referer'],'uid='.$_REFK['uid']);
}
if ($_outkeyw)
{
$_OUTKEY = getDbData($table['s_outkey'],'site='.$s." and date='".$date['today']."' and keyword='".$_outkeyw."'",'*');
if($_OUTKEY['uid']) getDbUpdate($table['s_outkey'],$_sengine.'='.$_sengine.'+1,total=total+1','uid='.$_OUTKEY['uid']);
else getDbInsert($table['s_outkey'],'site,date,keyword,'.$_sengine.',total',"'".$s."','".$date['today']."','".$_outkeyw."','1','1'");
}
$_ISBROWER = getDbData($table['s_browser'],'site='.$s." and date='".$date['today']."' and browser='".$_browser."'",'*');
if ($_ISBROWER['uid']) getDbUpdate($table['s_browser'],'hit=hit+1','uid='.$_ISBROWER['uid']);
else getDbInsert($table['s_browser'],'site,date,browser,hit',"'".$s."','".$date['today']."','".$_browser."','1'");
$_TODAYCNT = getDbData($table['s_counter'],"date='".$date['today']."' and site=".$s,'*');
if ($_TODAYCNT['uid'])
{
getDbUpdate($table['s_counter'],'hit=hit+1,page=page+1','uid='.$_TODAYCNT['uid']);
getDbUpdate($table['s_numinfo'],'visit=visit+1',"date='".$date['today']."' and site=".$s);
}
else
{
getDbInsert($table['s_counter'],'site,date,hit,page',"'".$s."','".$date['today']."','1','1'");
getDbInsert($table['s_numinfo'],'date,site,visit',"'".$date['today']."','".$s."','1'");
}
if ($_REFCNT == 1)
{
db_query("OPTIMIZE TABLE ".$table['s_referer'],$DB_CONNECT);
db_query("OPTIMIZE TABLE ".$table['s_outkey'],$DB_CONNECT);
db_query("OPTIMIZE TABLE ".$table['s_browser'],$DB_CONNECT);
db_query("OPTIMIZE TABLE ".$table['s_counter'],$DB_CONNECT);
db_query("OPTIMIZE TABLE ".$table['s_numinfo'],$DB_CONNECT);
}
$_SESSION['mylog'.$s] = $g['ip'].'-'.$date['totime'];
$_SESSION['agent'.$s] = $g['agent'];
}
}
?>

View File

@@ -0,0 +1 @@
접속통계

View File

@@ -0,0 +1,30 @@
<?php $POPUPS = getDbSelect($table['s_popup'],'hidden=0','*')?>
<?php while($POP=db_fetch_array($POPUPS)):?>
<?php if (!$POP['term0'] && ($POP['term1'] > $date['totime'] || $POP['term2'] < $date['totime'])):?>
<?php getDbUpdate($table['s_popup'],'hidden=1','uid='.$POP['uid']);continue?>
<?php endif?>
<?php $POP['xdispage']='_'.$POP['dispage']?>
<?php if(strpos($POP['xdispage'],'[c['.$_HS['uid'].']]')) continue?>
<?php if(!strpos($POP['xdispage'],'[s['.$_HS['uid'].']]') && !strpos($POP['xdispage'],'[m['.$_HS['uid'].']'.$_HM['id'].']') && !strpos($POP['xdispage'],'[m['.$_HS['uid'].']'.$_HP['id'].']')) continue?>
<?php
if ($g['mobile']&&$_SESSION['pcmode']!='Y') $POP['skin'] = $POP['m_skin'];
$g['dir_popup_skin'] = $g['path_module'].'popup/themes/'. $POP['skin'].'/';
?>
<aside>
<?php
if(strpos($_COOKIE['popview'], $POP['uid']) !== false) {
} else {
if ($POP['admin']) {
if ($my['admin']) {
include $g['dir_popup_skin'].'main.php';
}
} else {
include $g['dir_popup_skin'].'main.php';
}
}
?>
</aside>
<?php endwhile?>

View File

@@ -0,0 +1 @@
팝업

View File

@@ -0,0 +1,13 @@
<?php
if(!defined('__KIMS__')) exit;
$g['cutips'] = array
(
'127.0.0.2',
);
foreach ($g['cutips'] as $_cip)
{
if (strpos('_'.$_SERVER['REMOTE_ADDR'],$_cip)) exit;
}
?>

View File

@@ -0,0 +1 @@
IP 차단

View File

@@ -0,0 +1,30 @@
<b>IP차단 스위치 이용안내</b>
------------------------------------------------------------
이 스위치는 특정 IP나 특정 대역의 IP를 원천적으로 차단합니다.
편집아이콘을 클릭하면 스위치 코드를 편집할 수 있습니다.
<b>1) 127.0.0.2 를 차단하려면..</b>
$g['cutips'] = array
(
'127.0.0.2',
);
<b>2) 127.0. 으로 시작하는 IP대역을 차단하려면..</b>
$g['cutips'] = array
(
'127.0.',
);
<b>3) 127.0.0.2 와 192.168. 로 시작하는 IP를 차단하려면..</b>
$g['cutips'] = array
(
'127.0.0.2',
'192.168.',
);
<b>관리자님의 IP를 블럭처리하면 접근이 차단되어 FTP로만 수정할 수 있으니 주의하세요.</b>