1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
<?
include "include/config.inc";
$page["title"] = "Latest values";
$page["file"] = "latest.html";
show_header($page["title"],0,0);
?>
<?
show_table_header_begin();
$result=DBselect("select i.description,h.host from items i,hosts h where i.hostid=h.hostid and i.itemid=$itemid");
echo "TRENDS [",DBget_field($result,0,1),":",DBget_field($result,0,0),"]";
show_table_v_delimiter();
echo "<font size=2>";
if(isset($type)&&$type=="12hours")
{
echo "<b>[<a href='trends.html?itemid=$itemid&type=12hours'>12hours</a>]</b> ";
}
else
{
echo "<a href='trends.html?itemid=$itemid&type=12hours'>12hours</a> ";
}
if(isset($type)&&$type=="4hours")
{
echo "<b>[<a href='trends.html?itemid=$itemid&type=4hours'>4hours</a>]</b> ";
}
else
{
echo "<a href='trends.html?itemid=$itemid&type=4hours'>4hours</a> ";
}
if(isset($type)&&$type=="hour")
{
echo "<b>[<a href='trends.html?itemid=$itemid&type=hour'>hour</a>]</b> ";
}
else
{
echo "<a href='trends.html?itemid=$itemid&type=hour'>hour</a> ";
}
if(isset($type)&&$type=="30min")
{
echo "<b>[<a href='trends.html?itemid=$itemid&type=30min'>30min</a>]</b> ";
}
else
{
echo "<a href='trends.html?itemid=$itemid&type=30min'>30min</a> ";
}
if(isset($type)&&$type=="15min")
{
echo "<b>[<a href='trends.html?itemid=$itemid&type=15min'>15min</a>]</b> ";
}
else
{
echo "<a href='trends.html?itemid=$itemid&type=15min'>15min</a> ";
}
echo "</font>";
show_table_header_end();
echo "<br>";
?>
<?
if(isset($itemid)&&isset($type))
{
show_table_header(strtoupper($type));
}
else
{
show_table_header("Select type of trend");
}
echo "<TABLE BORDER=0 COLS=4 WIDTH=\"100%\" BGCOLOR=\"#CCCCCC\" cellspacing=1 cellpadding=3>";
echo "<TR BGCOLOR=#EEEEEE>";
echo "<TR BGCOLOR=#DDDDDD>";
echo "<TD ALIGN=CENTER>";
if(isset($itemid)&&isset($type))
{
echo "<IMG SRC=\"trend.html?itemid=$itemid&type=$type\">";
}
else
{
echo "...";
}
echo "</TD>";
echo "</TR>";
echo "</TABLE>";
?>
<?
show_footer();
?>
|