여분필드 출력
본문
여분필드 출력이 안되어서 질문하러왔습니다 ㅠ
qa탭에 비회원이 작성해도 출력이 되게끔 이름작성 부분에 wr_1을 넣고
방문매장 모름 등 입력한 메세지가 출력되는 부분에 wr_2를 넣고 출력하고 싶습니다.
write.skin.php구문
<section id="bo_w">
<h2>1:1문의 작성</h2>
<!-- 게시물 작성/수정 시작 { -->
<form name="fwrite" id="fwrite" action="<?php echo $action_url ?>"
onsubmit="return fwrite_submit(this);" method="post" enctype="multipart/form-data"
autocomplete="off">
<input type="hidden" name="w" value="<?php echo $w ?>">
<input type="hidden" name="qa_id" value="<?php echo $qa_id ?>">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="stx" value="<?php echo $stx ?>">
<input type="hidden" name="page" value="<?php echo $page ?>">
<input type="hidden" name="token" value="<?php echo $token ?>">
<?php
$option = '';
$option_hidden = '';
$option = '';
if ($is_dhtml_editor) {
$option_hidden .= '<input type="hidden" name="qa_html" value="1">';
} else {
$option .= "\n".'<input type="checkbox" id="qa_html" name="qa_html" onclick="html_auto_br(this);" value="'.$html_value.'" '.$html_checked.'>'."\n".'<label for="qa_html">html</label>';
}
echo $option_hidden;
?>
<div class="form_01">
<h1 class="tag">문의작성
<span style="color:#ff993e; font-size:20pt; font-weight:bolder;">_</span>
</h1>
<ul>
<ul class="form_title">
<li>제목</li>
<li class="bo_w_sbj">
<label for="qa_subject" class="sound_only">직접입력</label>
<input type="text" name="qa_subject"
value="<?php echo get_text($write['qa_subject']); ?>" id="qa_subject"
required class="frm_input full_input required" size="50" maxlength="255"
placeholder="직접입력" style="width: 550px; margin-left:0px;">
</li>
</ul>
<ul class="form_title">
<li>이름</li>
<li class="bo_w_sbj">
<label for="name" class="sound_only">이름<strong
class="sound_only">필수</strong></label>
<input type="text" name="name"
value="<?php echo get_text($write['name']); ?>" id="name" required
class="frm_input full_input required" size="50" maxlength="255"
placeholder="이름">
</li>
</ul>
<ul class="form_title">
<li>연락처</li>
<?php if ($is_hp) { ?>
<li class="bo_w_hp chk_box">
<label for="qa_hp" class="sound_only">연락처</label>
<input type="text" name="qa_hp"
value="<?php echo get_text($write['qa_hp']); ?>" id="qa_hp"
<?php echo $req_hp; ?>
class="<?php echo $req_hp.' '; ?>frm_input full_input" size="30"
placeholder="ex)*** 개인정보보호를 위한 휴대폰번호 노출방지 ***">
<?php if($qaconfig['qa_use_sms']) { ?>
<input type="checkbox" name="qa_sms_recv" id="qa_sms_recv" value="1"
<?php if($write['qa_sms_recv']) echo 'checked="checked"'; ?>
class="selec_chk">
<!--<label for="qa_sms_recv" class="frm_info"><span></span>답변등록 SMS알림 수신</label>-->
<?php } ?>
</li>
<?php } ?>
</ul>
<ul class="form_title">
<li>이메일</li>
<?php if ($is_email) { ?>
<li class="bo_w_mail chk_box">
<label for="qa_email" class="sound_only">이메일</label>
<input type="text" name="qa_email"
value="<?php echo get_text($write['qa_email']); ?>" id="qa_email"
<?php echo $req_email; ?>
class="<?php echo $req_email.' '; ?>frm_input full_input email"
size="50" maxlength="100" placeholder="이메일">
<input type="checkbox" name="qa_email_recv" id="qa_email_recv" value="1"
<?php if($write['qa_email_recv']) echo 'checked="checked"'; ?>
class="selec_chk">
<!--<label for="qa_email_recv" class="frm_info"><span></span>답변받기</label>-->
</li>
<?php } ?>
</ul>
<ul class="form_title">
<li>방문매장</li>
<li class="selectwrap">
<?php if ($category_option) { ?>
<li class="bo_w_select write_div">
<label for="qa_category" class="sound_only">분류<strong>필수</strong></label>
<select name="qa_category" id="qa_category" required>
<option value="">시/도</option>
<?php echo $category_option ?>
</select>
</li>
<?php } ?>
<select name="wr_2" id="wr_2" class="wr_2">
<option value="">선택하세요</option>
<option value="단순출력(방문수령)" <?if($write[wr_2]=='단순출력(방문수령' )
echo " selected " ;?>>단순출력(방문수령)</option>
<option value="사용예약" <?if($write[wr_2]=='사용예약' ) echo " selected " ;?>>사용예약
</option>
</select>
<input type="text" name="wr_1" value="<?php echo $write['wr_1'] ?>" id="wr_1"
required class="frm_input" size="20">
<div style="display: inline-block;"><input type="radio" name="wr_5"
value="매장명 모름" style="width: 30px; margin-left:10px;float:right;">
<li style="margin-top: 13px;margin-left: 10px;float: right;">매장명 모름</li>
</div>
</ul>
<ul class="form_title">
<li>문의내용</li>
<li
class="qa_content_wrap <?php echo $is_dhtml_editor ? $config['cf_editor'] : ''; ?>">
<label for="qa_content" class="sound_only">내용<strong
class="sound_only">필수</strong></label>
<?php echo $editor_html; // 에디터 사용시는 에디터로, 아니면 textarea 로 노출 ?>
</li>
</ul>
</ul>
</div>
view.skin.php구문
<div class="franchise_banner"><img src="/theme/kkundak2/img/franchise_banner.png"></div>
<script src="<?php echo G5_JS_URL; ?>/viewimageresize.js"></script>
<!-- 게시물 읽기 시작 { -->
<article id="bo_v">
<header>
<h2 id="bo_v_title">
<?php
echo '<span class="bo_v_cate">'.$view['category'].'</span> '; // 분류 출력 끝
?>
<?php
echo $view['subject']; // 글제목 출력
?>
</h2>
</header>
<section id="bo_v_info">
<h2>페이지 정보</h2>
<span class="sound_only">작성자</span><strong><?php echo $view['name'] ?></strong>
<span class="sound_only">작성일</span><strong class="bo_date"><i class="fa fa-clock-o"
aria-hidden="true"></i> <?php echo $view['datetime']; ?></strong>
<?php if($view['email'] || $view['hp']) { ?>
<?php if($view['email']) { ?>
<span class="sound_only">이메일</span>
<strong><i class="fa fa-envelope-o" aria-hidden="true"></i>
<?php echo $view['email']; ?></strong>
<?php } ?>
<?php if($view['hp']) { ?>
<span class="sound_only">휴대폰</span>
<strong><i class="fa fa-phone" aria-hidden="true"></i> <?php echo $view['hp']; ?></strong>
<?php } ?>
<?php } ?>
<!-- 게시물 상단 버튼 시작 { -->
<div id="bo_v_top">
<?php
ob_start();
?>
<ul class="bo_v_com">
<li><a href="<?php echo $list_href ?>" class="btn_b01 btn" title="목록"><i
class="fa fa-list" aria-hidden="true"></i><span
class="sound_only">목록</span></a></li>
<?php if ($write_href) { ?><li><a href="<?php echo $write_href ?>"
class="btn_b01 btn" title="글쓰기"><i class="fa fa-pencil"
aria-hidden="true"></i><span class="sound_only">글쓰기</span></a></li>
<?php } ?>
<?php if ($update_href || $delete_href) { ?>
<li>
<button type="button" class="btn_more_opt btn_b01 btn" title="게시판 읽기 옵션"><i
class="fa fa-ellipsis-v" aria-hidden="true"></i><span
class="sound_only">게시판 읽기 옵션</span></button>
<ul class="more_opt">
<?php if ($update_href) { ?><li><a href="<?php echo $update_href ?>"
class="btn_b01 btn" title="수정">수정<i class="fa fa-pencil-square-o"
aria-hidden="true"></i></a></li><?php } ?>
<?php if ($delete_href) { ?><li><a href="<?php echo $delete_href ?>"
class="btn_b01 btn" onclick="del(this.href); return false;"
title="삭제">삭제<i class="fa fa-trash-o" aria-hidden="true"></i></a>
</li><?php } ?>
</ul>
</li>
<?php } ?>
</ul>
<script>
// 게시판 리스트 옵션
$(".btn_more_opt").on("click", function() {
$(".more_opt").toggle();
})
</script>
<?php
$link_buttons = ob_get_contents();
ob_end_flush();
?>
</div>
<!-- } 게시물 상단 버튼 끝 -->
</section>
<?php echo $view['wr_1']?>
<?php echo $view['wr_2']?>
<section id="bo_v_atc">
<h2 id="bo_v_atc_title">본문</h2>
<?php
// 파일 출력
if($view['img_count']) {
echo "<div id=\"bo_v_img\">\n";
for ($i=0; $i<$view['img_count']; $i++) {
//echo $view['img_file'][$i];
echo get_view_thumbnail($view['img_file'][$i], $qaconfig['qa_image_width']);
}
echo "</div>\n";
}
?>
<!-- 본문 내용 시작 { -->
<div id="bo_v_con">
<?php echo get_view_thumbnail($view['content'], $qaconfig['qa_image_width']); ?>
</div>
<!-- } 본문 내용 끝 -->
<?php if($view['qa_type']) { ?>
<div id="bo_v_addq"><a href="<?php echo $rewrite_href; ?>" class="btn_b01">추가질문</a>
</div>
<?php } ?>
<?php if($view['download_count']) { ?>
<!-- 첨부파일 시작 { -->
<section id="bo_v_file">
<h2>첨부파일</h2>
<ul>
<?php
// 가변 파일
for ($i=0; $i<$view['download_count']; $i++) {
?>
<li>
<i class="fa fa-download" aria-hidden="true"></i>
<a href="<?php echo $view['download_href'][$i]; ?>" class="view_file_download"
download>
<strong><?php echo $view['download_source'][$i] ?></strong>
</a>
</li>
<?php
}
?>
</ul>
</section>
<!-- } 첨부파일 끝 -->
<?php } ?>
</section>
<?php if ($prev_href || $next_href) { ?>
<ul class="bo_v_nb">
<?php if ($prev_href) { ?><li><a href="<?php echo $prev_href ?>" class="btn_b01 btn"><i
class="fa fa-chevron-left" aria-hidden="true"></i> 이전글</a></li><?php } ?>
<?php if ($next_href) { ?><li><a href="<?php echo $next_href ?>" class="btn_b01 btn">다음글 <i
class="fa fa-chevron-right" aria-hidden="true"></i></i></a></li><?php } ?>
</ul>
<?php } ?>
<?php
// 질문글에서 답변이 있으면 답변 출력, 답변이 없고 관리자이면 답변등록폼 출력
if(!$view['qa_type']) {
if($view['qa_status'] && $answer['qa_id'])
include_once($qa_skin_path.'/view.answer.skin.php');
else
include_once($qa_skin_path.'/view.answerform.skin.php');
}
?>
<?php if($view['rel_count']) { ?>
<section id="bo_v_rel">
<h2>연관질문</h2>
<div class="tbl_head01 tbl_wrap">
<table>
<thead>
<tr>
<th scope="col">제목</th>
<th scope="col">등록일</th>
<th scope="col">상태</th>
</tr>
</thead>
<tbody>
<?php
for($i=0; $i<$view['rel_count']; $i++) {
?>
<tr>
<td>
<span
class="bo_cate_link"><?php echo get_text($rel_list[$i]['category']); ?></span>
<a href="<?php echo $rel_list[$i]['view_href']; ?>" class="bo_tit">
<?php echo $rel_list[$i]['subject']; ?>
</a>
</td>
<td class="td_date"><?php echo $rel_list[$i]['date']; ?></td>
<td class="td_stat"><span
class="<?php echo ($rel_list[$i]['qa_status'] ? 'txt_done' : 'txt_rdy'); ?>"><?php echo ($rel_list[$i]['qa_status'] ? '<i class="fa fa-check-circle" aria-hidden="true"></i> 답변완료' : '<i class="fa fa-times-circle" aria-hidden="true"></i> 답변대기'); ?></span>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
</section>
<?php } ?>
</article>
<!-- } 게시판 읽기 끝 -->
!-->!-->
답변을 작성하시기 전에 로그인 해주세요.