<%@ Language=VBScript %> <% dim dd(200) dim nn(200) dim ss(200) dim gg(200) dim ll(200) Set fso = CreateObject("Scripting.FileSystemObject") On Error Resume Next Set a = fso.CreateTextFile(server.mappath("highscores.txt"),false) Set a = fso.OpenTextFile(server.mappath("highscores.txt"),1,0) On Error goto 0 broj=0 Do While a.AtEndOfStream <> true xx=a.ReadLine xs=split(xx,";;;;;") dd(broj)=xs(1) nn(broj)=xs(2) ss(broj)=xs(3) gg(broj)=xs(4) ll(broj)=xs(5) broj=broj+1 Loop a.close on error resume next %> HighScores

HighScores
2004

<%j=1 imastari=false%> <% for i=0 to 199 %> <% if (month(dd(i)) = month(date)) and (year(dd(i)) = year(date)) then %> <% if j<= 100 then %> <% if ss(i)>0 then %> <% end if %> <% end if %> <% else if i > 99 then imastari=true ss(i)=-1 end if end if %> <% next %>
This Month

<%= cstr(j) %>.

<%j=j+1 %>
 <%= nn(i) %>

<%= ss(i) %> 

<% for i=0 to 99 %> <% if (month(dd(i)) = month(date)) and (year(dd(i)) = year(date)) then %> <% else %> <% end if %> <% next %>
Overall

<%= cstr(i+1) %>.

 <%= nn(i) %>

<%= ss(i) %> 

<%= cstr(i+1) %>.

 <%= nn(i) %>

<%= ss(i) %> 

<% if imastari=true then On Error Resume Next fso.CopyFile server.mappath("highscores.txt"), server.mappath("highscores_OLD.txt") 'Set a = fso.CreateTextFile(server.mappath("highscores.txt"),true) Set a = fso.OpenTextFile(server.mappath("highscores.txt"),2,0) %> <%for i=0 to 199 if ss(i)>0 then a.Write(cstr(i+1)&";;;;;") a.Write(dd(i)&";;;;;") a.Write (nn(i)&";;;;;") a.Write (cstr(ss(i))&";;;;;") a.Write (gg(i)&";;;;;") a.Write (ll(i)&";;;;;") a.WriteLine() end if next a.Close end if %>