<% 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)
爬山講話
上山下海
「樂善盃」報名表格
贊助表格
文章摘錄
謝謝您
旅行隊行程表
第一期至第二十七期

二十八 2005 月一日