[mrtg] Re: code update: rename mrtg asp script

David Eshelman deshelman at crawford.com
Fri Apr 27 22:21:57 MEST 2001


hmm (wish i was running RRD)
have been waiting for it to be integrated..
i am sure this is possible... with some work...
i will look into it when i am back at the office on Monday  :)
(which .cgi file? is this the one that is creating the graphs?)

-David Eshelman

-----Original Message-----
From: Josh Goldfarb
To: David Eshelman
Sent: 4/27/01 4:17 PM
Subject: RE: [mrtg] code update: rename mrtg asp script

Excellent idea.. Now the other question I have is that I have mrtg
running on the frontend and Rrdtool on the back end. Now do u think we
can convert the .cgi file to asp. It will search through the .rrd
files.. And then convert the .cgi to asp

???
Let me know what you think
Thx
Josh


-----Original Message-----
From: David Eshelman [mailto:deshelman at crawford.com] 
Sent: Friday, April 27, 2001 4:16 PM
To: Josh Goldfarb
Subject: RE: [mrtg] code update: rename mrtg asp script


sorry..
rename this script to default.asp or whatever.asp
using this with the [directory] function
(places files in a subdirectory)
for iis you have to rename the default filename it points to this script
will search the directory for .htm or .html file and redirect to it...
:) so you do not have to change the default path in IIS

whole conversation should be saved on the mrtg site...
http://www.ee.ethz.ch/~slist/mrtg/
( RE: [mrtg] changing htm name  and RE: [mrtg] rename htm - solved)


-----Original Message-----
From: Josh Goldfarb
To: David Eshelman
Sent: 4/27/01 4:05 PM
Subject: RE: [mrtg] code update: rename mrtg asp script

Little confused on what you are doing.
I might be late on this conversation.. 
This is to make the html files. Asp
???
josh

-----Original Message-----
From: David Eshelman [mailto:deshelman at crawford.com] 
Sent: Friday, April 27, 2001 4:03 PM
To: 'mrtg at list.ee.ethz.ch'
Subject: [mrtg] code update: rename mrtg asp script



<%@ Language=VBScript %>
<% response.buffer=true %>

<%
' Revision 1.2
'Removed Unnecessary Variables. Closed FSO connection (I always forget).


  Dim objFSO
  Set objFSO = Server.CreateObject("Scripting.FileSystemObject")

  Dim strRootFolder
  strRootFolder = Request.ServerVariables("PATH_TRANSLATED")
  strRootFolder = Lcase(Left(strRootFolder,
instrRev(strRootFolder,"\"))) Dim objFolder
  Set objFolder = objFSO.GetFolder(strRootFolder)
Set fc = objFolder.Files
set objFSO = Nothing
     Dim File, strPath, strExtension

     'Iterate through each file in the folder
     For Each File in fc
       'Obtain the extension of the current file
          strPath = File.Path
       strExtension = Ucase(Right(strPath, Len(strPath) - _
                                InStrRev(strPath, ".")))
       If strExtension = "HTM" then
               response.redirect(File.Name)
       elseif strExtension = "HTML" then
             response.redirect(File.Name)
            
end if

next
response.write("No Files Exist!!!")
%>

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list