Site maintained at the University of Utah in Salt Lake City, UT.

|
Welcome visitor #
<%
' Declare our variables
Dim objFSO, objCountFile ' object vars for FSO and File
Dim strCountFileName ' filename of count text file
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"))
' Compute our count file's filename
' This is based on the file from which you call count.asp
' It basically takes that name and appends a .cnt so I don't
' accidently overwrite any files. If for some reason you have
' a file named script_name.asp.cnt then change this or watch out!
'strCountFileName = Server.MapPath(Request.ServerVariables("SCRIPT_NAME") & ".cnt")
strCountFileName = Server.MapPath("rmphec_count_index.txt")
' Create FileSystemObject to deal with file access
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
' Open the file as a text stream (1 = ForReading, True = Create)
Set objCountFile = objFSO.OpenTextFile(strCountFileName, 1, True)
' Read the current count from the file
If Not objCountFile.AtEndOfStream Then
' Set value to contents of the file
iCount = CLng(objCountFile.ReadAll)
Else
' If no file exists or it's empty start at 0
iCount = 0
End If
' Close the file and destroy the object
objCountFile.Close
Set objCountFile = Nothing
' Increment the count
iCount = iCount + 1
' Overwrite existing file and get a text stream to new one
Set objCountFile = objFSO.CreateTextFile(strCountFileName, True)
' Write updated count
objCountFile.Write iCount
' Close the file and destroy the object
objCountFile.Close
Set objCountFile = Nothing
' Destroy the FSO object
Set objFSO = Nothing
' 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
%>
Rocky Mountain Public Health Education Consortium (RMPHEC) Home
Mission:
The purpose of RMPHEC is to improve the health status of, and eliminate health disparities among, women, children, and families, including those with special health needs. This will be done by increasing the knowledge, skills, and capacity of public health professionals, paraprofessionals, organizations and systems in the Rocky Mountain and surrounding states and Tribes within the region.
Supported in part by Project # 1T02 MC 00022 01, 02, and 03 and #1T21 MC03421-01-00 from the Maternal and Child Health Bureau (Title V, Social Security Act), Health Resources and Services Administration, Department of Health and Human Services.
Rocky Mountain Public Health Education Consortium is an approved provider of continuing nursing education by the Utah Nurses Association, an accredited
approver by the American Nurses Credentialing Center's Commission on Accreditation. Provider #P05-04 for the period 7/1/05-7/1/08. All UNA Members taking our courses will be given a 10% discount.
For NCHEC (National Commission for Health Education Credentialing Inc.) we are now an "Multiple Event Provider" #MEP2237 for the period of 1/1/05-12/31/08.