Files
librenms-librenms/html/graph.php
T

37 lines
747 B
PHP
Raw Normal View History

2007-04-03 14:10:23 +00:00
<?php
/**
2016-08-20 12:16:55 +01:00
* LibreNMS
*
2016-08-20 12:16:55 +01:00
* This file is part of LibreNMS.
*
2013-10-29 05:38:12 +10:00
* @copyright (C) 2006 - 2012 Adam Armstrong
*/
use LibreNMS\Data\Store\Datastore;
$start = microtime(true);
2020-09-21 14:54:51 +02:00
$init_modules = ['web', 'graphs', 'auth'];
require realpath(__DIR__ . '/..') . '/includes/init.php';
2020-09-21 14:54:51 +02:00
if (! Auth::check()) {
2020-06-30 09:25:01 -05:00
// check for unauthenticated graphs and set auth
$auth = is_client_authorized($_SERVER['REMOTE_ADDR']);
2020-09-21 14:54:51 +02:00
if (! $auth) {
exit('Unauthorized');
2020-06-30 09:25:01 -05:00
}
2019-04-11 23:26:42 -05:00
}
2018-07-13 17:08:00 -05:00
set_debug(isset($_GET['debug']));
2019-06-23 00:29:12 -05:00
require \LibreNMS\Config::get('install_dir') . '/includes/html/graphs/graph.inc.php';
2007-04-03 14:10:23 +00:00
Datastore::terminate();
if ($debug) {
echo '<br />';
2020-09-21 15:59:34 +02:00
printf('Runtime %.3fs', microtime(true) - $start);
echo '<br />';
printStats();
}