<!-- #include virtual="/manager/common/file/top_ui.asp" -->
<script type="text/javascript" src="/common/js/04banner.js"></script>

<!-- 권한 체크 -->
<!-- #include file="config.asp" -->
<%


' 파라미터정보 *************************************************************************************
b_l_num		= InputValue(request("b_l_num"))
prepage		= InputValue(request("prepage"))
' **************************************************************************************************


If b_l_num = "" then	' 등록
	
	reset_url = "write.asp"
	is_title_str = "신규 배너 생성"

else ' 수정
	
	' 레코드필드
	R_Fields	= "b_l_num, info_url, b_l_code, b_l_img, b_l_url, b_l_chk, b_l_sdate, b_l_edate, b_l_subject, b_l_memo, b_l_wdate, b_l_mdate"
	R_tablename_str	= "banner "
	R_WHERE_str		= " WHERE b_l_num="&b_l_num

	Call SelectQuery (R_Fields, R_tablename_str, R_WHERE_str)

	reset_url = "list.asp"
	is_title_str = "배너 정보 수정"

End if



If b_l_sdate = "" then

	b_l_sdate_y = Year(now)
	b_l_sdate_m = month(now)
	b_l_sdate_d = day(now)

Else

	b_l_sdate_arr	= split(b_l_sdate,"-")

	b_l_sdate_y = b_l_sdate_arr(0)
	b_l_sdate_m = b_l_sdate_arr(1)
	b_l_sdate_d = b_l_sdate_arr(2)

End if

If b_l_edate = "" Then
	
	nm = DateAdd("m",1, now)

	b_l_edate_y = Year(nm)
	b_l_edate_m = month(nm)
	b_l_edate_d = day(nm)

else

	b_l_edate_arr	= split(b_l_edate, "-")

	b_l_edate_y = b_l_edate_arr(0)
	b_l_edate_m = b_l_edate_arr(1)
	b_l_edate_d = b_l_edate_arr(2)

End if

%>

		<!-- 내용영역 -->
		<div id="contents">

			<div id="contents_head"> 
				<div id="contents_title">
					<img src="/manager/img/tit_ic06.gif" width="22" height="21" class="<%=skin%> center" alt="" /><h1><span><%=is_title_str %></span></h1>
				</div>
				<div id="location">
					<a href="/manager/" tabindex="<%=getTabIndex()%>">Home</a> &gt; <a href="/manager/content/04popup/list.asp" tabindex="<%=getTabIndex()%>">부가기능</a> &gt; <a href="/manager/content/04banner/list.asp" tabindex="<%=getTabIndex()%>">배너관리</a> &gt; <a href="write.asp" class="now" tabindex="<%=getTabIndex()%>"><%=is_title_str %></a>
				</div>
			</div>

			<!-- 내용들어가는곳 -->
			<div id="contents_area">

				<form id="frm" method="post" action="write_ok.asp" enctype="multipart/form-data" onsubmit="return w_chk();">
				<div>
				<input type="hidden" name="b_l_num" value="<%=b_l_num%>" /><!-- (수정일때사용) -->
				<input type="hidden" name="b_l_img2" value="<%=b_l_img%>" />
				</div>

					<h2 class="space"></h2>


					<fieldset>
						<legend>배너생성 서식 작성</legend>
						<table cellspacing="0" class="bbs_<%=skin%>" summary="신규 배너 생성을 위한 입력 양식입니다.">
						<caption>배너생성 서식</caption>
						<colgroup>
						<col width="140" />
						<col width="580" />
						</colgroup>
						<tr>
							<th scope="row"><label for="b_l_subject">제목</label></th>
							<td class="left"><input type="text" size="90" title="제목 입력" id="b_l_subject" name="b_l_subject" class="input_box" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="<%=b_l_subject%>" maxlength="100" tabindex="<%=getTabIndex()%>" /></td>
						</tr>
						<tr>
							<th scope="row"><label for="sc_hdate1_y">사용기간</label></th>
							<td class="left">
								<select id="b_l_sdate_y" name="b_l_sdate_y" title="시작 사용기간(년)을 선택" tabindex="<%=getTabIndex()%>">
									<% For z=2009 To Year(now)+5 %>
									<option value="<%=z%>" <%If z = Int(b_l_sdate_y) Then response.write "selected='selected'" End If %>><%=z%>년</option>
									<%next%>
								</select>
								<select id="b_l_sdate_m" name="b_l_sdate_m"  title="시작 사용기간(월)을 선택" tabindex="<%=getTabIndex()%>">
									<% For z=1 To 12 %>
									<option value="<%=z%>" <%If z = Int(b_l_sdate_m) Then response.write "selected='selected'" End if %>><%=z%>월</option>
									<%next%>
								</select>
								<select id="b_l_sdate_d" name="b_l_sdate_d"   title="시작 사용기간(일)을 선택" tabindex="<%=getTabIndex()%>">
									<% For z=1 To 31%>
									<option value="<%=z%>" <%If z = Int(b_l_sdate_d) Then response.write "selected='selected'" End if%>><%=z%>일</option>
									<%next%>
								</select>
								~
								<select id="b_l_edate_y" name="b_l_edate_y" title="종료 사용기간(년)을 선택" tabindex="<%=getTabIndex()%>">
									<% For z=2009 To Year(now)+5 %>
									<option value="<%=z%>" <%If z = Int(b_l_edate_y)  Then response.write "selected='selected'" End if%>><%=z%>년</option>
									<%next%>
								</select>
								<select id="b_l_edate_m" name="b_l_edate_m"  title="종료 사용기간(월)을 선택" tabindex="<%=getTabIndex()%>">
									<% For z=1 To 12 %>
									<option value="<%=z%>" <%If z = Int(b_l_edate_m) Then response.write "selected='selected'" End If %>><%=z%>월</option>
									<%next%>
								</select>
								<select id="b_l_edate_d" name="b_l_edate_d"   title="종료 사용기간(일)을 선택" tabindex="<%=getTabIndex()%>">
									<% For z=1 To 31%>
									<option value="<%=z%>" <%If z = Int(b_l_edate_d) Then response.write "selected='selected'" End if%>><%=z%>일</option>
									<%next%>
								</select>
								
							</td>
						</tr>
						<tr>
							<th scope="row"><label for="b_l_img">배너 이미지 파일</label></th>
							<td class="left">
								<input type="file" size="70" id="b_l_img" name="b_l_img" title="배너 이미지 찾아보기" class="input_box_file" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="" tabindex="<%=getTabIndex()%>"/>

								<%If b_l_img <> "" then%>
									<br/><!--a href="down.asp?filename=<%=server.urlencode(b_l_img)%>" tabindex="<%=getTabIndex()%>"--><img src = "/data/banner/<%=b_l_img%>" alt="<%=b_l_subject%>" class="vam pt5" /><!--/a-->
									<%'b_l_img%>&nbsp;<input type='checkbox' name='b_l_img_del' value='<%=b_l_img%>' tabindex="<%=getTabIndex()%>" />삭제
								<%End if%>
							</td>
						</tr>
						<tr>
							<th scope="row"><label for="b_l_url">연결주소</label></th>
							<td class="left">http:// <input type="text" size="50" title="연결주소 입력" id="b_l_url" name="b_l_url" class="input_box" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="<%=b_l_url%>" maxlength="300" tabindex="<%=getTabIndex()%>" /> <span class="text1">* 사용 예) www.nninc.co.kr</span></td>
						</tr>
						<tr>
							<th scope="row"><label for="b_l_chk">사용여부</label></th>
							<td class="left">
								<select id="b_l_chk" name="b_l_chk" title="배너 사용여부 선택" tabindex="<%=getTabIndex()%>">
									<option value="Y" <%if b_l_chk = "Y" Then response.write "selected='selected'" End if %>>사용</option>
									<option value="N" <%if b_l_chk = "N" Then response.write "selected='selected'" End If %>>중지</option>
								</select>
							</td>
						</tr>
						</table>
					</fieldset>




					<div class="contoll_box">
						<div id="<%=skin%>_bt"><span class="button"><input type="submit" value="등록" tabindex="<%=getTabIndex()%>" /></span>  <span class="button"><input type="button" value="취소" onclick="dialog_close();" tabindex="<%=getTabIndex()%>"/></span></div>
					</div>

				</form>

			</div>
			<!-- 내용들어가는곳 -->

		</div>
		<!-- //내용영역 -->


<!--#include virtual="/manager/common/file/bottom_ui.asp"-->
