login/post: prepend print button
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 15 Oct 2019 03:17:25 +0000 (05:17 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 16 Oct 2019 16:40:52 +0000 (18:40 +0200)
login/post/index.php

index c3439a18c9453fbc84333bf837d222d1e24e29fe..2f6a9f93b123a0d89ac4b414852c426349b7d940 100644 (file)
@@ -1,4 +1,6 @@
 <?php
+$body = ob_get_clean();
+
 if ($username = @$_REQUEST['login']) {
        try {
                $user = new User("profile/$username");
@@ -21,3 +23,9 @@ if ( $password = trim(@file_get_contents("{$user->dir}/.passwd")) ) {
        }
        $Place['pass'] = htmlspecialchars($password) ?: '<em>zelf ingesteld</em>';
 }
+else {
+       $Place['pass'] = '<em>onbekend</em>';
+}
+
+print '<p class="nav right"><a href="javascript:window.print()">Print</a></p>'."\n";
+print $body;