<% sMatPath="\stat\weeks" 'sMatPath="\weeks" sBorder=0 Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.GetFolder(server.MapPath(sMatPath)) Dim allFiles() fc=0 For Each objFile in objFolder.Files If right(objFile.Name,3) = "txt" Then redim preserve allFiles(fc) allFiles(fc)=objFile.name fc=fc+1 End If Next If objFSO.FileExists(server.MapPath(sMatPath + "\" + allFiles(ubound(allFiles)-1))) then Set f=objFSO.OpenTextFile(server.MapPath(sMatPath + "\" + allFiles(ubound(allFiles)-1)),1) Var_1 = f.ReadLine f.Close else Var_1 = 0 end if If objFSO.FileExists(server.MapPath(sMatPath + "\" + allFiles(ubound(allFiles)-0))) then Set f=objFSO.OpenTextFile(server.MapPath(sMatPath + "\" + allFiles(ubound(allFiles)-0)),1) Var_0 = f.ReadLine f.Close else Var_0 = 0 end if if Var_0 < Var_1 then color="red" if Var_0 = Var_1 then color="yellow" if Var_0 > Var_1 then color="green" URLToRSS = "http://www.mt4i.com/users/fdp/rss?rnd=" + cstr(now()) italic = "" Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0") xmlHttp.Open "Get", URLToRSS, false xmlHttp.Send() RSSXML = xmlHttp.ResponseText Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0") xmlDOM.async = false xmlDOM.LoadXml(RSSXML) Set xmlHttp = Nothing ' clear HTTP object Set RSSItems = xmlDOM.getElementsByTagName("item") ' collect all "items" from downloaded RSS Set xmlDOM = Nothing ' clear XML RSSItemsCount = RSSItems.Length-1 j = -1 For i = 0 To RSSItemsCount Set RSSItem = RSSItems.Item(i) for each child in RSSItem.childNodes Select case lcase(child.nodeName) case "title" RSStitle = child.text case "link" RSSlink = child.text case "description" RSSdescription = child.text End Select next j = J+1 If Instr(RSSTitle,"(open)")>0 then italic = "font-style:italic; " End if Next dim fs,fname set fname=objFSO.CreateTextFile(server.MapPath(sMatPath + "\" + "ShowPerc.asp"),true) fname.WriteLine(chr(60) & "%") fname.WriteLine("size=1") fname.WriteLine("") fname.WriteLine("if request(" & chr(34) & "size" & chr(34) & ")<>" & chr(34) & chr(34) & " then") fname.WriteLine(" size = request(" & chr(34) & "size" & chr(34) & ")") fname.WriteLine("end if") fname.WriteLine("if size<10 then size=10") fname.WriteLine("") fname.WriteLine("%" & chr(62)) fname.WriteLine("") fname.WriteLine("") fname.WriteLine("") fname.WriteLine("") fname.WriteLine("" & Var_0 & "") fname.WriteLine("") fname.Close set fname=nothing set fso=nothing %> Percentage <%="" + Var_0 + ""%> <%=color%>