From 5b464086b7a9c26bb786b6d976aa3baf37d2a33f Mon Sep 17 00:00:00 2001 From: curlychoi Date: Tue, 9 Aug 2016 10:53:31 +0900 Subject: [PATCH] =?UTF-8?q?=EB=AA=A9=EB=A1=9D=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EC=A0=90=ED=94=84=EA=B8=B0=EB=8A=A5=20=EA=B4=80=EB=A6=AC?= =?UTF-8?q?=EC=9E=90=20=EC=A0=84=EC=9A=A9=20(l2zeo=EB=8B=98=20=EC=A0=9C?= =?UTF-8?q?=EC=95=88)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- list.skin.php | 17 +++++++++++++ mw.adm/mw.jump.update.php | 52 ++++++++++++++++++++++++++++++++++++++ mw.lib/mw.function.lib.php | 31 +++++++++++++++++++++++ mw.proc/mw.jump.update.php | 3 +++ 4 files changed, 103 insertions(+) create mode 100644 mw.adm/mw.jump.update.php diff --git a/list.skin.php b/list.skin.php index 46c6fe1..d25defa 100644 --- a/list.skin.php +++ b/list.skin.php @@ -1106,6 +1106,7 @@
선택 질문 보류
선택 비밀글
선택 비밀글 해제
+
선택 점프
@@ -1294,6 +1295,22 @@ function select_secret() { f.submit(); } +// 선택한 게시물 점프 +function select_jump() { + var f = document.fboardlist; + + $("#admin_action").val(''); + + if (!check_confirm("점프")) + return; + + if (!confirm("선택한 게시물을 정말 점프 하시겠습니까?")) + return; + + f.action = "/mw.adm/mw.jump.update.php"; + f.submit(); +} + // 선택한 게시물 해제 비밀글 function select_secret_open() { var f = document.fboardlist; diff --git a/mw.adm/mw.jump.update.php b/mw.adm/mw.jump.update.php new file mode 100644 index 0000000..3dc0dec --- /dev/null +++ b/mw.adm/mw.jump.update.php @@ -0,0 +1,52 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +include_once("_common.php"); + +header("Content-Type: text/html; charset=$g4[charset]"); +$gmnow = gmdate("D, d M Y H:i:s") . " GMT"; +header("Expires: 0"); // rfc2616 - Section 14.21 +header("Last-Modified: " . $gmnow); +header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 +header("Cache-Control: pre-check=0, post-check=0, max-age=0"); // HTTP/1.1 +header("Pragma: no-cache"); // HTTP/1.0 + +if (!$bo_table) die("데이터가 없습니다."); + +include_once("{$board_skin_path}/mw.lib/mw.skin.basic.lib.php"); + +if (!$is_admin) { + die("권한이 없습니다."); +} + +$tmp_array = array(); +$tmp_array = $_POST['chk_wr_id']; + +$chk_count = count($tmp_array); + +for ($i=$chk_count-1; $i>=0; $i--) +{ + $wr_id = $tmp_array[$i]; + mw_jump($bo_table, $wr_id); +} + +goto_url(mw_seo_url($bo_table, 0, "&page=$page" . $qstr)); + diff --git a/mw.lib/mw.function.lib.php b/mw.lib/mw.function.lib.php index 767bbb8..49d2753 100644 --- a/mw.lib/mw.function.lib.php +++ b/mw.lib/mw.function.lib.php @@ -4395,3 +4395,34 @@ function mw_row_delete_point($board, $write) } } +function mw_jump($bo_table, $wr_id) +{ + global $g4; + global $mw; + global $member; + + $write_table = $g4['write_prefix'].$bo_table; + + $wr_num = get_next_num($write_table); + + $sql = " update {$write_table} "; + $sql.= " set wr_num = '{$wr_num}' "; + $sql.= " , wr_datetime = '{$g4['time_ymdhis']}' "; + $sql.= " where wr_id = '{$wr_id}' "; + + $qry = sql_query($sql); + + if ($qry) { + $sql = " insert into {$mw['jump_log_table']} set "; + $sql.= " bo_table = '{$bo_table}' "; + $sql.= " , wr_id = '{$wr_id}' "; + $sql.= " , mb_id = '{$member['mb_id']}' "; + $sql.= " , jp_datetime = '{$g4['time_ymdhis']}' "; + sql_query($sql); + + $sql = " update {$g4['board_new_table']} set bn_datetime = '{$g4['time_ymdhis']}' "; + $sql.= " where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' "; + sql_query($sql); + } +} + diff --git a/mw.proc/mw.jump.update.php b/mw.proc/mw.jump.update.php index 6e990ad..7ceeee7 100644 --- a/mw.proc/mw.jump.update.php +++ b/mw.proc/mw.jump.update.php @@ -67,6 +67,7 @@ insert_point($member['mb_id'], -1*$mw_basic['cf_jump_point'], "새글 점프", $bo_table, $wr_id, $g4['time_ymd'].'-'.$count); } +/* $wr_num = get_next_num($write_table); $sql = " update {$write_table} "; @@ -88,6 +89,8 @@ $sql.= " where bo_table = '{$bo_table}' and wr_id = '{$wr_id}' "; sql_query($sql); } +*/ +mw_jump($bo_table, $wr_id); echo "ok";