} catch (ATCExceptionDBError $e) { header("HTTP/1.0 500 Internal Server Error"); echo 'Caught exception: ', $e->getMessage(), "\n"; } catch (ATCExceptionDBConn $e) { header("HTTP/1.0 500 Internal Server Error"); echo 'Caught exception: ', $e->getMessage(), "\n"; } catch (ATCException $e) { header("HTTP/1.0 400 Bad Request"); echo 'Caught exception: ', $e->getMessage(), "\n"; } catch (Exception $e) { header("HTTP/1.0 500 Internal Server Error"); echo 'Caught exception: ', $e->getMessage(), "\n"; } } } if ($ATC->current_user_id()) { header('Location: ./', true, 302); } $ATC->gui_output_page_header('Login'); ?> <form method="post"> <fieldset> <legend> Login for access </legend> <label for="username">Username</label> <input type="text" name="username" id="username" value="<?php echo isset($_POST['username']) ? htmlentities($_POST['username']) : ''; ?> " required="required" maxlength="255" /><br /> <label for="password">Password</label> <input type="password" name="password" id="password" required="required" /><br /> <button type="submit" id="login">Login</button>