<% function main() Dim intCounter, intTimes1, intTimes2, i, j, intDigit Dim strPath, strCounter Dim iscontinue iscontinue = true if(Request.Cookies("CareActionOrgHKCounter")<>"") then intCounter = int(Request.Cookies("CareActionOrgHKCounter")) else strPath = Server.MapPath(".") & "\counter\counter.txt" intCounter = read(strPath) if(intCounter = false) then iscontinue = false else intCounter = CInt(intCounter) + 1 save strPath, intCounter Response.Cookies("CareActionOrgHKCounter") = intCounter end if end if if(iscontinue=true) then intTimes1 = 1 intTimes2 = 1 strPath="images/" for i =len(intCounter) to 1 Step -1 for j= 1 to i intTimes1 = intTimes1 * 10 next intTimes2 = intTimes1/10 intDigit = int((intCounter mod intTimes1)/intTimes2) strCounter = strCounter + "" intTimes1 = 1 intTimes2 = 1 next for i = 6 to len(intCounter) Step -1 strCounter = "" + strCounter next end if if(iscontinue=true) then main = strCounter else main = false end if end function '**************************************************************************************** ' boolean = isExisted(str_filename) '**************************************************************************************** public function isExisted(str_filename) dim obj_file, isFileExisted set obj_file = Server.CreateObject("Scripting.FileSystemObject") if obj_file.FileExists(str_filename) = true then isFileExisted = true else Response.write("File " & str_filename & " is not existed
") isFileExisted = false end if set obj_file = nothing isExisted = isFileExisted end function '**************************************************************************************** ' fil_content = read(str_filename) '**************************************************************************************** public function read(str_filename) dim fil_content, obj_file, obj_textstream if(isExisted(str_filename)) then Set obj_file = Server.CreateObject("Scripting.FileSystemObject") Set obj_textstream = obj_file.OpenTextFile(str_filename) do while obj_textstream.AtEndOfStream = false fil_content = fil_content & obj_textstream.ReadLine & vbcrlf loop obj_textstream.Close Set obj_textstream = Nothing Set obj_file = Nothing read = fil_content else read = false end if end function '**************************************************************************************** ' save str_filename, str_content '**************************************************************************************** public sub save(str_filename, str_content) dim obj_file, obj_textstream 'Response.write(str_filename & " " & str_content & "
") set obj_file = Server.CreateObject("Scripting.FileSystemObject") set obj_textstream = obj_file.CreateTextFile(str_filename,true) obj_textstream.WriteLine(str_content) obj_textstream.Close set obj_textstream = nothing set obj_file = nothing end sub %> 主頁
樂善探索
樂善動態
樂善探訪
樂善盃贊助
中國樂善行
澳門樂善行
何厚煌博士小傳
樂善旅行
上山下海
廣西來函
閒山匯友
海上活動花絮
世外行蹤
近山居閒話
景點追擊
樂詩足跡
爬山講話
謝謝您
感謝信
景點推介
茂芳冊府
群山縱橫
郊野探勝
吉祥物圖案
貴州體驗
產品資
讀者心聲
讀者園地
樂善戰衣
贊助表格
 
首頁