mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-03 08:01:38 +02:00
Tidied up html/index.php
This commit is contained in:
+6
-103
@@ -19,7 +19,8 @@ include("../includes/functions.php");
|
||||
include("includes/functions.inc.php");
|
||||
|
||||
// Check for install.inc.php
|
||||
if (!file_exists('../config.php') && $_SERVER['PATH_INFO'] != '/install.php') {
|
||||
if (!file_exists('../config.php') && $_SERVER['PATH_INFO'] != '/install.php')
|
||||
{
|
||||
// no config.php does so let's redirect to the install
|
||||
header('Location: /install.php');
|
||||
exit;
|
||||
@@ -93,23 +94,6 @@ include("includes/authenticate.inc.php");
|
||||
if (strstr($_SERVER['REQUEST_URI'], 'widescreen=yes')) { $_SESSION['widescreen'] = 1; }
|
||||
if (strstr($_SERVER['REQUEST_URI'], 'widescreen=no')) { unset($_SESSION['widescreen']); }
|
||||
|
||||
# Load the settings for Multi-Tenancy.
|
||||
if (isset($config['branding']) && is_array($config['branding']))
|
||||
{
|
||||
if ($config['branding'][$_SERVER['SERVER_NAME']])
|
||||
{
|
||||
foreach ($config['branding'][$_SERVER['SERVER_NAME']] as $confitem => $confval)
|
||||
{
|
||||
eval("\$config['" . $confitem . "'] = \$confval;");
|
||||
}
|
||||
} else {
|
||||
foreach ($config['branding']['default'] as $confitem => $confval)
|
||||
{
|
||||
eval("\$config['" . $confitem . "'] = \$confval;");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# page_title_prefix is displayed, unless page_title is set
|
||||
if ($config['page_title']) { $config['page_title_prefix'] = $config['page_title']; }
|
||||
|
||||
@@ -120,8 +104,6 @@ if ($config['page_title']) { $config['page_title_prefix'] = $config['page_title'
|
||||
<title><?php echo($config['page_title_suffix']); ?></title>
|
||||
<base href="<?php echo($config['base_url']); ?>" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
|
||||
<meta http-equiv="content-language" content="en-us" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<?php
|
||||
if ($config['page_refresh']) { echo(' <meta http-equiv="refresh" content="'.$config['page_refresh'].'" />' . "\n"); }
|
||||
@@ -134,89 +116,10 @@ if ($config['page_refresh']) { echo(' <meta http-equiv="refresh" content="'.$co
|
||||
<script src="js/bootstrap-hover-dropdown.min.js"></script>
|
||||
<script src="js/typeahead.min.js"></script>
|
||||
<script src="js/hogan-2.0.0.js"></script>
|
||||
|
||||
<script src="js/jquery.cycle2.min.js"></script>
|
||||
<?php
|
||||
if ($config['favicon']) { echo(' <link rel="shortcut icon" href="'.$config['favicon'].'" />' . "\n"); }
|
||||
?>
|
||||
<!--<link rel="stylesheet" href="css/mktree.css" type="text/css" />-->
|
||||
<?php
|
||||
//if ($_SESSION['widescreen']) { echo('<link rel="stylesheet" href="css/styles-wide.css" type="text/css" />'); }
|
||||
?>
|
||||
<!--<script type="text/javascript" src="js/mktree.js"></script>-->
|
||||
<!--<script type="text/javascript" src="js/sorttable.js"></script>-->
|
||||
<!--<script type="text/javascript" src="js/jquery.min.js"></script>-->
|
||||
<!--<script type="text/javascript" src="js/jquery-checkbox.js"></script>-->
|
||||
<!--<script type="text/javascript" src="js/bootstrap.min.js"></script>-->
|
||||
<!--<script type="text/javascript" src="js/qtip/jquery.qtip.min.js"></script>-->
|
||||
<!--<link rel="stylesheet" href="css/jquery.qtip.min.css" type="text/css">-->
|
||||
<!--<?php /* html5.js below from http://html5shim.googlecode.com/svn/trunk/html5.js */ ?>-->
|
||||
<!--[if IE]><script src="js/html5.js"></script><![endif]-->
|
||||
<!--[if lt IE 9]><script language="javascript" type="text/javascript" src="js/jqplot/excanvas.js"></script><![endif]-->
|
||||
<!--<script language="javascript" type="text/javascript" src="js/jqplot/jquery.jqplot.min.js"></script>-->
|
||||
<!--<link rel="stylesheet" type="text/css" href="js/jqplot/jquery.jqplot.min.css" />-->
|
||||
<!--<script type="text/javascript" src="js/jqplot/plugins/jqplot.pieRenderer.min.js"></script>-->
|
||||
<!--<script type="text/javascript" src="js/jqplot/plugins/jqplot.donutRenderer.min.js"></script>-->
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
$(function () {
|
||||
$('.bubbleInfo').each(function () {
|
||||
var distance = 10;
|
||||
var time = 250;
|
||||
var hideDelay = 500;
|
||||
|
||||
var hideDelayTimer = null;
|
||||
|
||||
var beingShown = false;
|
||||
var shown = false;
|
||||
var trigger = $('.trigger', this);
|
||||
var info = $('.popup', this).css('opacity', 0);
|
||||
|
||||
$([trigger.get(0), info.get(0)]).mouseover(function () {
|
||||
if (hideDelayTimer) clearTimeout(hideDelayTimer);
|
||||
if (beingShown || shown) {
|
||||
// don't trigger the animation again
|
||||
return;
|
||||
} else {
|
||||
// reset position of info box
|
||||
beingShown = true;
|
||||
|
||||
info.css({
|
||||
top: -90,
|
||||
left: -33,
|
||||
display: 'block'
|
||||
}).animate({
|
||||
top: '-=' + distance + 'px',
|
||||
opacity: 1
|
||||
}, time, 'swing', function() {
|
||||
beingShown = false;
|
||||
shown = true;
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}).mouseout(function () {
|
||||
if (hideDelayTimer) clearTimeout(hideDelayTimer);
|
||||
hideDelayTimer = setTimeout(function () {
|
||||
hideDelayTimer = null;
|
||||
info.animate({
|
||||
top: '-=' + distance + 'px',
|
||||
opacity: 0
|
||||
}, time, 'swing', function () {
|
||||
shown = false;
|
||||
info.css('display', 'none');
|
||||
});
|
||||
|
||||
}, hideDelay);
|
||||
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
//-->
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
|
||||
<!-- Begin
|
||||
@@ -236,12 +139,12 @@ function popUp(URL)
|
||||
|
||||
if (!$vars['bare'] == "yes") {
|
||||
|
||||
if ($_SESSION['authenticated']) {
|
||||
if ($_SESSION['authenticated'])
|
||||
{
|
||||
include("includes/print-menubar.php");
|
||||
} else {
|
||||
echo('<hr color="#444444" />');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -289,7 +192,9 @@ if ($_SESSION['authenticated'])
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
|
||||
$runtime_end = utime(); $runtime = $runtime_end - $runtime_start;
|
||||
$gentime = substr($runtime, 0, 5);
|
||||
|
||||
@@ -307,7 +212,6 @@ if ($config['page_gen'])
|
||||
if ($cachesize < 0) { $cachesize = 0; } // Silly PHP!
|
||||
|
||||
echo(' <br />Cached data in memory is '.formatStorage($cachesize).'. Page memory usage is '.formatStorage($fullsize).', peaked at '. formatStorage(memory_get_peak_usage()) .'.');
|
||||
|
||||
echo(' <br />Generated in ' . $gentime . ' seconds.');
|
||||
}
|
||||
?>
|
||||
@@ -320,7 +224,6 @@ $('INPUT.auto-hint, TEXTAREA.auto-hint').focus(function() {
|
||||
$(this).removeClass('auto-hint');
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
|
||||
Reference in New Issue
Block a user