| 
									
										
										
										
											2016-08-12 09:58:16 -05:00
										 |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* | 
					
						
							|  |  |  |  * LibreNMS | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Copyright (c) 2014 Neil Lathwood <https://github.com/laf/ http://www.lathwood.co.uk/fa> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is free software: you can redistribute it and/or modify it | 
					
						
							|  |  |  |  * under the terms of the GNU General Public License as published by the | 
					
						
							|  |  |  |  * Free Software Foundation, either version 3 of the License, or (at your | 
					
						
							|  |  |  |  * option) any later version.  Please see LICENSE.txt at the top level of | 
					
						
							|  |  |  |  * the source code distribution for details. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-07-01 15:28:29 -05:00
										 |  |  | session_start(); | 
					
						
							| 
									
										
										
										
											2019-10-26 00:29:12 +00:00
										 |  |  | session_write_close(); | 
					
						
							| 
									
										
										
										
											2017-07-01 15:28:29 -05:00
										 |  |  | if (isset($_SESSION['stage']) && $_SESSION['stage'] == 2) { | 
					
						
							|  |  |  |     $init_modules = array('web', 'nodb'); | 
					
						
							|  |  |  |     require realpath(__DIR__ . '/..') . '/includes/init.php'; | 
					
						
							|  |  |  | } else { | 
					
						
							|  |  |  |     $init_modules = array('web', 'auth', 'alerts'); | 
					
						
							|  |  |  |     require realpath(__DIR__ . '/..') . '/includes/init.php'; | 
					
						
							| 
									
										
										
										
											2016-11-21 14:12:59 -06:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-05 14:16:05 -05:00
										 |  |  |     if (!Auth::check()) { | 
					
						
							| 
									
										
										
										
											2019-04-11 23:26:42 -05:00
										 |  |  |         die('Unauthorized'); | 
					
						
							| 
									
										
										
										
											2017-07-01 15:28:29 -05:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2016-11-21 14:12:59 -06:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2016-08-12 09:58:16 -05:00
										 |  |  | 
 | 
					
						
							|  |  |  | set_debug($_REQUEST['debug']); | 
					
						
							| 
									
										
										
										
											2019-04-11 23:26:42 -05:00
										 |  |  | $id = basename($_REQUEST['id']); | 
					
						
							| 
									
										
										
										
											2016-08-12 09:58:16 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-06-23 00:29:12 -05:00
										 |  |  | if ($id && is_file(\LibreNMS\Config::get('install_dir') . "/includes/html/output/$id.inc.php")) { | 
					
						
							|  |  |  |     require \LibreNMS\Config::get('install_dir') . "/includes/html/output/$id.inc.php"; | 
					
						
							| 
									
										
										
										
											2016-08-12 09:58:16 -05:00
										 |  |  | } |