Merge branch 'master' of github.com:gnuboard/g5
This commit is contained in:
@ -159,7 +159,6 @@ function icon($act, $link='', $target='_parent')
|
|||||||
function rm_rf($file)
|
function rm_rf($file)
|
||||||
{
|
{
|
||||||
if (file_exists($file)) {
|
if (file_exists($file)) {
|
||||||
@chmod($file, G5_FILE_PERMISSION);
|
|
||||||
if (is_dir($file)) {
|
if (is_dir($file)) {
|
||||||
$handle = opendir($file);
|
$handle = opendir($file);
|
||||||
while($filename = readdir($handle)) {
|
while($filename = readdir($handle)) {
|
||||||
@ -167,9 +166,13 @@ function rm_rf($file)
|
|||||||
rm_rf($file.'/'.$filename);
|
rm_rf($file.'/'.$filename);
|
||||||
}
|
}
|
||||||
closedir($handle);
|
closedir($handle);
|
||||||
rmdir($file);
|
|
||||||
} else
|
@chmod($file, G5_DIR_PERMISSION);
|
||||||
unlink($file);
|
@rmdir($file);
|
||||||
|
} else {
|
||||||
|
@chmod($file, G5_FILE_PERMISSION);
|
||||||
|
@unlink($file);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1101,5 +1101,33 @@ function fconfigform_submit(f)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
// 본인확인 모듈 실행권한 체크
|
||||||
|
if($config['cf_cert_use']) {
|
||||||
|
// kcb일 때
|
||||||
|
if($config['cf_cert_ipin'] == 'kcb' || $config['cf_cert_hp'] == 'kcb') {
|
||||||
|
// 실행모듈
|
||||||
|
if(strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {
|
||||||
|
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||||
|
$exe = G5_OKNAME_PATH.'/bin/okname';
|
||||||
|
else
|
||||||
|
$exe = G5_OKNAME_PATH.'/bin/okname_x64';
|
||||||
|
} else {
|
||||||
|
if(PHP_INT_MAX == 2147483647) // 32-bit
|
||||||
|
$exe = G5_OKNAME_PATH.'/bin/okname.exe';
|
||||||
|
else
|
||||||
|
$exe = G5_OKNAME_PATH.'/bin/oknamex64.exe';
|
||||||
|
}
|
||||||
|
|
||||||
|
echo module_exec_check($exe, 'okname');
|
||||||
|
}
|
||||||
|
|
||||||
|
// kcp일 때
|
||||||
|
if($config['cf_cert_hp'] == 'kcp') {
|
||||||
|
$exe = G5_KCPCERT_PATH.'/bin/ct_cli';
|
||||||
|
|
||||||
|
echo module_exec_check($exe, 'ct_cli');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
include_once ('./admin.tail.php');
|
include_once ('./admin.tail.php');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
$sub_menu = "300400";
|
$sub_menu = "300400";
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
|
||||||
|
|
||||||
auth_check($auth[$sub_menu], 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
@ -31,6 +30,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'" class="ov_listall">전체목록</
|
|||||||
|
|
||||||
$g5['title'] = '인기검색어순위';
|
$g5['title'] = '인기검색어순위';
|
||||||
include_once('./admin.head.php');
|
include_once('./admin.head.php');
|
||||||
|
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||||
|
|
||||||
$colspan = 3;
|
$colspan = 3;
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit;
|
if (!defined('_GNUBOARD_')) exit;
|
||||||
|
|
||||||
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
|
||||||
include_once(G5_LIB_PATH.'/visit.lib.php');
|
include_once(G5_LIB_PATH.'/visit.lib.php');
|
||||||
include_once('./admin.head.php');
|
include_once('./admin.head.php');
|
||||||
|
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||||
|
|
||||||
if (empty($fr_date)) $fr_date = G5_TIME_YMD;
|
if (empty($fr_date)) $fr_date = G5_TIME_YMD;
|
||||||
if (empty($to_date)) $to_date = G5_TIME_YMD;
|
if (empty($to_date)) $to_date = G5_TIME_YMD;
|
||||||
|
|||||||
@ -2,12 +2,12 @@
|
|||||||
$sub_menu = '200810';
|
$sub_menu = '200810';
|
||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
include_once(G5_PATH.'/lib/visit.lib.php');
|
include_once(G5_PATH.'/lib/visit.lib.php');
|
||||||
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
|
||||||
|
|
||||||
auth_check($auth[$sub_menu], 'r');
|
auth_check($auth[$sub_menu], 'r');
|
||||||
|
|
||||||
$g5['title'] = '접속자검색';
|
$g5['title'] = '접속자검색';
|
||||||
include_once('./admin.head.php');
|
include_once('./admin.head.php');
|
||||||
|
include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||||
|
|
||||||
$search_word = escape_trim($_GET['search_word']);
|
$search_word = escape_trim($_GET['search_word']);
|
||||||
$search_sort = escape_trim($_GET['search_sort']);
|
$search_sort = escape_trim($_GET['search_sort']);
|
||||||
|
|||||||
@ -83,7 +83,7 @@ if ($is_admin) {
|
|||||||
if(G5_IS_MOBILE) {
|
if(G5_IS_MOBILE) {
|
||||||
echo '<script src="'.G5_JS_URL.'/modernizr.custom.70111.js"></script>'.PHP_EOL; // overflow scroll 감지
|
echo '<script src="'.G5_JS_URL.'/modernizr.custom.70111.js"></script>'.PHP_EOL; // overflow scroll 감지
|
||||||
}
|
}
|
||||||
//if(!defined('G5_IS_ADMIN'))
|
if(!defined('G5_IS_ADMIN'))
|
||||||
echo $config['cf_add_script'];
|
echo $config['cf_add_script'];
|
||||||
?>
|
?>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@ -151,6 +151,13 @@ $sql = " insert into `{$table_prefix}config`
|
|||||||
";
|
";
|
||||||
mysql_query($sql) or die(mysql_error() . "<p>" . $sql);
|
mysql_query($sql) or die(mysql_error() . "<p>" . $sql);
|
||||||
|
|
||||||
|
// 1:1문의 설정
|
||||||
|
$sql = " insert into `{$table_prefix}qa_config`
|
||||||
|
( qa_title, qa_category, qa_skin, qa_mobile_skin, qa_use_email, qa_req_email, qa_use_hp, qa_req_hp, qa_use_editor, qa_subject_len, qa_mobile_subject_len, qa_page_rows, qa_mobile_page_rows, qa_image_width, qa_upload_size, qa_insert_content )
|
||||||
|
values
|
||||||
|
( '1:1문의', '회원|포인트', 'basic', 'basic', '1', '0', '1', '0', '1', '60', '30', '15', '15', '600', '1048576', '' ) ";
|
||||||
|
mysql_query($sql);
|
||||||
|
|
||||||
// 관리자 회원가입
|
// 관리자 회원가입
|
||||||
$sql = " insert into `{$table_prefix}member`
|
$sql = " insert into `{$table_prefix}member`
|
||||||
set mb_id = '$admin_id',
|
set mb_id = '$admin_id',
|
||||||
|
|||||||
@ -2426,4 +2426,65 @@ if (!function_exists("get_sock")) {
|
|||||||
return $buffer;
|
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<count($out); $i++) {
|
||||||
|
if(strpos(strtoupper($out[$i]), 'KCP ENC') !== false) {
|
||||||
|
$search = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 'okname':
|
||||||
|
exec($exe.' D 2>&1', $out);
|
||||||
|
for($i=0; $i<count($out); $i++) {
|
||||||
|
if(strpos(strtolower($out[$i]), 'ret code') !== false) {
|
||||||
|
$search = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!$search)
|
||||||
|
$error = $exe.'\n파일을 바이너리 타입으로 다시 업로드하여 주십시오.';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if($error) {
|
||||||
|
$error = '<script>alert("'.$error.'");</script>';
|
||||||
|
}
|
||||||
|
|
||||||
|
return $error;
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
@ -1,8 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||||
|
?>
|
||||||
|
|
||||||
// 환경설정 변수 추가 스크립트, css 에 jquery ui 의 datepicker 코드를 더한다.
|
|
||||||
$config['cf_add_script'] .= <<<EOT
|
|
||||||
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css" rel="stylesheet" />
|
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/base/jquery-ui.css" rel="stylesheet" />
|
||||||
<style>
|
<style>
|
||||||
.ui-datepicker { font:12px dotum; }
|
.ui-datepicker { font:12px dotum; }
|
||||||
@ -33,5 +32,3 @@ jQuery(function($){
|
|||||||
$.datepicker.setDefaults($.datepicker.regional["ko"]);
|
$.datepicker.setDefaults($.datepicker.regional["ko"]);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
EOT;
|
|
||||||
?>
|
|
||||||
@ -16,6 +16,18 @@ $cmd = "$exe $svcTxSeqno \"$name\" $birthday $gender $ntvFrnrTpCd $mblTelCmmCd $
|
|||||||
//cmd 실행
|
//cmd 실행
|
||||||
exec($cmd, $out, $ret);
|
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 응답 정보
|
okname 응답 정보
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user