Copy
<?php//////////설정 아주 중요!!!!$gr_id = "autob";//그룹아이디를 이곳에 적으세요"; $bo_include_head = "_head.php";//"이곳에서 해더 파일명을 넣으세요";$bo_include_tail = "_tail.php";//"이곳에서 푸터 파일명을 넣으세요";$bo_skin = "gallery";//이곳에 스킨명$bo_table = $mb['mb_id'];$bo_subject = $mb['mb_nick']." 회원님의 일상생활";//자동 생성 게시판 제목?><?php$sub_menu = "200100";include_once('./_common.php');check_demo();if (!count($_POST['chk'])) { alert($_POST['act_button']." 하실 항목을 하나 이상 체크하세요.");}auth_check($auth[$sub_menu], 'w');if ($_POST['act_button'] == "선택수정") { for ($i=0; $i<count($_POST['chk']); $i++) { // 실제 번호를 넘김 $k = $_POST['chk'][$i]; $mb = get_member($_POST['mb_id'][$k]); if (!$mb['mb_id']) { $msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n'; } else if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) { $msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 수정할 수 없습니다.\\n'; } else if ($member['mb_id'] == $mb['mb_id']) { $msg .= $mb['mb_id'].' : 로그인 중인 관리자는 수정 할 수 없습니다.\\n'; } else { if($_POST['mb_certify'][$k]) $mb_adult = $_POST['mb_adult'][$k]; else $mb_adult = 0; $sql = " update {$g5['member_table']} set mb_level = '{$_POST['mb_level'][$k]}', mb_intercept_date = '{$_POST['mb_intercept_date'][$k]}', mb_mailling = '{$_POST['mb_mailling'][$k]}', mb_sms = '{$_POST['mb_sms'][$k]}', mb_open = '{$_POST['mb_open'][$k]}', mb_certify = '{$_POST['mb_certify'][$k]}', mb_adult = '{$mb_adult}' where mb_id = '{$_POST['mb_id'][$k]}' "; sql_query($sql); } }} else if ($_POST['act_button'] == "선택삭제") { for ($i=0; $i<count($_POST['chk']); $i++) { // 실제 번호를 넘김 $k = $_POST['chk'][$i]; $mb = get_member($_POST['mb_id'][$k]); if (!$mb['mb_id']) { $msg .= $mb['mb_id'].' : 회원자료가 존재하지 않습니다.\\n'; } else if ($member['mb_id'] == $mb['mb_id']) { $msg .= $mb['mb_id'].' : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n'; } else if (is_admin($mb['mb_id']) == 'super') { $msg .= $mb['mb_id'].' : 최고 관리자는 삭제할 수 없습니다.\\n'; } else if ($is_admin != 'super' && $mb['mb_level'] >= $member['mb_level']) { $msg .= $mb['mb_id'].' : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n'; } else { // 회원자료 삭제 member_delete($mb['mb_id']); } }}if ($msg) //echo '<script> alert("'.$msg.'"); </script>'; alert($msg);<!-- } 회원 전용 게시판 생성 --><?if ($mb_level==3) {$board_path = G5_DATA_PATH.'/file/'.$bo_table;// 게시판 디렉토리 생성@mkdir($board_path, G5_DIR_PERMISSION);@chmod($board_path, G5_DIR_PERMISSION);// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.$file = $board_path . '/index.php';$f = @fopen($file, 'w');@fwrite($f, '');@fclose($f);@chmod($file, G5_FILE_PERMISSION);// 분류에 & 나 = 는 사용이 불가하므로 2바이트로 바꾼다.$src_char = array('&', '=');$dst_char = array('&', '〓');$bo_category_list = str_replace($src_char, $dst_char, $bo_category_list);$sql_common = " gr_id = '$gr_id', bo_subject = '$bo_subject', bo_mobile_subject = '$bo_subject', bo_device = 'both', bo_admin = '$bo_table', bo_list_level = '2', bo_read_level = '2', bo_write_level = '2', bo_reply_level = '2', bo_comment_level = '2', bo_html_level = '2', bo_link_level = '2', bo_count_modify = '2', bo_count_delete = '2', bo_upload_level = '2', bo_download_level = '2', bo_read_point = '0', bo_write_point = '0', bo_comment_point = '0', bo_download_point = '0', bo_use_category = '0', bo_category_list = '', bo_use_sideview = '0', bo_use_file_content = '0', bo_use_secret = '0', bo_use_dhtml_editor = '0', bo_use_rss_view = '0', bo_use_good = '0', bo_use_nogood = '0', bo_use_name = '0', bo_use_signature = '0', bo_use_ip_view = '0', bo_use_list_view = '0', bo_use_list_file = '0', bo_use_list_content = '0', bo_use_email = '0', bo_use_cert = '', bo_use_sns = '', bo_table_width = '99', bo_subject_len = '60', bo_mobile_subject_len = '30', bo_page_rows = '15', bo_mobile_page_rows = '15', bo_new = '24', bo_hot = '100', bo_image_width = '600', bo_skin = '$bo_skin', bo_mobile_skin = 'basic', bo_include_head = '$bo_include_head', bo_include_tail = '$bo_include_tail', bo_content_head = '', bo_content_tail = '', bo_mobile_content_head = '', bo_insert_content = '', bo_gallery_cols = '4', bo_gallery_width = '174', bo_gallery_height = '124', bo_mobile_gallery_width = '125', bo_mobile_gallery_height= '100', bo_upload_count = '2', bo_upload_size = '204800', bo_reply_order = '1', bo_use_search = '1', bo_order = '1', bo_write_min = '0', bo_write_max = '0', bo_comment_min = '0', bo_comment_max = '0', bo_sort_field = '0', bo_1_subj = '', bo_2_subj = '', bo_3_subj = '', bo_4_subj = '', bo_5_subj = '', bo_6_subj = '', bo_7_subj = '', bo_8_subj = '', bo_9_subj = '', bo_10_subj = '', bo_1 = '', bo_2 = '', bo_3 = '', bo_4 = '', bo_5 = '', bo_6 = '', bo_7 = '', bo_8 = '', bo_9 = '', bo_10 = '' "; $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(G5_ADMIN_PATH.'/sql_write.sql'); $sql = implode($file, "\n"); $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);}goto_url('./member_list.php?'.$qstr);?>
위와 같이 소스를 짜집기 해서 만들었는데요 레벨3으로 수정하면 프로그램 오류가 나서
웹 사이트에서 페이지를 표시할 수 없습니다. | |
이렇게 나오네요 ㅠㅠ
뭐가 문제인가요?
|
답변 1개 / 댓글 6개
채택된 답변
+20 포인트
2017-07-26 (수) 15:42:35
72번째 줄 if ($mb_level==3) { 를
if ($member[mb_level]==3) { 로 변경 해보세요~
답변에 대한 댓글 6개
2017-07-27 (목) 11:44:07
원래 게시판 생성이 되었던 부분인가요? 그랬었는데, 레벨3을 넣으니 안된다는건지요..
소스로 봐서 제가 보기엔 문제가 없어 보입니다.
소스로 봐서 제가 보기엔 문제가 없어 보입니다.
2017-07-27 (목) 11:50:16
이게 member_list_update.php인데요 혹시 회원 리스트에서 버튼을 클릭했을 때 이 동작이 일어나게 하려면 어떻게 해야하나요?
2017-07-27 (목) 11:51:49
아니요 처음 시도해보는거고 원래 회원가입시 자동생성 소스를 레벨 3일때 자동생성으로 하려고 하는거에요 ㅠㅠ
2017-07-27 (목) 12:07:25
팁이 어디 있을텐데... 잠시 찾아봤는데 안보이네요 예전에 회원가입시 게시판 생성을 본것 같기는 합니다. 적절한 답변이 못될것 같네요....
답변을 작성하려면 로그인이 필요합니다.