%@ Language=VBScript %> <% '************************************************************************* ' DO NOT MODIFY THIS SCRIPT IF YOU WANT UPDATES TO WORK! ' Function : Statistics & Reports ' Product : CandyPress Store Administration ' Version : 2.5 ' Modified : February 2004 ' Copyright: Copyright (C) 2004 CandyPress.Com ' See "license.txt" for this product for details regarding ' licensing, usage, disclaimers, distribution and general ' copyright requirements. If you don't have a copy of this ' file, you may request one at webmaster@candypress.com ' Custom : Adam L. - Added Quarterly and Yearly '************************************************************************* Option explicit Response.Buffer = true const adminLevel = 1 %> <% 'Work fields dim repType dim repPeriod dim repInterval dim repOrderStatus dim startDate dim startDateAll dim endDate dim aValues dim aLabels dim strTitle dim strYAxisLabel dim strXAxisLabel dim I dim repID dim errMsg dim firstDayOfQuarter dim showArr, item 'Database dim mySQL, cn, rs, rs2 '************************************************************************* 'Open Database Connection call openDB() 'Store Configuration if loadConfig() = false then response.redirect "sysMsg.asp?errMsg=" & server.URLEncode("Could not load Store Configuration settings.") end if 'Get form values repID = trim(Request.Form("repID")) if repID = "01" then 'ORDERS repType = lCase(trim(Request.Form("repType"))) repOrderStatus = lCase(trim(Request.Form("repOrderStatus"))) repPeriod = lCase(trim(Request.Form("repPeriod"))) repInterval = lCase(trim(Request.Form("repInterval"))) elseif repID = "02" then 'GENERAL REPORTS repType = lCase(trim(Request.Form("repType"))) end if 'If no form values were found, check the cookie if len(repID & repType & repOrderStatus & repPeriod & repInterval & "") = 0 then for each item in Request.Cookies if item = "CPStatistics" then showArr = Split(Request.Cookies(item),"*|*") repID = showArr(0) repType = showArr(1) repOrderStatus = showArr(2) repPeriod = showArr(3) repInterval = showArr(4) end if next else 'Save Search Criteria in a Cookie Response.Cookies("CPStatistics") = repID & "*|*" & repType & "*|*" & repOrderStatus & "*|*" & repPeriod & "*|*" & repInterval Response.Cookies("CPStatistics").expires = Date() + 30 end if %>
Statistics
|
To create a report, select the query parameters you want and click the "Show" button. |
<%=errMsg%> |
| width=0 align=center valign=middle bgcolor="<%=colXYLabels%>">
<%
for I = 1 to len(strYAxisLabel)
Response.Write "" & mid(strYAxisLabel,I,1) & " " next %> |
<%=strTitle%> | |
| <%=replace(aLabels(I)," "," ")%> | height=<%=barHeight%> align=absMiddle> <%=aValues(I)%> |
|
| <%=strXAxisLabel%> | ||
<%=strTitle%>
| " & aLabels(col) & " | " next %>
| " & aValues(col,row) & " | " next Response.Write "