1<?php 2include_once(dirname(__FILE__).'/includes/utils.inc.php'); 3 4$this_version = '4.4.6'; 5$this_year = '2020'; 6?> 7<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 8 9<html> 10 11<head> 12 13<meta name="ROBOTS" content="NOINDEX, NOFOLLOW" /> 14<title>Nagios Core</title> 15<link rel="stylesheet" type="text/css" href="stylesheets/common.css?<?php echo $this_version; ?>" /> 16<link rel="stylesheet" type="text/css" href="stylesheets/nag_funcs.css?<?php echo $this_version; ?>" /> 17<script type="text/javascript" src="js/jquery-1.12.4.min.js"></script> 18<script type="text/javascript" src="js/nag_funcs.js"></script> 19 20<script type='text/javascript'> 21 var cookie; 22 <?php if ($cfg["enable_page_tour"]) { ?> 23 var vbox; 24 var vBoxId = "main"; 25 var vboxText = "<a href=https://www.nagios.com/tours target=_blank> " + 26 "Click here to watch the entire Nagios Core 4 Tour!</a>"; 27 <?php } ?> 28 $(document).ready(function() { 29 var user = "<?php echo htmlspecialchars($_SERVER['REMOTE_USER']); ?>"; 30 31 <?php if ($cfg["enable_page_tour"]) { ?> 32 vBoxId += ";" + user; 33 vbox = new vidbox({pos:'lr',vidurl:'https://www.youtube.com/embed/2hVBAet-XpY', 34 text:vboxText,vidid:vBoxId}); 35 <?php } ?> 36 loadRemoteFeed( // Our top banner splash. 37 '#splashbox0-contents', 'corebanner', 1, 38 '', processBannerItem, '' 39 ); 40 41 loadRemoteFeed( // "Latest News" 42 '#splashbox4-contents', 'frontpage', 3, 43 '<ul>', processNewsItem, '<li><a href="https://www.nagios.org/news" target="_blank">More news...</a></li></ul>' 44 ); 45 46 loadRemoteFeed( // "Don't Miss..." 47 '#splashbox5-contents', 'corepromo', 3, 48 '<ul>', processPromoItem, '</ul>' 49 ); 50 51 getCoreStatus(); 52 }); 53 54 // Fetch an RSS feed and format HTML for the first n items. 55 function loadRemoteFeed(id, name, n, prefix, formatter, suffix) { 56 $.ajax({ 57 type: 'GET', 58 url: 'https://www.nagios.org/backend/feeds/' + name + '/', 59 crossDomain: true, 60 success: function(d, status, jqXHR) { 61 // We should have Internet access, set the playlist HTML. 62 initializePlaylist(); 63 64 var text = ''; // Start with empty text by default. 65 66 $(d).find('channel').find('item').each(function(index) { 67 var itemText = formatter($(this)); // Format the item's HTML. 68 if (itemText) text += itemText; // Append if non-empty. 69 return index+1 < n; // Only process n items. 70 }); 71 72 // Only set the HTML if we have item text. 73 if (text) $(id).html(prefix + text + suffix); 74 } 75 }); 76 } 77 78 function processBannerItem(item) { 79 return item.find('description').text(); 80 } 81 82 function processNewsItem(item) { 83 var link = item.find('link').text(); 84 var title = item.find('title').text(); 85 return link && title 86 ? '<li><a href="' + link + '" target="_blank">' + title + '</a></li>' 87 : ''; 88 } 89 90 function processPromoItem(item) { 91 var description = item.find('description').text(); 92 return description 93 ? '<li>' + description + '</li>' 94 : ''; 95 } 96 97 98 // Set our playlist HTML when we know we have Internet access. 99 var playlistInitialized = false; 100 function initializePlaylist() { 101 if (!playlistInitialized) { 102 playlistInitialized = true; 103 $('#splashbox3') 104 .addClass('splashbox3-full') 105 .removeClass('splashbox3-empty') 106 .html('<iframe width="100%" height="100%" src="//www.youtube.com/embed/videoseries?list=PLN-ryIrpC_mCUW1DFwZpxpAk00i60lSkE&iv_load_policy=3&rel=0" frameborder="0" allowfullscreen></iframe>'); 107 } 108 } 109 110 // Get the daemon status JSON. 111 function getCoreStatus() { 112 setCoreStatusHTML('passiveonly', 'Checking process status...'); 113 114 $.get('<?php echo $cfg["cgi_base_url"];?>/statusjson.cgi?query=programstatus', function(d) { 115 d = d && d.data && d.data.programstatus || false; 116 if (d && d.nagios_pid) { 117 var pid = d.nagios_pid; 118 var daemon = d.daemon_mode ? 'Daemon' : 'Process'; 119 setCoreStatusHTML('enabled', daemon + ' running with PID ' + pid); 120 } else { 121 setCoreStatusHTML('disabled', 'Not running'); 122 } 123 }).fail(function() { 124 setCoreStatusHTML('disabled', 'Unable to get process status'); 125 }); 126 } 127 128 function setCoreStatusHTML(image, text) { 129 $('#core-status').html('<img src="images/' + image + '.gif" /> ' + text); 130 } 131</script> 132 133</head> 134 135 136<body id="splashpage"> 137 138 139<div id="mainbrandsplash"> 140 <div id="mainlogo"><a href="https://www.nagios.org/" target="_blank"><img src="images/logofullsize.png" border="0" alt="Nagios" title="Nagios"></a></div> 141 <div><span id="core-status"></span></div> 142</div> 143 144 145<div id="currentversioninfo"> 146 <div class="product">Nagios<sup><span style="font-size: small;">®</span></sup> Core<sup><span style="font-size: small;">™</span></sup></div> 147 <div class="version">Version <?php echo $this_version; ?></div> 148 <div class="releasedate">April 28, 2020</div> 149</div> 150 151 152<div id='splashrow0'> 153 <div id="splashbox0" class="splashbox-media"><!-- info banner feed --> 154 <div id="splashbox0-contents"></div> 155 </div> 156</div> 157 158 159<div id="splashboxes"> 160 161 <div id='splashrow1'> 162 163 <div id="splashbox1" class="splashbox splashbox-clear"> 164 <h2>Get Started</h2> 165 <ul> 166 <li><a href="https://go.nagios.com/nagioscore/startmonitoring" target="_blank">Start monitoring your infrastructure</a></li> 167 <li><a href="https://go.nagios.com/nagioscore/changelook" target="_blank">Change the look and feel of Nagios</a></li> 168 <li><a href="https://go.nagios.com/nagioscore/extend" target="_blank">Extend Nagios with hundreds of addons</a></li> 169 <!--<li><a href="https://go.nagios.com/nagioscore/docs" target="_blank">Read the Nagios documentation</a></li>--> 170 <li><a href="https://go.nagios.com/nagioscore/support" target="_blank">Get support</a></li> 171 <li><a href="https://go.nagios.com/nagioscore/training" target="_blank">Get training</a></li> 172 <li><a href="https://go.nagios.com/nagioscore/certification" target="_blank">Get certified</a></li> 173 </ul> 174 </div> 175 176 <div id="splashbox2" class="splashbox"> 177 <h2>Quick Links</h2> 178 <ul> 179 <li><a href="https://library.nagios.com" target="_blank">Nagios Library</a> (tutorials and docs)</li> 180 <li><a href="https://labs.nagios.com" target="_blank">Nagios Labs</a> (development blog)</li> 181 <li><a href="https://exchange.nagios.org" target="_blank">Nagios Exchange</a> (plugins and addons)</li> 182 <li><a href="https://support.nagios.com" target="_blank">Nagios Support</a> (tech support)</li> 183 <li><a href="https://www.nagios.com" target="_blank">Nagios.com</a> (company)</li> 184 <li><a href="https://www.nagios.org" target="_blank">Nagios.org</a> (project)</li> 185 </ul> 186 </div> 187 188 <div id="splashbox3" class="splashbox3-empty"><!-- youtube playlist --> 189 </div> 190 191 </div><!-- end splashrow1 --> 192 193 <div id="splashrow2"> 194 195 <div id="splashbox4" class="splashbox splashbox-clear"><!-- latest news feed --> 196 <h2>Latest News</h2> 197 <div id="splashbox4-contents"> 198 </div> 199 </div> 200 201 <div id="splashbox5" class="splashbox"><!-- core promo feed --> 202 <h2>Don't Miss...</h2> 203 <div id="splashbox5-contents"> 204 </div> 205 </div> 206 207 </div><!-- end splashrow2 --> 208 209</div><!-- end splashboxes--> 210 211 212<div id="mainfooter"> 213 <div id="maincopy"> 214 Copyright © 2010-<?php echo $this_year; ?> Nagios Core Development Team and Community Contributors. Copyright © 1999-2009 Ethan Galstad. See the THANKS file for more information on contributors. 215 </div> 216 <div CLASS="disclaimer"> 217 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>. 218 </div> 219 <div class="logos"> 220 <a href="https://www.nagios.org/" target="_blank"><img src="images/weblogo1.png" width="102" height="47" border="0" style="padding: 0 40px 0 40px;" title="Nagios.org" /></a> 221 <a href="http://sourceforge.net/projects/nagios" target="_blank"><img src="images/sflogo.png" width="88" height="31" border="0" alt="SourceForge.net Logo" /></a> 222 </div> 223</div> 224 225 226</body> 227</html> 228