From effc8231ac5f4404a9e4418b785f53e61a9e099e Mon Sep 17 00:00:00 2001 From: gnuboard Date: Fri, 15 Nov 2013 11:50:32 +0900 Subject: [PATCH 1/4] =?UTF-8?q?=EC=A0=91=EC=86=8D=EC=9E=90=EA=B2=80?= =?UTF-8?q?=EC=83=89=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/admin.menu200.php | 1 + adm/visit_search.php | 175 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 176 insertions(+) create mode 100644 adm/visit_search.php diff --git a/adm/admin.menu200.php b/adm/admin.menu200.php index e9b5b66d0..6e06700e7 100644 --- a/adm/admin.menu200.php +++ b/adm/admin.menu200.php @@ -4,6 +4,7 @@ $menu['menu200'] = array ( array('200100', '회원관리', G5_ADMIN_URL.'/member_list.php', 'mb_list'), array('200300', '회원메일발송', G5_ADMIN_URL.'/mail_list.php', 'mb_mail'), array('200800', '접속자집계', G5_ADMIN_URL.'/visit_list.php', 'mb_visit', 1), + array('200810', '접속자검색', G5_ADMIN_URL.'/visit_search.php', 'mb_search', 1), array('200200', '포인트관리', G5_ADMIN_URL.'/point_list.php', 'mb_point'), array('200900', '투표관리', G5_ADMIN_URL.'/poll_list.php', 'mb_poll') ); diff --git a/adm/visit_search.php b/adm/visit_search.php new file mode 100644 index 000000000..4b3e7b4ba --- /dev/null +++ b/adm/visit_search.php @@ -0,0 +1,175 @@ +처음"; //페이지 처음으로 (초기화용도) +?> + + + + + + + +
+ + + + + +
+ + ++++++ + + + + + + + + +"), array("<", ">"), $referer); + $link = ""; + } + + if ($is_admin == 'super') + $ip = $row['vi_ip']; + else + $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row['vi_ip']); + + if ($brow == '기타') { $brow = "$brow"; } + if ($os == '기타') { $os = "$os"; } + + $list = ($i%2); + echo " + + + + + + + "; +} + +if ($i == 0) + echo ""; + +echo ""; +echo "
IP접속 경로브라우저OS일시
 $ip$link$title$brow$os$row[vi_date] $row[vi_time]
자료가 없습니다.
"; + +$page = get_paging($config['cf_write_pages'], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&domain=$domain&page="); +if ($page) { + echo "
$page
"; +} +?> + + + + From 5a670fa304c824198666cc7c4b638aec4d3b6e5f Mon Sep 17 00:00:00 2001 From: whitedot Date: Fri, 15 Nov 2013 13:25:40 +0900 Subject: [PATCH 2/4] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90:=20#11=20?= =?UTF-8?q?=EC=A0=91=EC=86=8D=EC=9E=90=EA=B2=80=EC=83=89=20=EB=A7=88?= =?UTF-8?q?=ED=81=AC=EC=97=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/visit_search.php | 243 +++++++++++++++++++++---------------------- 1 file changed, 118 insertions(+), 125 deletions(-) diff --git a/adm/visit_search.php b/adm/visit_search.php index 4b3e7b4ba..dad295534 100644 --- a/adm/visit_search.php +++ b/adm/visit_search.php @@ -13,140 +13,133 @@ $search_word = escape_trim($_GET['search_word']); $search_sort = escape_trim($_GET['search_sort']); $colspan = 5; -$qstr = "search_word=$search_word&search_sort=$search_sort"; //페이징 처리관련 변수 -$listall = "
처음"; //페이지 처음으로 (초기화용도) +$qstr = 'search_word='.$search_word.'&search_sort='.$search_sort; //페이징 처리관련 변수 +$listall = '처음'; //페이지 처음으로 (초기화용도) ?> - - - - - - -
- - - - - -
- - ------ - - - - - - - - - + + + + + + + + + + +
+
IP접속 경로브라우저OS일시
+ + + + + + + + + + + "), array("<", ">"), $referer); + $link = ""; } - $title = str_replace(array("<", ">"), array("<", ">"), $referer); - $link = ""; - } + if ($is_admin == 'super') + $ip = $row['vi_ip']; + else + $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row['vi_ip']); - if ($is_admin == 'super') - $ip = $row['vi_ip']; - else - $ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.♡.\\3.\\4", $row['vi_ip']); + if ($brow == '기타') $brow = ''.$brow.''; + if ($os == '기타') $os = ''.$os.''; - if ($brow == '기타') { $brow = "$brow"; } - if ($os == '기타') { $os = "$os"; } + $list = ($i%2); + ?> + + + + + + + + + '; ?> + +
IP접속 경로브라우저OS일시
자료가 없습니다.
+ - $list = ($i%2); - echo " - -  $ip - $link$title - $brow - $os - $row[vi_date] $row[vi_time] - "; -} - -if ($i == 0) - echo "자료가 없습니다."; - -echo ""; -echo ""; - -$page = get_paging($config['cf_write_pages'], $page, $total_page, "$_SERVER[PHP_SELF]?$qstr&domain=$domain&page="); -if ($page) { - echo "
$page
"; + From 450682f810790509e73430768565d858e6a0f5a8 Mon Sep 17 00:00:00 2001 From: whitedot Date: Fri, 15 Nov 2013 13:34:26 +0900 Subject: [PATCH 3/4] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90:=20#11=20?= =?UTF-8?q?=EC=A0=91=EC=86=8D=EC=9E=90=EA=B2=80=EC=83=89=20=EB=A7=88?= =?UTF-8?q?=ED=81=AC=EC=97=852?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/visit_search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adm/visit_search.php b/adm/visit_search.php index dad295534..85d30569b 100644 --- a/adm/visit_search.php +++ b/adm/visit_search.php @@ -121,9 +121,9 @@ $listall = '처음'; //페이지 처음 if ($brow == '기타') $brow = ''.$brow.''; if ($os == '기타') $os = ''.$os.''; - $list = ($i%2); + $tr_bg = 'tr_bg'.($i%2); ?> - + From 11dc67702084bfc9efc56b128d4c9e0c866beea5 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 15 Nov 2013 15:03:34 +0900 Subject: [PATCH 4/4] =?UTF-8?q?get=5Fsock=20=EB=8C=80=EC=B2=B4=ED=95=A8?= =?UTF-8?q?=EC=88=98=20common.lib.php=20=EB=A1=9C=20=EC=9D=B4=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/config_form.php | 40 ---------------------------------------- lib/common.lib.php | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 40 deletions(-) diff --git a/adm/config_form.php b/adm/config_form.php index a94316e9b..cec883d30 100644 --- a/adm/config_form.php +++ b/adm/config_form.php @@ -147,46 +147,6 @@ $pg_anchor = ''; -if (!function_exists("get_sock")) { - function get_sock($url) - { - // host 와 uri 를 분리 - //if (ereg("http://([a-zA-Z0-9_\-\.]+)([^<]*)", $url, $res)) - if (preg_match("/http:\/\/([a-zA-Z0-9_\-\.]+)([^<]*)/", $url, $res)) - { - $host = $res[1]; - $get = $res[2]; - } - - // 80번 포트로 소캣접속 시도 - $fp = fsockopen ($host, 80, $errno, $errstr, 30); - if (!$fp) - { - die("$errstr ($errno)\n"); - } - else - { - fputs($fp, "GET $get HTTP/1.0\r\n"); - fputs($fp, "Host: $host\r\n"); - fputs($fp, "\r\n"); - - // header 와 content 를 분리한다. - while (trim($buffer = fgets($fp,1024)) != "") - { - $header .= $buffer; - } - while (!feof($fp)) - { - $buffer .= fgets($fp,1024); - } - } - fclose($fp); - - // content 만 return 한다. - return $buffer; - } -} - if (!$config['cf_icode_server_ip']) $config['cf_icode_server_ip'] = '211.172.232.124'; if (!$config['cf_icode_server_port']) $config['cf_icode_server_port'] = '7295'; diff --git a/lib/common.lib.php b/lib/common.lib.php index ecf2d30f7..0233a5b4b 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2382,4 +2382,45 @@ function get_qa_config($fld='*') return $row; } + +// get_sock 함수 대체 +if (!function_exists("get_sock")) { + function get_sock($url) + { + // host 와 uri 를 분리 + //if (ereg("http://([a-zA-Z0-9_\-\.]+)([^<]*)", $url, $res)) + if (preg_match("/http:\/\/([a-zA-Z0-9_\-\.]+)([^<]*)/", $url, $res)) + { + $host = $res[1]; + $get = $res[2]; + } + + // 80번 포트로 소캣접속 시도 + $fp = fsockopen ($host, 80, $errno, $errstr, 30); + if (!$fp) + { + die("$errstr ($errno)\n"); + } + else + { + fputs($fp, "GET $get HTTP/1.0\r\n"); + fputs($fp, "Host: $host\r\n"); + fputs($fp, "\r\n"); + + // header 와 content 를 분리한다. + while (trim($buffer = fgets($fp,1024)) != "") + { + $header .= $buffer; + } + while (!feof($fp)) + { + $buffer .= fgets($fp,1024); + } + } + fclose($fp); + + // content 만 return 한다. + return $buffer; + } +} ?> \ No newline at end of file