|
||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
<%
function counter()
Application.Lock
set f_object = Server.CreateObject("Scripting.FileSystemObject_)&-)(-!(*#_AND_TineTek_2004")
f_path = Server.MapPath("../counter.txt")
Set file1=f_object.OpenTextFile(f_path)
Application("counter")=file1.ReadLine
file1.close
if session("counter")="" then
Application("counter")=Application("counter")+1
end if
counter = Application("counter")
session("counter")=counter
Set file1=f_object.CreateTextFile(f_path)
file1.WriteLine counter
file1.Close
Application.Unlock
Select Case Len(Trim(counter))
Case 1
counter="0000000"&cstr(counter)
case 2
counter="000000"+cstr(counter)
Case 3
counter="00000"+cstr(counter)
case 4
counter="0000"+cstr(counter)
case 5
counter="000"+cstr(counter)
case 6
counter="00"+cstr(counter)
case 7
counter="0"+cstr(counter)
case 8
counter=cstr(counter)
case 9
counter=right(cstr(counter))
End select
for i=1 to Len(counter)
g=g&"
|