Replace individual includes with include/all.php for consistent configuration and add cookie-based authentication in all.php.

This commit is contained in:
2025-09-25 14:10:01 +02:00
parent 878106f83f
commit dcfe098f35
17 changed files with 40 additions and 23 deletions

View File

@@ -1,6 +1,6 @@
<?php
header('Content-Type: application/json');
include $_SERVER['DOCUMENT_ROOT']."/../../include/db_connect.php" ;
include $_SERVER['DOCUMENT_ROOT'] . "/include/all.php";
if (isset($_GET['term'])) {
$term = $_GET['term'];
$query = "SELECT hostname AS serv FROM cmdb_srvall WHERE hostname LIKE '%$term%' UNION SELECT hostname AS serv FROM x_SRVALL WHERE hostname LIKE '%$term%'";