Merge branch 'g5'

This commit is contained in:
chicpro
2016-05-04 13:32:20 +09:00
10 changed files with 30 additions and 10 deletions

View File

@ -15,6 +15,14 @@ $msg = array();
// 1:1문의 설정값
$qaconfig = get_qa_config();
if(trim($qaconfig['qa_category'])) {
$category = explode('|', $qaconfig['qa_category']);
if(!in_array($qa_category, $category))
alert('분류를 올바르게 지정해 주십시오.');
} else {
alert('1:1문의 설정에서 분류를 설정해 주십시오');
}
// e-mail 체크
$qa_email = '';
if(isset($_POST['qa_email']) && $_POST['qa_email'])
@ -102,6 +110,18 @@ if($w == 'u' || $w == 'a' || $w == 'r') {
}
}
// 파일개수 체크
$file_count = 0;
$upload_count = count($_FILES['bf_file']['name']);
for ($i=1; $i<=$upload_count; $i++) {
if($_FILES['bf_file']['name'][$i] && is_uploaded_file($_FILES['bf_file']['tmp_name'][$i]))
$file_count++;
}
if($file_count > 2)
alert('첨부파일을 2개 이하로 업로드 해주십시오.');
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
@mkdir(G5_DATA_PATH.'/qa', G5_DIR_PERMISSION);
@chmod(G5_DATA_PATH.'/qa', G5_DIR_PERMISSION);

View File

@ -304,7 +304,6 @@ $secret_checked = "";
if ($w == '') {
$password_required = 'required';
$file = array('count'=>$file_count);
} else if ($w == 'u') {
$password_required = '';
@ -338,6 +337,8 @@ if ($w == '') {
}
$file = get_file($bo_table, $wr_id);
if($file_count < $file['count'])
$file_count = $file['count'];
} else if ($w == 'r') {
if (strstr($write['wr_option'], 'secret')) {
$is_secret = true;
@ -349,7 +350,6 @@ if ($w == '') {
for ($i=1; $i<=G5_LINK_COUNT; $i++) {
$write['wr_link'.$i] = get_text($write['wr_link'.$i]);
}
$file = array('count'=>$file_count);
}
set_session('ss_bo_table', $_REQUEST['bo_table']);

View File

@ -129,7 +129,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
</tr>
<?php } ?>
<?php for ($i=0; $is_file && $i<$file['count']; $i++) { ?>
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<tr>
<th scope="row">파일 #<?php echo $i+1 ?></th>
<td>

View File

@ -128,7 +128,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
</tr>
<?php } ?>
<?php for ($i=0; $is_file && $i<$file['count']; $i++) { ?>
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<tr>
<th scope="row">파일 #<?php echo $i+1 ?></th>
<td>

View File

@ -146,7 +146,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
</tr>
<?php } ?>
<?php for ($i=0; $is_file && $i<$file['count']; $i++) { ?>
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<tr>
<th scope="row">파일 #<?php echo $i+1 ?></th>
<td>

View File

@ -146,7 +146,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
</tr>
<?php } ?>
<?php for ($i=0; $is_file && $i<$file['count']; $i++) { ?>
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<tr>
<th scope="row">파일 #<?php echo $i+1 ?></th>
<td>

View File

@ -129,7 +129,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
</tr>
<?php } ?>
<?php for ($i=0; $is_file && $i<$file['count']; $i++) { ?>
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<tr>
<th scope="row">파일 #<?php echo $i+1 ?></th>
<td>

View File

@ -128,7 +128,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
</tr>
<?php } ?>
<?php for ($i=0; $is_file && $i<$file['count']; $i++) { ?>
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<tr>
<th scope="row">파일 #<?php echo $i+1 ?></th>
<td>

View File

@ -146,7 +146,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
</tr>
<?php } ?>
<?php for ($i=0; $is_file && $i<$file['count']; $i++) { ?>
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<tr>
<th scope="row">파일 #<?php echo $i+1 ?></th>
<td>

View File

@ -146,7 +146,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
</tr>
<?php } ?>
<?php for ($i=0; $is_file && $i<$file['count']; $i++) { ?>
<?php for ($i=0; $is_file && $i<$file_count; $i++) { ?>
<tr>
<th scope="row">파일 #<?php echo $i+1 ?></th>
<td>