Merge branch 'master' of github.com:gnuboard/g4s
Conflicts: adm/boardgroup_list.php adm/mail_list.php adm/poll_list.php
This commit is contained in:
@ -119,14 +119,13 @@ $pg_anchor = "<ul class=\"frm_list\">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_use">사용여부</label></th>
|
||||
<th scope="row"><label for="bo_pc_mobile">접속기기</label></th>
|
||||
<td>
|
||||
<?=help("게시판그룹의 사용여부 설정이 게시판의 사용여부 설정보다 우선합니다.")?>
|
||||
<select id="bo_use_" name="bo_use">
|
||||
<option value="both" <?=get_selected($board['bo_use'], 'both', true);?>>PC와 모바일에서 모두 사용</option>
|
||||
<option value="pc" <?=get_selected($board['bo_use'], 'pc');?>>PC 전용</option>
|
||||
<option value="mobile" <?=get_selected($board['bo_use'], 'mobile');?>>모바일 전용</option>
|
||||
<option value="none" <?=get_selected($board['bo_use'], 'none');?>>사용하지 않음</option>
|
||||
<?=help("PC 와 모바일 사용을 구분합니다.")?>
|
||||
<select id="bo_pc_mobile" name="bo_pc_mobile">
|
||||
<option value="both" <?=get_selected($board['bo_pc_mobile'], 'both');?>>PC와 모바일에서 모두 사용</option>
|
||||
<option value="pc" <?=get_selected($board['bo_pc_mobile'], 'pc');?>>PC 전용</option>
|
||||
<option value="mobile" <?=get_selected($board['bo_pc_mobile'], 'mobile');?>>모바일 전용</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="group_setting">
|
||||
|
||||
@ -53,7 +53,7 @@ $bo_category_list = str_replace($src_char, $dst_char, $bo_category_list);
|
||||
|
||||
$sql_common = " gr_id = '{$_POST['gr_id']}',
|
||||
bo_subject = '{$_POST['bo_subject']}',
|
||||
bo_use = '{$_POST['bo_use']}',
|
||||
bo_pc_mobile = '{$_POST['bo_pc_mobile']}',
|
||||
bo_admin = '{$_POST['bo_admin']}',
|
||||
bo_list_level = '{$_POST['bo_list_level']}',
|
||||
bo_read_level = '{$_POST['bo_read_level']}',
|
||||
|
||||
@ -4,13 +4,13 @@ include_once('./_common.php');
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
if (!isset($board['bo_use'])) {
|
||||
if (!isset($board['bo_pc_mobile'])) {
|
||||
// 게시판 사용 필드 추가
|
||||
// both : pc, mobile 둘다 사용
|
||||
// pc : pc 전용 사용
|
||||
// mobile : mobile 전용 사용
|
||||
// none : 사용 안함
|
||||
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_use` ENUM( 'both', 'pc', 'mobile', 'none' ) NOT NULL DEFAULT 'both' AFTER `bo_subject` ", false);
|
||||
sql_query(" ALTER TABLE `{$g4['board_table']}` ADD `bo_pc_mobile` ENUM( 'both', 'pc', 'mobile' ) NOT NULL DEFAULT 'both' AFTER `bo_subject` ", false);
|
||||
}
|
||||
|
||||
$sql_common = " from {$g4['board_table']} a ";
|
||||
@ -116,9 +116,9 @@ var list_delete_php = 'board_list_delete.php';
|
||||
<th scope="col">쓰기P<span class="sound_only">포인트</span></th>
|
||||
<th scope="col">댓글P<span class="sound_only">포인트</span></th>
|
||||
<th scope="col">다운P<span class="sound_only">포인트</span></th>
|
||||
<th scope="col">검색<br>사용</th>
|
||||
<th scope="col">검색<br>순서</th>
|
||||
<th scope="col">선택</th>
|
||||
<th scope="col"><?=subject_sort_link('bo_use_search')?>검색<br>사용</a></th>
|
||||
<th scope="col"><?=subject_sort_link('bo_order_search')?>검색<br>순서</a></th>
|
||||
<th scope="col">접속기기</th>
|
||||
<th scope="col">관리</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -156,11 +156,10 @@ var list_delete_php = 'board_list_delete.php';
|
||||
<td><input type="text" id="bo_order_search_<?=$i?>" name="bo_order_search[<?=$i?>]" class="frm_input" value="<?=$row['bo_order_search']?>" size="2" title="검색순서"></td>
|
||||
</td>
|
||||
<td>
|
||||
<select id="bo_use_<?=$i?>" name="bo_use[<?=$i?>]">
|
||||
<option value="both" <?=get_selected($row['bo_use'], 'both', true);?>>양쪽</option>
|
||||
<option value="pc" <?=get_selected($row['bo_use'], 'pc');?>>PC</option>
|
||||
<option value="mobile" <?=get_selected($row['bo_use'], 'mobile');?>>모바일</option>
|
||||
<option value="none" <?=get_selected($row['bo_use'], 'none');?>>미사용</option>
|
||||
<select id="bo_pc_mobile_<?=$i?>" name="bo_pc_mobile[<?=$i?>]">
|
||||
<option value="both" <?=get_selected($row['bo_pc_mobile'], 'both', true);?>>양쪽</option>
|
||||
<option value="pc" <?=get_selected($row['bo_pc_mobile'], 'pc');?>>PC</option>
|
||||
<option value="mobile" <?=get_selected($row['bo_pc_mobile'], 'mobile');?>>모바일</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><?=$one_update?> <?=$one_copy?></td>
|
||||
|
||||
@ -30,7 +30,7 @@ if ($_POST['btn_submit'] == "선택수정") {
|
||||
$sql = " update {$g4['board_table']}
|
||||
set gr_id = '{$_POST['gr_id'][$k]}',
|
||||
bo_subject = '{$_POST['bo_subject'][$k]}',
|
||||
bo_use = '{$_POST['bo_use'][$k]}',
|
||||
bo_pc_mobile = '{$_POST['bo_pc_mobile'][$k]}',
|
||||
bo_skin = '{$_POST['bo_skin'][$k]}',
|
||||
bo_read_point = '{$_POST['bo_read_point'][$k]}',
|
||||
bo_write_point = '{$_POST['bo_write_point'][$k]}',
|
||||
|
||||
@ -88,6 +88,7 @@ var list_update_php = "./boardgroup_list_update.php";
|
||||
접근사용 옵션은 해당 그룹에 속한 모든 게시판에 적용됩니다.
|
||||
</p>
|
||||
|
||||
<<<<<<< HEAD
|
||||
<?if ($is_admin == 'super') {?>
|
||||
<div id="btn_add">
|
||||
<a href="./boardgroup_form.php" id="bo_gr_add">게시판그룹 추가</a>
|
||||
@ -95,11 +96,15 @@ var list_update_php = "./boardgroup_list_update.php";
|
||||
<?}?>
|
||||
|
||||
<form id="fboardgrouplist" name="fboardgrouplist" method="post">
|
||||
=======
|
||||
<form id="fboardgrouplist" name="fboardgrouplist" method="post" action="./boardgroup_list_update.php">
|
||||
>>>>>>> 75f31cd998e7ebb2d18eed50b548a4ac81fa39b3
|
||||
<input type="hidden" name="sst" value="<?=$sst?>">
|
||||
<input type="hidden" name="sod" value="<?=$sod?>">
|
||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||
<input type="hidden" name="stx" value="<?=$stx?>">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<input type="hidden" name="token" value="<?=$token?>">
|
||||
|
||||
<table class="tbl_gr_list">
|
||||
<thead>
|
||||
@ -136,8 +141,7 @@ var list_update_php = "./boardgroup_list_update.php";
|
||||
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" id="gr_id" name="gr_id[<?=$i?>]" value="<?=$row['gr_id']?>">
|
||||
<input type="checkbox" id="chk_<?=$i?>" name="chk[]" value="<?=$i?>" title="<?=$row['gr_subject']?> 그룹선택">
|
||||
<input type="checkbox" id="chk_<?=$i?>" name="chk[]" value="<?=$row['gr_id']?>" title="<?=$row['gr_subject']?> 그룹선택">
|
||||
</td>
|
||||
<td class="td_mbid"><a href="<?=$g4['bbs_path']?>/group.php?gr_id=<?=$row['gr_id']?>"><?=$row['gr_id']?></a></td>
|
||||
<td>
|
||||
@ -172,10 +176,8 @@ var list_update_php = "./boardgroup_list_update.php";
|
||||
</table>
|
||||
|
||||
<div class="btn_list">
|
||||
<button>선택수정</button>
|
||||
<button>선택삭제</button>
|
||||
<button onclick="btn_check(this.form, 'update')">선택수정</button>
|
||||
<!-- <button onclick="btn_check(this.form, 'delete')">선택삭제</button> -->
|
||||
<input type="submit" name="act_button" value="선택수정">
|
||||
<input type="submit" name="act_button" value="선택삭제">
|
||||
<a href="./boardgroup_form.php">게시판그룹 추가</a>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@ -6,20 +6,36 @@ check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
for ($i=0; $i<count($_POST['chk']); $i++)
|
||||
{
|
||||
// 실제 번호를 넘김
|
||||
$k = $_POST['chk'][$i];
|
||||
$count = count($_POST['chk']);
|
||||
|
||||
$sql = " update {$g4['group_table']}
|
||||
set gr_subject = '{$_POST['gr_subject'][$k]}',
|
||||
gr_use = '{$_POST['gr_use'][$k]}',
|
||||
gr_admin = '{$_POST['gr_admin'][$k]}',
|
||||
gr_use_access = '{$_POST['gr_use_access'][$k]}'
|
||||
where gr_id = '{$_POST['gr_id'][$k]}' ";
|
||||
if ($is_admin != 'super')
|
||||
$sql .= " and gr_admin = '{$_POST['gr_admin'][$k]}' ";
|
||||
sql_query($sql);
|
||||
if(!$count)
|
||||
alert($_POST['act_button'].'할 게시판그룹을 1개이상 선택해 주세요.');
|
||||
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
$gr_id = $_POST['chk'][$i];
|
||||
|
||||
if($_POST['act_button'] == '선택수정') {
|
||||
$sql = " update {$g4['group_table']}
|
||||
set gr_subject = '{$_POST['gr_subject'][$k]}',
|
||||
gr_use = '{$_POST['gr_use'][$k]}',
|
||||
gr_admin = '{$_POST['gr_admin'][$k]}',
|
||||
gr_use_access = '{$_POST['gr_use_access'][$k]}'
|
||||
where gr_id = '{$_POST['gr_id'][$k]}' ";
|
||||
if ($is_admin != 'super')
|
||||
$sql .= " and gr_admin = '{$_POST['gr_admin'][$k]}' ";
|
||||
sql_query($sql);
|
||||
} else if($_POST['act_button'] == '선택삭제') {
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g4['board_table']} where gr_id = '$gr_id' ");
|
||||
if ($row['cnt'])
|
||||
alert("이 그룹에 속한 게시판이 존재하여 게시판 그룹을 삭제할 수 없습니다.\\n\\n이 그룹에 속한 게시판을 먼저 삭제하여 주십시오.", './board_list.php?sfl=gr_id&stx='.$gr_id);
|
||||
|
||||
// 그룹 삭제
|
||||
sql_query(" delete from {$g4['group_table']} where gr_id = '$gr_id' ");
|
||||
|
||||
// 그룹접근 회원 삭제
|
||||
sql_query(" delete from {$g4['group_member_table']} where gr_id = '$gr_id' ");
|
||||
}
|
||||
}
|
||||
|
||||
goto_url('./boardgroup_list.php?'.$qstr);
|
||||
|
||||
24
adm/mail_delete.php
Normal file
24
adm/mail_delete.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
$sub_menu = '200300';
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
check_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
|
||||
if(!$count)
|
||||
alert('삭제할 메일목록을 1개이상 선택해 주세요.');
|
||||
|
||||
for($i=0; $i<$count; $i++) {
|
||||
$ma_id = $_POST['chk'][$i];
|
||||
|
||||
$sql = " delete from {$g4['mail_table']} where ma_id = '$ma_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./mail_list.php');
|
||||
?>
|
||||
@ -29,10 +29,14 @@ $colspan = 6;
|
||||
현재 등록된 메일은 총 <?=$total_count ?>건입니다.
|
||||
</p>
|
||||
|
||||
<<<<<<< HEAD
|
||||
<div id="btn_add">
|
||||
<a href="./mail_form.php" id="mail_add">메일내용추가</a>
|
||||
</div>
|
||||
|
||||
=======
|
||||
<form id="fmaillist" name="fmaillist" method="post" action="./mail_delete.php">
|
||||
>>>>>>> 75f31cd998e7ebb2d18eed50b548a4ac81fa39b3
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -56,8 +60,7 @@ $colspan = 6;
|
||||
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="" value="">
|
||||
<input type="checkbox" id="chk_<?=$i?>" name="chk[]" value="<?=$i?>" title="메일선택">
|
||||
<input type="checkbox" id="chk_<?=$i?>" name="chk[]" value="<?=$row['ma_id']?>" title="메일선택">
|
||||
</td>
|
||||
<td class="td_num"><?=$num?></td>
|
||||
<td><a href="./mail_form.php?w=u&ma_id=<?=$row['ma_id']?>"><?=$row['ma_subject']?></a></td>
|
||||
@ -77,34 +80,28 @@ $colspan = 6;
|
||||
|
||||
<div class="btn_list">
|
||||
<button>선택삭제</button>
|
||||
<input type="submit" name="btn_submit" value="선택삭제">
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
// POST 방식으로 삭제
|
||||
function post_delete(action_url, val)
|
||||
{
|
||||
var f = document.fpost;
|
||||
$(function() {
|
||||
$('#fmaillist').submit(function() {
|
||||
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||
var cnt = $('input[name^=chk]:checked').length;
|
||||
if(cnt < 1) {
|
||||
alert('삭제할 메일목록을 1개이상 선택해 주세요.');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(confirm('한번 삭제한 자료는 복구할 방법이 없습니다. 정말 삭제하시겠습니까?')) {
|
||||
f.ma_id.value = val;
|
||||
f.action = action_url;
|
||||
f.submit();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<form id="fpost" name="fpost" method="post">
|
||||
<input type="hidden" name="sst" value="<?=$sst?>">
|
||||
<input type="hidden" name="sod" value="<?=$sod?>">
|
||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||
<input type="hidden" name="stx" value="<?=$stx?>">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<input type="hidden" name="w" value='d'>
|
||||
<input type="hidden" name="ma_id">
|
||||
</form>
|
||||
|
||||
<?
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
@ -184,7 +184,7 @@ function point_clear()
|
||||
|
||||
<?=get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");?>
|
||||
|
||||
<form id="fpointlist2" name="fpointlist2" method="post" onsubmit="return fpointlist2_submit(this);" autocomplete="off">
|
||||
<form id="fpointlist2" name="fpointlist2" method="post" action="./point_update.php" autocomplete="off">
|
||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||
<input type="hidden" name="stx" value="<?=$stx?>">
|
||||
<input type="hidden" name="sst" value="<?=$sst?>">
|
||||
@ -206,14 +206,6 @@ function point_clear()
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
function fpointlist2_submit(f)
|
||||
{
|
||||
f.action = "./point_update.php";
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
|
||||
27
adm/poll_delete.php
Normal file
27
adm/poll_delete.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
$sub_menu = "200900";
|
||||
include_once('./_common.php');
|
||||
|
||||
check_demo();
|
||||
|
||||
auth_check($auth[$sub_menu], 'd');
|
||||
|
||||
check_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
|
||||
if(!$count)
|
||||
alert('삭제할 투표목록을 1개이상 선택해 주세요.');
|
||||
|
||||
for($i=0; $i<$count; $i++) {
|
||||
$po_id = $_POST['chk'][$i];
|
||||
|
||||
$sql = " delete from {$g4['poll_table']} where po_id = '$po_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
$sql = " delete from {$g4['poll_etc_table']} where po_id = '$po_id' ";
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
goto_url('./poll_list.php?'.$qstr);
|
||||
?>
|
||||
@ -21,7 +21,7 @@ include_once('./admin.head.php');
|
||||
?>
|
||||
|
||||
<div class="cbox">
|
||||
<form id="fpoll" name="fpoll" method="post" onsubmit="return fpoll_check(this);" enctype="multipart/form-data">
|
||||
<form id="fpoll" name="fpoll" method="post" action="./poll_form_update.php" enctype="multipart/form-data">
|
||||
<input type="hidden" name="po_id" value="<?=$po_id?>">
|
||||
<input type="hidden" name="w" value="<?=$w?>">
|
||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||
@ -100,19 +100,11 @@ include_once('./admin.head.php');
|
||||
|
||||
<div class="btn_confirm">
|
||||
<input type="submit" class="btn_submit" accesskey="s" value="확인">
|
||||
<button onclick="document.location.href='./poll_list.php?<?=$qstr?>';">목록</button>
|
||||
<a href="./poll_list.php?<?=$qstr?>">목록</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
function fpoll_check(f)
|
||||
{
|
||||
f.action = './poll_form_update.php';
|
||||
return true;
|
||||
}
|
||||
</script>
|
||||
|
||||
<?
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
|
||||
@ -72,10 +72,20 @@ $colspan = 6;
|
||||
<section class="cbox">
|
||||
<h2>투표목록</h2>
|
||||
|
||||
<<<<<<< HEAD
|
||||
<div id="btn_add">
|
||||
<a href="./poll_form.php" id="poll_add">투표 추가</a>
|
||||
</div>
|
||||
|
||||
=======
|
||||
<form id="fpolllist" name="fpolllist" method="post" action="./poll_delete.php">
|
||||
<input type="hidden" name="sst" value="<?=$sst?>">
|
||||
<input type="hidden" name="sod" value="<?=$sod?>">
|
||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||
<input type="hidden" name="stx" value="<?=$stx?>">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<input type="hidden" name="token" value="<?=$token?>">
|
||||
>>>>>>> 75f31cd998e7ebb2d18eed50b548a4ac81fa39b3
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
@ -101,8 +111,7 @@ $colspan = 6;
|
||||
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="" value="">
|
||||
<input type="checkbox" id="chk_<?=$i?>" name="chk[]" value="<?=$i?>" title="투표선택">
|
||||
<input type="checkbox" id="chk_<?=$i?>" name="chk[]" value="<?=$row['po_id']?>" title="투표선택">
|
||||
</td>
|
||||
<td class="td_num"><?=$row['po_id']?></td>
|
||||
<td><?=cut_str(get_text($row['po_subject']),70)?></td>
|
||||
@ -123,8 +132,8 @@ $colspan = 6;
|
||||
|
||||
<div class="btn_list">
|
||||
<button>선택삭제</button>
|
||||
<input type="submit" name="btn_submit" value="선택삭제">
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
<?=get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");?>
|
||||
@ -135,30 +144,23 @@ if (isset($stx))
|
||||
?>
|
||||
|
||||
<script>
|
||||
// POST 방식으로 삭제
|
||||
function post_delete(action_url, val)
|
||||
{
|
||||
var f = document.fpost;
|
||||
$(function() {
|
||||
$('#fpolllist').submit(function() {
|
||||
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||
var cnt = $('input[name^=chk]:checked').length;
|
||||
if(cnt < 1) {
|
||||
alert('삭제할 투표목록을 1개이상 선택해 주세요.');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||
f.po_id.value = val;
|
||||
f.action = action_url;
|
||||
f.submit();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<form id="fpost" name="fpost" method="post">
|
||||
<input type="hidden" name="sst" value="<?=$sst?>">
|
||||
<input type="hidden" name="sod" value="<?=$sod?>">
|
||||
<input type="hidden" name="sfl" value="<?=$sfl?>">
|
||||
<input type="hidden" name="stx" value="<?=$stx?>">
|
||||
<input type="hidden" name="page" value="<?=$page?>">
|
||||
<input type="hidden" name="token" value="<?=$token?>">
|
||||
<input type="hidden" name="w" value='d'>
|
||||
<input type="hidden" name="po_id">
|
||||
</form>
|
||||
|
||||
<?
|
||||
include_once ('./admin.tail.php');
|
||||
?>
|
||||
@ -6,11 +6,10 @@ auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
// 체크된 자료 삭제
|
||||
if (isset($_POST['chk']) && is_array($_POST['chk'])) {
|
||||
for ($i=0; $i<count($chk); $i++) {
|
||||
// 실제 번호를 넘김
|
||||
$k = $chk[$i];
|
||||
for ($i=0; $i<count($_POST['chk']); $i++) {
|
||||
$pp_id = $_POST['chk'][$i];
|
||||
|
||||
sql_query(" delete from {$g4['popular_table']} where pp_id = '{$_POST['pp_id'][$k]}' ", true);
|
||||
sql_query(" delete from {$g4['popular_table']} where pp_id = '$pp_id' ", true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -117,8 +116,7 @@ var list_delete_php = 'popular_list.php';
|
||||
|
||||
<tr>
|
||||
<td class="td_chk">
|
||||
<input type="hidden" name="pp_id[<?=$i?>]" value="<?=$row['pp_id']?>">
|
||||
<input type="checkbox" id="chk_<?=$i?>" name="chk[]" value="<?=$i?>" title="<?=$word?> 선택">
|
||||
<input type="checkbox" id="chk_<?=$i?>" name="chk[]" value="<?=$row['pp_id']?>" title="<?=$word?> 선택">
|
||||
</td>
|
||||
<td> <a href="<?=$_SERVER['PHP_SELF']?>?sfl=pp_word&stx=<?=$word?>"><?=$word?></a></td>
|
||||
<td><?=$row['pp_date']?></td>
|
||||
@ -137,7 +135,6 @@ var list_delete_php = 'popular_list.php';
|
||||
<?if ($is_admin == 'super'){ ?>
|
||||
<div class="btn_list">
|
||||
<button>선택삭제</button>
|
||||
<button onclick="btn_check(this.form, 'delete')">선택삭제</button>
|
||||
</div>
|
||||
<?}?>
|
||||
|
||||
@ -151,6 +148,24 @@ if (isset($stx))
|
||||
echo '<script>document.fsearch.sfl.value = \''.$sfl.'\';</script>';
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$('#fpopularlist').submit(function() {
|
||||
if(confirm("한번 삭제한 자료는 복구할 방법이 없습니다.\n\n정말 삭제하시겠습니까?")) {
|
||||
var cnt = $('input[name^=chk]:checked').length;
|
||||
if(cnt < 1) {
|
||||
alert('삭제할 검색어를 1개이상 선택해 주세요.');
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?
|
||||
include_once('./admin.tail.php');
|
||||
?>
|
||||
|
||||
@ -2,9 +2,11 @@
|
||||
include_once('./_common.php');
|
||||
|
||||
if (!$board['bo_table']) {
|
||||
alert('존재하지 않는 게시판입니다.', G4_PATH);
|
||||
alert('존재하지 않는 게시판입니다.', G4_URL);
|
||||
}
|
||||
|
||||
check_pc_mobile($board['bo_pc_mobile']);
|
||||
|
||||
if (isset($write['wr_is_comment']) && $write['wr_is_comment']) {
|
||||
goto_url('./board.php?bo_table='.$bo_table.'&wr_id='.$write['wr_parent'].'#c_'.$wr_id);
|
||||
}
|
||||
|
||||
@ -6,7 +6,6 @@ include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
|
||||
set_session('ss_bo_table', $bo_table);
|
||||
set_session('ss_wr_id', $wr_id);
|
||||
|
||||
// 090713
|
||||
if (!$board['bo_table']) {
|
||||
alert('존재하지 않는 게시판입니다.', G4_URL);
|
||||
}
|
||||
@ -15,6 +14,8 @@ if (!$bo_table) {
|
||||
alert("bo_table 값이 넘어오지 않았습니다.\\nwrite.php?bo_table=code 와 같은 방식으로 넘겨 주세요.", G4_URL);
|
||||
}
|
||||
|
||||
check_pc_mobile($board['bo_pc_mobile']);
|
||||
|
||||
@include_once (G4_PATH.'/skin/board/write.head.skin.php');
|
||||
@include_once ($board_skin_path.'/write.head.skin.php');
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@ CREATE TABLE IF NOT EXISTS `g4s_board` (
|
||||
`bo_table` varchar(20) NOT NULL default '',
|
||||
`gr_id` varchar(255) NOT NULL default '',
|
||||
`bo_subject` varchar(255) NOT NULL default '',
|
||||
`bo_pc_mobile` enum('both','pc','mobile') NOT NULL DEFAULT 'both',
|
||||
`bo_admin` varchar(255) NOT NULL default '',
|
||||
`bo_list_level` tinyint(4) NOT NULL default '0',
|
||||
`bo_read_level` tinyint(4) NOT NULL default '0',
|
||||
|
||||
@ -1716,4 +1716,19 @@ function iconv_euckr($str)
|
||||
{
|
||||
return iconv('utf-8', 'euc-kr', $str);
|
||||
}
|
||||
|
||||
|
||||
// PC 또는 모바일 사용인지를 검사
|
||||
function check_pc_mobile($pc_mobile)
|
||||
{
|
||||
global $is_admin;
|
||||
|
||||
if ($is_admin) return;
|
||||
|
||||
if ($pc_mobile=='pc' && G4_IS_MOBILE) {
|
||||
alert('PC 전용 게시판입니다.', G4_URL);
|
||||
} else if ($pc_mobile=='mobile' && !G4_IS_MOBILE) {
|
||||
alert('모바일 전용 게시판입니다.', G4_URL);
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user