]> git.nbdom.net Git - nb.git/commitdiff
www/dbq/dbq.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 7 Jan 2018 05:27:20 +0000 (05:27 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sun, 7 Jan 2018 05:27:20 +0000 (05:27 +0000)
www/dbq/dbq.php

index 8fe08cf8b1afc0a190ff5f6376061cd269937e8a..8b06f3d24d63c47c337abf43a54d2781b426cac9 100644 (file)
@@ -281,6 +281,17 @@ class DbQ extends nb {
 
                        $bottom = [];
 
+                       if ($this->http_user()) {
+                               $bottom[] = '<a href="/logout"'
+                                       .' style="background:url(\'/ldap/jpegPhoto.jpg?w=20\') right no-repeat;padding-right:22px"'
+                                       .'>Logout: '
+                                       .$this->http_user()
+                                       .' (can: '.$this->perm2h().')'
+                                       #.'<img src="/ldap/jpegPhoto.jpg?w=20" />'
+                               .'</a>';
+                       }
+
+
                        if ($this->perm >= self::ADMIN and !empty($this->db->pdo)) {
                                $r = [
                                '/(^|;)password=[^;]*/' => '',
@@ -289,16 +300,6 @@ class DbQ extends nb {
                                $bottom[] = 'Database: '.preg_replace(array_keys($r),$r,$this->db->pdo);
                        }
 
-                       #debug($_SERVER);
-                       if ($this->http_user()) $bottom[] = '<a href="/logout">Logout: '
-                               .$this->http_user()
-                       .' (can: '.$this->perm2h().')'.'</a>';
-
-                       if ($this->perm >= self::READ) {
-                       #echo '<img src="/ldap/jpegPhoto.png?w=25" />';
-                       #$bottom[] = '<object type="image/jpeg" data="/ldap/jpegPhoto.bin"></object>';
-                       }
-
                        if ($bottom and $this->page->is('html')) echo $this->page->tag('div class="block" style="display:inline-block"',join('<br />'.NB_EOL,$bottom));
 
                        $this->page->end();