From 7d8a0f7b91c1341ba07a1fce3070646cf5180077 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 26 Dec 2013 17:15:03 +0900 Subject: [PATCH 1/6] =?UTF-8?q?=EC=B6=94=EA=B0=80=20script=20css=20?= =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=20=ED=8E=98=EC=9D=B4=EC=A7=80?= =?UTF-8?q?=EC=97=90=EC=84=9C=EB=8A=94=20=EC=B6=9C=EB=A0=A5=EB=90=98?= =?UTF-8?q?=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- head.sub.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/head.sub.php b/head.sub.php index f0dbbb49b..b1988fe05 100644 --- a/head.sub.php +++ b/head.sub.php @@ -83,7 +83,7 @@ if ($is_admin) { if(G5_IS_MOBILE) { echo ''.PHP_EOL; // overflow scroll 감지 } -//if(!defined('G5_IS_ADMIN')) +if(!defined('G5_IS_ADMIN')) echo $config['cf_add_script']; ?> From b5bf60cbcef806cf81c19a5e9cea5e90a4e349ea Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 26 Dec 2013 18:02:14 +0900 Subject: [PATCH 2/6] =?UTF-8?q?=EB=B3=B8=EC=9D=B8=ED=99=95=EC=9D=B8=20?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=ED=95=A0=20=EB=95=8C=20=EB=AA=A8=EB=93=88?= =?UTF-8?q?=EC=9D=98=20=EC=8B=A4=ED=96=89=EA=B6=8C=ED=95=9C=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=BD=94=EB=93=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/config_form.php | 36 ++++++++++++++++++++++++++++++++++++ plugin/okname/hpcert1.php | 12 ++++++++++++ 2 files changed, 48 insertions(+) diff --git a/adm/config_form.php b/adm/config_form.php index cec883d30..20226d6ae 100644 --- a/adm/config_form.php +++ b/adm/config_form.php @@ -1101,5 +1101,41 @@ function fconfigform_submit(f) '.PHP_EOL; + echo 'alert("'.$exe.'\n파일의 실행권한이 없습니다.\n\nchmod 755 '.basename($exe).' 과 같이 실행권한을 부여해 주십시오.")'.PHP_EOL; + echo ''.PHP_EOL; + } + } + + // kcp일 때 + if($config['cf_cert_hp'] == 'kcp') { + $exe = G5_KCPCERT_PATH.'/bin/ct_cli'; + + if(!is_executable($exe)) { + echo ''.PHP_EOL; + } + } +} + include_once ('./admin.tail.php'); ?> diff --git a/plugin/okname/hpcert1.php b/plugin/okname/hpcert1.php index 684226671..e4bdbaff3 100644 --- a/plugin/okname/hpcert1.php +++ b/plugin/okname/hpcert1.php @@ -16,6 +16,18 @@ $cmd = "$exe $svcTxSeqno \"$name\" $birthday $gender $ntvFrnrTpCd $mblTelCmmCd $ //cmd 실행 exec($cmd, $out, $ret); +if($ret == 127) { + alert_close('모듈실행 파일이 존재하지 않습니다.\\n\\n'.basename($exe).' 파일이 '.G5_PLUGIN_DIR.'/'.G5_OKNAME_DIR.'/bin 안에 있어야 합니다.'); +} + +if($ret == 126) { + alert_close('모듈실행 파일의 실행권한이 없습니다.\\n\\nchmod 755 '.basename($exe).' 과 같이 실행권한을 부여해 주십시오.'); +} + +if($ret == -1) { + alert_close('모듈실행 파일의 실행권한이 없습니다.\\n\\ncmd.exe의 IUSER 실행권한이 있는지 확인하여 주십시오.'); +} + /************************************************************************** okname 응답 정보 **************************************************************************/ From ee269c66adce350fca94dcad10c5b6d370433fda Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 27 Dec 2013 11:01:17 +0900 Subject: [PATCH 3/6] =?UTF-8?q?=EC=9D=B8=EC=A6=9D=20=EB=AA=A8=EB=93=88=20?= =?UTF-8?q?=EC=8B=A4=ED=96=89=EA=B6=8C=ED=95=9C=20=EC=B2=B4=ED=81=AC=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/config_form.php | 12 ++------- lib/common.lib.php | 61 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+), 10 deletions(-) diff --git a/adm/config_form.php b/adm/config_form.php index 20226d6ae..6dec4a4d5 100644 --- a/adm/config_form.php +++ b/adm/config_form.php @@ -1118,22 +1118,14 @@ if($config['cf_cert_use']) { $exe = G5_OKNAME_PATH.'/bin/oknamex64.exe'; } - if(!is_executable($exe)) { - echo ''.PHP_EOL; - } + echo module_exec_check($exe, 'okname'); } // kcp일 때 if($config['cf_cert_hp'] == 'kcp') { $exe = G5_KCPCERT_PATH.'/bin/ct_cli'; - if(!is_executable($exe)) { - echo ''.PHP_EOL; - } + echo module_exec_check($exe, 'ct_cli'); } } diff --git a/lib/common.lib.php b/lib/common.lib.php index 9d9299335..fdb650f59 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2426,4 +2426,65 @@ if (!function_exists("get_sock")) { return $buffer; } } + +// 인증, 결제 모듈 실행 체크 +function module_exec_check($exe, $type) +{ + $error = ''; + $is_linux = false; + if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') + $is_linux = true; + + // 모듈 파일 존재하는지 체크 + if(!is_file($exe)) { + $error = $exe.' 파일이 존재하지 않습니다.'; + } else { + // 실행권한 체크 + if(!is_executable($exe)) { + if($is_linux) + $error = $exe.'\n파일의 실행권한이 없습니다.\n\nchmod 755 '.basename($exe).' 과 같이 실행권한을 부여해 주십시오.'; + else + $error = $exe.'\n파일의 실행권한이 없습니다.\n\n'.basename($exe).' 파일에 실행권한을 부여해 주십시오.'; + } else { + // 바이너리 파일인지 + if($is_linux) { + $search = false; + exec('whoami', $out); + if(empty($out)) { + $error = 'exec 함수의 실행권한이 없습니다. 서버관리자에게 문의해 주십시오.'; + } else { + switch($type) { + case 'ct_cli': + exec($exe.' -h 2>&1', $out); + for($i=0; $i&1', $out); + for($i=0; $i'; + } + + return $error; +} ?> \ No newline at end of file From 9f109f203ebbce5b1dbd9f475c2090c16139ed56 Mon Sep 17 00:00:00 2001 From: chicpro Date: Tue, 31 Dec 2013 09:06:33 +0900 Subject: [PATCH 4/6] =?UTF-8?q?jquery=20datepicker=20=EC=A0=81=EC=9A=A9?= =?UTF-8?q?=EB=90=98=EC=A7=80=20=EC=95=8A=EB=8A=94=20=EC=98=A4=EB=A5=98=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/popular_rank.php | 4 ++-- adm/visit.sub.php | 4 ++-- adm/visit_search.php | 14 ++++++------ plugin/jquery-ui/datepicker.php | 39 +++++++++++++++------------------ 4 files changed, 29 insertions(+), 32 deletions(-) diff --git a/adm/popular_rank.php b/adm/popular_rank.php index fc6ab489c..a6b396c47 100644 --- a/adm/popular_rank.php +++ b/adm/popular_rank.php @@ -1,7 +1,6 @@ 전체목록 diff --git a/adm/visit.sub.php b/adm/visit.sub.php index 7cb87dd68..b153152b1 100644 --- a/adm/visit.sub.php +++ b/adm/visit.sub.php @@ -1,9 +1,9 @@ $(function(){ - $("#fr_date, #to_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" }); + $("#fr_date, #to_date").datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy-mm-dd", showButtonPanel: true, yearRange: "c-99:c+99", maxDate: "+0d" }); }); function fvisit_submit(act) diff --git a/adm/visit_search.php b/adm/visit_search.php index 3408614ed..1c3d6c964 100644 --- a/adm/visit_search.php +++ b/adm/visit_search.php @@ -1,13 +1,13 @@ -처음'; //페이지 처음