Ohio DeMolay

Keep Moving Forward

<%= strPageTitle %>

Ohio DeMolay Online
Home
Chapters
Forms
calendar
leadership
membership
education
photos
ritual
scholarship
links
contact
connection
login




Grand Lodge F. & A.M. of Ohio


Ohio Buckeye Priory
Ohio Buckeye Priory


State Court of Chevaliers
Ohio State Court of Chevaliers

Chapter Management Forms Chapter Management Forms
Award & Recognition Forms Awards
redball.gif (924 bytes) Competitions
Home - Chapters - Forms - Calendar - Leadership - Membership - Education - Photos - Ritual - Scholarships - Links - Contacts - Connection - Alumni - Login


Sign My Guestbook Guestbook by GuestWorld View My Guestbook

Webmaster Note: Your comments and opinions are welcomed on the guestbook, but anonymous postings will no longer be allowed on the site.

This is an Official Publication of Ohio DeMolay
operating under the authority of DeMolay International,
whose SEE is in Kansas City, MO. Copyright 2006.




Any Questions? Email Ken Cohen the Web Master


This page has been viewed <% '******************************************************* '* ASP 101 Sample Code - http://www.asp101.com * '* * '* This code is made available as a service to our * '* visitors and is provided strictly for the * '* purpose of illustration. * '* * '* Please direct all inquiries to webmaster@asp101.com * '******************************************************* %> <% ' I placed this in a function so I wouldn't have to worry about ' any namespace collisions. For example... if this was inline ' code and someone named a variable strSQL in a file this file ' gets included into you'd get an error. This way you don't and ' there's no chance of the variables overwriting one another! Function RetrieveAndIncrementCount() ' From adovbs.inc: Const adOpenKeyset = 1 Const adLockPessimistic = 2 Const adCmdText = &H0001 ' Local variables Dim strFilename Dim strSQL Dim rsCounter Dim iCount ' Get filename and build SQL query strFilename = Request.ServerVariables("SCRIPT_NAME") strSQL = "SELECT page_name, hit_count FROM hit_count WHERE page_name='" & strFilename & "';" ' Open our recordset Set rsCounter = Server.CreateObject("ADODB.Recordset") ' Access version: rsCounter.Open strSQL, _ "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\odemolay\databases\counter_db.mdb;", _ adOpenKeyset, adLockPessimistic, adCmdText ' SQL Server version: 'rsCounter.Open strSQL, Application("SQLConnString"), adOpenKeyset, adLockPessimistic, adCmdText ' If we've got a record then we read the current value ' If we don't then we create one, set the filename, and start at 0 If rsCounter.EOF Then rsCounter.AddNew iCount = 0 rsCounter.Fields("page_name").Value = strFilename Else rsCounter.MoveFirst iCount = rsCounter.Fields("hit_count").Value End If ' Increment the count and update the DB rsCounter.Fields("hit_count").Value = iCount + 1 rsCounter.Update ' Close our connection rsCounter.Close Set rsCounter = Nothing ' Return the count (pre-incrementation). RetrieveAndIncrementCount = iCount End Function %> <% ' Declare our vaiables Dim iCount ' count variable Dim bUseImages ' boolean whether or not to use images Dim I ' standard looping var ' Determine whether we use images or plain text ' You could just set this to True or False instead ' bUseImages = CBool(Request.QueryString("images")) bUseImages = true iCount = RetrieveAndIncrementCount() ' We're all done with the hard part ' All that's left is to display the results If bUseImages Then ' Loop through the count integer showing each digit ' You can grab the images one at a time or get the zip ' http://www.asp101.com/samples/download/counter_imgs.zip For I = 1 to Len(iCount) ' Output the IMG tag using the right digit Response.Write "" Next 'I Else ' No image wanted just show the variable Response.Write iCount End If %> times.
<% Dim objModifiedFSO Dim objFile Dim dateModified ' Creates the object and assigns it to our variable. Set objModifiedFSO = Server.CreateObject("Scripting.FileSystemObject") ' Get access to the file Set objFile = objModifiedFSO.GetFile(Server.MapPath(Request.ServerVariables("SCRIPT_NAME"))) ' Get last modified property dateModified = objFile.DateLastModified %> This page Last Updated: <%= FormatDateTime(dateModified, 2) %>