X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-admins_add.php;h=7dc2947f5358707cb5f47d97c2da9b20c09f8804;hb=9e604ce404fe7d2d8dafc259a5fb8cd826aec5e6;hp=f9b915cb30ce333586698205b3eb5dfec44d39c8;hpb=414570c5081d337bb6c28dcf521bd8bca02f69e7;p=mailer.git diff --git a/inc/modules/admin/what-admins_add.php b/inc/modules/admin/what-admins_add.php index f9b915cb30..7dc2947f53 100644 --- a/inc/modules/admin/what-admins_add.php +++ b/inc/modules/admin/what-admins_add.php @@ -10,10 +10,10 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Neues Administrator-Account anlegen * * -------------------------------------------------------------------- * - * $Revision:: 856 $ * - * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ * + * $Revision:: $ * + * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * - * $Author:: stelzi $ * + * $Author:: $ * * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * @@ -38,24 +38,24 @@ // Some security stuff... if ((!defined('__SECURITY')) || (!IS_ADMIN())) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); -} +} // END - if // Add description as navigation point -ADD_DESCR("admin", __FILE__); +ADD_DESCR('admin', __FILE__); // Display form is default $FORM = true; -if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('login'))) && (REQUEST_ISSET_POST(('email'))) && (REQUEST_ISSET_POST(('pass1'))) && (REQUEST_ISSET_POST(('pass2'))) && (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) { +if ((REQUEST_ISSET_POST('add')) && (REQUEST_ISSET_POST('login')) && (REQUEST_ISSET_POST('email')) && (REQUEST_ISSET_POST('pass1')) && (REQUEST_ISSET_POST('pass2')) && (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) { // Add admin when not added already - if (REGISTER_ADMIN(REQUEST_POST('login'), generateHash(REQUEST_POST('pass1')), REQUEST_POST('email')) == "done") { + if (REGISTER_ADMIN(REQUEST_POST('login'), generateHash(REQUEST_POST('pass1')), REQUEST_POST('email')) == 'done') { // Do not ouput any form! $FORM = false; // Admin login saved - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('ADMIN_ADMINS_ADD_DONE')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ADD_DONE')); // Run filter chain runFilterChain('post_admin_added', REQUEST_POST_ARRAY()); @@ -64,13 +64,14 @@ if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('login'))) && (REQUEST // Shall we display the form? if ($FORM === true) { - // Set missing elements - // @TODO Do we still need this ugly code here? - if (!REQUEST_ISSET_POST(('login'))) REQUEST_SET_POST('login', ""); - if (!REQUEST_ISSET_POST(('email'))) REQUEST_SET_POST('email', ""); + // Prepare content + $content = merge_array( + array('login' => '', 'email' => ''), + REQUEST_POST_ARRAY() + ); // Load form from template - LOAD_TEMPLATE("admin_admins_add"); + LOAD_TEMPLATE('admin_admins_add', false, $content); } // END - if //