최초등록
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<%
|
||||
' 페이지정보 *************************************************
|
||||
v_page = InputValue(request("p_page"))
|
||||
v_block = InputValue(request("p_block"))
|
||||
v_search = InputValue(request("p_search"))
|
||||
v_keyword = InputValue(request("p_keyword"))
|
||||
mode = InputValue(request("mode")) ' -- a:관리자페이지 , u:일반유저페이지
|
||||
page_info = "p_page="&v_page&"&p_block="&v_block&"&p_search="&v_search&"&p_keyword="&v_keyword
|
||||
' ************************************************************
|
||||
|
||||
' 권한정보 *************************************************************************************
|
||||
is_ad_cms = "Y"
|
||||
is_read = "Y"
|
||||
is_write = "Y"
|
||||
is_delete = "Y"
|
||||
is_reply = "Y"
|
||||
' **************************************************************************************************
|
||||
%>
|
||||
@@ -0,0 +1,70 @@
|
||||
<!--#include virtual = "/common/lib/dbcon.asp" -->
|
||||
<!--#include virtual = "/common/lib/func.asp" -->
|
||||
|
||||
<!--#include file = "config.asp" -->
|
||||
|
||||
<%
|
||||
|
||||
' 파라미터정보 *************************************************************************************
|
||||
b_l_num = InputValue(request("b_l_num"))
|
||||
status = InputValue(request("status"))
|
||||
' **************************************************************************************************
|
||||
|
||||
|
||||
If status = "totdel" then ' 다중삭제
|
||||
|
||||
chk = InputValue(Replace(request("chk")," ",""))
|
||||
arr_chk = Split(chk,",")
|
||||
|
||||
For z=0 To UBound(arr_chk)
|
||||
|
||||
' 이미지 삭제
|
||||
SQL_I = "SELECT b_l_img FROM banner WHERE b_l_num = "&arr_chk(z)
|
||||
Set Rs = Dbcon.Execute (SQL_I)
|
||||
|
||||
b_l_img = rs("b_l_img")
|
||||
rs.close : Set rs = nothing
|
||||
|
||||
strDir = server.mappath("\")&"\data\banner\"
|
||||
|
||||
If b_l_img <> "" then
|
||||
|
||||
Call dfile(strDir, b_l_img) ' 삭제
|
||||
End if
|
||||
|
||||
sql = " delete from banner where b_l_num = "&arr_chk(z)
|
||||
Dbcon.execute sql
|
||||
|
||||
next
|
||||
|
||||
|
||||
else ' 일반삭제
|
||||
|
||||
|
||||
' 이미지 삭제
|
||||
SQL_I = "SELECT b_l_img FROM banner WHERE b_l_num = "&b_l_num
|
||||
Set Rs = Dbcon.Execute (SQL_I)
|
||||
|
||||
b_l_img = rs("b_l_img")
|
||||
rs.close : Set rs = nothing
|
||||
|
||||
strDir = server.mappath("\")&"\data\banner\"
|
||||
|
||||
If b_l_img <> "" then
|
||||
|
||||
Call dfile(strDir,b_l_img) ' 삭제
|
||||
End if
|
||||
|
||||
sql = " delete from banner where b_l_num = "&b_l_num
|
||||
Dbcon.execute sql
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Dbcon.close : Set Dbcon = Nothing
|
||||
|
||||
ok_url = "list.asp"
|
||||
Call loding ("0", ok_url)
|
||||
|
||||
|
||||
%>
|
||||
@@ -0,0 +1,63 @@
|
||||
<%@ codepage = 65001%>
|
||||
<% session.codepage = 65001 %>
|
||||
<%Response.CharSet = "UTF-8"%>
|
||||
<%
|
||||
Response.Buffer = False
|
||||
a_tablename = Request.QueryString("a_tablename")
|
||||
filename = Request.QueryString("filename")
|
||||
|
||||
a_tablename = Replace(a_tablename, "..", "" )
|
||||
a_tablename = Replace(a_tablename, "/", "" )
|
||||
|
||||
filename = Replace(filename, "..", "" )
|
||||
filename = Replace(filename, "/", "" )
|
||||
|
||||
If filename = "" Then
|
||||
%>
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
<!--
|
||||
alert("잘못된 페이지 요청")
|
||||
history.go(-1);
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<%
|
||||
response.end
|
||||
End if
|
||||
|
||||
strDirectory = server.mappath( "/data/banner/" )&"\"
|
||||
|
||||
filepath = strDirectory & filename
|
||||
|
||||
'filepath = Request.QueryString("file")
|
||||
'filename = Mid(filepath, InStrRev("\")+1)
|
||||
|
||||
|
||||
|
||||
set objFS = Server.CreateObject("Scripting.FileSystemObject")
|
||||
|
||||
If objFS.FileExists(filepath) = False Then
|
||||
%>
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
<!--
|
||||
alert("잘못된 페이지 요청")
|
||||
history.go(-1);
|
||||
//-->
|
||||
</SCRIPT>
|
||||
<%
|
||||
response.end
|
||||
End if
|
||||
|
||||
|
||||
set objF = objFS.GetFile(filepath)
|
||||
Response.AddHeader "Content-Disposition","attachment;filename=" & filename
|
||||
Response.AddHeader "Content-Length", objF.Size
|
||||
set objF = nothing
|
||||
set objFS = nothing
|
||||
|
||||
Response.ContentType = "application/unknown"
|
||||
Response.CacheControl = "public"
|
||||
|
||||
Set objDownload = Server.CreateObject("DEXT.FileDownload")
|
||||
objDownload.Download filepath
|
||||
Set uploadform = Nothing
|
||||
%>
|
||||
@@ -0,0 +1,44 @@
|
||||
<!--#include virtual = "/common/lib/dbcon.asp" -->
|
||||
<!--#include virtual = "/common/lib/func.asp" -->
|
||||
|
||||
<!--#include file = "config.asp" -->
|
||||
|
||||
<%
|
||||
|
||||
|
||||
' 파라미터정보 ***********************************************
|
||||
|
||||
status = InputValue(request("status"))
|
||||
tot_level_chk = InputValue(request("tot_level_chk"))
|
||||
|
||||
b_l_chk = InputValue(request("b_l_chk"))
|
||||
b_l_num = InputValue(request("b_l_num"))
|
||||
|
||||
' ************************************************************
|
||||
|
||||
|
||||
If status = "totlevel" then ' 다중
|
||||
|
||||
chk = Replace(request("chk")," ","")
|
||||
arr_chk = Split(chk,",")
|
||||
|
||||
For z=0 To UBound(arr_chk)
|
||||
|
||||
SQL = " Update banner set b_l_chk = '"&tot_level_chk&"' Where b_l_num = "&arr_chk(z)
|
||||
Dbcon.execute SQL
|
||||
|
||||
next
|
||||
|
||||
Else
|
||||
|
||||
SQL = " Update banner set b_l_chk = '"&b_l_chk&"' Where b_l_num = "&b_l_num
|
||||
Dbcon.execute SQL
|
||||
|
||||
End if
|
||||
|
||||
Dbcon.close : Set Dbcon = nothing
|
||||
|
||||
ok_url = "list.asp"
|
||||
Call loding("0", ok_url)
|
||||
|
||||
%>
|
||||
@@ -0,0 +1,218 @@
|
||||
<!-- #include virtual="/manager/common/file/other_top.asp" -->
|
||||
<script type="text/javascript" src="/common/js/04banner.js"></script>
|
||||
|
||||
<!-- 권한 체크 -->
|
||||
<!-- #include file="config.asp" -->
|
||||
<%
|
||||
|
||||
|
||||
' 테이블 기본 환경설정 ********************************************************************************
|
||||
|
||||
table = "banner" ' 테이블명
|
||||
idx_field = "b_l_num" ' 기본키
|
||||
Query_OrderBy = "b_l_code ASC" ' 정렬기준 필드
|
||||
Query_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" ' 불러올 필드
|
||||
|
||||
' ****************************************************************************************************
|
||||
|
||||
v_keyword = request("v_keyword")
|
||||
v_search = request("v_search")
|
||||
|
||||
' 검색어가 있다면
|
||||
if v_keyword <> "" and v_search <> "" then
|
||||
search_str = " AND "&v_search&" like '%"& replace(v_keyword,"'","''")&"%'"
|
||||
End if
|
||||
|
||||
' -----------------------------리스트 출력 쿼리문 생성-----------------------------
|
||||
sql = "select "&Query_Fields&" from "&table&" WHERE "&idx_field&" <> '0'"
|
||||
sql = sql & search_str &" ORDER BY " & Query_OrderBy
|
||||
Set Rs = Dbcon.Execute (sql)
|
||||
If rs.eof Then
|
||||
vCnt = -1
|
||||
Else
|
||||
vData = rs.getrows()
|
||||
vCnt = UBound(vData,2)
|
||||
End If
|
||||
rs.close : Set rs = nothing
|
||||
' ---------------------------------------------------------------------------------
|
||||
|
||||
%>
|
||||
<!-- 등록/수정UI -->
|
||||
<div id="dialog" style="text-align:center;vertical-align:middle;">
|
||||
<p id="dialogContent"></p>
|
||||
</div>
|
||||
<!-- 내용영역 -->
|
||||
<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>배너 리스트</span></h1>
|
||||
</div>
|
||||
<div id="location">
|
||||
<a href="/manager/" tabindex="<%=getTabIndex()%>">Home</a> > <a href="/manager/content/04popup/list.asp/" tabindex="<%=getTabIndex()%>">부가기능</a> > <a href="list.asp" tabindex="<%=getTabIndex()%>">배너관리</a> > <a href="list.asp" class="now" tabindex="<%=getTabIndex()%>">배너 리스트</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 내용들어가는곳 -->
|
||||
<div id="contents_area">
|
||||
|
||||
|
||||
|
||||
<h2 class="space"></h2>
|
||||
|
||||
|
||||
<div class="write_info">
|
||||
|
||||
<div class="write_form pt7">
|
||||
<form id="frm_sch" action="list.asp" method="post">
|
||||
|
||||
<ul>
|
||||
<li class="search"><label for="p_search">배너검색</label> :</li>
|
||||
<li><select id="p_search" name="p_search" title="검색형태 선택" tabindex="<%=getTabIndex()%>">
|
||||
<option value="b_l_subject" <%if v_search = "b_l_subject" Then response.write "selected='selected'" End if %>>제목</option>
|
||||
<option value="b_l_url" <%if v_search = "b_l_url" Then response.write "selected='selected'" End If %>>연결주소</option>
|
||||
</select></li>
|
||||
<li><input type="text" size="62" title="검색어를 입력하세요" id="p_keyword" name="p_keyword" class="input_box input" onfocus="focus_on1_<%=skin%>(this);" onblur="focus_off1(this);" value="<%=v_keyword%>" tabindex="<%=getTabIndex()%>" /></li>
|
||||
<li><div id="<%=skin%>_bt"><span class="button"><input type="submit" value="검색" tabindex="<%=getTabIndex()%>" /></span></div></li>
|
||||
<li><div id="w01_bt"><span class="button"><input type="button" value="전체보기" onclick="page_go1('list.asp');" tabindex="<%=getTabIndex()%>" /></span></div></li>
|
||||
</ul>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="list_count" style="height:20px">
|
||||
<div id="<%=skin%>_bt" class="list_left">
|
||||
<span class="button"><input type="button" value="신규배너생성" onclick="dialog_open('신규배너생성', 'write_ui.asp', '');" /></span>
|
||||
</div>
|
||||
전체 <strong><%=vCnt+1%></strong>개
|
||||
</div>
|
||||
|
||||
|
||||
<form id= "frm_list" action="" method='post'>
|
||||
<div>
|
||||
<input type="hidden" name="status" />
|
||||
<input type="hidden" name="b_l_chk" />
|
||||
<input type="hidden" name="b_l_num" />
|
||||
|
||||
<input type="hidden" id="chk_all" name="chk_all" />
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="list_count">
|
||||
<!-- 전체 <strong>14</strong>개 (페이지 <strong class="orange">1</strong>/2) -->
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<fieldset>
|
||||
<legend>회원관리 수정/삭제/보기</legend>
|
||||
<table cellspacing="0" class="bbs_<%=skin%>" summary="사이트의 회원을 관리합니다.">
|
||||
<caption>회원관리 서식</caption>
|
||||
<colgroup>
|
||||
<col width="40" />
|
||||
<col width="50" />
|
||||
<col />
|
||||
<col width="150" />
|
||||
<col width="80" />
|
||||
<col width="50" />
|
||||
<col width="50" />
|
||||
</colgroup>
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">선택</th>
|
||||
<th scope="col">순서</th>
|
||||
<th scope="col">배너</th>
|
||||
<th scope="col">사용기간</th>
|
||||
<th scope="col">사용여부</th>
|
||||
<th scope="col">수정</th>
|
||||
<th scope="col">삭제</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
|
||||
<%
|
||||
|
||||
If vCnt >- 1 Then
|
||||
|
||||
zz = 1
|
||||
For i=0 To vCnt
|
||||
|
||||
Call arr2Value(Query_Fields, "vData", i)
|
||||
|
||||
If b_l_chk = "Y" then
|
||||
b_l_chk_str = "<strong>사용</strong>"
|
||||
ElseIf b_l_chk = "N" then
|
||||
b_l_chk_str = "중지"
|
||||
End if
|
||||
%>
|
||||
|
||||
<tr>
|
||||
<td scope="row" class="center"><input type="checkbox" name="chk" value="<%=b_l_num%>" title="해당 배너 선택" tabindex="<%=getTabIndex()%>" /></td>
|
||||
<td scope="row" class="center"><a href="move.asp?move=up&b_l_num=<%=b_l_num%>&b_l_code=<%=b_l_code%>" title="순서 위로 이동" tabindex="<%=getTabIndex()%>"><img src="/manager/img/ic_up.gif" width="10" height="9" alt="순서 위로 이동" /></a><a href="move.asp?move=down&b_l_num=<%=b_l_num%>&b_l_code=<%=b_l_code%>" title="순서 아래로 이동" tabindex="<%=getTabIndex()%>"><img src="/manager/img/ic_down.gif" width="10" height="9" alt="순서 아래로 이동" /></a></td>
|
||||
<td scope="row" class="center">
|
||||
<a href="javascript:page_go2('http://<%=b_l_url%>');" tabindex="<%=getTabIndex()%>">
|
||||
<img src = "/data/banner/<%=b_l_img%>" alt="<%=b_l_subject%>" />
|
||||
<br/><%=b_l_subject%>
|
||||
</a>
|
||||
</td>
|
||||
<td scope="row" class="center"><span class="orange"><%=b_l_sdate%> ~ <%=b_l_edate%></span></td>
|
||||
<td scope="row" class="center"><%=b_l_chk_str%></td>
|
||||
<td scope="row" class="center"><input type="button" value="수정" class="ct_bt01" onclick="dialog_open('배너수정', 'write_ui.asp?b_l_num=<%=b_l_num%>', '');" tabindex="<%=getTabIndex()%>"/></td>
|
||||
<td scope="row" class="center"><input type="button" value="삭제" class="ct_bt01" onclick="d_chk('delete_ok.asp?b_l_num=<%=b_l_num%>&<%=page_info%>');" tabindex="<%=getTabIndex()%>"/></td>
|
||||
</tr>
|
||||
<%
|
||||
zz = zz + 1
|
||||
next
|
||||
|
||||
|
||||
else
|
||||
%>
|
||||
|
||||
<tr>
|
||||
<td scope="row" class="center"></td>
|
||||
<td scope="row" class="center"></td>
|
||||
<td scope="row" class="center"></td>
|
||||
<td scope="row" class="center"></td>
|
||||
<td scope="row" class="center"></td>
|
||||
<td scope="row" class="center"></td>
|
||||
<td scope="row" class="center"></td>
|
||||
</tr>
|
||||
<% End If %>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</fieldset>
|
||||
|
||||
<div class="contoll_box2">
|
||||
<ul>
|
||||
<li><img src="/manager/img/line01.gif" width="36" height="21" alt="" /></li>
|
||||
<li class="pt7"><div class="bt01"><a href="javascript:checkAll();" tabindex="<%=getTabIndex()%>"><span>전체 선택/해제</span></a></div><div class="bt01"><a href="javascript:delete2();" tabindex="<%=getTabIndex()%>"><span>선택 배너삭제</span></a></div></li>
|
||||
<li class="pt7 pl4"><span class="gray">|</span> 선택한 배너를
|
||||
<select id="tot_m_level" name="tot_level_chk" title="선택한 배너 사용여부 선택" tabindex="<%=getTabIndex()%>">
|
||||
<option value="Y" selected="selected">사용</option>
|
||||
<option value="N">중지</option>
|
||||
</select>으로
|
||||
</li>
|
||||
<li class="pt7 pl2"><div class="bt01"><a href="javascript:tot_levelchage('<%=page_info%>');" tabindex="<%=getTabIndex()%>"><span>변경</span></a></div></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!-- 내용들어가는곳 -->
|
||||
|
||||
</div>
|
||||
<!-- //내용영역 -->
|
||||
|
||||
<!--#include virtual="/manager/common/file/sub_bottom.asp"-->
|
||||
@@ -0,0 +1,44 @@
|
||||
<!--#include virtual = "/common/lib/dbcon.asp" -->
|
||||
<!--#include virtual = "/common/lib/func.asp" -->
|
||||
|
||||
<!--#include file = "config.asp" -->
|
||||
|
||||
<%
|
||||
|
||||
|
||||
b_l_num = InputValue(request("b_l_num")) ' --일련번호
|
||||
b_l_code = InputValue(request("b_l_code")) ' --정렬번호
|
||||
move = InputValue(request("move")) ' --이동
|
||||
|
||||
|
||||
|
||||
if move = "up" then
|
||||
sql = "select b_l_num, b_l_code from banner where b_l_code < "&b_l_code&" order by b_l_code desc"
|
||||
elseif move = "down" then
|
||||
sql = "select b_l_num, b_l_code from banner where b_l_code > "&b_l_code&" order by b_l_code"
|
||||
End If
|
||||
Set Rs = Dbcon.Execute (sql)
|
||||
|
||||
If Not rs.eof Then
|
||||
|
||||
v_rsb_l_num = trim(rs("b_l_num")) ' -- 대체할 디비번호
|
||||
v_rsb_l_code = trim(rs("b_l_code")) ' -- 대체할 값
|
||||
|
||||
|
||||
sql1 = "update banner set b_l_code = "& b_l_code &" where b_l_num = "& v_rsb_l_num
|
||||
sql2 = "update banner set b_l_code = "& v_rsb_l_code &" where b_l_num = "& b_l_num
|
||||
|
||||
Dbcon.execute sql1
|
||||
Dbcon.execute sql2
|
||||
|
||||
End If
|
||||
|
||||
rs.close : Set rs = nothing
|
||||
|
||||
Dbcon.close : Set Dbcon = Nothing
|
||||
|
||||
|
||||
ok_url = "list.asp"
|
||||
Call loding ("0", ok_url)
|
||||
|
||||
%>
|
||||
@@ -0,0 +1,188 @@
|
||||
<!-- #include virtual="/manager/common/file/other_top.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> > <a href="/manager/content/04popup/list.asp" tabindex="<%=getTabIndex()%>">부가기능</a> > <a href="/manager/content/04banner/list.asp" tabindex="<%=getTabIndex()%>">배너관리</a> > <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%> <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="page_go1('<%=reset_url%>');" tabindex="<%=getTabIndex()%>"/></span></div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!-- 내용들어가는곳 -->
|
||||
|
||||
</div>
|
||||
<!-- //내용영역 -->
|
||||
|
||||
|
||||
<!--#include virtual="/manager/common/file/sub_bottom.asp"-->
|
||||
@@ -0,0 +1,108 @@
|
||||
<!--#include virtual = "/common/lib/dbcon.asp" -->
|
||||
<!--#include virtual = "/common/lib/func.asp" -->
|
||||
|
||||
<!--#include file = "config.asp" -->
|
||||
|
||||
<%
|
||||
|
||||
Set UploadForm = Server.CreateObject("DEXT.FileUpload")
|
||||
UploadForm.DefaultPath = server.MapPath("/")&"\data\"
|
||||
|
||||
|
||||
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, b_l_img_del, b_l_img2"
|
||||
R_Fields = R_Fields & ", b_l_sdate_y, b_l_sdate_m, b_l_sdate_d, b_l_edate_y, b_l_edate_m, b_l_edate_d"
|
||||
R_Fields = R_Fields & ", b_l_img "
|
||||
|
||||
Call RequestAll (R_Fields, "UploadForm")
|
||||
b_l_memo = InputValue2(b_l_memo)
|
||||
|
||||
If Len(b_l_sdate_m)=1 Then b_l_sdate_m = "0"&b_l_sdate_m
|
||||
If Len(b_l_sdate_d)=1 Then b_l_sdate_d = "0"&b_l_sdate_d
|
||||
If Len(b_l_edate_m)=1 Then b_l_edate_m = "0"&b_l_edate_m
|
||||
If Len(b_l_edate_d)=1 Then b_l_edate_d = "0"&b_l_edate_d
|
||||
|
||||
b_l_sdate = b_l_sdate_y&"-"&b_l_sdate_m&"-"&b_l_sdate_d
|
||||
b_l_edate = b_l_edate_y&"-"&b_l_edate_m&"-"&b_l_edate_d
|
||||
|
||||
|
||||
' ------------------- 저장공간인 [DATA]폴더가 없다면 생성 한다. -------------------
|
||||
FolderCreate(server.MapPath("/")&"/data/banner/")
|
||||
' ------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
If b_l_num = "" then ' 저장
|
||||
|
||||
|
||||
' 이미지파일저장
|
||||
' *****************************************
|
||||
strDir = server.mappath("/")&"\data\banner\"
|
||||
ext_str = "jpg,gif"
|
||||
b_l_img = wfile2("b_l_img", 10, strDir, ext_str)
|
||||
' *****************************************
|
||||
|
||||
|
||||
' 순서
|
||||
' *****************************************
|
||||
sql = " SELECT isnull(max(b_l_code),0) FROM banner"
|
||||
Set Rs = Dbcon.Execute (sql)
|
||||
b_l_code = rs(0)
|
||||
rs.close : Set rs = Nothing
|
||||
|
||||
b_l_code = b_l_code + 1
|
||||
' *****************************************
|
||||
|
||||
|
||||
R_Fields_i = "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"
|
||||
|
||||
b_l_wdate = getDateFm(now,3)
|
||||
b_l_mdate = getDateFm(now,3)
|
||||
|
||||
|
||||
Call InsertQuery(R_Fields_i, "banner")
|
||||
|
||||
ok_url = "list.asp"
|
||||
|
||||
|
||||
else ' 수정
|
||||
|
||||
|
||||
strDir = server.mappath("/") & "\data\banner\"
|
||||
ext_str = "jpg,gif"
|
||||
b_l_img = wfile2("b_l_img", 10, strDir, ext_str)
|
||||
|
||||
|
||||
If b_l_img <> "" then ' 첨부파일이 있으면
|
||||
|
||||
Call dfile(strDir, b_l_img2)
|
||||
|
||||
else
|
||||
|
||||
b_l_img = b_l_img2
|
||||
|
||||
If b_l_img_del <> "" then ' 첨부파일만 삭제
|
||||
Call dfile(strDir, b_l_img2)
|
||||
b_l_img = ""
|
||||
End if
|
||||
|
||||
End if
|
||||
|
||||
|
||||
|
||||
R_Fields = "info_url, b_l_img, b_l_url, b_l_chk, b_l_sdate, b_l_edate, b_l_subject, b_l_memo, b_l_mdate"
|
||||
|
||||
b_l_mdate = getDateFm(now,4)
|
||||
|
||||
Call UpdateQuery (R_Fields, "banner", "where b_l_num="&b_l_num)
|
||||
|
||||
ok_url = "list.asp"
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Dbcon.close : Set Dbcon = nothing
|
||||
|
||||
Call loding("0", ok_url)
|
||||
|
||||
%>
|
||||
@@ -0,0 +1,188 @@
|
||||
<!-- #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> > <a href="/manager/content/04popup/list.asp" tabindex="<%=getTabIndex()%>">부가기능</a> > <a href="/manager/content/04banner/list.asp" tabindex="<%=getTabIndex()%>">배너관리</a> > <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%> <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"-->
|
||||
Reference in New Issue
Block a user