Merge branch 'master' of github.com:gnuboard/g5

This commit is contained in:
whitedot
2013-11-26 10:44:55 +09:00
24 changed files with 268 additions and 50 deletions

View File

@ -103,9 +103,9 @@ $colspan = 5;
continue;
}
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<input type="hidden" name="au_menu[<?php echo $i ?>]" value="<?php echo $row['au_menu'] ?>">
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>">

View File

@ -119,10 +119,10 @@ $colspan = 16;
$one_update = '<a href="./board_form.php?w=u&amp;bo_table='.$row['bo_table'].'&amp;'.$qstr.'">수정</a>';
$one_copy = '<a href="./board_copy.php?bo_table='.$row['bo_table'].'" class="board_copy" target="win_board_copy">복사</a>';
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo get_text($row['bo_subject']) ?></label>
<input type="checkbox" name="chk[]" value="<?php echo $i ?>" id="chk_<?php echo $i ?>">

View File

@ -125,10 +125,10 @@ $colspan = 11;
$s_upd = '<a href="./boardgroup_form.php?'.$qstr.'&amp;w=u&amp;gr_id='.$row['gr_id'].'">수정</a>';
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<input type="hidden" name="group_id[<?php echo $i ?>]" value="<?php echo $row['gr_id'] ?>">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['gr_subject'] ?> 그룹</label>

View File

@ -110,9 +110,9 @@ $colspan = 7;
$mb_nick = get_sideview($row['mb_id'], $row['mb_nick'], $row['mb_email'], $row['mb_homepage']);
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_nick'] ?> 회원</label>
<input type="checkbox" name="chk[]" value="<?php echo $row['gm_id'] ?>" id="chk_<?php echo $i ?>">

View File

@ -57,10 +57,10 @@ $colspan = 7;
$num = number_format($total_count - ($page - 1) * $config['cf_page_rows'] - $i);
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<input type="checkbox" id="chk_<?php echo $i ?>" name="chk[]" value="<?php echo $row['ma_id'] ?>" title="메일선택">
</td>

View File

@ -96,9 +96,9 @@ include_once('./admin.head.php');
$ma_list .= $cr . $row['mb_email'] . "||" . $row['mb_id'] . "||" . $row['mb_name'] . "||" . $row['mb_nick'] . "||" . $row['mb_datetime'];
$cr = "\n";
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_num"><?php echo $i ?></td>
<td class="td_mbid"><?php echo $row['mb_id'] ?></td>
<td class="td_mbname"><?php echo $row['mb_name'] ?></td>

View File

@ -187,7 +187,7 @@ $colspan = 15;
$address = $row['mb_zip1'] ? $row['mb_addr1'].' '.$row['mb_addr2'] : '';
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
switch($row['mb_certify']) {
case 'hp':
@ -209,7 +209,7 @@ $colspan = 15;
}
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td headers="mb_list_chk" class="td_chk" rowspan="2">
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
<label for="chk_<?php echo $i; ?>" class="sound_only"><?php echo $row['mb_name']; ?> <?php echo $row['mb_nick']; ?>님</label>
@ -235,7 +235,7 @@ $colspan = 15;
<td headers="mb_list_grp" rowspan="2" class="td_numsmall"><?php echo $group ?></td>
<td headers="mb_list_mng" rowspan="2" class="td_mngsmall"><?php echo $s_mod ?> <?php echo $s_grp ?></td>
</tr>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td headers="mb_list_nick" class="td_name sv_use"><div><?php echo $mb_nick ?></div></td>
<td headers="mb_list_mailc" class="td_chk"><?php echo preg_match('/[1-9]/', $row['mb_email_certify'])?'<span class="txt_true">Yes</span>':'<span class="txt_false">No</span>'; ?></td>
<td headers="mb_list_mailr" class="td_chk"><input type="checkbox" name="mb_mailling[<?php echo $i; ?>]" <?php echo $row['mb_mailling']?'checked':''; ?> value="1"></td>

View File

@ -151,10 +151,10 @@ function point_clear()
if($row['po_expired'] == 1)
$expr = ' txt_expired';
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<input type="hidden" name="mb_id[<?php echo $i ?>]" value="<?php echo $row['mb_id'] ?>" id="mb_id_<?php echo $i ?>">
<input type="hidden" name="po_id[<?php echo $i ?>]" value="<?php echo $row['po_id'] ?>" id="po_id_<?php echo $i ?>">

View File

@ -105,10 +105,10 @@ $colspan = 7;
$s_mod = '<a href="./poll_form.php?'.$qstr.'&amp;w=u&amp;po_id='.$row['po_id'].'">수정</a>';
//$s_del = '<a href="javascript:post_delete(\'poll_form_update.php\', \''.$row['po_id'].'\');">삭제</a>';
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<input type="checkbox" name="chk[]" value="<?php echo $row['po_id'] ?>" id="chk_<?php echo $i ?>" title="투표선택">
</td>

View File

@ -112,10 +112,10 @@ var list_delete_php = 'popular_list.php';
for ($i=0; $row=sql_fetch_array($result); $i++) {
$word = get_text($row['pp_word']);
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_chk">
<input type="checkbox" name="chk[]" value="<?php echo $row['pp_id'] ?>" id="chk_<?php echo $i ?>" title="<?php echo $word ?> 선택">
</td>

View File

@ -65,10 +65,10 @@ while ($row=sql_fetch_array($result)) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_num"><?php echo $no ?></td>
<td class="td_category"><?php echo $key ?></td>
<td>

View File

@ -56,10 +56,10 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_category"><a href="./visit_list.php?fr_date=<?php echo $key ?>&amp;to_date=<?php echo $key ?>"><?php echo $key ?></a></td>
<td>
<div class="visit_bar">

View File

@ -76,9 +76,9 @@ while ($row=sql_fetch_array($result)) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_num"><?php echo $no ?></td>
<td class="td_category"><?php echo $link ?><?php echo $key ?><?php echo $link2 ?></td>
<td>

View File

@ -55,9 +55,9 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_category"><?php echo $hour ?></td>
<td>
<div class="visit_bar">

View File

@ -78,9 +78,9 @@ $result = sql_query($sql);
if ($brow == '기타') { $brow = '<span title="'.$row['vi_agent'].'">'.$brow.'</span>'; }
if ($os == '기타') { $os = '<span title="'.$row['vi_agent'].'">'.$os.'</span>'; }
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_category"><?php echo $ip ?></td>
<td><?php echo $link ?><?php echo $title ?><?php echo $link2 ?></td>
<td class="td_category"><?php echo $brow ?></td>

View File

@ -57,10 +57,10 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_category"><a href="./visit_date.php?fr_date=<?php echo $key ?>-01&amp;to_date=<?php echo $key ?>-31"><?php echo $key ?></a></td>
<td>
<div class="visit_bar">

View File

@ -69,10 +69,10 @@ while ($row=sql_fetch_array($result)) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_num"><?php echo $no ?></td>
<td class="td_category"><?php echo $key ?></td>
<td>

View File

@ -114,9 +114,9 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'">처음</a>'; //페이지 처음
if ($brow == '기타') $brow = '<span title="'.$row['vi_agent'].'">'.$brow.'</span>';
if ($os == '기타') $os = '<span title="'.$row['vi_agent'].'">'.$os.'</span>';
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_id"><a href="<?php echo $_SERVER['PHP_SELF']; ?>?search_sort=vi_ip&amp;search_word=<?php echo $ip; ?>"><?php echo $ip; ?></a></td>
<td><?php echo $link.$title; ?></a></td>
<td class="td_idsmall"><?php echo $brow; ?></td>

View File

@ -52,10 +52,10 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_category"><?php echo $weekday[$i] ?></td>
<td>
<div class="visit_bar">

View File

@ -57,10 +57,10 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$rate = ($count / $sum_count * 100);
$s_rate = number_format($rate, 1);
$tr_bg = 'tr_bg'.($i%2);
$bg = 'bg'.($i%2);
?>
<tr class="<?php echo $tr_bg; ?>">
<tr class="<?php echo $bg; ?>">
<td class="td_category"><a href="./visit_month.php?fr_date=<?php echo $key ?>-01-01&amp;to_date=<?php echo $key ?>-12-31"><?php echo $key ?></a></td>
<td>
<div class="visit_bar">

142
bbs/new_delete.php Normal file
View File

@ -0,0 +1,142 @@
<?php
include_once('./_common.php');
//print_r2($_POST); exit;
if ($is_admin != 'super')
alert("최고관리자만 접근이 가능합니다.");
$board = array();
$save_bo_table = array();
for($i=0;$i<count($_POST['chk_bn_id']);$i++)
{
// 실제 번호를 넘김
$k = $_POST['chk_bn_id'][$i];
$bo_table = $_POST['bo_table'][$k];
$wr_id = $_POST['wr_id'][$k];
$save_bo_table[] = $bo_table;
$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' ");
$sql = " select * from $write_table where wr_id = '$wr_id' ";
$write = sql_fetch($sql);
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("\n", trim($board['bo_notice']));
$bo_notice = "";
for ($k=0; $k<count($notice_array); $k++)
if ((int)$write['wr_id'] != (int)$notice_array[$k])
$bo_notice .= $notice_array[$k] . "\n";
$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' ");
}
}
$save_bo_table = array_unique($save_bo_table);
foreach ($save_bo_table as $key=>$value) {
delete_cache_latest($value);
}
goto_url("new.php?sfl=$sfl&stx=$stx&page=$page");
?>

View File

@ -27,7 +27,7 @@ if ($is_guest) {
if ($w == "c" || $w == "cu") {
if ($member['mb_level'] < $board['bo_comment_level'])
alert('댓글 쓸 권한이 없습니다.');
alert('댓글 쓸 권한이 없습니다.');
}
else
alert('w 값이 제대로 넘어오지 않았습니다.');
@ -67,12 +67,12 @@ if ($w == 'c') // 댓글 입력
{
/*
if ($member[mb_point] + $board[bo_comment_point] < 0 && !$is_admin)
alert('보유하신 포인트('.number_format($member[mb_point]).')가 없거나 모자라서 댓글쓰기('.number_format($board[bo_comment_point]).')가 불가합니다.\\n\\n포인트를 적립하신 후 다시 댓글 써 주십시오.');
alert('보유하신 포인트('.number_format($member[mb_point]).')가 없거나 모자라서 댓글쓰기('.number_format($board[bo_comment_point]).')가 불가합니다.\\n\\n포인트를 적립하신 후 다시 댓글 써 주십시오.');
*/
// 댓글쓰기 포인트설정시 회원의 포인트가 음수인 경우 댓글 쓰지 못하던 버그를 수정 (곱슬최씨님)
// 댓글쓰기 포인트설정시 회원의 포인트가 음수인 경우 댓글 쓰지 못하던 버그를 수정 (곱슬최씨님)
$tmp_point = ($member['mb_point'] > 0) ? $member['mb_point'] : 0;
if ($tmp_point + $board['bo_comment_point'] < 0 && !$is_admin)
alert('보유하신 포인트('.number_format($member['mb_point']).')가 없거나 모자라서 댓글쓰기('.number_format($board['bo_comment_point']).')가 불가합니다.\\n\\n포인트를 적립하신 후 다시 댓글 써 주십시오.');
alert('보유하신 포인트('.number_format($member['mb_point']).')가 없거나 모자라서 댓글쓰기('.number_format($board['bo_comment_point']).')가 불가합니다.\\n\\n포인트를 적립하신 후 다시 댓글 써 주십시오.');
// 댓글 답변
if ($comment_id)
@ -264,7 +264,7 @@ else if ($w == 'cu') // 댓글 수정
else
alert('그룹관리자의 권한보다 높은 회원의 댓글이므로 수정할 수 없습니다.');
} else
alert('자신이 관리하는 그룹의 게시판이 아니므로 댓글 수정할 수 없습니다.');
alert('자신이 관리하는 그룹의 게시판이 아니므로 댓글 수정할 수 없습니다.');
} else if ($is_admin == 'board') { // 게시판관리자이면
$mb = get_member($comment['mb_id']);
if ($member['mb_id'] == $board['bo_admin']) { // 자신이 관리하는 게시판인가?
@ -273,7 +273,7 @@ else if ($w == 'cu') // 댓글 수정
else
alert('게시판관리자의 권한보다 높은 회원의 댓글이므로 수정할 수 없습니다.');
} else
alert('자신이 관리하는 게시판이 아니므로 댓글 수정할 수 없습니다.');
alert('자신이 관리하는 게시판이 아니므로 댓글 수정할 수 없습니다.');
} else if ($member['mb_id']) {
if ($member['mb_id'] != $comment['mb_id'])
alert('자신의 글이 아니므로 수정할 수 없습니다.');

View File

@ -245,11 +245,8 @@ tbody td {border:1px solid #ececec}
tfoot th, tfoot td {padding:10px 0;border:1px solid #c1d1d5;background:#d7e0e2}
tfoot th {}
tfoot td {font-weight:bold;text-align:center}
table .tr_bg0 {background:#fff}
table .tr_bg1 {background:#f0f3f7}
.tbl_wrap {margin:0 0 10px;padding:0 20px}
.tbl_wrap td.empty_table {padding:100px 0;text-align:center}
/* thead 한 줄 테이블 */
.tbl_head01 {}
@ -276,6 +273,10 @@ table .tr_bg1 {background:#f0f3f7}
.tbl_frm01 #captcha {margin:0;padding:0;border:0;background:transparent}
.tbl_frm01 #captcha input {margin-left:5px;text-align:center}
/* 자료 없는 목록 */
.empty_table {padding:100px 0 !important;text-align:center}
.empty_list {padding:20px 0 !important;text-align:center}
/* 테이블 그리드 */
.grid_1 {width:50px}
.grid_2 {width:100px}
@ -296,6 +297,15 @@ table .tr_bg1 {background:#f0f3f7}
.grid_17 {width:850px}
.grid_18 {width:900px}
/* 목록 홀짝 배경색 */
.bg0 {background:#fff}
.bg1 {background:#f2f5f9}
.bg1 td {border-color:#e9e9e9}
.bg0cancel {background:#fdebf3}
.bg0cancel td {border-color:#f9d8e6}
.bg1cancel {background:#fdebf3}
.bg1cancel td {border-color:#f9d8e6}
/* 회원관리 목록 */
.mb_leave_msg {color:#b6b6b6}
.mb_intercept_msg {color:#f59fe4}

View File

@ -33,10 +33,26 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<!-- } 전체게시물 검색 끝 -->
<!-- 전체게시물 목록 시작 { -->
<form name="fnewlist" method="post" action="#" onsubmit="return fnew_submit(this);">
<input type="hidden" name="sw" value="move">
<input type="hidden" name="view" value="<?php echo $view; ?>">
<input type="hidden" name="sfl" value="<?php echo $sfl; ?>">
<input type="hidden" name="stx" value="<?php echo $stx; ?>">
<input type="hidden" name="srows" value="<?php echo $srows; ?>">
<input type="hidden" name="bo_table" value="<?php echo $bo_table; ?>">
<input type="hidden" name="page" value="<?php echo $page; ?>">
<input type="hidden" name="pressed" value="">
<div class="tbl_head01 tbl_wrap">
<table>
<thead>
<tr>
<?php if ($is_admin) { ?>
<th scope="col">
<label for="all_chk" class="sound_only">목록 전체</label>
<input type="checkbox" id="all_chk">
</th>
<?php } ?>
<th scope="col">그룹</th>
<th scope="col">게시판</th>
<th scope="col">제목</th>
@ -48,11 +64,20 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
<?php
for ($i=0; $i<count($list); $i++)
{
$num = $total_count - ($page - 1) * $config['cf_page_rows'] - $i;
$gr_subject = cut_str($list[$i]['gr_subject'], 20);
$bo_subject = cut_str($list[$i]['bo_subject'], 20);
$wr_subject = get_text(cut_str($list[$i]['wr_subject'], 80));
?>
<tr>
<?php if ($is_admin) { ?>
<td class="td_chk">
<label for="chk_bn_id_<?php echo $i; ?>" class="sound_only"><?php echo $num?>번</label>
<input type="checkbox" name="chk_bn_id[]" value="<?php echo $i; ?>">
<input type="hidden" name="bo_table[<?php echo $i; ?>]" value="<?php echo $list[$i]['bo_table']; ?>">
<input type="hidden" name="wr_id[<?php echo $i; ?>]" value="<?php echo $list[$i]['wr_id']; ?>">
</td>
<?php } ?>
<td class="td_group"><a href="./new.php?gr_id=<?php echo $list[$i]['gr_id'] ?>"><?php echo $gr_subject ?></a></td>
<td class="td_board"><a href="./board.php?bo_table=<?php echo $list[$i]['bo_table'] ?>"><?php echo $bo_subject ?></a></td>
<td><a href="<?php echo $list[$i]['href'] ?>"><?php echo $list[$i]['comment'] ?><?php echo $wr_subject ?></a></td>
@ -68,5 +93,46 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
</table>
</div>
<?php if ($is_admin) { ?>
<div class="sir_bw02 sir_bw">
<input type="submit" onclick="document.pressed=this.value" value="선택삭제" class="btn_submit">
</div>
<?php } ?>
</form>
<?php if ($is_admin) { ?>
<script>
$(function(){
$('#all_chk').click(function(){
$('[name="chk_bn_id[]"]').attr('checked', this.checked);
});
});
function fnew_submit(f)
{
f.pressed.value = document.pressed;
var cnt = 0;
for (var i=0; i<f.length; i++) {
if (f.elements[i].name == "chk_bn_id[]" && f.elements[i].checked)
cnt++;
}
if (!cnt) {
alert(document.pressed+"할 게시물을 하나 이상 선택하세요.");
return false;
}
if (!confirm("선택한 게시물을 정말 "+document.pressed+" 하시겠습니까?\n\n한번 삭제한 자료는 복구할 수 없습니다")) {
return false;
}
f.action = "./new_delete.php";
return true;
}
</script>
<?php } ?>
<?php echo $write_pages ?>
<!-- } 전체게시물 목록 끝 -->