diff options
Diffstat (limited to 'admin/user/insert.php')
-rw-r--r-- | admin/user/insert.php | 44 |
1 files changed, 17 insertions, 27 deletions
diff --git a/admin/user/insert.php b/admin/user/insert.php index 53d35df..59b9444 100644 --- a/admin/user/insert.php +++ b/admin/user/insert.php @@ -40,30 +40,20 @@ if(HTTP::issetPOST('id', 'slug', 'username', 'password', 'fullname', 'mailaddr', } #=============================================================================== -# TRY: Template\Exception -#=============================================================================== -try { - $FormTemplate = Template\Factory::build('user/form'); - $FormTemplate->set('FORM', [ - 'TYPE' => 'INSERT', - 'INFO' => $messages ?? [], - 'DATA' => array_change_key_case($Attribute->getAll(['password']), CASE_UPPER), - 'TOKEN' => Application::getSecurityToken() - ]); - - $InsertTemplate = Template\Factory::build('user/insert'); - $InsertTemplate->set('HTML', $FormTemplate); - - $MainTemplate = Template\Factory::build('main'); - $MainTemplate->set('NAME', $Language->text('title_user_insert')); - $MainTemplate->set('HTML', $InsertTemplate); - echo $MainTemplate; -} - -#=============================================================================== -# CATCH: Template\Exception -#=============================================================================== -catch(Template\Exception $Exception) { - Application::exit($Exception->getMessage()); -} -?>
\ No newline at end of file +# Build document +#=============================================================================== +$FormTemplate = Template\Factory::build('user/form'); +$FormTemplate->set('FORM', [ + 'TYPE' => 'INSERT', + 'INFO' => $messages ?? [], + 'DATA' => array_change_key_case($Attribute->getAll(['password']), CASE_UPPER), + 'TOKEN' => Application::getSecurityToken() +]); + +$InsertTemplate = Template\Factory::build('user/insert'); +$InsertTemplate->set('HTML', $FormTemplate); + +$MainTemplate = Template\Factory::build('main'); +$MainTemplate->set('NAME', $Language->text('title_user_insert')); +$MainTemplate->set('HTML', $InsertTemplate); +echo $MainTemplate; |