게시판 선택삭제, 선택수정 관련 스크립트 수정
This commit is contained in:
@ -65,11 +65,6 @@ include_once('./admin.head.php');
|
|||||||
$colspan = 8;
|
$colspan = 8;
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<script>
|
|
||||||
var list_update_php = 'board_list_update.php';
|
|
||||||
var list_delete_php = 'board_list_delete.php';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<form id="fsearch" name="fsearch" method="get">
|
<form id="fsearch" name="fsearch" method="get">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>게시판 검색</legend>
|
<legend>게시판 검색</legend>
|
||||||
@ -173,9 +168,9 @@ var list_delete_php = 'board_list_delete.php';
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<div class="btn_list">
|
<div class="btn_list">
|
||||||
<input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택수정">
|
<input type="submit" name="act_button" value="선택수정">
|
||||||
<?if ($is_admin == 'super') {?>
|
<?if ($is_admin == 'super') {?>
|
||||||
<input type="submit" name="btn_submit" onclick="document.pressed=this.value" value="선택삭제">
|
<input type="submit" name="act_button" value="선택삭제">
|
||||||
<a href="./board_form.php">게시판추가</a>
|
<a href="./board_form.php">게시판추가</a>
|
||||||
<?}?>
|
<?}?>
|
||||||
</div>
|
</div>
|
||||||
@ -186,21 +181,34 @@ var list_delete_php = 'board_list_delete.php';
|
|||||||
<?=get_paging($config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&page=');?>
|
<?=get_paging($config['cf_write_pages'], $page, $total_page, $_SERVER['PHP_SELF'].'?'.$qstr.'&page=');?>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function fboardlist_submit(f)
|
|
||||||
{
|
|
||||||
if (!is_checked("chk[]")) {
|
|
||||||
alert(document.pressed+" 하실 항목을 하나 이상 선택하세요.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$(function(){
|
$(function(){
|
||||||
$(".board_copy").click(function(){
|
$(".board_copy").click(function(){
|
||||||
window.open(this.href, "win_board_copy", "left=100,top=100,width=550,height=450");
|
window.open(this.href, "win_board_copy", "left=100,top=100,width=550,height=450");
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('input[name=act_button]').click(function(e) {
|
||||||
|
e.preventDefault();
|
||||||
|
|
||||||
|
var act = $(this).val();
|
||||||
|
var cnt = $('input[name^=chk]:checked').length;
|
||||||
|
|
||||||
|
if(act == "선택삭제") {
|
||||||
|
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||||
|
if(cnt < 1) {
|
||||||
|
alert(act+'할 게시판을 1개 이상 선택해 주세요.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if(act == "선택수정") {
|
||||||
|
if(cnt < 1) {
|
||||||
|
alert(act+'할 게시판그룹을 1개 이상 선택해 주세요.');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#fboardlist').submit();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@ if (!count($_POST['chk'])) {
|
|||||||
alert($_POST['btn_submit']." 하실 항목을 하나 이상 체크하세요.");
|
alert($_POST['btn_submit']." 하실 항목을 하나 이상 체크하세요.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_POST['btn_submit'] == "선택수정") {
|
if ($_POST['act_button'] == "선택수정") {
|
||||||
|
|
||||||
auth_check($auth[$sub_menu], 'w');
|
auth_check($auth[$sub_menu], 'w');
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ if ($_POST['btn_submit'] == "선택수정") {
|
|||||||
sql_query($sql);
|
sql_query($sql);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if ($_POST['btn_submit'] == "선택삭제") {
|
} else if ($_POST['act_button'] == "선택삭제") {
|
||||||
|
|
||||||
if ($is_admin != 'super')
|
if ($is_admin != 'super')
|
||||||
alert('게시판 삭제는 최고관리자만 가능합니다.');
|
alert('게시판 삭제는 최고관리자만 가능합니다.');
|
||||||
|
|||||||
Reference in New Issue
Block a user