<% Dim qryValue ' 선언해줘야 함!! SetWhere 함수 내에서 사용되는 변수.. Dim curCount(7) Dim arrData(8,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) from visit_counter "& qryValue Set Rs = Dbcon.Execute (qry) totalCount = rs(0) rs.close : Set rs = nothing ' 배열 초기화 For i=0 To 6 curCount(i) = 0 next ' 요일별 카운터를 구한다 qry = "select vDW,count(vNum) as vC from visit_counter "&qryValue&" group by vDW order by vDW" Set Rs = Dbcon.Execute (qry) sumCount = 0 Do While Not rs.eof vDW = Int(rs("vDW")) vC = Int(rs("vC")) curCount(vDW) = vC sumCount = sumCount + vC rs.movenext loop maxCount = 0 minCount = 100000 For i=0 To 6 if sumCount > 0 then curSize = int((curCount(i)/sumCount) * 540) curPer = formatnumber((curCount(i)/sumCount) * 100,2) else curSize = 0 curPer = 0 End if if maxCount < curCount(i) then maxCount = curCount(i) End if if minCount > curCount(i) then minCount = curCount(i) End if arrData(i,0) = curCount(i) arrData(i,1) = curSize arrData(i,2) = curPer if arrData(i,0) = 0 then arrData(i,0) = "" End if if arrData(i,2) = 0 then arrData(i,2) = "" End if next %>

요일별 통계

<% 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='SUN' value='"&arrData(0,0)&"' color='E94646' />" strXML = strXML & "<set name='MON' value='"&arrData(1,0)&"' color='B1D361' />" strXML = strXML & "<set name='TUE' value='"&arrData(2,0)&"' color='FECC6D' />" strXML = strXML & "<set name='WED' value='"&arrData(3,0)&"' color='D07CDB'/>" strXML = strXML & "<set name='THUR' value='"&arrData(4,0)&"' color='7BDCC5'/>" strXML = strXML & "<set name='FRI' value='"&arrData(5,0)&"' color='74C2E4'/>" strXML = strXML & "<set name='SAT' value='"&arrData(6,0)&"' color='828FE3'/>" strXML = strXML & "</graph>" response.write renderChartHTML("/manager/img/swf/main_colum3d.swf", "", strXML, "myNext", 730, 200,"" ,"","") %>
전체 <%=totalCount %>명 방문 (최대 <%=maxCount %>명, 최소 <%=minCount %>명)
요일별 방문자 통계 <% td_end = 1 for z=0 To 8 %> <% td_end = td_end + 1 If td_end = 4 then ' 3칸째일때 td_end = 1 If z <> 8 Then response.write "" else response.write "" End if next %>
요일별 방문자 통계 서식
요일 방문수 비율(%) 요일 방문수 비율(%) 요일 방문수 비율(%)
<% If z <= "7" Then SetWeek(z) End If %>  <% SetDetail(z)%> <%=arrData(z,2)%>