Merge branch 'master' of github.com:gnuboard/g5

This commit is contained in:
whitedot
2014-01-09 10:41:45 +09:00
3 changed files with 43 additions and 30 deletions

View File

@ -421,6 +421,7 @@ $frm_submit .= '</div>';
<tr>
<th scope="row"><label for="bo_count_modify">원글 수정 불가<strong class="sound_only">필수</strong></label></th>
<td>
<?php echo help('댓글의 수가 설정 수 이상이면 원글을 수정할 수 없습니다. 0으로 설정하시면 댓글 수에 관계없이 수정할 수있습니다.'); ?>
댓글 <input type="text" name="bo_count_modify" value="<?php echo $board['bo_count_modify'] ?>" id="bo_count_modify" required class="required numeric frm_input" size="3">개 이상 달리면 수정불가
</td>
<td class="td_grpset">
@ -1290,8 +1291,8 @@ function fboardform_submit(f)
<?php echo get_editor_js("bo_mobile_content_head"); ?>
<?php echo get_editor_js("bo_mobile_content_tail"); ?>
if (parseInt(f.bo_count_modify.value) < 1) {
alert("원글 수정 불가 댓글수는 1 이상 입력하셔야 합니다.");
if (parseInt(f.bo_count_modify.value) < 0) {
alert("원글 수정 불가 댓글수는 0 이상 입력하셔야 합니다.");
f.bo_count_modify.focus();
return false;
}

View File

@ -89,8 +89,8 @@ if ($w == '') {
and mb_id <> '{$member['mb_id']}'
and wr_is_comment = 1 ";
$row = sql_fetch($sql);
if ($row['cnt'] >= $board['bo_count_modify'] && !$is_admin)
alert('이 글과 관련된 코멘트가 존재하므로 수정 할 수 없습니다.\\n\\n코멘트가 '.$board['bo_count_modify'].'건 이상 달린 원글은 수정할 수 없습니다.');
if ($board['bo_count_modify'] && $row['cnt'] >= $board['bo_count_modify'] && !$is_admin)
alert('이 글과 관련된 댓글이 존재하므로 수정 할 수 없습니다.\\n\\n댓글이 '.$board['bo_count_modify'].'건 이상 달린 원글은 수정할 수 없습니다.');
$title_msg = '글수정';
} else if ($w == 'r') {

View File

@ -2447,33 +2447,45 @@ function module_exec_check($exe, $type)
// 바이너리 파일인지
if($is_linux) {
$search = false;
exec('ls', $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;
}
$executable = true;
if(!$search)
$error = $exe.'\n파일을 바이너리 타입으로 다시 업로드하여 주십시오.';
switch($type) {
case 'ct_cli':
exec($exe.' -h 2>&1', $out);
if(empty($out)) {
$executable = false;
break;
}
for($i=0; $i<count($out); $i++) {
if(strpos($out[$i], 'KCP ENC') !== false) {
$search = true;
break;
}
}
break;
case 'okname':
exec($exe.' D 2>&1', $out);
if(empty($out)) {
$executable = false;
break;
}
for($i=0; $i<count($out); $i++) {
if(strpos(strtolower($out[$i]), 'ret code') !== false) {
$search = true;
break;
}
}
break;
}
if(!$executable) {
$error = 'exec 함수의 실행권한이 없습니다. 서버관리자에게 문의해 주십시오.';
} else if(!$search) {
$error = $exe.'\n파일을 바이너리 타입으로 다시 업로드하여 주십시오.';
}
}
}