게시판 그룹 일괄 수정 가능한가요?? 정보
게시판 그룹 일괄 수정 가능한가요??본문
동일 그룹 내에서는... 체크박스 체크 하면 일괄 수정 가능한것은 알고 있는데요..
전체 그룹을 일괄 수정할 방법이 있을까요??
그룹이 세분화 되어있어서
뭐 하나 수정하려고 해도 손이좀 가서요..
게시판 설정 페이지에서,
동일그룹 수정을 할것인지, 아니면, 그룹 전체를 수정할것인지,, 라디오 버튼으로 선택할수있게 하고 싶은데요
그러러면, board_form_update.php 에서 수정을 해야 할것 같은데요.
아래는 board_form_update.php의 동일 그룹 수정 코드인데요.
아래 부분을 어떻게 수정하면 될것 같은데,,, 도움 부탁드립니다. ㅠㅠ
왕초보 주제에 별거 다할려니 힘듭니다. ㅠㅠ
힌트라두 부탁드립니다.. ㅠㅠ
// 같은 그룹내 게시판 동일 옵션 적용
$s = "";
if ($chk_admin) $s .= " , bo_admin = '$bo_admin' ";
if ($chk_list_level) $s .= " , bo_list_level = '$bo_list_level' ";
if ($chk_read_level) $s .= " , bo_read_level = '$bo_read_level' ";
if ($chk_write_level) $s .= " , bo_write_level = '$bo_write_level' ";
if ($chk_reply_level) $s .= " , bo_reply_level = '$bo_reply_level' ";
if ($chk_comment_level) $s .= " , bo_comment_level = '$bo_comment_level' ";
if ($chk_link_level) $s .= " , bo_link_level = '$bo_link_level' ";
if ($chk_upload_level) $s .= " , bo_upload_level = '$bo_upload_level' ";
if ($chk_download_level) $s .= " , bo_download_level = '$bo_download_level' ";
if ($chk_html_level) $s .= " , bo_html_level = '$bo_html_level' ";
if ($chk_trackback_level) $s .= " , bo_trackback_level = '$bo_trackback_level' ";
if ($chk_count_modify) $s .= " , bo_count_modify = '$bo_count_modify' ";
if ($chk_count_delete) $s .= " , bo_count_delete = '$bo_count_delete' ";
if ($chk_read_point) $s .= " , bo_read_point = '$bo_read_point' ";
if ($chk_write_point) $s .= " , bo_write_point = '$bo_write_point' ";
if ($chk_comment_point) $s .= " , bo_comment_point = '$bo_comment_point' ";
if ($chk_download_point) $s .= " , bo_download_point = '$bo_download_point' ";
if ($chk_category_list) {
$s .= " , bo_category_list = '$bo_category_list' ";
$s .= " , bo_use_category = '$bo_use_category' ";
}
if ($chk_use_sideview) $s .= " , bo_use_sideview = '$bo_use_sideview' ";
if ($chk_use_file_content) $s .= " , bo_use_file_content = '$bo_use_file_content' ";
if ($chk_use_comment) $s .= " , bo_use_comment = '$bo_use_comment' ";
if ($chk_use_secret) $s .= " , bo_use_secret = '$bo_use_secret' ";
if ($chk_use_dhtml_editor) $s .= " , bo_use_dhtml_editor = '$bo_use_dhtml_editor' ";
if ($chk_use_rss_view) $s .= " , bo_use_rss_view = '$bo_use_rss_view' ";
if ($chk_use_good) $s .= " , bo_use_good = '$bo_use_good' ";
if ($chk_use_nogood) $s .= " , bo_use_nogood = '$bo_use_nogood' ";
if ($chk_use_name) $s .= " , bo_use_name = '$bo_use_name' ";
if ($chk_use_signature) $s .= " , bo_use_signature = '$bo_use_signature' ";
if ($chk_use_ip_view) $s .= " , bo_use_ip_view = '$bo_use_ip_view' ";
if ($chk_use_trackback) $s .= " , bo_use_trackback = '$bo_use_trackback' ";
if ($chk_use_list_view) $s .= " , bo_use_list_view = '$bo_use_list_view' ";
if ($chk_use_list_content) $s .= " , bo_use_list_content = '$bo_use_list_content' ";
if ($chk_use_email) $s .= " , bo_use_email = '$bo_use_email' ";
if ($chk_skin) $s .= " , bo_skin = '$bo_skin' ";
if ($chk_gallery_cols) $s .= " , bo_gallery_cols = '$bo_gallery_cols' ";
if ($chk_table_width) $s .= " , bo_table_width = '$bo_table_width' ";
if ($chk_page_rows) $s .= " , bo_page_rows = '$bo_page_rows' ";
if ($chk_subject_len) $s .= " , bo_subject_len = '$bo_subject_len' ";
if ($chk_new) $s .= " , bo_new = '$bo_new' ";
if ($chk_hot) $s .= " , bo_hot = '$bo_hot' ";
if ($chk_image_width) $s .= " , bo_image_width = '$bo_image_width' ";
if ($chk_reply_order) $s .= " , bo_reply_order = '$bo_reply_order' ";
if ($chk_disable_tags) $s .= " , bo_disable_tags = '$bo_disable_tags' ";
if ($chk_sort_field) $s .= " , bo_sort_field = '$bo_sort_field' ";
if ($chk_write_min) $s .= " , bo_write_min = '$bo_write_min' ";
if ($chk_write_max) $s .= " , bo_write_max = '$bo_write_max' ";
if ($chk_comment_min) $s .= " , bo_comment_min = '$bo_comment_min' ";
if ($chk_comment_max) $s .= " , bo_comment_max = '$bo_comment_max' ";
if ($chk_upload_count) $s .= " , bo_upload_count = '$bo_upload_count' ";
if ($chk_upload_size) $s .= " , bo_upload_size = '$bo_upload_size' ";
if ($chk_include_head) $s .= " , bo_include_head = '$bo_include_head' ";
if ($chk_include_tail) $s .= " , bo_include_tail = '$bo_include_tail' ";
if ($chk_content_head) $s .= " , bo_content_head = '$bo_content_head' ";
if ($chk_content_tail) $s .= " , bo_content_tail = '$bo_content_tail' ";
if ($chk_insert_content) $s .= " , bo_insert_content = '$bo_insert_content' ";
if ($chk_use_search) $s .= " , bo_use_search = '$bo_use_search' ";
if ($chk_order_search) $s .= " , bo_order_search = '$bo_order_search' ";
for ($i=1; $i<=10; $i++) {
if ($_POST["chk_{$i}"]) {
$s .= " , bo_{$i}_subj = '".$_POST["bo_{$i}_subj"]."' ";
$s .= " , bo_{$i} = '".$_POST["bo_{$i}"]."' ";
}
}
if ($s) {
$sql = " update $g4[board_table]
set bo_table = bo_table
{$s}
where gr_id = '$gr_id' ";
sql_query($sql);
}
if ($_FILES[bo_image_head][name]) {
$bo_image_head_path = "$board_path/$bo_image_head_urlencode";
move_uploaded_file($_FILES[bo_image_head][tmp_name], $bo_image_head_path);
chmod($bo_image_head_path, 0606);
}
if ($_FILES[bo_image_tail][name]) {
$bo_image_tail_path = "$board_path/$bo_image_tail_urlencode";
move_uploaded_file($_FILES[bo_image_tail][tmp_name], $bo_image_tail_path);
chmod($bo_image_tail_path, 0606);
}
goto_url("./board_form.php?w=u&bo_table=$bo_table&$qstr");
?>
전체 그룹을 일괄 수정할 방법이 있을까요??
그룹이 세분화 되어있어서
뭐 하나 수정하려고 해도 손이좀 가서요..
게시판 설정 페이지에서,
동일그룹 수정을 할것인지, 아니면, 그룹 전체를 수정할것인지,, 라디오 버튼으로 선택할수있게 하고 싶은데요
그러러면, board_form_update.php 에서 수정을 해야 할것 같은데요.
아래는 board_form_update.php의 동일 그룹 수정 코드인데요.
아래 부분을 어떻게 수정하면 될것 같은데,,, 도움 부탁드립니다. ㅠㅠ
왕초보 주제에 별거 다할려니 힘듭니다. ㅠㅠ
힌트라두 부탁드립니다.. ㅠㅠ
// 같은 그룹내 게시판 동일 옵션 적용
$s = "";
if ($chk_admin) $s .= " , bo_admin = '$bo_admin' ";
if ($chk_list_level) $s .= " , bo_list_level = '$bo_list_level' ";
if ($chk_read_level) $s .= " , bo_read_level = '$bo_read_level' ";
if ($chk_write_level) $s .= " , bo_write_level = '$bo_write_level' ";
if ($chk_reply_level) $s .= " , bo_reply_level = '$bo_reply_level' ";
if ($chk_comment_level) $s .= " , bo_comment_level = '$bo_comment_level' ";
if ($chk_link_level) $s .= " , bo_link_level = '$bo_link_level' ";
if ($chk_upload_level) $s .= " , bo_upload_level = '$bo_upload_level' ";
if ($chk_download_level) $s .= " , bo_download_level = '$bo_download_level' ";
if ($chk_html_level) $s .= " , bo_html_level = '$bo_html_level' ";
if ($chk_trackback_level) $s .= " , bo_trackback_level = '$bo_trackback_level' ";
if ($chk_count_modify) $s .= " , bo_count_modify = '$bo_count_modify' ";
if ($chk_count_delete) $s .= " , bo_count_delete = '$bo_count_delete' ";
if ($chk_read_point) $s .= " , bo_read_point = '$bo_read_point' ";
if ($chk_write_point) $s .= " , bo_write_point = '$bo_write_point' ";
if ($chk_comment_point) $s .= " , bo_comment_point = '$bo_comment_point' ";
if ($chk_download_point) $s .= " , bo_download_point = '$bo_download_point' ";
if ($chk_category_list) {
$s .= " , bo_category_list = '$bo_category_list' ";
$s .= " , bo_use_category = '$bo_use_category' ";
}
if ($chk_use_sideview) $s .= " , bo_use_sideview = '$bo_use_sideview' ";
if ($chk_use_file_content) $s .= " , bo_use_file_content = '$bo_use_file_content' ";
if ($chk_use_comment) $s .= " , bo_use_comment = '$bo_use_comment' ";
if ($chk_use_secret) $s .= " , bo_use_secret = '$bo_use_secret' ";
if ($chk_use_dhtml_editor) $s .= " , bo_use_dhtml_editor = '$bo_use_dhtml_editor' ";
if ($chk_use_rss_view) $s .= " , bo_use_rss_view = '$bo_use_rss_view' ";
if ($chk_use_good) $s .= " , bo_use_good = '$bo_use_good' ";
if ($chk_use_nogood) $s .= " , bo_use_nogood = '$bo_use_nogood' ";
if ($chk_use_name) $s .= " , bo_use_name = '$bo_use_name' ";
if ($chk_use_signature) $s .= " , bo_use_signature = '$bo_use_signature' ";
if ($chk_use_ip_view) $s .= " , bo_use_ip_view = '$bo_use_ip_view' ";
if ($chk_use_trackback) $s .= " , bo_use_trackback = '$bo_use_trackback' ";
if ($chk_use_list_view) $s .= " , bo_use_list_view = '$bo_use_list_view' ";
if ($chk_use_list_content) $s .= " , bo_use_list_content = '$bo_use_list_content' ";
if ($chk_use_email) $s .= " , bo_use_email = '$bo_use_email' ";
if ($chk_skin) $s .= " , bo_skin = '$bo_skin' ";
if ($chk_gallery_cols) $s .= " , bo_gallery_cols = '$bo_gallery_cols' ";
if ($chk_table_width) $s .= " , bo_table_width = '$bo_table_width' ";
if ($chk_page_rows) $s .= " , bo_page_rows = '$bo_page_rows' ";
if ($chk_subject_len) $s .= " , bo_subject_len = '$bo_subject_len' ";
if ($chk_new) $s .= " , bo_new = '$bo_new' ";
if ($chk_hot) $s .= " , bo_hot = '$bo_hot' ";
if ($chk_image_width) $s .= " , bo_image_width = '$bo_image_width' ";
if ($chk_reply_order) $s .= " , bo_reply_order = '$bo_reply_order' ";
if ($chk_disable_tags) $s .= " , bo_disable_tags = '$bo_disable_tags' ";
if ($chk_sort_field) $s .= " , bo_sort_field = '$bo_sort_field' ";
if ($chk_write_min) $s .= " , bo_write_min = '$bo_write_min' ";
if ($chk_write_max) $s .= " , bo_write_max = '$bo_write_max' ";
if ($chk_comment_min) $s .= " , bo_comment_min = '$bo_comment_min' ";
if ($chk_comment_max) $s .= " , bo_comment_max = '$bo_comment_max' ";
if ($chk_upload_count) $s .= " , bo_upload_count = '$bo_upload_count' ";
if ($chk_upload_size) $s .= " , bo_upload_size = '$bo_upload_size' ";
if ($chk_include_head) $s .= " , bo_include_head = '$bo_include_head' ";
if ($chk_include_tail) $s .= " , bo_include_tail = '$bo_include_tail' ";
if ($chk_content_head) $s .= " , bo_content_head = '$bo_content_head' ";
if ($chk_content_tail) $s .= " , bo_content_tail = '$bo_content_tail' ";
if ($chk_insert_content) $s .= " , bo_insert_content = '$bo_insert_content' ";
if ($chk_use_search) $s .= " , bo_use_search = '$bo_use_search' ";
if ($chk_order_search) $s .= " , bo_order_search = '$bo_order_search' ";
for ($i=1; $i<=10; $i++) {
if ($_POST["chk_{$i}"]) {
$s .= " , bo_{$i}_subj = '".$_POST["bo_{$i}_subj"]."' ";
$s .= " , bo_{$i} = '".$_POST["bo_{$i}"]."' ";
}
}
if ($s) {
$sql = " update $g4[board_table]
set bo_table = bo_table
{$s}
where gr_id = '$gr_id' ";
sql_query($sql);
}
if ($_FILES[bo_image_head][name]) {
$bo_image_head_path = "$board_path/$bo_image_head_urlencode";
move_uploaded_file($_FILES[bo_image_head][tmp_name], $bo_image_head_path);
chmod($bo_image_head_path, 0606);
}
if ($_FILES[bo_image_tail][name]) {
$bo_image_tail_path = "$board_path/$bo_image_tail_urlencode";
move_uploaded_file($_FILES[bo_image_tail][tmp_name], $bo_image_tail_path);
chmod($bo_image_tail_path, 0606);
}
goto_url("./board_form.php?w=u&bo_table=$bo_table&$qstr");
?>
댓글 전체
if ($s) {
if ($gr_id2 == '1')
$sql = " update $g4[board_table] set bo_table = bo_table {$s} ";
else if ($gr_id2 != '1')
$sql = " update $g4[board_table] set bo_table = bo_table {$s} where gr_id = '$gr_id' ";
sql_query($sql);
}
board_form.php는 아래처럼 하면 될 것 같네요.
<tr class='ht'>
<td></td>
<td>그룹</td>
<td>
<?=get_group_select('gr_id', $board[gr_id], "required itemname='그룹'");?>
<? if ($w=='u') { ?><a href="javascript:location.href='./board_list.php?sfl=a.gr_id&stx='+document.fboardform.gr_id.value;">동일그룹게시판목록</a><?}?>
<input type=checkbox name=gr_id2 value=1> 전체
</td>
</tr>
if ($gr_id2 == '1')
$sql = " update $g4[board_table] set bo_table = bo_table {$s} ";
else if ($gr_id2 != '1')
$sql = " update $g4[board_table] set bo_table = bo_table {$s} where gr_id = '$gr_id' ";
sql_query($sql);
}
board_form.php는 아래처럼 하면 될 것 같네요.
<tr class='ht'>
<td></td>
<td>그룹</td>
<td>
<?=get_group_select('gr_id', $board[gr_id], "required itemname='그룹'");?>
<? if ($w=='u') { ?><a href="javascript:location.href='./board_list.php?sfl=a.gr_id&stx='+document.fboardform.gr_id.value;">동일그룹게시판목록</a><?}?>
<input type=checkbox name=gr_id2 value=1> 전체
</td>
</tr>
정말 너무너무 감사드립니다.. ㅎㅎㅎㅎㅎ
아주 잘 됩니다.. 꾸벅.. ㅜㅜ
좋은하루 되세요. ^^v
아주 잘 됩니다.. 꾸벅.. ㅜㅜ
좋은하루 되세요. ^^v