[272 of 351]
firstPage previousPage indexPage nextPage lastPage
<% If isEmpty(Session("IMG_9401")) = True Then page_hits = kaos_countermk2(IMG_9401,IMG_9401) Session("IMG_9401") = True else page_hits = kaos_countermk2(0,IMG_9401 ) end if %>
This image has been viewed <% Response.write page_hits %> times.Current Rating: <% Const FReading = 1, FWriting = 2, FAppending = 3 Const TstateUseDefault = -2, TstateTrue = -1, TstateFalse = 0 Dim strURL, strLength, counter, findSlash, lastSlash, page strURL = Request.ServerVariables("URL") strLength = len(strURL) FOR counter=1 TO strLength findSlash=instr(counter,strURL,"/") IF findslash = 0 then lastSlash = instr(counter-1,strURL,"/") exit FOR END IF NEXT page = Mid(strURL,lastSlash+1,strLength) page1 = Split(page, ".") Filex = "/" & page1(0) & "rating.txt" Filey = "" & Filex & "" set FS = server.createObject("Scripting.FileSystemObject") Dim Filepat Filepat = Server.MapPath(Filey) if FS.FileExists(Filepat) Then Set TStream = FS.OpenTextFile(Filepat, FReading, False,TstateUseDefault) Dim Content,totaltext,RateCount,RateSum Content = TStream.ReadLine totaltext = Split(Content, "-") RateCount = totaltext(0) RateSum = totaltext(1) resultant = RateSum/RateCount Response.write "" & Round(resultant,2) & "" TStream.Close Set TStream = nothing else Response.write "0" End If Set FS = nothing %>


 
Name  : Comments:
 
<% Filenam = "/" & page1(0) & ".txt" Filename = "" & Filenam & "" Const ForReading = 1, ForWriting = 2, ForAppending = 3 Const TristateUseDefault = -2, TristateTrue = -1, TristateFalse = 0 Dim FSO set FSO = server.createObject("Scripting.FileSystemObject") Dim Filepath Filepath = Server.MapPath(Filename) if FSO.FileExists(Filepath) Then Set TextStream = FSO.OpenTextFile(Filepath, ForReading, False,TristateUseDefault) Dim Contents Contents = TextStream.ReadAll Response.write "
" & Contents & "
" TextStream.Close Set TextStream = nothing End If Set FSO = nothing %>