'', 'qa_subject'=>'', 'qa_category'=>''); if($is_guest) alert('회원이시라면 로그인 후 이용해 보십시오.', './login.php?url='.urlencode(G5_BBS_URL.'/qalist.php')); $qaconfig = get_qa_config(); $token = _token(); set_session('ss_qa_write_token', $token); $g5['title'] = $qaconfig['qa_title']; include_once('./qahead.php'); $skin_file = $qa_skin_path.'/write.skin.php'; if(is_file($skin_file)) { /*========================== $w == a : 답변 $w == r : 추가질문 $w == u : 수정 ==========================*/ if($w == 'u' || $w == 'r') { $sql = " select * from {$g5['qa_content_table']} where qa_id = '$qa_id' "; if($is_admin !== 'super') { $sql .= " and mb_id = '{$member['mb_id']}' "; } $write = sql_fetch($sql); if($w == 'u') { if(!$write['qa_id']) alert('게시글이 존재하지 않습니다.\\n삭제되었거나 자신의 글이 아닌 경우입니다.'); if($is_admin !== 'super') { if($write['qa_type'] == 0 && $write['qa_status'] == 1) alert('답변이 등록된 문의글은 수정할 수 없습니다.'); if($write['mb_id'] != $member['mb_id']) alert('게시글을 수정할 권한이 없습니다.\\n\\n올바른 방법으로 이용해 주십시오.', G5_URL); } } } // 분류 $category_option = ''; if(trim($qaconfig['qa_category'])) { $category = explode('|', $qaconfig['qa_category']); $category_cnt = count($category); for($i=0; $i<$category_cnt; $i++) { $category_option .= option_selected($category[$i], $write['qa_category']); } } else { alert('1:1문의 설정에서 분류를 설정해 주십시오'); } $is_dhtml_editor = false; if ($config['cf_editor'] && $qaconfig['qa_use_editor'] && (!is_mobile() || defined('G5_IS_MOBILE_DHTML_USE') && G5_IS_MOBILE_DHTML_USE)) { $is_dhtml_editor = true; } // 추가질문에서는 제목을 공백으로 if($w == 'r') $write['qa_subject'] = ''; $content = ''; if ($w == '') { $content = html_purifier($qaconfig['qa_insert_content']); } else if($w == 'r') { if($is_dhtml_editor) $content = '