<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%> <% // *** Visit Counter *** var FX_count; var FX_digit = 5; var FX_dpath = Server.MapPath("FX_DataCounter"); var FX_fpath = Server.MapPath("FX_DataCounter/counter.txt"); var FX_fso = Server.CreateObject("Scripting.FileSystemObject") // Check if directory and file exists, if not create it. if (!FX_fso.fileExists(FX_fpath)) { if (!FX_fso.folderExists(FX_dpath)) { FX_fso.CreateFolder(FX_dpath); } Application.Lock(); var FX_file = FX_fso.OpenTextFile(FX_fpath, 8, true); FX_file.write(94); FX_file.Close(); Application.Unlock(); } // Read file and update it once per session var FX_fobj = FX_fso.getfile(FX_fpath); var FX_file = FX_fobj.OpenAsTextStream(1,-2); FX_count = Math.round(FX_file.Read(100)); if (Session("FX_DataCounter") == null) { Application.Lock(); FX_file = FX_fso.CreateTextFile(FX_fpath, 8, false); FX_file.write(FX_count+1); FX_file.Close(); Application.Unlock(); FX_fso = null; FX_count++; Session("FX_DataCounter") = FX_count; } // Add leadings var FX_numlength = String(FX_count).length; if (FX_numlength < FX_digit) { var FX_lead = parseInt(FX_digit - FX_numlength); for (var i=0; i M.FRANCISCO - MADEIRAS, S.A.