<%

'//파라미터정보 *************************************************************************************
b_num		= InputValue(request("b_num"))
b_type		= InputValue(request("b_type"))
'//**************************************************************************************************


'//수정모드

w_mode = "M"

If is_ad_cms <> "Y" then	'//관리자가아닐때 체크


	If SESSION("pwd_chk_" & a_num & "_" & b_num) <> "ok" then	'//체크통과확인
		
		Call locationhref("pwd.asp?prepage=modi&a_num=" & a_num & "&b_num=" & b_num & "&" & page_info)
		

	End if

End if



'//레코드필드
R_Fields = "b_num, b_type, b_id, b_name, b_pwd, b_subject, b_email, b_jumin, b_phone1, b_phone2, b_phone3, b_cate, b_catename, b_noticechk, b_content, b_ip, b_count, b_look, b_open, b_ref, b_step, b_level, b_regdate, b_chuchun, b_sbjclr, b_sdate, b_edate, b_temp1, b_temp2, b_temp3, b_temp4, b_temp5, b_temp6, b_temp7,b_temp8, b_file1, b_file2, b_file3, b_file4, b_file5,b_keyword"

R_tablename_str = a_tablename

R_WHERE_str = " WHERE b_num=" & b_num

Call SelectQuery (R_Fields, R_tablename_str, R_WHERE_str)




If b_temp6 = "" Or IsNull(b_temp6) then

	b_temp6_y = Year(now)
	b_temp6_m = Right("0" & Month(now), 2)
	b_temp6_d = Right("0" & Day(now), 2)

else
	b_temp6_arr	= split(b_temp6, "-")

	b_temp6_y = b_temp6_arr(0)
	b_temp6_m = b_temp6_arr(1)
	b_temp6_d = b_temp6_arr(2)

End if




%>
<!--#include virtual="/content/board/top.asp"-->
	
	<script type="text/javascript">//<![CDATA[
		var xed;

		
		function w_chk2(){
			
			if (CheckSpaces(document.getElementById('frm').b_temp5, '답변부서')) {return false;}
			else if (CheckSpaces(document.getElementById('frm').b_temp8, '답변내용')) {return false;}
			//else if (CheckSpaces(document.getElementById('frm').b_subject, '제목')) {return false;}



			loading_st(1);

		}
	//]]>
	</script>

<!-- 쓰기 -->
<div id="board" style="width:<%=a_width%>;">
	
	<form id="frm" method="post" action="/content/board/<%=a_level%>/reply_ok.asp?a_num=<%=a_num%>&amp;<%=page_info%>" onsubmit="return w_chk2();">
	<div>
	<input type="hidden" name="b_num" value="<%=b_num%>" /><!-- (수정일때사용) -->
	<input type="hidden" name="b_type" value="<%=b_type%>" />
	<input type="hidden" name="w_mode" value="<%=w_mode%>" />

	<input type="hidden" name="b_open" value="Y" />


	<input type="hidden" name="b_ref" value="<%=b_ref%>" />
	<input type="hidden" name="b_step" value="<%=b_step%>" />
	<input type="hidden" name="b_level" value="<%=b_level%>" />
	</div>


	<div class="guide">
		<span><img src="/content/board/nninc_qna/img/ic_vcheck.gif" width="7" height="10" alt="*" /> 표시가 된 곳은 필수 항목입니다.</span>
	</div>

	<!-- 쓰기 테이블 -->
	<div class="table_bwrite">

	


			<table cellspacing="0">
			<caption><%=replace( tit_name, " | ", "" )%></caption>
				<colgroup>
				<col width="130" />
				<col width="" />
				</colgroup>
			<thead>
				<tr>
					<th scope="col"></th>
					<th scope="col" class="th_end">답변쓰기</th>
				</tr>
			</thead>
			<tbody>
			
					<tr>
						<th scope="row"><label for="b_temp5">답변부서</label></th>
						<td>
							<input type="text" size="50" id="b_temp5" name="b_temp5" class="board_input" onfocus="focus_on1(this);" onblur="focus_off1(this);" value="<%=b_temp5%>" maxlength="50"  />
						</td>
					</tr>

					<tr>
						<th scope="row">처리기한</th>
						<td>
							<select id="b_temp6_y" name="b_temp6_y" >
							<%For z= Year(now)-2 To Year(now)+5 %>
							<option value="<%=z%>" <%=chkSelect(b_temp6_y, z)%>><%=z%></option>							
							<%next%>
							</select><label for="b_temp6_y">년</label>
						<select id="b_temp6_m" name="b_temp6_m" >
							<%For z=1 To 12
								z_value = Right( "0" & z, 2 )
							%>
							<option value="<%=z_value%>" <%=chkSelect(b_temp6_m, z_value)%>><%=z_value%></option>							
							<%next%>
						</select><label for="b_temp6_y">월</label>
						<select id="b_temp6_d" name="b_temp6_d">
							<%For z=1 To 31
								z_value = Right( "0" & z, 2 )
							%>
							<option value="<%=z_value%>" <%=chkSelect(b_temp6_d, z_value )%>><%=z_value%></option>
							<label for="b_temp6_y">일</label>
							<%next%>
						</select>
						</td>
					</tr>

					<tr>
						<th scope="row"><label for="b_temp7">처리상황</label></th>
						<td>
							<select id="b_temp7" name="b_temp7">

								<option value="접수" <%=chkSelect(b_temp7, "접수")%>>접수</option>

								<option value="진행중" <%=chkSelect(b_temp7, "진행중")%> >진행중</option>

								<option value="완료" <%=chkSelect(b_temp7, "완료")%>>완료</option>

								<option value="취하" <%=chkSelect(b_temp7, "취하")%>>취하</option>

							</select>
						</td>
					</tr>


				<tr>
					<td colspan="2" class="content">
						<textarea cols="50" rows="15" id="b_temp8" name="b_temp8" title="답변 내용 입력" style="width:98%;" onfocus="focus_on1(this);" onblur="focus_off1(this);" ><%=b_temp8%></textarea>
					</td>
				</tr>


				
			</tbody>
			</table>

	
	</div>
	<!-- //쓰기 테이블 -->

	<!-- 버튼 -->
	<div class="board_button2">
		<span><input type="image" src="/content/board/nninc_qna/img/save_bt.gif" alt="저장"/></span>
		<span><a href="list.asp?a_num=<%=a_num%>&amp;<%=page_info%>" ><img src="/content/board/nninc_qna/img/list_bt.gif" width="62" height="23" alt="목록" /></a></span>
	</div>
	<!-- //버튼 -->

	</form>

</div>
<!-- //쓰기 -->
<!--#include virtual="/content/board/bottom.asp"-->

