스크랩 팝업창 선택삭제가 안되는데요 .... 채택완료
게시판쪽 선택삭제는 스크랩 게시물이여도
삭제해버리면
다른회원도 못보는거였네요 것도 모르고 -.-
다시 질문좀 드리겠습니다 ㅜㅜ
스크랩팝업창에서 선택삭제 버튼을 만들라고 하는데요 ......
scrap.skin.php 파일에
Q&A에 있는거 찾아보고 만들었지만..
선택삭제버튼이 반응을 안해버리는데
혹시 왜 안되는지 한번 봐주시면 감사하겠습니다 ~~
날짜대신 wr_1을 넣은 상태이고요
검정찐한게 추가된 코드입니다
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// add_stylesheet('css 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">', 0);
?>
<form method="post" onsubmit="return fnew_submit(this);">
<input type="hidden" name="pressed" value="">
<!-- 스크랩 목록 시작 { -->
<div id="scrap" class="new_win mbskin">
<h1 id="win_title"><?php echo $g5['title'] ?></h1>
<div class="tbl_head01 tbl_wrap">
<table>
<caption>스크랩 목록</caption>
<thead>
<tr>
<th scope="col">
<label for="all_chk" class="sound_only">목록 전체</label>
<input type="checkbox" id="all_chk">
</th>
<th scope="col">번호</th>
<th scope="col">게시판</th>
<th scope="col">제목</th>
<th scope="col">마감일</th>
<th scope="col">삭제</th>
</tr>
</thead>
<tbody>
<?php for ($i=0; $i<count($list); $i++) { ?>
<tr>
<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; ?>" id="chk_bn_id_<?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>
<td class="td_num"><?php echo $list[$i]['num'] ?></td>
<td class="td_board"><a href="<?php echo $list[$i]['opener_href'] ?>" target="_blank" onclick="opener.document.location.href='<?php echo $list[$i]['opener_href'] ?>'; return false;"><?php echo $list[$i]['bo_subject'] ?></a></td>
<td><a href="<?php echo $list[$i]['opener_href_wr_id'] ?>" target="_blank" onclick="opener.document.location.href='<?php echo $list[$i]['opener_href_wr_id'] ?>'; return false;"><?php echo $list[$i]['subject'] ?></a></td>
<td class="td_datetime"><?php echo $list[$i]['wr_1'] ?></td>
<td class="td_mng"><a href="<?php echo $list[$i]['del_href']; ?>" onclick="del(this.href); return false;">삭제</a></td>
</tr>
<?php } ?>
<?php if ($i == 0) echo "<tr><td colspan=\"5\" class=\"empty_table\">자료가 없습니다.</td></tr>"; ?>
</tbody>
</table>
</div>
<?php echo get_paging($config['cf_write_pages'], $page, $total_page, "?$qstr&page="); ?>
<div class="win_btn">
<button type="button" onclick="window.close();">창닫기</button>
</div>
</div>
<!-- } 스크랩 목록 끝 -->
<script>
function fscrap_submit(f)
{
if (f.stx.value.length < 2) {
alert("검색어는 두글자 이상 입력하십시오.");
f.stx.select();
f.stx.focus();
return false;
}
f.action = "";
return true;
}
</script>
</form>
</div>
<!-- } 스크랩 목록 끝 -->
<div class="sir_bw02 sir_bw">
<input type="submit" name="submit_button" value="선택삭제" class="btn_submit">
</div>
</form>
<script>
$(function(){
$('#all_chk').click(function(){
$('[name="chk_bn_id[]"]').attr('checked', this.checked);
});
});
function fnew_submit(f)
{
document.pressed = f.submit_button.value;
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 = "./scrap_delete.php";
return true;
}
</script>
도움좀 부탁드립니다~
답변 1개
답변을 작성하려면 로그인이 필요합니다.
로그인