<% '== BEGIN CONSTANTS ============================================================ ' I'm going to use some fake Consts here just to make my life easier. ' I do this because I have an application var that stores site wide ' DB connection info, username, and password. As constants I'd have ' to truly hard code them and I also couldn't do the Server.MapPath ' for Access. After these few lines however, they are treated ' STRICTLY as if they were true Consts and are not modified in any ' other place! Dim DB_CONNECTIONSTRING, DB_USERNAME, DB_PASSWORD Dim DB_DATE_DELIMITER ' Default Access DB connection info DB_CONNECTIONSTRING = "Provider=Microsoft.Jet.OLEDB.3.51; Data Source=" & Server.MapPath("database/forum.mdb") & ";" ' Some alternate drivers. I've tested against all 3 of these. 'DB_CONNECTIONSTRING = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.Mappath("database/forum.mdb") & ";" DB_CONNECTIONSTRING = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("../database/forum.mdb") & ";" DB_USERNAME = "" DB_PASSWORD = "" ' Sample SQL Server connection info 'DB_CONNECTIONSTRING = "Provider=SQLOLEDB; Data Source=sql_server_name_or_ip; Initial Catalog=db_name;" 'DB_USERNAME = "user" 'DB_PASSWORD = "pass" ' Date delimiter: Access likes # / SQL likes ' DB_DATE_DELIMITER = "#" ' Automatically enables / disables sending of e-mail and all related functions ' If you turn this on be sure you configure the SendEmail function ' below to use your component as well as ' CHANGE THE MESSAGE AND ADDRESSES! Const SEND_EMAIL = False ' In new verions this should be set in the forums table. This constant ' is used to determine the grouping if that field doesn't exist. Const MESSAGE_GROUPING = "" ' "monthly" / "7days" / "" '== END CONSTANTS ============================================================== '== BEGIN SUBS & FUNCTIONS ===================================================== Sub ShowHeader() %> AutoShowTV.COM Forums <% 'Show the table for admins ShowAdminTable %>

AutoShowTV Forums


<% End Sub Sub ShowFooter() %>
<% End Sub ' You'll need to modify this function to use whatever email compnent ' you prefer if you want to use email notification. Sub SendEmail(strFrom, strTo, strSubject, strBody) ' DB and email object vars for email notification Dim objCDOMail ' Make sure emailing is enabled If SEND_EMAIL Then ' Create an instance of the NewMail object. Set objCDOMail = Server.CreateObject("CDONTS.NewMail") ' Set the properties of the object objCDOMail.From = strFrom objCDOMail.To = strTo objCDOMail.Subject = strSubject objCDOMail.Body = strBody ' Send the message! objCDOMail.Send Set objCDOMail = Nothing End If End Sub ' SendEmail '== END SUBS & FUNCTIONS ======================================================= %>