-
Notifications
You must be signed in to change notification settings - Fork 1
/
alert.php
39 lines (30 loc) · 848 Bytes
/
alert.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
<?php
if (PHP_SAPI !== 'cli') {
die ("Only available in CLI.\n");
}
# CSV Output
# Settings
require_once("inc/settings.inc.php");
# Load saved svc file settings
require_once("inc/sources.inc.php");
# Load PHP functions
require_once("inc/functions.inc.php");
# Looping trough Files
foreach (getFilelist($GLOBALS["reports_path"], ".inc.php") as $file) {
$pos = strrpos($file, ".inc.php");
if ($pos > 1) {
if (empty($GLOBALS["sources"][$file]["name"])) {
$name = substr($file, 0, $pos);
$name = str_replace("_", " ", $name);
$name = ucfirst($name);
} else {
$name = $GLOBALS["sources"][$file]["name"];
}
}
echo "Found report " . $name . "\n";
include($GLOBALS["reports_path"] . "/" . $file);
checkAlert();
# not allowd to overwrite function
exit;
}
?>