forked from proche-rainmaker/phplicensewatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
/
feature_monitor.php
34 lines (25 loc) · 1.17 KB
/
feature_monitor.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
<?php
require_once("./common.php");
print_header("Per Feature License Monitoring");
?>
</head><body>
<h1>Per Feature License Monitoring</h1>
<p class="a_centre"><a href="monitor.php"><img src="back.jpg" alt="up page"/></a></p>
<hr/>
<p class="a_centre">Data is taken every <?php echo($collection_interval); ?> minutes. It shows usage for past day, past week, past month and past year.</p>
<?php
/* ---------------------------------------------------------------------- */
include_once('./tools.php');
$today = mktime (0,0,0,date("m"),date("d"), date("Y"));
$periods = array("day","week","month","year");
for ( $i = 0 ; $i < sizeof($periods) ; $i++ ) {
echo('<h2 class="a_centre" style="padding-top: 20pt;"> ' . ucfirst($periods[$i]) . '</h2><p class="a_centre" style="padding-top: 20pt; padding-bottom: 10pt;"><img src="generate_monitor.php?feature=' . htmlspecialchars($_GET['feature']) . '&mydate=' . date("Y-m-d", $today) . '&period=' . $periods[$i] );
if ( isset($_GET['upper_limit']) ){
echo('&upper_limit=' . htmlspecialchars($_GET['upper_limit']) . '">');
}else{
echo("\" alt=\"".htmlspecialchars($_GET['feature'])."\"/>");
}
echo("</p>");
}
?>
</body></html>