I have removed the names of boxes/ip's for obvious reasons and replaced them
with XXXX. Also, this is a bit sloppy of code because I'm just trying to get it
working properly on cf8 (i.e. the randomly placed cfdumps) I'm a PHP coder but
this project they required CF so that explains the sad attempt below...thanks
for the help.
<!--- Real Time Folder Readings --->
<cfset ydate = CreateDate(year(now()),month(now()),day(now()-1))/>
<cfif StructKeyExists(URL,"sDate")><cfset sInDate = URL.sDate /><cfelse><cfset
sInDate="#DateFormat(ydate, "mm/dd/yyyy")#"></cfif>
<cfif StructKeyExists(URL,"eDate")><cfset eInDate = URL.eDate /><cfelse><cfset
eInDate="#month(now())#/#day(now())#/#year(now())#"></cfif>
<cfif Minute(now()) gt 0 and Minute(now()) lt 15><cfset tMin = "00" />
<cfelseif Minute(now()) ge 15 and Minute(now()) lt 30><cfset tMin = "15" />
<cfelseif Minute(now()) ge 30 and Minute(now()) lt 45><cfset tMin = "30" />
<cfelseif Minute(now()) ge 45 and Minute(now()) lt 60><cfset tMin = "45" />
</cfif>
<cfif Hour(now()) lt 10><cfset tHour = "0" & Hour(now()) />
<cfelse><cfset tHour = Hour(now()) />
</cfif>
<cfif StructKeyExists(URL,"sTime")><cfset sInDate = sInDate & " " &
sTime><cfelse>
<cfset sInDate = sIndate & " " & tHour & ":" & tMin & ":00">
</cfif>
<cfif StructKeyExists(URL,"eTime")><cfset eInDate = eInDate & " " &
eTime><cfelse>
<cfset eInDate = eIndate & " " & tHour & ":" & tMin & ":00">
</cfif>
<!--- Calls for SMTP Counts--->
<cfset smtpbounce = 0 />
<cfset smtppending = 0 />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\mailroot\Badmail\" aStartDate="#sInDate#"
aEndDate="#eInDate#" aFilterType="*.BAD" returnvariable="result"></cfinvoke>
<cfset smtpbounce = smtpbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\mailroot\Queue\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="*.EML" returnvariable="result"></cfinvoke>
<cfset smtppending = smtppending + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\mailroot\Drop\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="*" returnvariable="result"></cfinvoke>
<cfset smtpbounce = smtpbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\mailroot\Pickups\" aStartDate="#sInDate#"
aEndDate="#eInDate#" aFilterType="*" returnvariable="result"></cfinvoke>
<cfset smtppending = smtppending + result />
<!--- End of SMTP Calls --->
<!--- Calls to iMail Folders --->
<cfset imailbounce = 0 />
<cfset imailhbounce = 0 />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\spool\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="Q*" returnvariable="result"></cfinvoke>
<cfset imailbounce = imailbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\spool\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="R*" returnvariable="result"></cfinvoke>
<cfset imailbounce = imailbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\spool\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="*.smp" returnvariable="result"></cfinvoke>
<cfset imailbounce = imailbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\spool\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="*.smd" returnvariable="result"></cfinvoke>
<cfset imailbounce = imailbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\spool\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="*.gsc" returnvariable="result"></cfinvoke>
<cfset imailhbounce = imailhbounce + result />
<cfinvoke component="opt.components.dashboard" method="getFolderCountByDate"
aDirPath="\\XXXXX\spool\" aStartDate="#sInDate#" aEndDate="#eInDate#"
aFilterType="*.gse" returnvariable="result"></cfinvoke>
<cfset imailhbounce = imailhbounce + result />
<!--- End of iMail Folders --->
<!--- Grab from the bounce table in the SPSS_MktgPrefs DB --->
<cfinvoke component="opt.components.dashboard" method="getOptOutPending"
aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qPending"></cfinvoke>
<cfinvoke component="opt.components.dashboard" method="getOptOutActive"
aStartDate="#sInDate#" aEndDate="#eInDate#" returnvariable="qActive"></cfinvoke>
<cfinvoke component="opt.components.dashboard" method="getBounceLog" aId="0"
aCategoryId="1" aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qHardBounce"></cfinvoke>
<cfinvoke component="opt.components.dashboard" method="getBounceLog" aId="0"
aCategoryId="2" aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qSoftBounce"></cfinvoke>
<cfinvoke component="opt.components.dashboard" method="getBounceLog" aId="16"
aCategoryId="3" aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qOptOutBounce"></cfinvoke>
<cfinvoke component="opt.components.dashboard" method="getBounceLog" aId="64"
aCategoryId="3" aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qAutoResponderBounce"></cfinvoke>
<cfinvoke component="opt.components.dashboard" method="getBounceLog" aId="0"
aCategoryId="3" aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qOtherBounce"></cfinvoke>
<!--- End of Real Time Calls --->
<!--- Grab Aprimo Pending Emails --->
<cfinvoke component="opt.components.dashboard" method="getAprimoPending"
aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qAprimoPending"></cfinvoke>
<cfif qAprimoPending.RecordCount eq "">
<cfset aprimocount = 0>
<cfelse>
<cfset aprimocount = qAprimoPending.RecordCount>
</cfif>
<!--- End call for Aprimo Emails --->
<!--- Total Bounce Counts --->
<cfif qPending.mkpendingCount eq "">
<cfset ppcount = 0 />
<cfelse>
<cfset ppcount = qPending.mkpendingCount />
</cfif>
<cfif qActive.mkactiveCount eq "">
<cfset aacount = 0 />
<cfelse>
<cfset aacount = qActive.mkActiveCount />
</cfif>
<cfif qHardBounce.bouncesCount eq "">
<cfset hbcount = 0 />
<cfelse>
<cfset hbcount = qHardBounce.bouncesCount/>
</cfif>
<cfif qSoftBounce.bouncesCount eq "">
<cfset sbcount = 0 />
<cfelse>
<cfset sbcount = qSoftBounce.bouncesCount/>
</cfif>
<cfif qOptOutBounce.bouncesCount eq "">
<cfset oocount = 0 />
<cfelse>
<cfset oocount = qOptOutBounce.bouncesCount/>
</cfif>
<cfif qAutoResponderBounce.bouncesCount eq "">
<cfset arcount = 0 />
<cfelse>
<cfset arcount = qAutoResponderBounce.bouncesCount/>
</cfif>
<cfif qOtherBounce.bouncesCount eq "">
<cfset otcount = 0 />
<cfelse>
<cfset otcount = qOtherBounce.bouncesCount - (oocount + arcount) />
</cfif>
<cfinvoke component="opt.components.dashboard" method="getSMTPSend"
aStartDate="#sInDate#" aEndDate="#eInDate#"
returnvariable="qSmtpCount"></cfinvoke>
<cfif qSmtpCount.sendCount eq "">
<cfset sendcount = 0 />
<cfelse>
<cfset sendcount = qSmtpCount.sendCount />
</cfif>
<p>Email Statistics For <span id="stt"><cfoutput>#sInDate#</cfoutput></span>
Through <span id="stt"><cfoutput>#eInDate#</cfoutput></span></p>
<ul>
<li>
<cfdump var="#aprimocount#">
<cfdump var="#smtpbounce#">
<cfdump var="#smtppending#">
<cfdump var="#imailbounce#">
<cfdump var="#imailhbounce#">
<cfdump var="#hbcount#">
<cfdump var="#sbcount#">
<cfdump var="#oocount#">
<cfdump var="#arcount#">
<cfdump var="#otcount#">
<cfdump var="#aacount#">
<cfdump var="#ppcount#">
<cfdump var="#sendcount#">
<cfchart format="flash" xaxistitle="Sources" yaxistitle="Quantities"
scaleFrom="0" gridlines="5" show3d="yes" showlegend="no"
seriesplacement="stacked" chartwidth="600" chartheight="450">
<cfchartseries type="bar" serieslabel="Pending" seriescolor="##009900">
<cfchartdata item="Aprimo Emails" value="#aprimocount#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Hard Bounce" seriescolor="##CC0000">
<cfchartdata item="Microsoft Emails" value="#smtpbounce#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Pending" seriescolor="##009900">
<cfchartdata item="Microsoft Emails" value="#smtppending#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Hard Bounces" seriescolor="##CC0000">
<cfchartdata item="iMail Emails" value="#imailhbounce#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Pending" seriescolor="##009900">
<cfchartdata item="iMail Emails" value="#imailbounce#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Hard Bounces"
seriescolor="##CC0000">
<cfchartdata item="Bounces/Opt-Outs" value="#hbcount#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Soft Bounces"
seriescolor="##FF6600">
<cfchartdata item="Bounces/Opt-Outs" value="#sbcount#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Opt Bounces" seriescolor="##000000">
<cfchartdata item="Bounces/Opt-Outs" value="#oocount#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Auto Responder Bounces"
seriescolor="##000066">
<cfchartdata item="Bounces/Opt-Outs" value="#arcount#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Other Bounces"
seriescolor="##66FFCC">
<cfchartdata item="Bounces/Opt-Outs" value="#otcount#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Active" seriescolor="##000000">
<cfchartdata item="Bounces/Opt-Outs" value="#aacount#">
</cfchartseries>
<cfchartseries type="bar" serieslabel="Pending" seriescolor="##009900">
<cfchartdata item="Bounces/Opt-Outs" value="#ppcount#">
</cfchartseries>
<cfchar