forked from proche-rainmaker/phplicensewatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
utilization.php
61 lines (44 loc) · 1.72 KB
/
utilization.php
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
<?php
require_once("common.php");
print_header("License Usage Graphs");
?>
</head><body>
<h1>License Usage</h1>
<p class="a_centre"><a href="admin.php"><img src="back.jpg" alt="up page"/></a></p>
<hr/>
<p>The following links will show the license usage for different tools. Data is being collected every <?php echo($collection_interval); ?> minutes.</p>
<p>Features (click on link to show past usage):</p>
<ul>
<?php
#############################################################
# Print out the list of tools we are showing statistics
#############################################################
for ( $i = 0 ; $i < sizeof($monitor_license); $i++ ) {
echo ('<li><a href="feature_graphs.php?feature=' . $monitor_license[$i]["feature"] . '">' . $monitor_license[$i]["description"] . '</a></li>');
}
?>
</ul>
<h2>Usage since midnight today</h2>
<?php
##########################################################
# Get today's date
##########################################################
$mydate = date("Y-m-d", mktime (0,0,0,date("m"),date("d"), date("Y")));
print("<p>");
for ( $i = 0 ; $i < sizeof($monitor_license); $i++ ) {
print("<img src=\"generate_graph.php?feature=".$monitor_license[$i]["feature"]."&smallsize=1&mydate=".$mydate."\" alt=\"" . $monitor_license[$i]["description"] . "\"/>");
}
print("</p>");
?>
<p>How much time has specified number of licenses been used</p>
<?php
print("<p>");
for ( $i = 0 ; $i < sizeof($monitor_license); $i++ ) {
print("<img src=\"generate_graph.php?feature=".$monitor_license[$i]["feature"]."&smallsize=1&time_breakdown=1&mydate=".$mydate."\" alt=\"" . $monitor_license[$i]["description"] . "\"/><br>\n");
}
print("</p>");
?>
<?php
include('./version.php');
?>
</body></html>