forked from phpLicenseWatcher/phpLicenseWatcher
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathusage.php
More file actions
55 lines (34 loc) · 1.12 KB
/
usage.php
File metadata and controls
55 lines (34 loc) · 1.12 KB
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
<?php
require_once("common.php");
print_header("License Monitor Graphs");
?>
<h1>License monitoring</h1>
<hr/>
<p>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
require_once("DB.php");
$db = DB::connect($dsn, true);
if (DB::isError($db)) {
die ($db->getMessage());
}
$sql = "SELECT feature, label FROM feature WHERE showInLists = 1 ORDER BY feature";
$recordset = $db->query($sql);
if (DB::isError($recordset)) {
die ($recordset->getMessage());
}
while ($row = $recordset->fetchRow()){
$label = $row[1];
if( $label == "" ){
$label =$row[0];
}
echo ('<li><a href="monitor_detail.php?feature=' . $row[0] . '">' . $label . '</a></li>');
}
$recordset->free();
$db->disconnect();
echo ('<li><a href="monitor_detail.php?feature=">All listed above</a></li>');
echo ('<li><a href="monitor_detail.php?feature=all">Every single feature (slow)</a></li>');
?>
</ul>
<?php print_footer(); ?>