-
Notifications
You must be signed in to change notification settings - Fork 14
/
header.php
92 lines (85 loc) · 3.78 KB
/
header.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?php
$name = "Graphsky";
$env = isset($_GET['env']) ? $_GET['env'] : $conf['graphite_default_env'];
$c = (isset($_GET['c']) && $_GET['c'] != "") ? $_GET['c'] : NULL;
$m = (isset($_GET['m']) && $_GET['m'] != "") ? $_GET['m'] : NULL;
$h = (isset($_GET['h']) && $_GET['h'] != "") ? $_GET['h'] : NULL;
$g = (isset($_GET['g']) && $_GET['g'] != "") ? $_GET['g'] : NULL;
$title_array = array($env,$c,$h,$g);
$title = implode(" > ", array_filter($title_array));
?>
<!DOCTYPE html>
<!-- Icons by Google: https://github.com/google/material-design-icons -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta http-equiv="refresh" content="<?php print $conf['dashboard_refresh_interval']; ?>" >
<meta name="viewport" content="initial-scale=1,width=device-width,height=device-height,user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#<?php print $conf['theme_color']; ?>" >
<!--link rel="stylesheet" type="text/css" href="stylesheet.css"-->
<link rel="stylesheet" type="text/css" href="stylesheet.php">
<link rel="stylesheet" type="text/css" href="js/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="js/jquery-ui.structure.min.css">
<link rel="stylesheet" type="text/css" href="js/jquery-ui.theme.min.css">
<link rel="stylesheet" type="text/css" href="js/jquery-ui-timepicker-addon.min.css">
<link rel="shortcut icon" href="img/favicon.php?c=<?php print $conf['theme_color']; ?>" sizes="196x196">
<!--link rel="shortcut icon" href="img/icon.png" sizes="196x196"-->
<link rel="apple-touch-icon" href="img/apple-touch-icon.png" sizes="196x196">
<link rel="apple-touch-icon-precomposed" href="img/apple-touch-icon.png" sizes="196x196">
<script type="text/javascript" src="js/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="js/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-timepicker-addon.min.js"></script>
<script type="text/javascript" charset="utf-8">
var didScroll;
var lastScrollTop = 0;
var delta = 5;
var navbarHeight = $('#graph_menu').outerHeight();
$(window).scroll(function(event){
didScroll = true;
});
setInterval(function() {
if (didScroll) {
hasScrolled();
didScroll = false;
}
}, 250);
function hasScrolled() {
var st = $(this).scrollTop();
if(Math.abs(lastScrollTop - st) <= delta)
return;
if (st > lastScrollTop && st > navbarHeight){
$('#graph_menu').removeClass('graph_menu-down').addClass('graph_menu-up');
} else {
if(st + $(window).height() < $(document).height()) {
$('#graph_menu').addClass('graph_menu-down').removeClass('graph_menu-up');
}
}
lastScrollTop = st;
}
$(function(){
$.datepicker.setDefaults({
timeFormat: "HH:mm",
dateFormat: "yy-mm-dd",
showOn: "button",
showTime: false,
constrainInput: false,
buttonImage: "img/calendar.svg",
buttonImageOnly: true,
controlType: "select",
oneLine: true
});
$('#from_calendar').datetimepicker({
onClose: function(dateText, inst) { $(this).attr("disabled", false); },
beforeShow: function(dateText, inst) { $(this).attr("disabled", true); }
});
$('#until_calendar').datetimepicker({
onClose: function(dateText, inst) { $(this).attr("disabled", false); },
beforeShow: function(dateText, inst) { $(this).attr("disabled", true); }
});
});
</script>
<title><?php print "$name | $title" ?></title>
</head>
<body>
<div id="container">