새글 페이지와 썸네일 파일의 잘못된 코드 수정
This commit is contained in:
@ -130,7 +130,7 @@ function imageview(id, w, h)
|
||||
foreach($amenu as $key=>$value) {
|
||||
$href1 = $href2 = '';
|
||||
|
||||
if ($menu['menu'.$key][0][2]) {
|
||||
if (isset($menu['menu'.$key][0][2]) && $menu['menu'.$key][0][2]) {
|
||||
$href1 = '<a href="'.$menu['menu'.$key][0][2].'" class="gnb_1da">';
|
||||
$href2 = '</a>';
|
||||
} else {
|
||||
|
||||
@ -11,7 +11,7 @@ if( ! $call ){
|
||||
if( ! $is_admin ){
|
||||
$sql = " select count(*) as cnt from {$g5['auth_table']} where mb_id = '{$member['mb_id']}' ";
|
||||
$row = sql_fetch($sql);
|
||||
if ( ! $row['cnt']) {
|
||||
if (! (isset($row['cnt']) && $row['cnt'])) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,9 +53,17 @@ for($i=0;$i<$count_chk_bn_id;$i++)
|
||||
// 업로드된 파일이 있다면 파일삭제
|
||||
$sql2 = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ";
|
||||
$result2 = sql_query($sql2);
|
||||
while ($row2 = sql_fetch_array($result2))
|
||||
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']);
|
||||
while ($row2 = sql_fetch_array($result2)){
|
||||
|
||||
$delete_file = run_replace('delete_file_path', G5_DATA_PATH.'/file/'.$bo_table.'/'.str_replace('../', '', $row2['bf_file']), $row2);
|
||||
if( file_exists($delete_file) ){
|
||||
@unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']);
|
||||
}
|
||||
// 이미지파일이면 썸네일삭제
|
||||
if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['bf_file'])) {
|
||||
delete_board_thumbnail($bo_table, $row2['bf_file']);
|
||||
}
|
||||
}
|
||||
// 파일테이블 행 삭제
|
||||
sql_query(" delete from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ");
|
||||
|
||||
@ -63,9 +71,9 @@ for($i=0;$i<$count_chk_bn_id;$i++)
|
||||
}
|
||||
else
|
||||
{
|
||||
// 코멘트 포인트 삭제
|
||||
if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '코멘트'))
|
||||
insert_point($row['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_id']}-{$row['wr_id']} 코멘트삭제");
|
||||
// 댓글 포인트 삭제
|
||||
if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '댓글'))
|
||||
insert_point($row['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_id']}-{$row['wr_id']} 댓글삭제");
|
||||
|
||||
$count_comment++;
|
||||
}
|
||||
@ -120,8 +128,8 @@ for($i=0;$i<$count_chk_bn_id;$i++)
|
||||
$comment_reply = substr($write['wr_comment_reply'], 0, $len);
|
||||
|
||||
// 코멘트 삭제
|
||||
if (!delete_point($write['mb_id'], $bo_table, $comment_id, '코멘트')) {
|
||||
insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_parent']}-{$comment_id} 코멘트삭제");
|
||||
if (!delete_point($write['mb_id'], $bo_table, $comment_id, '댓글')) {
|
||||
insert_point($write['mb_id'], $board['bo_comment_point'] * (-1), "{$board['bo_subject']} {$write['wr_parent']}-{$comment_id} 댓글삭제");
|
||||
}
|
||||
|
||||
// 코멘트 삭제
|
||||
|
||||
@ -227,7 +227,7 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
|
||||
return;
|
||||
|
||||
$size = @getimagesize($source_file);
|
||||
if($size[2] < 1 || $size[2] > 3) // gif, jpg, png 에 대해서만 적용
|
||||
if(!isset($size[2]) || $size[2] < 1 || $size[2] > 3) // gif, jpg, png 에 대해서만 적용
|
||||
return;
|
||||
|
||||
if (!is_dir($target_path)) {
|
||||
|
||||
Reference in New Issue
Block a user