73 lines
1.6 KiB
Plaintext
73 lines
1.6 KiB
Plaintext
<!--#include virtual = "/common/lib/dbcon.asp" -->
|
|
<!--#include virtual = "/common/lib/func.asp" -->
|
|
|
|
<!--#include file = "config.asp" -->
|
|
|
|
<%
|
|
|
|
R_Fields = "po_idx, po_subject, po_chk, po_sdate_y, po_sdate_m, po_sdate_d, po_edate_y, po_edate_m, po_edate_d, po_group"
|
|
|
|
Call RequestAll (R_Fields, "")
|
|
|
|
If Len(po_sdate_m)=1 Then po_sdate_m="0"&po_sdate_m
|
|
If Len(po_sdate_d)=1 Then po_sdate_d="0"&po_sdate_d
|
|
If Len(po_edate_m)=1 Then po_edate_m="0"&po_edate_m
|
|
If Len(po_edate_d)=1 Then po_edate_d="0"&po_edate_d
|
|
|
|
po_sdate = po_sdate_y&"-"&po_sdate_m&"-"&po_sdate_d
|
|
po_edate = po_edate_y&"-"&po_edate_m&"-"&po_edate_d
|
|
|
|
|
|
po_group_str = "[]"
|
|
po_group = Replace(po_group, " ", "") ' ex) 1,3,4
|
|
If po_group<>"" then
|
|
po_group = Replace(po_group, ",", "][") ' ex) 1][3][4
|
|
po_group = "["&po_group&"]" ' ex) [1][3][4]
|
|
End If
|
|
|
|
po_group = po_group_str & po_group
|
|
|
|
|
|
|
|
If po_idx = "" then ' 저장
|
|
|
|
|
|
|
|
' 순서 --------------------------------------
|
|
sql = " SELECT isnull(max(po_code),0) FROM poll"
|
|
Set Rs = Dbcon.Execute (sql)
|
|
po_code = rs(0)
|
|
rs.close : Set rs = Nothing
|
|
|
|
po_code = po_code + 1
|
|
' --------------------------------------------------------
|
|
|
|
|
|
R_Fields_i = "po_subject, po_group, po_sdate, po_edate, po_chk, po_code, po_pk, po_wdate, po_mdate"
|
|
po_pk = get_idx_add()
|
|
po_wdate = getDateFm(now,3)
|
|
po_mdate = getDateFm(now,3)
|
|
|
|
|
|
Call InsertQuery(R_Fields_i, "poll")
|
|
|
|
ok_url = "list.asp?"&page_info
|
|
|
|
|
|
|
|
else ' 수정
|
|
|
|
|
|
R_Fields_u = "po_subject, po_group, po_sdate, po_edate, po_chk, po_mdate"
|
|
po_mdate = getDateFm(now,3)
|
|
Call UpdateQuery (R_Fields_u, "poll", "where po_idx="&po_idx)
|
|
|
|
ok_url = "list.asp?"&page_info
|
|
|
|
End if
|
|
|
|
Dbcon.close
|
|
|
|
Call loding("0",ok_url)
|
|
|
|
%> |