Debian Codegraph @

html/main.php

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 <?php
2 include_once(dirname(__FILE__).'/includes/utils.inc.php');
3
4 $this_version = '4.5.12';
5 $this_year = '2026';
6 $theme = isset($cfg['theme']) ? $cfg['theme'] : 'dark';
7 if ($theme != 'dark' && $theme != 'light') {
8 $theme = 'dark';
9 }
10 ?>
11 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
12
13 <html id="main" class="<?= $theme ?>">
14
15 <head>
16
17 <meta name="ROBOTS" content="NOINDEX, NOFOLLOW" />
18 <title>Nagios Core</title>
19 <link rel="stylesheet" type="text/css" href="stylesheets/common.css?<?php echo $this_version; ?>" />
20 <link rel="stylesheet" type="text/css" href="stylesheets/nag_funcs.css?<?php echo $this_version; ?>" />
21 <script type="text/javascript" src="js/jquery-3.7.1.min.js"></script>
22 <script type="text/javascript" src="js/nag_funcs.js"></script>
23
24 <script type='text/javascript'>
25 var cookie;
26 <?php if ($cfg["enable_page_tour"]) { ?>
27 var vbox;
28 var vBoxId = "main";
29 var vboxText = "<a href=https://www.nagios.com/tours target=_blank> " +
30 "Click here to watch the entire Nagios Core 4 Tour!</a>";
31 <?php } ?>
32 $(document).ready(function() {
33 var user = "<?php echo htmlspecialchars($_SERVER['REMOTE_USER'] ?? ''); ?>";
34
35 <?php if ($cfg["enable_page_tour"]) { ?>
36 vBoxId += ";" + user;
37 vbox = new vidbox({pos:'lr',vidurl:'https://www.youtube.com/embed/2hVBAet-XpY',
38 text:vboxText,vidid:vBoxId});
39 <?php } ?>
40
41 getCoreStatus();
42 });
43
44 // Get the daemon status JSON.
45 function getCoreStatus() {
46 setCoreStatusHTML('passiveonly', 'Checking process status...');
47
48 $.get('<?php echo $cfg["cgi_base_url"];?>/statusjson.cgi?query=programstatus', function(d) {
49 d = d && d.data && d.data.programstatus || false;
50 if (d && d.nagios_pid) {
51 var pid = d.nagios_pid;
52 var daemon = d.daemon_mode ? 'Daemon' : 'Process';
53 setCoreStatusHTML('enabled', daemon + ' running with PID ' + pid);
54 } else {
55 setCoreStatusHTML('disabled', 'Not running');
56 }
57 }).fail(function() {
58 setCoreStatusHTML('disabled', 'Unable to get process status');
59 });
60 }
61
62 function setCoreStatusHTML(image, text) {
63 $('#core-status').html(`<span class='dot-${image}'>●</span>&nbsp&nbsp${text}`);
64 }
65 </script>
66
67 </head>
68
69
70 <body id="splashpage">
71
72 <div id="currentversioninfo">
73 <div>
74 <div class="version">Version <b><?php echo $this_version; ?></b></div>
75 <div class="releasedate">March 25, 2026</div>
76 </div>
77 <div><span id="core-status"></span></div>
78 <a class="checkforupdates" href="https://www.nagios.org/checkforupdates/?version=<?php echo $this_version; ?>&amp;product=nagioscore" target="_blank">Check for updates</a>
79 </div>
80
81
82 <div id="updateversioninfo">
83 <?php
84 $updateinfo = get_update_information();
85 if (!$updateinfo['update_checks_enabled']) {
86 ?>
87 <div class="updatechecksdisabled">
88 <div class="warningmessage">Warning: Automatic Update Checks are Disabled!</div>
89 <div class="submessage">Disabling update checks presents a possible security risk. Visit <a href="https://www.nagios.org/" target="_blank">nagios.org</a> to check for updates manually or enable update checks in your Nagios config file.</a></div>
90 </div>
91 <?php
92 } else if ($updateinfo['update_available'] && $this_version < $updateinfo['update_version']) {
93 ?>
94 <div class="updateavailable">
95 <div class="updatemessage">A new version of Nagios Core is available!</div>
96 <div class="submessage">Visit <a href="https://www.nagios.org/download/" target="_blank">nagios.org</a> to download Nagios <?php echo htmlentities($updateinfo['update_version'], ENT_QUOTES, 'UTF-8');?>.</div>
97 </div>
98 <?php
99 }
100 ?>
101 </div>
102
103 <div id="mainsplash">
104 <a href="https://www.nagios.org/?utm_campaign=csp&utm_source=nagioscore&utm_medium=splash_thumbnail&utm_content=<?php echo $this_version; ?>" target="_blank"><img src="images/csp-dashboard.avif" /></a>
105 <div id="splashtext">
106 <div id="splashtexttitle">Meet Nagios Core Services Platform</div>
107 <div>The next generation of Open Source powered monitoring with advanced dashboards, monitoring wizards, and much more!</div>
108 <div id="splashbuttons">
109 <a id="splashlearnmore" href="https://www.nagios.org/?utm_campaign=csp&utm_source=nagioscore&utm_medium=splash_button&utm_content=<?php echo $this_version; ?>#csp-section-home" target="_blank">Learn More</a>
110 <a id="splashnewsletter" href="https://www.nagios.org/newsletter?utm_campaign=csp&utm_source=nagioscore&utm_medium=splash_newsletter_link&utm_content=<?php echo $this_version; ?>" target="_blank">Newsletter Sign-Up</a>
111 </div>
112 </div>
113 </div>
114
115 <div id="mainfooter">
116 <div id="maincopy">
117 Copyright &copy; 2010-<?php echo $this_year; ?> Nagios Core Development Team and Community Contributors. Copyright &copy; 1999-2009 Ethan Galstad. See the THANKS file for more information on contributors.
118 </div>
119 <div CLASS="disclaimer">
120 Nagios Core is licensed under the GNU General Public License and is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Nagios, Nagios Core and the Nagios logo are trademarks, servicemarks, registered trademarks or registered servicemarks owned by Nagios Enterprises, LLC. Use of the Nagios marks is governed by the <A href="https://www.nagios.com/legal/trademarks/">trademark use restrictions</a>.
121 </div>
122 <div class="logos">
123 <a href="https://www.nagios.org/" target="_blank"><div class="nlogo nagioslogo"></div></a>
124 </div>
125 </div>
126
127
128 </body>
129 </html>