Merge branch 'g5'
This commit is contained in:
@ -304,6 +304,7 @@ $secret_checked = "";
|
||||
|
||||
if ($w == '') {
|
||||
$password_required = 'required';
|
||||
$file = array('count'=>$file_count);
|
||||
} else if ($w == 'u') {
|
||||
$password_required = '';
|
||||
|
||||
@ -348,6 +349,7 @@ 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']);
|
||||
|
||||
@ -15,7 +15,12 @@ if($board['bo_use_category']) {
|
||||
$categories = array_map('trim', explode("|", $board['bo_category_list'].($is_admin ? '|공지' : '')));
|
||||
if(!empty($categories) && !in_array($ca_name, $categories))
|
||||
$msg[] = '분류를 올바르게 입력하세요.';
|
||||
|
||||
if(empty($categories))
|
||||
$ca_name = '';
|
||||
}
|
||||
} else {
|
||||
$ca_name = '';
|
||||
}
|
||||
|
||||
$wr_subject = '';
|
||||
@ -410,6 +415,24 @@ if (!$group['gr_use_access'] && $board['bo_read_level'] < 2 && !$secret) {
|
||||
naver_syndi_ping($bo_table, $wr_id);
|
||||
}
|
||||
|
||||
// 파일개수 체크
|
||||
$file_count = 0;
|
||||
$upload_count = count($_FILES['bf_file']['name']);
|
||||
|
||||
for ($i=0; $i<$upload_count; $i++) {
|
||||
if($_FILES['bf_file']['name'][$i] && is_uploaded_file($_FILES['bf_file']['tmp_name'][$i]))
|
||||
$file_count++;
|
||||
}
|
||||
|
||||
if($w == 'u') {
|
||||
$file = get_file($bo_table, $wr_id);
|
||||
if($file_count && (int)$file['count'] > $board['bo_upload_count'])
|
||||
alert('기존 파일을 삭제하신 후 첨부파일을 '.number_format($board['bo_upload_count']).'개 이하로 업로드 해주십시오.');
|
||||
} else {
|
||||
if($file_count > $board['bo_upload_count'])
|
||||
alert('첨부파일을 '.number_format($board['bo_upload_count']).'개 이하로 업로드 해주십시오.');
|
||||
}
|
||||
|
||||
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
|
||||
@mkdir(G5_DATA_PATH.'/file/'.$bo_table, G5_DIR_PERMISSION);
|
||||
@chmod(G5_DATA_PATH.'/file/'.$bo_table, G5_DIR_PERMISSION);
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user