본인확인 사용할 때 모듈의 실행권한 체크 코드 추가

This commit is contained in:
chicpro
2013-12-26 18:02:14 +09:00
parent 7d8a0f7b91
commit b5bf60cbce
2 changed files with 48 additions and 0 deletions

View File

@ -1101,5 +1101,41 @@ function fconfigform_submit(f)
</script>
<?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';
}
if(!is_executable($exe)) {
echo '<script>'.PHP_EOL;
echo 'alert("'.$exe.'\n파일의 실행권한이 없습니다.\n\nchmod 755 '.basename($exe).' 과 같이 실행권한을 부여해 주십시오.")'.PHP_EOL;
echo '</script>'.PHP_EOL;
}
}
// kcp일 때
if($config['cf_cert_hp'] == 'kcp') {
$exe = G5_KCPCERT_PATH.'/bin/ct_cli';
if(!is_executable($exe)) {
echo '<script>'.PHP_EOL;
echo 'alert("'.$exe.'\n파일의 실행권한이 없습니다.\n\nchmod 755 '.basename($exe).' 과 같이 실행권한을 부여해 주십시오.")'.PHP_EOL;
echo '</script>'.PHP_EOL;
}
}
}
include_once ('./admin.tail.php');
?>