%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
dim objconn,filename,rs,guery,idq,rsimg
set objconn=server.CreateObject("ADODB.Connection")
filename=server.mappath("contest.udl")
objconn.Open "file name="+filename
'************ NEWS
set rs=server.CreateObject("ADODB.Recordset")
query = "SELECT top 5 id,title FROM tblnews where per=1 order by id desc"
rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 1
rs.Open query,objconn
set rsIMG=server.CreateObject("ADODB.Recordset")
query = "SELECT top 1 id,title,filename FROM tblnews where filename is not null order by id desc"
rsIMG.CursorType = 0
rsIMG.CursorLocation = 2
rsIMG.LockType = 1
rsIMG.Open query,objconn
dim NNN
if rsIMG.eof and rsIMG.bof then
NNN=1
end if
%>
افراد فعال در سايت <% =application("activevisitors") %> نفر
تعداد بازديد کننده<%
on error resume next
' Create a server object
set fso = createobject("scripting.filesystemobject")
' Target the text file to be opened
set act = fso.opentextfile(server.mappath("asp_count.txt"))
' Read the value of the text document
' If the text document does not exist then the on error resume next
' will drop down to the next line
counter = clng(act.readline)
' Add one to the counter
counter = counter + 1
' Close the object
act.close
' Create a new text file on the server
Set act = fso.CreateTextFile(server.mappath("asp_count.txt"), true)
' Write the current counter value to the text document
act.WriteLine(counter)
' Close the object
act.Close
' Write the counter to the browser as text
Response.Write counter
%> نفر