diff --git a/include/config.php b/include/config.php index 8d6a3de..b6cdc91 100644 --- a/include/config.php +++ b/include/config.php @@ -1,7 +1,14 @@ SQL, true -> LDAP + $useLDAP = false; + $host = 'localhost'; + // 389 if your want to use LDAP $port = '3306'; + + // Unused with LDAP $db = 'openvpn-admin'; + $user = ''; $pass = ''; ?> diff --git a/include/connect.php b/include/connect.php index 0add7e4..f41e8c2 100644 --- a/include/connect.php +++ b/include/connect.php @@ -1,5 +1,5 @@ diff --git a/include/grids.php b/include/grids.php index 2af635d..8155b0c 100644 --- a/include/grids.php +++ b/include/grids.php @@ -4,8 +4,8 @@ if(!isset($_SESSION['admin_id'])) exit -1; - require(dirname(__FILE__) . '/connect.php'); - require(dirname(__FILE__) . '/functions.php'); + require_once(dirname(__FILE__) . '/connect.php'); + require_once(dirname(__FILE__) . '/functions.php'); // ---------------- SELECT ---------------- @@ -37,6 +37,12 @@ } } + else if ($_GET['select'] == "user_ldap") { + // Fake data for now + + echo json_encode([ [ "user_ldap_id" => "blabla", "user_ldap_online" => 1 ] ]); + } + // Select the logs else if($_GET['select'] == "log" && isset($_GET['offset'], $_GET['limit'])){ $offset = intval($_GET['offset']); diff --git a/include/html/grids.php b/include/html/grids.php index 2d7bad1..35291f4 100644 --- a/include/html/grids.php +++ b/include/html/grids.php @@ -1,35 +1,56 @@ - -