From: Nicolas Boisselier Date: Sun, 25 Dec 2016 23:16:33 +0000 (+0000) Subject: posix_unma X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=5a0d74bc13baa94ffb190347991e07e5cd64ca3a;p=nb.git posix_unma --- diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index 9819a2c6..09f5dd5a 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -404,9 +404,7 @@ class DbQ extends nb { public function status() { $rows = []; - // -# NB 25.12.16 $rows[] = [ 'name' => $this->page->tag('h4','*APP'), 'value' => '' ]; - // + // Dbq if ($this->client_content_type()) $rows[] = [ 'name' => 'dbq.client_content_type', 'value' => $this->client_content_type(), @@ -424,9 +422,15 @@ class DbQ extends nb { 'value' => ($this->page->is('html') ? 1 : 0), ]; - // -# NB 25.12.16 $rows[] = [ 'name' => $this->page->tag('h4','*CLIENT HEADERS'), 'value' => '' ]; - // + // Machine + #if ($this->perm >= self::ADMIN) {} + if (function_exists('posix_uname')) { + foreach (posix_uname() as $k=>$v) { + $rows[] = [ 'name' => 'posix.uname.'.$k, 'value' => $v ]; + } + } + + // Client headers foreach ([ 'addr', ] as $k) { @@ -440,10 +444,7 @@ class DbQ extends nb { 'value' => ( is_scalar($v) ? $v : json_encode($v) ), ]; - // -# NB 25.12.16 $rows[] = [ 'name' => $this->page->tag('h4','*SERVER HEADERS'), 'value' => '' ]; - - // + // Envs foreach ([ 'addr', 'port', @@ -454,6 +455,8 @@ class DbQ extends nb { if ($v==='') continue; $rows[] = [ 'name' => 'server.'.$k, 'value' => $v ]; } + + // Server headers foreach (headers_list() as $v) { list($k,$v) = explode(': ',$v); $rows[] = [ @@ -462,8 +465,6 @@ class DbQ extends nb { ]; } - // - return $rows; }