<% Dim qryValue ' 선언해줘야 함!! SetWhere 함수 내에서 사용되는 변수.. Dim arrValue(31) Dim arrData(33,2) YY = inputvalue(request("YY")) MM = inputvalue(request("MM")) DD = inputvalue(request("DD")) TT = inputvalue(request("TT")) If YY = "" and MM = "" and DD = "" and TT = "" then YY = Year(now) MM = Month(now) End If int_YY = "" : If IsNumeric(YY) Then int_yy = Int(YY) int_MM = "" : If IsNumeric(MM) Then int_MM = Int(MM) If Len(MM)=1 Then MM = "0"&MM ' where 조건 SetWhere() ' 카운터 수의 합을 구한다 qry ="select count(vNum) as TCount from visit_counter " & qryValue Set Rs = Dbcon.Execute (qry) sumCount = Rs("TCount") rs.close : Set rs = Nothing If YY<>"" And MM<>"" Then temp_d = DateAdd("m",1, YY&"-"&MM&"-01") dataLength = Right(DateAdd("d", -1, temp_d ),2) Else dataLength = 31 End If For i=1 To dataLength arrValue(i) = 0 next ' 카운터 수의 합을 구한다 qry ="select vDD,count(vNum) as VCount from visit_counter "&qryValue&" group by vDD order by vDD" Set Rs = Dbcon.Execute (qry) Do While Not rs.eof arrValue(rs("vDD")) = rs("VCount") rs.movenext Loop rs.close : Set rs = Nothing maxCount = 0 minCount = 100000 For j=1 To dataLength arrData(j,0) = arrValue(j) ' 카운터 If sumCount > 1 then arrData(j,1) = (arrValue(j)/sumCount)* 100 if arrData(j,1) > 0 then arrData(j,1) = formatnumber(arrData(j,1),2) arrData(j,2) = (arrValue(j)/sumCount) * 550 else arrData(j,1) = 0 arrData(j,2) = 0 End if If minCount > arrValue(j) then minCount = arrValue(j) If maxCount < arrValue(j) then maxCount = arrValue(j) if arrData(j,0) = 0 then arrData(j,0) = "" End if if arrData(j,2) = 0 then arrData(j,2) = "" End if Next %>

일별 통계

<% strXML = strXML & "<graph caption='' xAxisName='' yAxisName='' showValues='0' decimalPrecision='0' formatNumberScale='0' showAlternateHGridColor='1' AlternateHGridColor='' divLineColor='F0F0F0' divLineAlpha='' alternateHGridAlpha='5' bgcolor='ffffff' canvasBgColor='ffffff' canvasBaseColor='EAEAEA' canvasBaseDepth='1' canvasBgDepth='0' baseFont='verdana' baseFontSize='9' baseFontColor='999999' hoverCapBgColor='ffffff' hoverCapBorderColor='A6A6A6' hoverCapSepChar=' ' chartLeftMargin='0' chartRightMargin='0' chartTopMargin='5' chartBottomMargin='0'>" strXML = strXML & "<set name='1日' value='"&arrData(1,0)&"' color='B1D361' />" strXML = strXML & "<set name='' value='"&arrData(2,0)&"' color='FECC6D' />" strXML = strXML & "<set name='' value='"&arrData(3,0)&"' color='E94646' />" strXML = strXML & "<set name='' value='"&arrData(4,0)&"' color='7BDCC5'/>" strXML = strXML & "<set name='5日' value='"&arrData(5,0)&"' color='74C2E4'/>" strXML = strXML & "<set name='' value='"&arrData(6,0)&"' color='828FE3'/>" strXML = strXML & "<set name='' value='"&arrData(7,0)&"' color='D07CDB'/>" strXML = strXML & "<set name='' value='"&arrData(8,0)&"' color='D8D8D8'/>" strXML = strXML & "<set name='' value='"&arrData(9,0)&"' color='B1D361' />" strXML = strXML & "<set name='10日' value='"&arrData(10,0)&"' color='FECC6D' />" strXML = strXML & "<set name='' value='"&arrData(11,0)&"' color='E94646' />" strXML = strXML & "<set name='' value='"&arrData(12,0)&"' color='7BDCC5'/>" strXML = strXML & "<set name='' value='"&arrData(13,0)&"' color='74C2E4'/>" strXML = strXML & "<set name='' value='"&arrData(14,0)&"' color='828FE3'/>" strXML = strXML & "<set name='15日' value='"&arrData(15,0)&"' color='D07CDB'/>" strXML = strXML & "<set name='' value='"&arrData(16,0)&"' color='D8D8D8'/>" strXML = strXML & "<set name='' value='"&arrData(17,0)&"' color='B1D361' />" strXML = strXML & "<set name='' value='"&arrData(18,0)&"' color='FECC6D' />" strXML = strXML & "<set name='' value='"&arrData(19,0)&"' color='E94646' />" strXML = strXML & "<set name='20日' value='"&arrData(20,0)&"' color='7BDCC5'/>" strXML = strXML & "<set name='' value='"&arrData(21,0)&"' color='74C2E4'/>" strXML = strXML & "<set name='' value='"&arrData(22,0)&"' color='828FE3'/>" strXML = strXML & "<set name='' value='"&arrData(23,0)&"' color='D07CDB'/>" strXML = strXML & "<set name='' value='"&arrData(24,0)&"' color='D8D8D8'/>" strXML = strXML & "<set name='25日' value='"&arrData(25,0)&"' color='B1D361' />" strXML = strXML & "<set name='' value='"&arrData(26,0)&"' color='FECC6D' />" strXML = strXML & "<set name='' value='"&arrData(27,0)&"' color='E94646' />" strXML = strXML & "<set name='' value='"&arrData(28,0)&"' color='7BDCC5'/>" strXML = strXML & "<set name='' value='"&arrData(29,0)&"' color='74C2E4'/>" strXML = strXML & "<set name='30日' value='"&arrData(30,0)&"' color='828FE3'/>" strXML = strXML & "<set name='' value='"&arrData(31,0)&"' color='D07CDB'/>" strXML = strXML & "</graph>" response.write renderChartHTML("/manager/img/swf/main_colum3d.swf", "", strXML, "myNext", 730, 200,"","","") %>
전체 <%=sumCount%>명 방문 (최대 <%=maxCount%>명, 최소 <%=minCount%>명)
일별 방문자 통계 <% td_end = 1 For z=1 To 33 %> <% td_end = td_end + 1 If td_end = 4 Then ' 3칸째일때 td_end = 1 If z <> 33 Then response.write "" else response.write "" End if next %>
일별 방문자 통계 서식
일자 방문수 비율(%) 일자 방문수 비율(%) 일자 방문수 비율(%)
<%If z<=Int(dataLength) Then response.write z&"일" End If %> <% SetDetail(z)%> <%=arrData(z,1)%>