* This is the modus mailing list * 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="files/antispam_styles.css" type=text/css rel=stylesheet> <HEAD> <META HTTP-EQUIV="refresh" content="10;URL=antispam_counters_counter_iframe.asp"> </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="files/antispam_styles.css" type=text/css rel=stylesheet> <HEAD> <META HTTP-EQUIV="refresh" content="10;URL=antispam_counters_filters_iframe.asp"> </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--- Jim Barstow 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 Tech Sent: Friday, November 14, 2003 1:40 PM To: [EMAIL PROTECTED] Subject: [Modus] Spam Counter * This is the modus mailing list * I am insterested how you achieved those results on your webpage, looks very professional! Would you be willing to share the how too? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jim Barstow Sent: Friday, November 14, 2003 2:31 PM To: [EMAIL PROTECTED] Subject: [Modus] Spam Counter * This is the modus mailing list * Let me know if you are still looking for this.. Here is what I have... http://www.localis.com/?page=antispam Jim Barstow 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 Tech Sent: Thursday, November 13, 2003 8:22 AM To: [EMAIL PROTECTED] Subject: [Modus] Spam Counter * This is the modus mailing list * Does anyone have an asp script created they would share to query the database, and input the results into the webpage? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of ISOC Network Operations Sent: Thursday, November 13, 2003 9:10 AM To: [EMAIL PROTECTED] Subject: [Modus] Spam Counter * This is the modus mailing list * That means it is working. Well you would have to write some .asp or .php code to query that number from the database via ODBC connection and display it in the page. John -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gene DuCharme Sent: Wednesday, November 12, 2003 10:17 PM To: modus modus modus Subject: [Modus] Spam Counter * This is the modus mailing list * I followed directions: ran in query Analyzer: Update tblCounter set SpamCount = SpamCount + 1 Got Response: The command (s) Completed Successfully Does this mean the counter is working? And also how does one insert it into a web page which is on another server? --------------------------------------------------- Gene DuCharme SysAdmin Inland Northwest Internet (inwi.net) 509-935-8923 USA Online Central (usaoc.com) 877-GO-USAOC 401 S. Park St. Chewelah, Wa. 99109 *****E-mail Certified Virus Free by ModusMail****** ************* http://www.vircom.com ************* --------------------------------------------------- ** To unsubscribe, send an Email to: [EMAIL PROTECTED] with the word "UNSUBSCRIBE" in the body or subject line. ** To unsubscribe, send an Email to: [EMAIL PROTECTED] with the word "UNSUBSCRIBE" in the body or subject line. ** To unsubscribe, send an Email to: [EMAIL PROTECTED] with the word "UNSUBSCRIBE" in the body or subject line. ** To unsubscribe, send an Email to: [EMAIL PROTECTED] with the word "UNSUBSCRIBE" in the body or subject line. ** To unsubscribe, send an Email to: [EMAIL PROTECTED] with the word "UNSUBSCRIBE" in the body or subject line. ** To unsubscribe, send an Email to: [EMAIL PROTECTED] with the word "UNSUBSCRIBE" in the body or subject line.
