]> git.nbdom.net Git - nb.git/commitdiff
www/dbq/html/default.cs
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 19 Nov 2024 00:44:25 +0000 (01:44 +0100)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 19 Nov 2024 00:44:25 +0000 (01:44 +0100)
www/dbq/dbq.php
www/dbq/html/default.css

index 933a3ef4288996a118c7d0da9dbaca20fd8e5027..4c9ccbe6e37198d4a98b531739738a5164c021fd 100644 (file)
@@ -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');
 
index b966da80943c5ac6ac9eac995e53305e4b8593b2..763867d86715951964056481a457f7d88b9b4da6 100644 (file)
@@ -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);
 }