<% 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 %> 主頁
樂善傳真
第三屆「樂善盃」
「樂善盃」報名表格

樂善行活動

樂善行旅行
「樂善」寄語
樂詩足跡
香港山水
近山居閒話
滇遊漫話
爬山講話
領隊來稿(1)
領隊來稿(2)
群山縱橫
郊野探勝
好書推介
濠江來稿
讀者園
贊助單
支援單位(1)
支援單(2)
樂善盃工作會議
 
第一期至第二十

第二十三期 2004 月一日