| 
									
										
										
										
											2015-03-27 16:28:09 +00: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. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-11-21 14:12:59 -06:00
										 |  |  | $init_modules = array('web', 'auth'); | 
					
						
							|  |  |  | require realpath(__DIR__ . '/..') . '/includes/init.php'; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-08-05 14:16:05 -05:00
										 |  |  | if (!Auth::check()) { | 
					
						
							| 
									
										
										
										
											2019-04-11 23:26:42 -05:00
										 |  |  |     die('Unauthorized'); | 
					
						
							| 
									
										
										
										
											2016-11-21 14:12:59 -06:00
										 |  |  | } | 
					
						
							| 
									
										
										
										
											2015-03-27 16:28:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-09-07 18:42:49 +01:00
										 |  |  | set_debug($_REQUEST['debug']); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-05-03 16:51:01 -05:00
										 |  |  | $current = $_REQUEST['current']; | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | settype($current, 'integer'); | 
					
						
							| 
									
										
										
										
											2017-05-03 16:51:01 -05:00
										 |  |  | $rowCount = $_REQUEST['rowCount']; | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | settype($rowCount, 'integer'); | 
					
						
							| 
									
										
										
										
											2017-05-03 16:51:01 -05:00
										 |  |  | if (isset($_REQUEST['sort']) && is_array($_POST['sort'])) { | 
					
						
							|  |  |  |     foreach ($_REQUEST['sort'] as $k => $v) { | 
					
						
							| 
									
										
										
										
											2015-03-27 16:28:09 +00:00
										 |  |  |         $sort .= " $k $v"; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-11 23:26:42 -05:00
										 |  |  | $searchPhrase = $_REQUEST['searchPhrase']; | 
					
						
							|  |  |  | $id           = basename($_REQUEST['id']); | 
					
						
							| 
									
										
										
										
											2015-07-13 20:10:26 +02:00
										 |  |  | $response     = array(); | 
					
						
							| 
									
										
										
										
											2015-03-27 16:28:09 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2019-04-11 23:26:42 -05:00
										 |  |  | if ($id && file_exists("includes/html/table/$id.inc.php")) { | 
					
						
							|  |  |  |     header('Content-type: application/json'); | 
					
						
							|  |  |  |     include_once "includes/html/table/$id.inc.php"; | 
					
						
							| 
									
										
										
										
											2015-03-27 16:28:09 +00:00
										 |  |  | } |