From e93e829fb63e9206e5af60cd78c554e8a381e850 Mon Sep 17 00:00:00 2001 From: gnuboard Date: Mon, 25 Nov 2013 12:57:47 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=84=EC=B2=B4=EA=B2=8C=EC=8B=9C=EB=AC=BC?= =?UTF-8?q?=EC=97=90=20=EC=84=A0=ED=83=9D=EC=82=AD=EC=A0=9C=20=EA=B8=B0?= =?UTF-8?q?=EB=8A=A5=EB=84=A3=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/new_delete.php | 130 ++++++++++++++++++++++++++++++++++++ skin/new/basic/new.skin.php | 65 ++++++++++++++++++ 2 files changed, 195 insertions(+) create mode 100644 bbs/new_delete.php diff --git a/bbs/new_delete.php b/bbs/new_delete.php new file mode 100644 index 000000000..d949df1bb --- /dev/null +++ b/bbs/new_delete.php @@ -0,0 +1,130 @@ + 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' "); + } +} + +goto_url("new.php?sfl=$sfl&stx=$stx&page=$page"); +?> diff --git a/skin/new/basic/new.skin.php b/skin/new/basic/new.skin.php index 2d4e46196..30d148fa8 100644 --- a/skin/new/basic/new.skin.php +++ b/skin/new/basic/new.skin.php @@ -33,10 +33,26 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 +
+ + + + + + + + +
+ + + @@ -48,11 +64,18 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 + + + @@ -68,5 +91,47 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
+ + + 그룹 게시판 제목
+ + +
+ +
+ + +
+ +
+ + + + + \ No newline at end of file