From ffcc23976f8769bd49f01724097901297e34cc77 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Tue, 19 Nov 2024 01:44:25 +0100 Subject: [PATCH] www/dbq/html/default.cs --- www/dbq/dbq.php | 34 +++++++++++++++++++--------------- www/dbq/html/default.css | 5 +++++ 2 files changed, 24 insertions(+), 15 deletions(-) diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index 933a3ef4..4c9ccbe6 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -1332,6 +1332,7 @@ EOF; while (true) { $line = next($lines); if ($line === false) break; + if ($line == 'PHP Credits') break; # No more interrested // Section if (strpos($line, '_______') === 1) { @@ -1341,37 +1342,40 @@ EOF; $section = next($lines); } #bye($section); - if ($section == 'PHP Credits') break; # No more interrested continue; } // Sub - if (substr(trim($line), -1) !== ',' and !strpos($line, '=>')) { + if (!empty($line) and substr(trim($line), -1) !== ',' and !strpos($line, '=>')) { $sub = $line; + #bye($sub); continue; } // Key => Val - if (preg_match('/(.*) => (.*)/',$line,$m)) { + $keyVal = explode(' => ',$line); + if (count($keyVal)>1) { + $key = array_shift($keyVal); + $val = array_shift($keyVal); + + // Add multi lines values + while (substr(trim($line), -1) === ',') { + $line = next($lines); + if ($line === false) break; + $val .= ' '.$line; + } + + #if ($key == 'Additional .ini files parsed') continue; $rows[] = [ 'section' => $section, 'sub' => $sub, - 'key' => $m[1], - 'val' => $m[2], + 'key' => $key, + 'val' => $val, ]; } - // Vals multi lines - while (substr(trim($line), -1) === ',') { - $line = next($lines); - if ($line === false) break; - #bye($line); - #$row = end($rows); - $idx = key($rows); - $rows[$idx]['val'] .= ' '.$line; - } - } + $this->page($rows); #$this->page($this,'phpinfo_rows'); diff --git a/www/dbq/html/default.css b/www/dbq/html/default.css index b966da80..763867d8 100644 --- a/www/dbq/html/default.css +++ b/www/dbq/html/default.css @@ -93,6 +93,11 @@ h1, h1 a, h1 a:hover { background-color: transparent; } +.db-row td { + max-width: 30vw; + word-wrap: break-word; +} + a.active, .active a { color: var(--danger); } -- 2.47.3