최초등록

This commit is contained in:
sp1000je
2026-02-23 10:01:00 +09:00
commit 7bc9767bf4
3120 changed files with 198447 additions and 0 deletions
+130
View File
@@ -0,0 +1,130 @@
<!--#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_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, b_main_img_del, b_main_img2, b_l_win"
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 "
Call RequestAll (R_Fields, "UploadForm")
b_l_memo = InputValue2(UploadForm("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
If b_l_win <> "1" then b_l_win="0"
' ------------------- 저장공간인 [DATA]폴더가 없다면 생성 한다. -------------------
FolderCreate(Server.mappath("\")&"/data/banner2/")
' ------------------------------------------------------------------------------------
If b_l_num = "" then ' 저장
' 이미지파일저장
' *****************************************
strDir = server.mappath("/") & "\data\banner2\"
ext_str = "jpg,gif"
b_l_img = wfile2("b_l_img", 10, strDir, ext_str)
b_main_img = wfile2("b_main_img", 10, strDir, ext_str)
' *****************************************
' 순서
' *****************************************
sql = " SELECT isnull(max(b_l_code),0) FROM banner2"
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_main_img, b_l_win"
b_l_wdate = getDateFm(now,3)
b_l_mdate = getDateFm(now,3)
Call InsertQuery(R_Fields_i, "banner2")
ok_url = "list.asp"
else ' 수정
strDir = server.mappath("/") & "\data\banner2\"
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
strDir = server.mappath("/") & "\data\banner2\"
ext_str = "jpg,gif"
b_main_img = wfile2("b_main_img", 10, strDir, ext_str)
If b_main_img <> "" then ' 첨부파일이 있으면
Call dfile(strDir, b_main_img2)
else
b_main_img = b_main_img2
If b_main_img_del <> "" then ' 첨부파일만 삭제
Call dfile(strDir, b_main_img2)
b_main_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_main_img, b_l_win"
b_l_mdate = getDateFm(now,4)
Call UpdateQuery (R_Fields, "banner2", "where b_l_num="&b_l_num)
ok_url = "list.asp"
End if
Dbcon.close : Set Dbcon = Nothing
Call loding("0",ok_url)
%>