X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fadmin%2Fwhat-admins_add.php;h=dfe12659597ec07fb97e7abe2bf751058b37fa56;hb=c3b4eaf29946349ff058691db2dcb615a5379bb2;hp=6bb59018e13c2e22b2ee083721885b6ff9fa6590;hpb=e2148142f8b1a8f40fd6e7ca32185569c5a9083e;p=mailer.git diff --git a/inc/modules/admin/what-admins_add.php b/inc/modules/admin/what-admins_add.php index 6bb59018e1..dfe1265959 100644 --- a/inc/modules/admin/what-admins_add.php +++ b/inc/modules/admin/what-admins_add.php @@ -14,10 +14,9 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,22 +41,26 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { } // END - if // Add description as navigation point -addMenuDescription('admin', __FILE__); +addYouAreHereLink('admin', __FILE__); // Display form is default $FORM = true; -if ((isPostRequestElementSet('add')) && (isPostRequestElementSet('login')) && (isPostRequestElementSet('email')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')) && (postRequestElement('pass1') == postRequestElement('pass2'))) { - // Add admin when not added already - if (addAdminAccount(postRequestElement('login'), generateHash(postRequestElement('pass1')), postRequestElement('email')) == 'done') { - // Do not ouput any form! - $FORM = false; +// Is the form sent? +if (isFormSent('add')) { + // Check all + if ((isPostRequestParameterSet('login')) && (isPostRequestParameterSet('email')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2')) && (postRequestParameter('pass1') == postRequestParameter('pass2'))) { + // Add admin when not added already + if (addAdminAccount(postRequestParameter('login'), generateHash(postRequestParameter('pass1')), postRequestParameter('email')) == 'done') { + // Do not ouput any form! + $FORM = false; - // Admin login saved - loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ADD_DONE')); + // Admin login saved + loadTemplate('admin_settings_saved', false, '{--ADMIN_ADMINS_ADD_DONE--}'); - // Run filter chain - runFilterChain('post_admin_added', postRequestArray()); + // Run filter chain + runFilterChain('post_admin_added', postRequestArray()); + } // END - if } // END - if } // END - if @@ -70,7 +73,7 @@ if ($FORM === true) { ); // Load form from template - loadTemplate('admin_admins_add', false, $content); + loadTemplate('admin_add_admins', false, $content); } // END - if // [EOF]