새글에 선택삭제 기능추가
This commit is contained in:
@ -7,10 +7,17 @@ if ($is_admin != 'super')
|
|||||||
alert("최고관리자만 접근이 가능합니다.");
|
alert("최고관리자만 접근이 가능합니다.");
|
||||||
|
|
||||||
$board = array();
|
$board = array();
|
||||||
|
$save_bo_table = array();
|
||||||
|
|
||||||
for($i=0;$i<count($_POST['chk_bn_id']);$i++)
|
for($i=0;$i<count($_POST['chk_bn_id']);$i++)
|
||||||
{
|
{
|
||||||
list($bo_table, $wr_id) = explode(",", $_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;
|
$write_table = $g5['write_prefix'].$bo_table;
|
||||||
|
|
||||||
@ -126,5 +133,10 @@ for($i=0;$i<count($_POST['chk_bn_id']);$i++)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$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");
|
goto_url("new.php?sfl=$sfl&stx=$stx&page=$page");
|
||||||
?>
|
?>
|
||||||
@ -73,7 +73,9 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
|||||||
<?php if ($is_admin) { ?>
|
<?php if ($is_admin) { ?>
|
||||||
<td class="sir_set_chk">
|
<td class="sir_set_chk">
|
||||||
<label for="chk_bn_id_<?php echo $i; ?>" class="sir_sr"><?php echo $num?>번</label>
|
<label for="chk_bn_id_<?php echo $i; ?>" class="sir_sr"><?php echo $num?>번</label>
|
||||||
<input type="checkbox" name="chk_bn_id[]" value="<?php echo $list[$i]['bo_table'].','.$list[$i]['wr_id']; ?>">
|
<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>
|
</td>
|
||||||
<?php } ?>
|
<?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_group"><a href="./new.php?gr_id=<?php echo $list[$i]['gr_id'] ?>"><?php echo $gr_subject ?></a></td>
|
||||||
@ -94,7 +96,6 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
|||||||
<?php if ($is_admin) { ?>
|
<?php if ($is_admin) { ?>
|
||||||
<div class="sir_bw02 sir_bw">
|
<div class="sir_bw02 sir_bw">
|
||||||
<input type="submit" onclick="document.pressed=this.value" value="선택삭제" class="sir_b01_adm">
|
<input type="submit" onclick="document.pressed=this.value" value="선택삭제" class="sir_b01_adm">
|
||||||
<input type="submit" onclick="document.pressed=this.value" value="선택내용삭제" class="sir_b01_adm">
|
|
||||||
</div>
|
</div>
|
||||||
<?}?>
|
<?}?>
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
Reference in New Issue
Block a user