5.4 버전 hook 이벤트 추가 및 hook 추적에 Object도 가능하게 수정
This commit is contained in:
@ -69,5 +69,7 @@ if ($w == '') {
|
||||
alert('제대로 된 값이 넘어오지 않았습니다.');
|
||||
}
|
||||
|
||||
run_event('admin_boardgroup_form_update', $gr_id, $w);
|
||||
|
||||
goto_url('./boardgroup_form.php?w=u&gr_id='.$gr_id.'&'.$qstr);
|
||||
?>
|
||||
|
||||
@ -10,19 +10,23 @@ auth_check($auth[$sub_menu], 'w');
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$count = count($_POST['chk']);
|
||||
$post_chk = isset($_POST['chk']) ? (array) $_POST['chk'] : array();
|
||||
$post_group_id = isset($_POST['group_id']) ? (array) $_POST['group_id'] : array();
|
||||
$act_button = isset($_POST['act_button']) ? $_POST['act_button'] : '';
|
||||
|
||||
$count = count($post_chk);
|
||||
|
||||
if(!$count)
|
||||
alert($_POST['act_button'].'할 게시판그룹을 1개이상 선택해 주세요.');
|
||||
alert($act_button.'할 게시판그룹을 1개이상 선택해 주세요.');
|
||||
|
||||
for ($i=0; $i<$count; $i++)
|
||||
{
|
||||
$k = $_POST['chk'][$i];
|
||||
$gr_id = preg_replace('/[^a-z0-9_]/i', '', $_POST['group_id'][$k]);
|
||||
$k = $post_chk[$i];
|
||||
$gr_id = preg_replace('/[^a-z0-9_]/i', '', $post_group_id[$k]);
|
||||
$gr_subject = is_array($_POST['gr_subject']) ? strip_tags(clean_xss_attributes($_POST['gr_subject'][$k])) : '';
|
||||
$gr_admin = is_array($_POST['gr_admin']) ? strip_tags(clean_xss_attributes($_POST['gr_admin'][$k])) : '';
|
||||
|
||||
if($_POST['act_button'] == '선택수정') {
|
||||
if($act_button == '선택수정') {
|
||||
$sql = " update {$g5['group_table']}
|
||||
set gr_subject = '{$gr_subject}',
|
||||
gr_device = '".sql_real_escape_string($_POST['gr_device'][$k])."',
|
||||
@ -33,7 +37,7 @@ for ($i=0; $i<$count; $i++)
|
||||
if ($is_admin != 'super')
|
||||
$sql .= " and gr_admin = '{$gr_admin}' ";
|
||||
sql_query($sql);
|
||||
} else if($_POST['act_button'] == '선택삭제') {
|
||||
} else if($act_button == '선택삭제') {
|
||||
$row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where gr_id = '$gr_id' ");
|
||||
if ($row['cnt'])
|
||||
alert("이 그룹에 속한 게시판이 존재하여 게시판 그룹을 삭제할 수 없습니다.\\n\\n이 그룹에 속한 게시판을 먼저 삭제하여 주십시오.", './board_list.php?sfl=gr_id&stx='.$gr_id);
|
||||
@ -46,5 +50,7 @@ for ($i=0; $i<$count; $i++)
|
||||
}
|
||||
}
|
||||
|
||||
run_event('admin_boardgroup_list_update', $act_button, $chk, $post_group_id, $qstr);
|
||||
|
||||
goto_url('./boardgroup_list.php?'.$qstr);
|
||||
?>
|
||||
|
||||
@ -68,5 +68,7 @@ for ($i=0; $i<$count; $i++)
|
||||
sql_query($sql);
|
||||
}
|
||||
|
||||
run_event('admin_menu_list_update');
|
||||
|
||||
goto_url('./menu_list.php');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user