Debian Codegraph @

contrib/mrtg_php_portal/www/update.php

raw
1 <html>
2
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
5 <meta name="GENERATOR" content="Microsoft FrontPage 4.0">
6 <meta name="ProgId" content="FrontPage.Editor.Document">
7 <title>MRTG remove switch:</title>
8 </head>
9
10 <body>
11
12 <p><b><u>MRTG update switch stats:</u></b></p>
13 <FORM ACTION=update.php METHOD=POST>
14 <table border="0" width="100%">
15 <tr>
16 <td width="12%">Switch:</td>
17 <td width="88%"><select size="1" name="switch">
18 <?
19 include ("e:\\mrtg\\conf\\config.inc.php");
20 $dir = dir($mrtg_config_dir);
21 // echo "<ul>";
22 while($filename=$dir->read()) {
23 if (eregi("\.(cfg)$",$filename))
24 echo "<option value=".substr($filename, 0, -4).">".substr($filename, 0, -4)."</option>";
25 }
26 $dir->close();
27 //echo "</ul>";
28 ?>
29 </select></td>
30 </tr>
31 </table>
32 <br>
33 <input type="submit" value="Update" name="B1">
34 </form>
35 <hr>
36 </body>
37
38 </html>
39 <?
40
41 // Include config file with path variable, etc...
42 include ("e:\\mrtg\\conf\\config.inc.php");
43
44 if($REQUEST_METHOD == "POST"){
45 system ($perl_exe." ".$mrtg_exe." ".$mrtg_config_dir.$switch.".cfg");
46 echo "Mrtg stats for <b><a href=".$switch.".html".">".$switch."</a></b> updated...<br>";
47 }
48 echo "<br><a href=./>Back to index</a>";
49
50 ?>