diff options
Diffstat (limited to 'admin/auth.php')
-rw-r--r-- | admin/auth.php | 37 |
1 files changed, 14 insertions, 23 deletions
diff --git a/admin/auth.php b/admin/auth.php index cec8867..8c6d5a6 100644 --- a/admin/auth.php +++ b/admin/auth.php @@ -50,28 +50,19 @@ if(HTTP::issetPOST(['token' => Application::getSecurityToken()], 'username', 'pa } #=============================================================================== -# TRY: Template\Exception +# Build document #=============================================================================== -try { - $AuthTemplate = Template\Factory::build('auth'); - $AuthTemplate->set('FORM', [ - 'INFO' => $messages ?? [], - 'DATA' => [ - 'USERNAME' => HTTP::POST('username'), - 'PASSWORD' => HTTP::POST('password'), - ], - 'TOKEN' => Application::getSecurityToken() - ]); +$AuthTemplate = Template\Factory::build('auth'); +$AuthTemplate->set('FORM', [ + 'INFO' => $messages ?? [], + 'DATA' => [ + 'USERNAME' => HTTP::POST('username'), + 'PASSWORD' => HTTP::POST('password'), + ], + 'TOKEN' => Application::getSecurityToken() +]); - $MainTemplate = Template\Factory::build('main'); - $MainTemplate->set('NAME', 'Authentication'); - $MainTemplate->set('HTML', $AuthTemplate); - echo $MainTemplate; -} - -#=============================================================================== -# CATCH: Template\Exception -#=============================================================================== -catch(Template\Exception $Exception) { - Application::exit($Exception->getMessage()); -} +$MainTemplate = Template\Factory::build('main'); +$MainTemplate->set('NAME', 'Authentication'); +$MainTemplate->set('HTML', $AuthTemplate); +echo $MainTemplate; |