\'\"\\\'\\\"\%\=\(\)\/\^\*]/", "", $bo_category_list); $bo_use_category = isset($_POST['bo_use_category']) ? (int) $_POST['bo_use_category'] : 0; $bo_use_sideview = isset($_POST['bo_use_sideview']) ? (int) $_POST['bo_use_sideview'] : 0; $bo_use_dhtml_editor = isset($_POST['bo_use_dhtml_editor']) ? (int) $_POST['bo_use_dhtml_editor'] : 0; $bo_use_good = isset($_POST['bo_use_good']) ? (int) $_POST['bo_use_good'] : 0; $bo_use_nogood = isset($_POST['bo_use_nogood']) ? (int) $_POST['bo_use_nogood'] : 0; $bo_use_name = isset($_POST['bo_use_name']) ? (int) $_POST['bo_use_name'] : 0; $bo_use_signature = isset($_POST['bo_use_signature']) ? (int) $_POST['bo_use_signature'] : 0; $bo_use_ip_view = isset($_POST['bo_use_ip_view']) ? (int) $_POST['bo_use_ip_view'] : 0; $bo_use_list_view = isset($_POST['bo_use_list_view']) ? (int) $_POST['bo_use_list_view'] : 0; $bo_use_list_file = isset($_POST['bo_use_list_file']) ? (int) $_POST['bo_use_list_file'] : 0; $bo_use_list_content = isset($_POST['bo_use_list_content']) ? (int) $_POST['bo_use_list_content'] : 0; $bo_use_email = isset($_POST['bo_use_email']) ? (int) $_POST['bo_use_email'] : 0; $bo_use_sns = isset($_POST['bo_use_sns']) ? (int) $_POST['bo_use_sns'] : 0; $bo_use_captcha = isset($_POST['bo_use_captcha']) ? (int) $_POST['bo_use_captcha'] : 0; $bo_table_width = isset($_POST['bo_table_width']) ? (int) $_POST['bo_table_width'] : 0; $bo_subject_len = isset($_POST['bo_subject_len']) ? (int) $_POST['bo_subject_len'] : 0; $bo_mobile_subject_len = isset($_POST['bo_mobile_subject_len']) ? (int) $_POST['bo_mobile_subject_len'] : 0; $bo_page_rows = isset($_POST['bo_page_rows']) ? (int) $_POST['bo_page_rows'] : 0; $bo_mobile_page_rows = isset($_POST['bo_mobile_page_rows']) ? (int) $_POST['bo_mobile_page_rows'] : 0; $bo_use_rss_view = isset($_POST['bo_use_rss_view']) ? (int) $_POST['bo_use_rss_view'] : 0; $bo_use_secret = isset($_POST['bo_use_secret']) ? (int) $_POST['bo_use_secret'] : 0; $bo_use_file_content = isset($_POST['bo_use_file_content']) ? (int) $_POST['bo_use_file_content'] : 0; $bo_new = isset($_POST['bo_new']) ? (int) $_POST['bo_new'] : 0; $bo_hot = isset($_POST['bo_hot']) ? (int) $_POST['bo_hot'] : 0; $bo_image_width = isset($_POST['bo_image_width']) ? (int) $_POST['bo_image_width'] : 0; $bo_use_search = isset($_POST['bo_use_search']) ? (int) $_POST['bo_use_search'] : 0; $bo_use_cert = isset($_POST['bo_use_cert']) ? preg_replace('/[^0-9a-z_]/i', '', $_POST['bo_use_cert']) : ''; $bo_device = isset($_POST['bo_device']) ? clean_xss_tags($_POST['bo_device'], 1, 1) : ''; $bo_list_level = isset($_POST['bo_list_level']) ? (int) $_POST['bo_list_level'] : 0; $bo_read_level = isset($_POST['bo_read_level']) ? (int) $_POST['bo_read_level'] : 0; $bo_write_level = isset($_POST['bo_write_level']) ? (int) $_POST['bo_write_level'] : 0; $bo_reply_level = isset($_POST['bo_reply_level']) ? (int) $_POST['bo_reply_level'] : 0; $bo_comment_level = isset($_POST['bo_comment_level']) ? (int) $_POST['bo_comment_level'] : 0; $bo_html_level = isset($_POST['bo_html_level']) ? (int) $_POST['bo_html_level'] : 0; $bo_link_level = isset($_POST['bo_link_level']) ? (int) $_POST['bo_link_level'] : 0; $bo_count_modify = isset($_POST['bo_count_modify']) ? (int) $_POST['bo_count_modify'] : 0; $bo_count_delete = isset($_POST['bo_count_delete']) ? (int) $_POST['bo_count_delete'] : 0; $bo_upload_level = isset($_POST['bo_upload_level']) ? (int) $_POST['bo_upload_level'] : 0; $bo_download_level = isset($_POST['bo_download_level']) ? (int) $_POST['bo_download_level'] : 0; $bo_read_point = isset($_POST['bo_read_point']) ? (int) $_POST['bo_read_point'] : 0; $bo_write_point = isset($_POST['bo_write_point']) ? (int) $_POST['bo_write_point'] : 0; $bo_comment_point = isset($_POST['bo_comment_point']) ? (int) $_POST['bo_comment_point'] : 0; $bo_download_point = isset($_POST['bo_download_point']) ? (int) $_POST['bo_download_point'] : 0; $bo_select_editor = isset($_POST['bo_select_editor']) ? clean_xss_tags($_POST['bo_select_editor'], 1, 1) : ''; $bo_skin = isset($_POST['bo_skin']) ? clean_xss_tags($_POST['bo_skin'], 1, 1) : ''; $bo_mobile_skin = isset($_POST['bo_mobile_skin']) ? clean_xss_tags($_POST['bo_mobile_skin'], 1, 1) : ''; $bo_content_head = isset($_POST['bo_content_head']) ? $_POST['bo_content_head'] : ''; $bo_content_tail = isset($_POST['bo_content_tail']) ? $_POST['bo_content_tail'] : ''; $bo_mobile_content_head = isset($_POST['bo_mobile_content_head']) ? $_POST['bo_mobile_content_head'] : ''; $bo_mobile_content_tail = isset($_POST['bo_mobile_content_tail']) ? $_POST['bo_mobile_content_tail'] : ''; $bo_insert_content = isset($_POST['bo_insert_content']) ? $_POST['bo_insert_content'] : ''; $bo_gallery_cols = isset($_POST['bo_gallery_cols']) ? (int) $_POST['bo_gallery_cols'] : 0; $bo_gallery_width = isset($_POST['bo_gallery_width']) ? (int) $_POST['bo_gallery_width'] : 0; $bo_gallery_height = isset($_POST['bo_gallery_height']) ? (int) $_POST['bo_gallery_height'] : 0; $bo_mobile_gallery_width = isset($_POST['bo_mobile_gallery_width']) ? (int) $_POST['bo_mobile_gallery_width'] : 0; $bo_mobile_gallery_height = isset($_POST['bo_mobile_gallery_height']) ? (int) $_POST['bo_mobile_gallery_height'] : 0; $bo_upload_count = isset($_POST['bo_upload_count']) ? (int) $_POST['bo_upload_count'] : 0; $bo_upload_size = isset($_POST['bo_upload_size']) ? (int) $_POST['bo_upload_size'] : 0; $bo_reply_order = isset($_POST['bo_reply_order']) ? (int) $_POST['bo_reply_order'] : 0; $bo_order = isset($_POST['bo_order']) ? (int) $_POST['bo_order'] : 0; $bo_write_min = isset($_POST['bo_write_min']) ? (int) $_POST['bo_write_min'] : 0; $bo_write_max = isset($_POST['bo_write_max']) ? (int) $_POST['bo_write_max'] : 0; $bo_comment_min = isset($_POST['bo_comment_min']) ? (int) $_POST['bo_comment_min'] : 0; $bo_comment_max = isset($_POST['bo_comment_max']) ? (int) $_POST['bo_comment_max'] : 0; $bo_sort_field = isset($_POST['bo_sort_field']) ? clean_xss_tags($_POST['bo_sort_field'], 1, 1) : ''; $etcs = array(); for($i=1;$i<=10;$i++){ $etcs['bo_'.$i.'_subj'] = ${'bo_'.$i.'_subj'} = isset($_POST['bo_'.$i.'_subj']) ? $_POST['bo_'.$i.'_subj'] : ''; $etcs['bo_'.$i] = ${'bo_'.$i} = isset($_POST['bo_'.$i]) ? $_POST['bo_'.$i] : ''; } $sql_common = " gr_id = '{$gr_id}', bo_subject = '{$bo_subject}', bo_mobile_subject = '{$bo_mobile_subject}', bo_device = '{$bo_device}', bo_admin = '{$bo_admin}', bo_list_level = '{$bo_list_level}', bo_read_level = '{$bo_read_level}', bo_write_level = '{$bo_write_level}', bo_reply_level = '{$bo_reply_level}', bo_comment_level = '{$bo_comment_level}', bo_html_level = '{$bo_html_level}', bo_link_level = '{$bo_link_level}', bo_count_modify = '{$bo_count_modify}', bo_count_delete = '{$bo_count_delete}', bo_upload_level = '{$bo_upload_level}', bo_download_level = '{$bo_download_level}', bo_read_point = '{$bo_read_point}', bo_write_point = '{$bo_write_point}', bo_comment_point = '{$bo_comment_point}', bo_download_point = '{$bo_download_point}', bo_use_category = '{$bo_use_category}', bo_category_list = '{$str_bo_category_list}', bo_use_sideview = '{$bo_use_sideview}', bo_use_file_content = '{$bo_use_file_content}', bo_use_secret = '{$bo_use_secret}', bo_use_dhtml_editor = '{$bo_use_dhtml_editor}', bo_select_editor = '{$bo_select_editor}', bo_use_rss_view = '{$bo_use_rss_view}', bo_use_good = '{$bo_use_good}', bo_use_nogood = '{$bo_use_nogood}', bo_use_name = '{$bo_use_name}', bo_use_signature = '{$bo_use_signature}', bo_use_ip_view = '{$bo_use_ip_view}', bo_use_list_view = '{$bo_use_list_view}', bo_use_list_file = '{$bo_use_list_file}', bo_use_list_content = '{$bo_use_list_content}', bo_use_email = '{$bo_use_email}', bo_use_cert = '{$bo_use_cert}', bo_use_sns = '{$bo_use_sns}', bo_use_captcha = '{$bo_use_captcha}', bo_table_width = '{$bo_table_width}', bo_subject_len = '{$bo_subject_len}', bo_mobile_subject_len = '{$bo_mobile_subject_len}', bo_page_rows = '{$bo_page_rows}', bo_mobile_page_rows = '{$bo_mobile_page_rows}', bo_new = '{$bo_new}', bo_hot = '{$bo_hot}', bo_image_width = '{$bo_image_width}', bo_skin = '{$bo_skin}', bo_mobile_skin = '{$bo_mobile_skin}', "; // 최고 관리자인 경우에만 수정가능 if ($is_admin === 'super'){ $sql_common .= " bo_include_head = '".$bo_include_head."', bo_include_tail = '".$bo_include_tail."', bo_content_head = '{$bo_content_head}', bo_content_tail = '{$bo_content_tail}', bo_mobile_content_head = '{$bo_mobile_content_head}', bo_mobile_content_tail = '{$bo_mobile_content_tail}', "; } $sql_common .= " bo_insert_content = '{$bo_insert_content}', bo_gallery_cols = '{$bo_gallery_cols}', bo_gallery_width = '{$bo_gallery_width}', bo_gallery_height = '{$bo_gallery_height}', bo_mobile_gallery_width = '{$bo_mobile_gallery_width}', bo_mobile_gallery_height= '{$bo_mobile_gallery_height}', bo_upload_count = '{$bo_upload_count}', bo_upload_size = '{$bo_upload_size}', bo_reply_order = '{$bo_reply_order}', bo_use_search = '{$bo_use_search}', bo_order = '{$bo_order}', bo_write_min = '{$bo_write_min}', bo_write_max = '{$bo_write_max}', bo_comment_min = '{$bo_comment_min}', bo_comment_max = '{$bo_comment_max}', bo_sort_field = '{$bo_sort_field}', bo_1_subj = '{$bo_1_subj}', bo_2_subj = '{$bo_2_subj}', bo_3_subj = '{$bo_3_subj}', bo_4_subj = '{$bo_4_subj}', bo_5_subj = '{$bo_5_subj}', bo_6_subj = '{$bo_6_subj}', bo_7_subj = '{$bo_7_subj}', bo_8_subj = '{$bo_8_subj}', bo_9_subj = '{$bo_9_subj}', bo_10_subj = '{$bo_10_subj}', bo_1 = '{$bo_1}', bo_2 = '{$bo_2}', bo_3 = '{$bo_3}', bo_4 = '{$bo_4}', bo_5 = '{$bo_5}', bo_6 = '{$bo_6}', bo_7 = '{$bo_7}', bo_8 = '{$bo_8}', bo_9 = '{$bo_9}', bo_10 = '{$bo_10}' "; if ($w == '') { $row = sql_fetch(" select count(*) as cnt from {$g5['board_table']} where bo_table = '{$bo_table}' "); if ($row['cnt']) alert($bo_table.' 은(는) 이미 존재하는 TABLE 입니다.'); $sql = " insert into {$g5['board_table']} set bo_table = '{$bo_table}', bo_count_write = '0', bo_count_comment = '0', $sql_common "; sql_query($sql); // 게시판 테이블 생성 $file = file('./sql_write.sql'); $file = get_db_create_replace($file); $sql = implode("\n", $file); $create_table = $g5['write_prefix'] . $bo_table; // sql_board.sql 파일의 테이블명을 변환 $source = array('/__TABLE_NAME__/', '/;/'); $target = array($create_table, ''); $sql = preg_replace($source, $target, $sql); sql_query($sql, FALSE); } else if ($w == 'u') { // 게시판의 글 수 $sql = " select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 "; $row = sql_fetch($sql); $bo_count_write = $row['cnt']; // 게시판의 코멘트 수 $sql = " select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 1 "; $row = sql_fetch($sql); $bo_count_comment = $row['cnt']; // 글수 조정 /* 엔피씨님의 팁으로 교체합니다. 130308 http://sir.kr/g5_tiptech/27207 */ if (isset($_POST['proc_count'])) { // 원글을 얻습니다. //$sql = " select wr_id from {$g5['write_prefix']}{$bo_table} where wr_is_comment = 0 "; $sql = " select a.wr_id, (count(b.wr_parent) - 1) as cnt from {$g5['write_prefix']}{$bo_table} a, {$g5['write_prefix']}{$bo_table} b where a.wr_id=b.wr_parent and a.wr_is_comment=0 group by a.wr_id "; $result = sql_query($sql); for ($i=0; $row=sql_fetch_array($result); $i++) { /* // 코멘트수를 얻습니다. $sql2 = " select count(*) as cnt from {$g5['write_prefix']}$bo_table where wr_parent = '{$row['wr_id']}' and wr_is_comment = 1 "; $row2 = sql_fetch($sql2); */ sql_query(" update {$g5['write_prefix']}{$bo_table} set wr_comment = '{$row['cnt']}' where wr_id = '{$row['wr_id']}' "); } } // 공지사항에는 등록되어 있지만 실제 존재하지 않는 글 아이디는 삭제합니다. $bo_notice = ""; $lf = ""; if ($board['bo_notice']) { $tmp_array = explode(",", $board['bo_notice']); for ($i=0; $i