login/post: prepend print button
[minimedit.git] / 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;