테스트 사이트 - 개발 중인 베타 버전입니다

1:1 문의 기본 내용 저장이 안됩니다..

퉁백 8년 전 조회 4,138

기본 내용에 간단한 질문을 올리고 싶은데 저장이 안됩니다. 


qa_config.php 파일(관리자 게시판 1:1 문의) 코드이고요 

 

무슨 문제인지 모르겠습니다. 

 

답변 부탁드릴게요..ㅠㅠ

 

<?php</p><p>$sub_menu = "300500";</p><p>include_once('./_common.php');</p><p>include_once(G5_EDITOR_LIB);</p><p> </p><p>auth_check($auth[$sub_menu], 'r');</p><p> </p><p>$g5['title'] = '1:1문의 설정';</p><p>include_once ('./admin.head.php');</p><p> </p><p>// DB 테이블 생성</p><p>if(!sql_query(" DESCRIBE `{$g5['qa_config_table']}` ", false)) {</p><p>    sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['qa_config_table']}` (</p><p>                  `qa_title` varchar(255) NOT NULL DEFAULT'',</p><p>                  `qa_category` varchar(255) NOT NULL DEFAULT'',</p><p>                  `qa_skin` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_mobile_skin` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_use_email` tinyint(4) NOT NULL DEFAULT '0',</p><p>                  `qa_req_email` tinyint(4) NOT NULL DEFAULT '0',</p><p>                  `qa_use_hp` tinyint(4) NOT NULL DEFAULT '0',</p><p>                  `qa_req_hp` tinyint(4) NOT NULL DEFAULT '0',</p><p>                  `qa_use_sms` tinyint(4) NOT NULL DEFAULT '0',</p><p>                  `qa_send_number` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_admin_hp` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_use_editor` tinyint(4) NOT NULL DEFAULT '0',</p><p>                  `qa_subject_len` int(11) NOT NULL DEFAULT '0',</p><p>                  `qa_mobile_subject_len` int(11) NOT NULL DEFAULT '0',</p><p>                  `qa_page_rows` int(11) NOT NULL DEFAULT '0',</p><p>                  `qa_mobile_page_rows` int(11) NOT NULL DEFAULT '0',</p><p>                  `qa_image_width` int(11) NOT NULL DEFAULT '0',</p><p>                  `qa_upload_size` int(11) NOT NULL DEFAULT '0',</p><p>                  `qa_insert_content` text NOT NULL,</p><p>                  `qa_include_head` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_include_tail` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_content_head` text NOT NULL,</p><p>                  `qa_content_tail` text NOT NULL,</p><p>                  `qa_mobile_content_head` text NOT NULL,</p><p>                  `qa_mobile_content_tail` text NOT NULL,</p><p>                  `qa_1_subj` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_2_subj` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_3_subj` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_4_subj` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_5_subj` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_1` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_2` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_3` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_4` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_5` varchar(255) NOT NULL DEFAULT ''</p><p>                )", true);</p><p>    sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['qa_content_table']}` (</p><p>                  `qa_id` int(11) NOT NULL AUTO_INCREMENT,</p><p>                  `qa_num` int(11) NOT NULL DEFAULT '0',</p><p>                  `qa_parent` int(11) NOT NULL DEFAULT '0',</p><p>                  `qa_related` int(11) NOT NULL DEFAULT '0',</p><p>                  `mb_id` varchar(20) NOT NULL DEFAULT '',</p><p>                  `qa_name` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_email` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_hp` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_type` tinyint(4) NOT NULL DEFAULT '0',</p><p>                  `qa_category` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_email_recv` tinyint(4) NOT NULL DEFAULT '0',</p><p>                  `qa_sms_recv` tinyint(4) NOT NULL DEFAULT '0',</p><p>                  `qa_html` tinyint(4) NOT NULL DEFAULT '0',</p><p>                  `qa_subject` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_content` text NOT NULL,</p><p>                  `qa_status` tinyint(4) NOT NULL DEFAULT '0',</p><p>                  `qa_file1` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_source1` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_file2` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_source2` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_ip` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',</p><p>                  `qa_1` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_2` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_3` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_4` varchar(255) NOT NULL DEFAULT '',</p><p>                  `qa_5` varchar(255) NOT NULL DEFAULT '',</p><p>                  PRIMARY KEY (`qa_id`),</p><p>                  KEY `qa_num_parent` (`qa_num`,`qa_parent`)</p><p>                )", true);</p><p>}</p><p> </p><p>$sql = " SHOW COLUMNS FROM `{$g5['qa_content_table']}` LIKE 'qa_content' ";</p><p>$row = sql_fetch($sql);</p><p>if(strpos($row['Type'], 'text') === false) {</p><p>    sql_query(" ALTER TABLE `{$g5['qa_content_table']}` CHANGE `qa_content` `qa_content` text NOT NULL ", true);</p><p>}</p><p> </p><p>$qaconfig = get_qa_config();</p><p> </p><p>if(empty($qaconfig)) {</p><p>    $sql = " insert into `{$g5['qa_config_table']}`</p><p>                ( qa_title, qa_category, qa_skin, qa_mobile_skin, qa_use_email, qa_req_email, qa_use_hp, qa_req_hp, qa_use_editor, qa_subject_len, qa_mobile_subject_len, qa_page_rows, qa_mobile_page_rows, qa_image_width, qa_upload_size, qa_insert_content )</p><p>              values</p><p>                ( '1:1문의', '회원|포인트', 'basic', 'basic', '1', '0', '1', '0', '1', '60', '30', '15', '15', '600', '1048576', '' ) ";</p><p>    sql_query($sql);</p><p> </p><p>    $qaconfig = get_qa_config();</p><p>}</p><p> </p><p>// 관리자 이메일필드 추가</p><p>if(!isset($qaconfig['qa_admin_email'])) {</p><p>    sql_query(" ALTER TABLE `{$g5['qa_config_table']}`</p><p>                    ADD `qa_admin_email` varchar(255) NOT NULL DEFAULT '' AFTER `qa_admin_hp` ", true);</p><p>}</p><p> </p><p>// 상단 하단 설정 필드 추가</p><p>if(!isset($qaconfig['qa_include_head'])) {</p><p>    sql_query(" ALTER TABLE `{$g5['qa_config_table']}`</p><p>                    ADD `qa_include_head` varchar(255) NOT NULL DEFAULT '' AFTER `qa_insert_content`,</p><p>                    ADD `qa_include_tail` varchar(255) NOT NULL DEFAULT '' AFTER `qa_include_head`,</p><p>                    ADD `qa_content_head` text NOT NULL AFTER `qa_include_tail`,</p><p>                    ADD `qa_content_tail` text NOT NULL AFTER `qa_content_head`,</p><p>                    ADD `qa_mobile_content_head` text NOT NULL AFTER `qa_content_tail`,</p><p>                    ADD `qa_mobile_content_tail` text NOT NULL AFTER `qa_mobile_content_head` ", true);</p><p>}</p><p>?></p><p> </p><p><form name="fqaconfigform" id="fqaconfigform" method="post" onsubmit="return fqaconfigform_submit(this);" autocomplete="off"></p><p><input type="hidden" name="token" value="" id="token"></p><p> </p><p><section id="anc_cf_qa_config"></p><p>    <h2 class="h2_frm">1:1문의 설정</h2></p><p> </p><p>    <div class="tbl_frm01 tbl_wrap"></p><p>        <table></p><p>        <caption>1:1문의 설정</caption></p><p>        <colgroup></p><p>            <col class="grid_4"></p><p>            <col></p><p>        </colgroup></p><p>        <tbody></p><p>        <tr></p><p>            <th scope="row"><label for="qa_title">타이틀<strong class="sound_only">필수</strong></label></th></p><p>            <td></p><p>                <input type="text" name="qa_title" value="<?php echo $qaconfig['qa_title'] ?>" id="qa_title" required class="required frm_input" size="40"></p><p>                <a href="<?php echo G5_BBS_URL; ?>/qalist.php" class="btn_frmline">1:1문의 바로가기</a></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_category">분류<strong class="sound_only">필수</strong></label></th></p><p>            <td></p><p>                <?php echo help('분류와 분류 사이는 | 로 구분하세요. (예: 질문|답변) 첫자로 #은 입력하지 마세요. (예: #질문|#답변 [X])') ?></p><p>                <input type="text" name="qa_category" value="<?php echo $qaconfig['qa_category'] ?>" id="qa_category" required class="required frm_input" size="70"></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_skin">스킨 디렉토리<strong class="sound_only">필수</strong></label></th></p><p>            <td></p><p>                <?php echo get_skin_select('qa', 'qa_skin', 'qa_skin', $qaconfig['qa_skin'], 'required'); ?></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_mobile_skin">모바일 스킨 디렉토리<strong class="sound_only">필수</strong></label></th></p><p>            <td></p><p>                <?php echo get_mobile_skin_select('qa', 'qa_mobile_skin', 'qa_mobile_skin', $qaconfig['qa_mobile_skin'], 'required'); ?></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row">이메일 입력</th></p><p>            <td></p><p>                <input type="checkbox" name="qa_use_email" value="1" id="qa_use_email" <?php echo $qaconfig['qa_use_email']?'checked':''; ?>> <label for="qa_use_email">보이기</label></p><p>                <input type="checkbox" name="qa_req_email" value="1" id="qa_req_email" <?php echo $qaconfig['qa_req_email']?'checked':''; ?>> <label for="qa_req_email">필수입력</label></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row">휴대폰 입력</th></p><p>            <td></p><p>                <input type="checkbox" name="qa_use_hp" value="1" id="qa_use_hp" <?php echo $qaconfig['qa_use_hp']?'checked':''; ?>> <label for="qa_use_hp">보이기</label></p><p>                <input type="checkbox" name="qa_req_hp" value="1" id="qa_req_hp" <?php echo $qaconfig['qa_req_hp']?'checked':''; ?>> <label for="qa_req_hp">필수입력</label></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_use_sms">SMS 알림</label></th></p><p>            <td></p><p>                <?php echo help('휴대폰 입력을 사용하실 경우 문의글 등록시 등록자가 답변등록시 SMS 알림 수신을 선택할 수 있도록 합니다.
SMS 알림을 사용하기 위해서는 기본환경설정 > <a href="'.G5_ADMIN_URL.'/config_form.php#anc_cf_sms">SMS 설정</a>을 하셔야 합니다.') ?></p><p>                <select name="qa_use_sms" id="qa_use_sms"></p><p>                    <?php echo option_selected(0, $qaconfig['qa_use_sms'], '사용안함'); ?></p><p>                    <?php echo option_selected(1, $qaconfig['qa_use_sms'], '사용함'); ?></p><p>                </select></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_send_number">SMS 발신번호</label></th></p><p>            <td></p><p>                <?php echo help('SMS 알림 전송시 발신번호로 사용됩니다.'); ?></p><p>                <input type="text" name="qa_send_number" value="<?php echo $qaconfig['qa_send_number'] ?>" id="qa_send_number" class="frm_input"  size="30"></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_admin_hp">관리자 휴대폰번호</label></th></p><p>            <td></p><p>                <?php echo help('관리자 휴대폰번호를 입력하시면 문의글 등록시 등록하신 번호로 SMS 알림이 전송됩니다.
SMS 알림을 사용하지 않으시면 알림이 전송되지 않습니다.'); ?></p><p>                <input type="text" name="qa_admin_hp" value="<?php echo $qaconfig['qa_admin_hp'] ?>" id="qa_admin_hp" class="frm_input"  size="30"></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_admin_email">관리자 이메일</label></th></p><p>            <td></p><p>                <?php echo help('관리자 이메일을 입력하시면 문의글 등록시 등록하신 이메일로 알림이 전송됩니다.'); ?></p><p>                <input type="text" name="qa_admin_email" value="<?php echo $qaconfig['qa_admin_email'] ?>" id="qa_admin_email" class="frm_input"  size="50"></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_use_editor">DHTML 에디터 사용</label></th></p><p>            <td></p><p>                <?php echo help('글작성시 내용을 DHTML 에디터 기능으로 사용할 것인지 설정합니다. 스킨에 따라 적용되지 않을 수 있습니다.'); ?></p><p>                <select name="qa_use_editor" id="qa_use_editor"></p><p>                    <?php echo option_selected(0, $qaconfig['qa_use_editor'], '사용안함'); ?></p><p>                    <?php echo option_selected(1, $qaconfig['qa_use_editor'], '사용함'); ?></p><p>                </select></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_subject_len">제목 길이<strong class="sound_only"> 필수</strong></label></th></p><p>            <td></p><p>                <?php echo help('목록에서의 제목 글자수') ?></p><p>                <input type="text" name="qa_subject_len" value="<?php echo $qaconfig['qa_subject_len'] ?>" id="qa_subject_len" required class="required numeric frm_input"  size="4"></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_mobile_subject_len">모바일 제목 길이<strong class="sound_only"> 필수</strong></label></th></p><p>            <td></p><p>                <?php echo help('목록에서의 제목 글자수') ?></p><p>                <input type="text" name="qa_mobile_subject_len" value="<?php echo $qaconfig['qa_mobile_subject_len'] ?>" id="qa_mobile_subject_len" required class="required numeric frm_input"  size="4"></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_page_rows">페이지당 목록 수<strong class="sound_only"> 필수</strong></label></th></p><p>            <td></p><p>                <input type="text" name="qa_page_rows" value="<?php echo $qaconfig['qa_page_rows'] ?>" id="qa_page_rows" required class="required numeric frm_input"  size="4"></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_mobile_page_rows">모바일 페이지당 목록 수<strong class="sound_only"> 필수</strong></label></th></p><p>            <td></p><p>                <input type="text" name="qa_mobile_page_rows" value="<?php echo $qaconfig['qa_mobile_page_rows'] ?>" id="qa_mobile_page_rows" required class="required numeric frm_input"  size="4"></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_image_width">이미지 폭 크기<strong class="sound_only"> 필수</strong></label></th></p><p>            <td></p><p>                <?php echo help('게시판에서 출력되는 이미지의 폭 크기') ?></p><p>                <input type="text" name="qa_image_width" value="<?php echo $qaconfig['qa_image_width'] ?>" id="qa_image_width" required class="required numeric frm_input"  size="4"> 픽셀</p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_upload_size">파일 업로드 용량<strong class="sound_only"> 필수</strong></label></th></p><p>            <td></p><p>                <?php echo help('최대 '.ini_get("upload_max_filesize").' 이하 업로드 가능, 1 MB = 1,048,576 bytes') ?></p><p>                업로드 파일 한개당 <input type="text" name="qa_upload_size" value="<?php echo $qaconfig['qa_upload_size'] ?>" id="qa_upload_size" required class="required numeric frm_input"  size="10"> bytes 이하</p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_include_head">상단 파일 경로</label></th></p><p>            <td></p><p>                <input type="text" name="qa_include_head" value="<?php echo $qaconfig['qa_include_head'] ?>" id="qa_include_head" class="frm_input" size="50"></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_include_tail">하단 파일 경로</label></th></p><p>            <td></p><p>                <input type="text" name="qa_include_tail" value="<?php echo $qaconfig['qa_include_tail'] ?>" id="qa_include_tail" class="frm_input" size="50"></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_content_head">상단 내용</label></th></p><p>            <td></p><p>                <?php echo editor_html("qa_content_head", get_text($qaconfig['qa_content_head'], 0)); ?></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_content_tail">하단 내용</label></th></p><p>            <td></p><p>                <?php echo editor_html("qa_content_tail", get_text($qaconfig['qa_content_tail'], 0)); ?></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_mobile_content_head">모바일 상단 내용</label></th></p><p>            <td></p><p>                <?php echo editor_html("qa_mobile_content_head", get_text($qaconfig['qa_mobile_content_head'], 0)); ?></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_mobile_content_tail">모바일 하단 내용</label></th></p><p>            <td></p><p>                <?php echo editor_html("qa_mobile_content_tail", get_text($qaconfig['qa_mobile_content_tail'], 0)); ?></p><p>            </td></p><p>        </tr></p><p>        <tr></p><p>            <th scope="row"><label for="qa_insert_content">글쓰기 기본 내용</label></th></p><p>            <td></p><p>                <textarea id="qa_insert_content" name="qa_insert_content" rows="5"><?php echo $qaconfig['qa_insert_content'] ?></textarea></p><p>            </td></p><p>        </tr></p><p>        <?php for ($i=1; $i<=5; $i++) { ?></p><p>        <tr></p><p>            <th scope="row">여분필드<?php echo $i ?></th></p><p>            <td class="td_extra"></p><p>                <label for="qa_<?php echo $i ?>_subj">여분필드 <?php echo $i ?> 제목</label></p><p>                <input type="text" name="qa_<?php echo $i ?>_subj" id="qa_<?php echo $i ?>_subj" value="<?php echo get_text($qaconfig['qa_'.$i.'_subj']) ?>" class="frm_input"></p><p>                <label for="qa_<?php echo $i ?>">여분필드 <?php echo $i ?> 값</label></p><p>                <input type="text" name="qa_<?php echo $i ?>" value="<?php echo get_text($qaconfig['qa_'.$i]) ?>" id="qa_<?php echo $i ?>" class="frm_input"></p><p>            </td></p><p>        </tr></p><p>        <?php } ?></p><p>        </tbody></p><p>        </table></p><p>    </div></p><p></section></p><p> </p><p><div class="btn_confirm01 btn_confirm"></p><p>    <input type="submit" value="확인" class="btn_submit" accesskey="s"></p><p></div></p><p> </p><p></form></p><p> </p><p><script></p><p>function fqaconfigform_submit(f)</p><p>{</p><p>    <?php echo get_editor_js("qa_content_head"); ?></p><p>    <?php echo get_editor_js("qa_content_tail"); ?></p><p>    <?php echo get_editor_js("qa_mobile_content_head"); ?></p><p>    <?php echo get_editor_js("qa_mobile_content_tail"); ?></p><p> </p><p>    f.action = "./qa_config_update.php";</p><p>    return true;</p><p>}</p><p></script></p><p> </p><p><?php</p><p>include_once ('./admin.tail.php');</p><p>?>

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

EI소프트
8년 전

저부분을 보지 마시고 1:1 스킨쪽을 보시면 될것같습니다.,

스킨부분에다가 원하는 질문 답변을 코드로 넣어주시면될것같습니다.

로그인 후 평가할 수 있습니다

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인