안녕하세요
관리자 프론트에서 게시판 을 삭제할경우 해당게시판 에디터에서 등록된 이미지파일을 같이 모두 삭제 처리 해줘야할경우 다운받으셔서 업데이트 해주시기 바랍니다.
adm/board_list_update.php
만약
해당파일 커스텀 되어있다면? 대략 88라인
if (preg_match("/^[A-Za-z0-9_]+$/", $tmp_bo_table)) {
//여기
include './board_delete.inc.php';
}
해당부분 사이에 다음과 같이 넣어주시면됩니다.
$sql = "SELECT wr_content FROM {$g5['write_prefix']}{$tmp_bo_table}";
$result = sql_query($sql);
while ($row = sql_fetch_array($result)) {
preg_match_all('/\/data\/editor\/([0-9]+)\/([^\s"\'<>]+)/', $row['wr_content'], $matches);
for ($i = 0; $i < count($matches[0]); $i++) {
$folder = $matches[1][$i];
$filename = $matches[2][$i];
$editor_path = G5_DATA_PATH . "/editor/{$folder}";
$file_path = $editor_path . "/{$filename}";
if (is_file($file_path)) {
@unlink($file_path);
}
$file_ext = pathinfo($filename, PATHINFO_EXTENSION);
$file_name_no_ext = basename($filename, "." . $file_ext);
$thumbs = glob($editor_path . "/thumb-{$file_name_no_ext}_*." . $file_ext);
foreach ($thumbs as $thumb_file) {
if (is_file($thumb_file)) {
@unlink($thumb_file);
}
}
}
}
추천 많이 해주셔요~~
댓글 14개
게시글 목록
| 번호 | 제목 |
|---|---|
| 23606 | |
| 23598 | |
| 23585 | |
| 23579 | |
| 23578 | |
| 23564 | |
| 23550 | |
| 23549 | |
| 23548 | |
| 23529 | |
| 23510 | |
| 23507 | |
| 23481 | |
| 23471 | |
| 23453 | |
| 23452 | |
| 23450 | |
| 23436 | |
| 23428 | |
| 23404 | |
| 23396 | |
| 23389 | |
| 23380 | |
| 23369 | |
| 23350 | |
| 23337 | |
| 23317 | |
| 23307 | |
| 23298 | |
| 23290 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기