썸네일 정보
썸네일
첨부파일
본문
등록된 파일을 지워도 리스트에서 썸네일은 지운파일 그대로 보여집니다.
뭐가 잘못된건지, 어떻게 수정해야 하는지 알려주세요
뭐가 잘못된건지, 어떻게 수정해야 하는지 알려주세요
댓글 전체
bbs/delete.php파일에서
======================================== 64라인쯤에
while ($row = sql_fetch_array($result))
{
// 원글이라면
if (!$row[wr_is_comment])
{
// 원글 포인트 삭제
if (!delete_point($row[mb_id], $bo_table, $row[wr_id], '쓰기'))
insert_point($row[mb_id], $board[bo_write_point] * (-1), "$board[bo_subject] $row[wr_id] 글삭제");
// 업로드된 파일이 있다면 파일삭제
$sql2 = " select * from $g4[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("$g4[path]/data/file/$bo_table/$row2[bf_file]"); <===== 이부분
// 파일테이블 행 삭제
sql_query(" delete from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' ");
$count_write++;
}
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]} 코멘트삭제");
$count_comment++;
}
}
===================================================================
<===== 이부분 밑에
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]"); <===== 이부분
@unlink("$g4[path]/data/file/$bo_table/썸네일디렉토리/파일명$row2[bf_file]"); <===== 이부분
아랫줄을 적용하여 넣어주시고
bbs/write_update.php 에서
====================================== 146라인 밑에
// 존재하는 파일이 있다면 삭제합니다.
$row = sql_fetch(" select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$i' ");
@unlink("$g4[path]/data/file/$bo_table/$row[bf_file]");
이부분을 찾으셔서
@unlink("$g4[path]/data/file/$bo_table/$row[bf_file]");
밑에
@unlink("$g4[path]/data/file/$bo_table/썸네일디렉토리/파일명$row2[bf_file]"); <===== 이부분
추가 해주세요 물론 경로, 파일명 바꿔 주셔야 겠죠
======================================== 64라인쯤에
while ($row = sql_fetch_array($result))
{
// 원글이라면
if (!$row[wr_is_comment])
{
// 원글 포인트 삭제
if (!delete_point($row[mb_id], $bo_table, $row[wr_id], '쓰기'))
insert_point($row[mb_id], $board[bo_write_point] * (-1), "$board[bo_subject] $row[wr_id] 글삭제");
// 업로드된 파일이 있다면 파일삭제
$sql2 = " select * from $g4[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("$g4[path]/data/file/$bo_table/$row2[bf_file]"); <===== 이부분
// 파일테이블 행 삭제
sql_query(" delete from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$row[wr_id]' ");
$count_write++;
}
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]} 코멘트삭제");
$count_comment++;
}
}
===================================================================
<===== 이부분 밑에
@unlink("$g4[path]/data/file/$bo_table/$row2[bf_file]"); <===== 이부분
@unlink("$g4[path]/data/file/$bo_table/썸네일디렉토리/파일명$row2[bf_file]"); <===== 이부분
아랫줄을 적용하여 넣어주시고
bbs/write_update.php 에서
====================================== 146라인 밑에
// 존재하는 파일이 있다면 삭제합니다.
$row = sql_fetch(" select bf_file from $g4[board_file_table] where bo_table = '$bo_table' and wr_id = '$wr_id' and bf_no = '$i' ");
@unlink("$g4[path]/data/file/$bo_table/$row[bf_file]");
이부분을 찾으셔서
@unlink("$g4[path]/data/file/$bo_table/$row[bf_file]");
밑에
@unlink("$g4[path]/data/file/$bo_table/썸네일디렉토리/파일명$row2[bf_file]"); <===== 이부분
추가 해주세요 물론 경로, 파일명 바꿔 주셔야 겠죠