Title: Message
Here is the repost...
 
 

To make this all work, I used a set of stored procedures that someone on this list provided to me.  I will try and find them for you so you have them.
 
Here are the clips of ASP code used to generate the live stats on http://www.localis.com/?page=antispam
 
You will notice in the percentages code, I use an object I wrote called ASPFormat.  This is an object that is just an ASP to VB activeX port of the Format() function in VB.  If you would like the control, I can send it to you.. Its quite useful for padding numbers, and formatting strings into other things.. Basically anything that the format() function can do.
 
I simply created 2 Iframes and loaded the following sources inside them. They have a link to themselves in the meta refresh so they automatically reload every 10 seconds or so.
 
---snip counter code---
<% Set conn = Server.CreateObject("ADODB.Connection")
    conn.open "Driver={SQL Server};Server=xxx;;User ID=xxx;Password=xxx;Initial Catalog=MAILQUARANTINE"
 
 sql = "SELECT NumOfMsgs, Date " &_
   "FROM NumOfMsgsByDate " &_
   "GROUP BY NumOfMsgs, Date "
   
 Set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open sql, conn, 3, 3
 
 TotalMsgs = 0
 rs.MoveFirst
 for i = 1 to rs.RecordCount
  TotalMsgs = TotalMsgs + rs("NumOfMsgs")
  rs.MoveNext
 next
 
 rs.Close
 set rs = nothing
%>
<LINK href="" type=text/css rel=stylesheet> <HEAD> <META HTTP-EQUIV="refresh" content="10;URL=""></HEAD>
<BODY BGCOLOR="transparent" topmargin=0 rightmargin=0 bottommargin=0 leftmargin=0> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
 <TBODY>
 <TR>
  <TD><SPAN class=txtEvent><%if TotalMsgs > 0 then Response.Write(TotalMsgs & " Messages") else
Response.Write("Unavailable") end if%></SPAN></TD>
 </TR>
 </TBODY>
</TABLE>
---snip counter code---
 
---snip percentages code---
<% Set conn = Server.CreateObject("ADODB.Connection")
    conn.open "Driver={SQL Server};Server=xxx;;User ID=xxx;Password=xxx;Initial Catalog=MAILQUARANTINE"
 
 sql = "SELECT Percentage, Category " &_
   "FROM PercentageBySieveCategory " &_
   "ORDER BY Percentage DESC"
   
 Set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open sql, conn, 3, 3
 
 rs.MoveFirst
%>
<LINK href="" type=text/css rel=stylesheet> <HEAD> <META HTTP-EQUIV="refresh" content="10;URL=""></HEAD>
<BODY BGCOLOR="transparent" topmargin=0 rightmargin=0 bottommargin=0 leftmargin=0> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
 <TBODY>
<%
dim objTools
Set objTools = CreateObject("ASPFormat.Format")
 
rs.MoveFirst
do while not rs.EOF
%>
 <TR>
  <TD><SPAN class=txtEvent><%=objTools.FormatString(rs("Percentage"),
"00.00")%>%</SPAN></TD>
  <TD><SPAN class=txtEvent><%=rs("Category")%></SPAN></TD>
 </TR>
<%
 rs.MoveNext
loop
rs.Close
Set objTools = Nothing
Set rs = nothing
%>
 </TBODY>
</TABLE>
---snip percentages code---
 
 
 

Sr. Network Engineer
Diversified Solutions and Services, Inc.

22645 Canal Road, Suite B

Orange Beach, AL 36561

(251)980-8968
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Kristian Rhoden
Sent: Friday, November 14, 2003 3:19 PM
To: [EMAIL PROTECTED]
Subject: [Modus] ping, err uhh Stats?

Oh and Jim,
 
    Now that I picked on you and the rest of the gang, I accidentally (because it makes me look smart, I think) deleted the messages with the Stats (don't even ask, I won't tell!!! :) )... where can I get them :P or is this all over my head? Not to hard to be...just be 1 ft above sea level!
 
-Daniel (CXP)
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Jim Barstow
Sent: Friday, November 14, 2003 4:15 PM
To: [EMAIL PROTECTED]
Subject: [Modus] ping

ping
 
it got quiet all of a sudden.
oh wait, its friday, 3PM.
 

Sr. Network Engineer
Diversified Solutions and Services, Inc.

22645 Canal Road, Suite B

Orange Beach, AL 36561

(251)980-8968
 

Reply via email to