2 |
|
|
3 |
|
# |
4 |
|
# i-scream central monitoring system |
5 |
+ |
# http://www.i-scream.org |
6 |
|
# Copyright (C) 2000-2002 i-scream |
7 |
|
# |
8 |
|
# This program is free software; you can redistribute it and/or |
21 |
|
# |
22 |
|
|
23 |
|
# Navigation for the i-scream graphs |
24 |
< |
# tim@i-scream.org.uk |
24 |
> |
# tim@i-scream.org |
25 |
|
# |
26 |
|
# CONFIGURABLE CONSTANTS: - |
27 |
|
|
33 |
|
|
34 |
|
include("iutils.inc.php"); |
35 |
|
|
36 |
+ |
if ($formMethod == "GET") { |
37 |
+ |
$machine_name = isset($_GET['machine_name']) ? $_GET['machine_name'] : ""; |
38 |
+ |
$graph = isset($_GET['graph']) ? $_GET['graph'] : ""; |
39 |
+ |
$submit = isset($_GET['submit']) ? $_GET['submit'] : ""; |
40 |
+ |
$PHP_SELF = isset($_GET['PHP_SELF']) ? $_GET['PHP_SELF'] : ""; |
41 |
+ |
} |
42 |
+ |
|
43 |
+ |
$file_array = getdirArray($imgdir,'asort'); |
44 |
+ |
|
45 |
|
?> |
46 |
|
|
47 |
|
<? include($titleHTML); ?> |
59 |
|
<option selected value="">[select machine]</option> |
60 |
|
<? } ?> |
61 |
|
<? |
52 |
– |
$file_array = getdirArray($imgdir,'asort'); |
62 |
|
foreach($file_array as $file_name) { |
63 |
|
if(is_dir("$imgdir/$file_name")) { ?> |
64 |
|
<option value="<? echo $file_name ?>"><? echo $file_name ?></option> |
84 |
|
<? } else { ?> |
85 |
|
<option selected value="">[select graph]</option> |
86 |
|
<? } ?> |
87 |
+ |
<option value="ALL">ALL</option> |
88 |
|
<? |
89 |
|
$file_array = getdirArray("$imgdir/$machine_name",'asort'); |
90 |
|
foreach($file_array as $file_name) { |
108 |
|
|
109 |
|
<? |
110 |
|
if ($submit == "Show" && $machine_name && $graph) { |
111 |
< |
|
111 |
> |
if ($graph == "ALL") { |
112 |
|
?> |
113 |
+ |
<center><b>[<? echo $machine_name; ?>] - All graphs</b></center> |
114 |
+ |
|
115 |
+ |
<center> |
116 |
+ |
<? |
117 |
+ |
foreach($file_array as $file_name) { |
118 |
+ |
if(preg_match("/^(\S+)\-3h.png$/", $file_name, $matches)) { ?> |
119 |
+ |
<p><b><? echo tidyName($machine_name, $matches[1]) ?>:</b><br> |
120 |
+ |
<a href="<?=$PHP_SELF.'?'.'graph='.$matches[1].'&machine_name='.$machine_name.'&submit=Show'?>"> |
121 |
+ |
<img border="0" src="<? echo "$imgwebdir/$machine_name/$matches[1]-3h.png" ?>"></a></p> |
122 |
+ |
<? } |
123 |
+ |
} |
124 |
+ |
?> |
125 |
+ |
</center> |
126 |
+ |
<? |
127 |
+ |
} else { // if graph== All |
128 |
+ |
?> |
129 |
|
<center><b>[<? echo $machine_name; ?>] - '<? echo tidyName($machine_name, $graph) ?>' graphs</b></center> |
130 |
|
|
131 |
|
<center> |
135 |
|
<p><b>Last month :</b><br><img border="0" src="<? echo "$imgwebdir/$machine_name/$graph-1m.png" ?>"></p> |
136 |
|
<p><b>Last year :</b><br><img border="0" src="<? echo "$imgwebdir/$machine_name/$graph-1y.png" ?>"></p> |
137 |
|
</center> |
138 |
< |
|
138 |
> |
<? } /* if graph == All */ ?> |
139 |
|
<hr weight="1" color="<? echo $lineColor ?>"> |
140 |
|
|
141 |
|
<b>Latest data</b> |
147 |
|
|
148 |
|
|
149 |
|
<hr weight="1" color="<? echo $lineColor ?>"> |
150 |
< |
<? } |
125 |
< |
|
150 |
> |
<? } // if show, machine and graph |
151 |
|
?> |
152 |
|
|
153 |
|
<? include($bottomHTML); ?> |