<?
$sub_menu = "300100";
include_once("./_common.php");

check_demo();

auth_check($auth[$sub_menu], "w");

//echo "<pre>";var_export($_POST);echo "<pre>";
for ($i=0; $i<count($chk); $i++) 
{
    // 실제 번호를 넘김
    $k = $chk[$i];

    if ($is_admin != "super")
    {
        $sql = " select count(*) as cnt from $g4[board_table] a, $g4[group_table] b
                  where a.gr_id = '$gr_id[$k]' 
                    and a.gr_id = b.gr_id 
                    and b.gr_admin = '$member[mb_id]' ";
        $row = sql_fetch($sql);
        if (!$row[cnt])
            alert("최고관리자가 아닌 경우 다른 관리자의 게시판($board_table[$k])은 수정이 불가합니다.");
    }

    $sql = " update $g4[board_table]
                set gr_id               = '$gr_id[$k]',
                    bo_subject          = '$bo_subject[$k]',
                    bo_skin             = '$bo_skin[$k]',
					bo_include_head     = '".addslashes($bo_include_head[$k])."',
					bo_include_tail     = '".addslashes($bo_include_tail[$k])."',
					bo_content_head     = '".addslashes($bo_content_head[$k])."',
					bo_use_category     = '".$bo_use_category[$k]."',
					bo_category_list    = '".addslashes($bo_category_list[$k])."',
					bo_read_level       = '$bo_read_level[$k]',
					bo_write_level      = '$bo_write_level[$k]',
					bo_reply_level      = '$bo_reply_level[$k]',
					bo_comment_level    = '$bo_comment_level[$k]',
					bo_use_dhtml_editor = '$bo_use_dhtml_editor',
                    bo_use_search       = '$bo_use_search[$k]'
              where bo_table = '$board_table[$k]' ";

    sql_query($sql);

	
}

goto_url("./board_list.php?$qstr");
?>
