% Option Explicit %> <% Dim adoCon 'Database Connection Variable Dim rsConfiguration 'Holds the configuartion recordset Dim strCon 'Holds the Database driver and the path and name of the database Dim strSQL 'Holds the SQL query for the database DIm strSQLPR DIm strSQlArc Dim intRecordsPerPage 'Holds the number of files shown on each page Dim strBgColour 'Holds the background colour of the News Administrator Dim strTextColour 'Holds the text colour of the News Administrator Dim strTextType 'Holds the font type of the News Administrator Dim intHeadingTextSize 'Holds the heading font size Dim intTextSize 'Holds the font size of the News Administrator Dim intSmallTextSize 'Holds the small font size Dim strLinkColour 'Holds the link colour of the News Administrator Dim strTableColour 'Holds the table colour Dim strTableBorderColour 'Holds the table border colour Dim strTableTitleColour 'Holds the table title colour Dim strVisitedLinkColour 'Holds the visited link colour of the News Administrator Dim strActiveLinkColour 'Holds the active link colour of the News Administrator Dim blnLCode 'set to true Dim blnEmail 'Boolean set to true if e-mail is on Dim strCode 'Holds the page code Dim strCodeField 'Holds the code type Dim strWebSiteEmailAddress 'Holds the e-mail address for the web site the Site News is on Dim strMailComponent 'Email coponent the site news app useses Dim strSMTPServer 'SMTP server for sending the e-mails through Dim strLoggedInUserCode 'Holds the user code of the user Dim strTitleImage 'Holds the path and name for the title image for the site news Dim intMsgCharNo 'Holds the number of characters allowed for the messages Dim blnCookieSet 'Set to true if cookies are to be set to stop multiple posts Dim blnIPBlocking 'Set to true if IP blooking is to be used to stop multiple posts 'Create database connection 'Create a connection odject Set adoCon = Server.CreateObject("ADODB.Connection") '------------- If you are having problems with the script then try using a diffrent driver or DSN by editing the lines below -------------- 'Database connection info and driver strCon = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("news/news.mdb") '--------------------------------------------------------------------------------------------------------------------------------------------- 'Set an active connection to the Connection object adoCon.Open strCon 'Set up the page encoding strCodeField = "Code" strCode = "nolinks2002" 'Read in the configuration for the script 'Intialise the ADO recordset object Set rsConfiguration = Server.CreateObject("ADODB.Recordset") 'Initialise the SQL variable with an SQL statement to get the configuration details from the database strSQL = "SELECT tblConfiguration.* From tblConfiguration;" 'Query the database rsConfiguration.Open strSQL, strCon 'If there is config deatils in the recordset then read them in If NOT rsConfiguration.EOF Then 'Read in the configuration details from the recordset intRecordsPerPage = CInt(rsConfiguration("No_records_per_page")) strBgColour = rsConfiguration("bg_colour") strTextColour = rsConfiguration("text_colour") strTextType = rsConfiguration("text_type") intHeadingTextSize = CInt(rsConfiguration("heading_text_size")) intTextSize = CInt(rsConfiguration("text_size")) intSmallTextSize = CInt(rsConfiguration("small_text_size")) strTableColour = rsConfiguration("table_colour") strTableBorderColour = rsConfiguration("table_border_colour") strTableTitleColour = rsConfiguration("table_title_colour") strLinkColour = rsConfiguration("links_colour") strVisitedLinkColour = rsConfiguration("visited_links_colour") strActiveLinkColour = rsConfiguration("active_links_colour") strWebSiteEmailAddress = rsConfiguration("email_address") blnLCode = CBool(rsConfiguration("Code")) blnEmail = CBool(rsConfiguration("email_notify")) strTitleImage = rsConfiguration("Title_image") intMsgCharNo = rsConfiguration("Message_char_no") blnCookieSet = CBool(rsConfiguration("Cookie")) blnIPBlocking = CBool(rsConfiguration("IP_blocking")) strMailComponent = rsConfiguration("mail_component") strSMTPServer = rsConfiguration("mail_server") End If 'Reset server object rsConfiguration.Close Set rsConfiguration = Nothing %> <% Dim rsNewsPR 'Database recordset holding the news items = Press release Dim rsNewsArc 'Database recordset holding the news items = Publication Dim rsComments 'Database recordset holding the comments for this news item Dim lngNewsIDPR 'Holds the News item ID number Dim blnComments 'Set to true if comments are allowed for this item %>
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright : Harel Mallac & Co. Ltd 2006 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||