Files
KIN/statistics/dashboard_ctt_cate_Ajax.asp
2025-09-29 17:55:08 +09:00

66 lines
1.5 KiB
Plaintext

<!-- #include virtual = "lib/config.asp" -->
<!-- #include virtual = "include/JSON_2.0.4.asp" -->
<%
Response.CharSet="euc-kr"
Response.AddHeader "Pragma","no-cache"
Response.AddHeader "cache-control", "no-staff"
Response.Expires = -1
tmp_year = request("tmp_year")'ÇÁ·ÎÁ§Æ® ÄÚµå
'response.write " tmp_year = "& tmp_year &"<br>"
If request("tmp_year") <> "" then
query = " "
query = query & " select weeknum, sdate, edate, yearnum from project2.dbo.BG_WEEKNUM "
query = query & " WHERE del_yn = 'N' "
query = query & " and yearnum = '"& tmp_year &"' "
query = query & " AND sdate < CONVERT(varchar(10),getdate()+25,120) "
query = query & " order by sdate desc; "
'response.write query &"<br>"
rsc.Open query, adoConn, 1
set json = jsObject()
Redim data(rsc.recordcount-1)
iCnt = 0
if not rsc.eof then
while not rsc.eof
set Contact = jsObject()
Contact("weeknum") = rsc("weeknum")
Contact("sdate") = rsc("sdate")
Contact("edate") = rsc("edate")
Contact("yearnum") = rsc("yearnum")
set data(iCnt) = Contact
iCnt = iCnt + 1
rsc.movenext
wend
json("data") = data
Else
json("data") = ""
End If
rsc.close
response.write toJSON(json)
End if
Function AddComma(number)
If IsNull (number) Then
AddComma = 0
ElseIf IsNumeric (number) = False Then
AddComma = 0
Else
AddComma = FormatNumber(number, 0)
End If
End Function
%>