]> git.mxchange.org Git - mailer.git/commitdiff
Renamed form fields to separate them from others
authorRoland Häder <roland@mxchange.org>
Fri, 29 Jul 2011 21:19:17 +0000 (21:19 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 29 Jul 2011 21:19:17 +0000 (21:19 +0000)
inc/modules/admin.php
templates/de/emails/admin/admin_reset_password.tpl
templates/de/html/admin/admin_login_form.tpl
templates/de/html/admin/admin_reg_form.tpl
templates/de/html/admin/admin_reset_password_form.tpl

index d2b5e4cf246619045a0ecc7244b04677319f3372..a7e7831afaeded8fe786196b07e856cc00c3a23f 100644 (file)
@@ -52,7 +52,7 @@ $ret = 'init';
 // Is no admin registered?
 if (!isAdminRegistered()) {
        // Admin is not registered so we have to inform the user
-       if ((isFormSent()) && ((!isPostRequestParameterSet('login')) || (!isPostRequestParameterSet('pass1')) || (strlen(postRequestParameter('pass1')) < getConfig('minium_admin_pass_length')) || (!isPostRequestParameterSet('pass2')) || (strlen(postRequestParameter('pass2')) < getConfig('minium_admin_pass_length')) || (postRequestParameter('pass1') != postRequestParameter('pass2')))) {
+       if ((isFormSent()) && ((!isPostRequestParameterSet('admin_login')) || (!isPostRequestParameterSet('admin_pass1')) || (strlen(postRequestParameter('admin_pass1')) < getConfig('minium_admin_pass_length')) || (!isPostRequestParameterSet('admin_pass2')) || (strlen(postRequestParameter('admin_pass2')) < getConfig('minium_admin_pass_length')) || (postRequestParameter('admin_pass1') != postRequestParameter('admin_pass2')))) {
                setPostRequestParameter('ok', '***');
        } // END - if
 
@@ -61,13 +61,13 @@ if (!isAdminRegistered()) {
 
        if ((isFormSent()) && (postRequestParameter('ok') != '***')) {
                // Hash the password with the old function because we are here in install mode
-               $hashedPass = md5(postRequestParameter('pass1'));
+               $hashedPass = md5(postRequestParameter('admin_pass1'));
 
                // Kill maybe existing session variables
                destroyAdminSession(false);
 
                // Do registration
-               $ret = addAdminAccount(postRequestParameter('login'), $hashedPass, getWebmaster());
+               $ret = addAdminAccount(postRequestParameter('admin_login'), $hashedPass, getWebmaster());
 
                // Check if registration wents fine
                switch ($ret) {
@@ -116,9 +116,9 @@ if (!isAdminRegistered()) {
        // Whas that action okay?
        if ($ret != 'done') {
                // Init login name
-               $content['login'] = '';
-               if (isPostRequestParameterSet('login')) {
-                       $content['login'] = postRequestParameter('login');
+               $content['admin_login'] = '';
+               if (isPostRequestParameterSet('admin_login')) {
+                       $content['admin_login'] = postRequestParameter('admin_login');
                } // END - if
 
                // Init array elements
@@ -135,7 +135,7 @@ if (!isAdminRegistered()) {
                        $pass2Message = '';
 
                        // No login entered?
-                       if (empty($content['login'])) {
+                       if (empty($content['admin_login'])) {
                                $loginMessage = '{--ADMIN_NO_LOGIN--}';
                        } // END - if
 
@@ -145,21 +145,21 @@ if (!isAdminRegistered()) {
                        } // END - if
 
                        // No password 1 entered or to short?
-                       if (!isPostRequestParameterSet('pass1')) {
+                       if (!isPostRequestParameterSet('admin_pass1')) {
                                $pass1Message = '{--ADMIN_NO_PASS1--}';
-                       } elseif (strlen(postRequestParameter('pass1')) < getConfig('minium_admin_pass_length')) {
+                       } elseif (strlen(postRequestParameter('admin_pass1')) < getConfig('minium_admin_pass_length')) {
                                $pass1Message = '{--ADMIN_SHORT_PASS1--}';
                        }
 
                        // No password 2 entered or to short?
-                       if (!isPostRequestParameterSet('pass2')) {
+                       if (!isPostRequestParameterSet('admin_pass2')) {
                                $pass2Message = '{--ADMIN_NO_PASS2--}';
-                       } elseif (strlen(postRequestParameter('pass2')) < getConfig('minium_admin_pass_length')) {
+                       } elseif (strlen(postRequestParameter('admin_pass2')) < getConfig('minium_admin_pass_length')) {
                                $pass2Message = '{--ADMIN_SHORT_PASS2--}';
                        }
 
                        // Both didn't match?
-                       if (postRequestParameter('pass1') != postRequestParameter('pass2')) {
+                       if (postRequestParameter('admin_pass1') != postRequestParameter('admin_pass2')) {
                                // No match
                                if (empty($pass1Message)) $pass1Message = '{--ADMIN_PASS1_MISMATCH--}';
                                if (empty($pass2Message)) $pass2Message = '{--ADMIN_PASS2_MISMATCH--}';
@@ -186,16 +186,16 @@ if (!isAdminRegistered()) {
        } elseif (isGetRequestParameterSet('hash')) {
                // Output form for hash validation
                loadTemplate('admin_validate_reset_hash_form', false, getRequestParameter('hash'));
-       } elseif ((isPostRequestParameterSet('validate_hash')) && (isPostRequestParameterSet('login')) && (isPostRequestParameterSet('hash'))) {
+       } elseif ((isPostRequestParameterSet('validate_hash')) && (isPostRequestParameterSet('admin_login')) && (isPostRequestParameterSet('hash'))) {
                // Validate the login data and hash
-               $valid = adminResetValidateHashLogin(postRequestParameter('hash'), postRequestParameter('login'));
+               $valid = adminResetValidateHashLogin(postRequestParameter('hash'), postRequestParameter('admin_login'));
 
                // Valid?
                if ($valid === true) {
                        // Prepare content first
                        $content = array(
                                'hash'  => postRequestParameter('hash'),
-                               'login' => postRequestParameter('login')
+                               'admin_login' => postRequestParameter('admin_login')
                        );
 
                        // Validation okay so display form for final password change
@@ -204,11 +204,11 @@ if (!isAdminRegistered()) {
                        // Cannot validate the login data and hash
                        displayMessage('{--ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED--}');
                }
-       } elseif ((isPostRequestParameterSet('reset_pass')) && (isPostRequestParameterSet('hash')) && (isPostRequestParameterSet('login')) && (isPostRequestParameterSet('pass1')) && (postRequestParameter('pass1') == postRequestParameter('pass2'))) {
+       } elseif ((isPostRequestParameterSet('reset_pass')) && (isPostRequestParameterSet('hash')) && (isPostRequestParameterSet('admin_login')) && (isPostRequestParameterSet('admin_pass1')) && (postRequestParameter('admin_pass1') == postRequestParameter('admin_pass2'))) {
                // Okay, we shall the admin password here. So first revalidate the hash
-               if (adminResetValidateHashLogin(postRequestParameter('hash'), postRequestParameter('login'))) {
+               if (adminResetValidateHashLogin(postRequestParameter('hash'), postRequestParameter('admin_login'))) {
                        // Output result
-                       loadTemplate('admin_reset_password_done', false, doResetAdminPassword(postRequestParameter('login'), postRequestParameter('pass1')));
+                       loadTemplate('admin_reset_password_done', false, doResetAdminPassword(postRequestParameter('admin_login'), postRequestParameter('admin_pass1')));
                } else {
                        // Validation failed
                        displayMessage('{--ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2--}');
@@ -233,13 +233,13 @@ if (!isAdminRegistered()) {
        } // END - if
 
        // Check if the admin has submitted data or not
-       if ((isFormSent()) && ((!isPostRequestParameterSet('login')) || (!isPostRequestParameterSet('password')) || (strlen(postRequestParameter('password')) < getConfig('minium_admin_pass_length')))) {
+       if ((isFormSent()) && ((!isPostRequestParameterSet('admin_login')) || (!isPostRequestParameterSet('admin_password')) || (strlen(postRequestParameter('admin_password')) < getConfig('minium_admin_pass_length')))) {
                setPostRequestParameter('ok', '***');
        } // END - if
 
        if ((isFormSent()) && (postRequestParameter('ok') != '***')) {
                // All required data was entered so we check his account
-               $ret = ifAdminLoginDataIsValid(postRequestParameter('login'), postRequestParameter('password'));
+               $ret = ifAdminLoginDataIsValid(postRequestParameter('admin_login'), postRequestParameter('admin_password'));
 
                // Which status do we have?
                switch ($ret) {
@@ -267,7 +267,7 @@ if (!isAdminRegistered()) {
 
                        case '404': // Administrator login not found
                                setPostRequestParameter('ok', $ret);
-                               $ret = '{%message,ADMIN_ACCOUNT_404=' . postRequestParameter('login') . '%}';
+                               $ret = '{%message,ADMIN_ACCOUNT_404=' . postRequestParameter('admin_login') . '%}';
                                destroyAdminSession();
                                break;
 
@@ -285,9 +285,9 @@ if (!isAdminRegistered()) {
 
        // Error detected?
        if ($ret != 'done') {
-               $content['login'] = '';
-               if (isPostRequestParameterSet('login')) {
-                       $content['login'] = postRequestParameter('login');
+               $content['admin_login'] = '';
+               if (isPostRequestParameterSet('admin_login')) {
+                       $content['admin_login'] = postRequestParameter('admin_login');
                } // END - if
 
                // Init array elements
@@ -300,7 +300,7 @@ if (!isAdminRegistered()) {
                        $passwdMessage = '';
 
                        // Check for login
-                       if (!isPostRequestParameterSet('login')) {
+                       if (!isPostRequestParameterSet('admin_login')) {
                                // No login entered?
                                $loginMessage = '{--ADMIN_NO_LOGIN--}';
                        } elseif ((!empty($ret)) && (postRequestParameter('ok') == '404')) {
@@ -309,10 +309,10 @@ if (!isAdminRegistered()) {
                        }
 
                        // Check for password
-                       if (!isPostRequestParameterSet('password')) {
+                       if (!isPostRequestParameterSet('admin_password')) {
                                // No password entered?
                                $passwdMessage = '{--ADMIN_NO_PASS--}';
-                       } elseif (strlen(postRequestParameter('password')) < getConfig('minium_admin_pass_length')) {
+                       } elseif (strlen(postRequestParameter('admin_password')) < getConfig('minium_admin_pass_length')) {
                                // Or password too short?
                                $passwdMessage = '{--ADMIN_SHORT_PASS--}';
                        } elseif ((!empty($ret)) && (postRequestParameter('ok') == 'password')) {
index beab4d17d7ee0b5a07c02589fc1cc03956b48e00..1fdd94a2904863d4c7defd96bf858a49fcadf3a0 100644 (file)
@@ -9,7 +9,7 @@ hier ist Ihr angefordeter Reset-Link, den Sie zum Zur&uuml;cksetzen Ihres Admini
 Wenn Sie auf diesen Link klicken, ist Ihr Passwort noch nicht zur&uuml;ckgesetzt. Bitte geben Sie zur Best&auml;tigung Ihr Loginname ein. Dann erst k&ouml;nnen Sie Ihr Passwort &auml;ndern.
 
 Hier ist Ihr Loginname:
-$content[login]
+$content[admin_login]
 
 Sollten Sie dies nicht gewesen sein, so ignorieren Sie einfach diese Mail. Hier sind die IP-Nummer und Browserbezeichnung:
 ------------------------------
index 855ad62bfc74194e7b3ad59055ebe8e4a8f38b3a..0166df915a5ad4baad2241a14524f82a8540ee75 100644 (file)
@@ -14,7 +14,7 @@
        <tr>
                <td align="right">{--ENTER_ADMIN_LOGIN--}:</td>
                <td>
-                       <input type="text" class="form_field" name="login" tabindex="1" size="20" maxlength="100" value="$content[login]" />
+                       <input type="text" class="form_field" name="admin_login" tabindex="1" size="20" maxlength="100" value="$content[admin_login]" />
                </td>
        </tr>
        $content[login_message]
@@ -26,7 +26,7 @@
                        </div>
                </td>
                <td class="bottom">
-                       <input type="password" class="form_field" name="password" tabindex="2" size="20" maxlength="100" />
+                       <input type="password" class="form_field" name="admin_password" tabindex="2" size="20" maxlength="100" />
                </td>
        </tr>
        $content[pass_message]
index bd841b51d6879d78d18a1609b31e54029c083f47..59b90a82568ffc5a5c913d349aeae0cea9eede90 100644 (file)
        <tr>
                <td align="right">{--ADMIN_ACCOUNT_FIRST_CREATION_LOGIN--}:</td>
                <td>
-                       <input type="text" class="form_field" name="login" size="20" maxlength="100" value="$content[login]" />
+                       <input type="text" class="form_field" name="admin_login" size="20" maxlength="100" value="$content[admin_login]" />
                </td>
        </tr>
        $content[login_message]
        <tr>
                <td align="right">{--ADMIN_ACCOUNT_FIRST_CREATION_PASS1--}:</td>
                <td>
-                       <input type="password" class="form_field" name="pass1" size="20" maxlength="255" />
+                       <input type="password" class="form_field" name="admin_pass1" size="20" maxlength="255" />
                </td>
        </tr>
        $content[pass1_message]
        <tr>
                <td align="right">{--ADMIN_ACCOUNT_FIRST_CREATION_PASS2--}:</td>
                <td>
-                       <input type="password" class="form_field" name="pass2" size="20" maxlength="255" />
+                       <input type="password" class="form_field" name="admin_pass2" size="20" maxlength="255" />
                </td>
        </tr>
        $content[pass2_message]
index 48888c25c3966c429f9cbe4fffeefb91cafec9fe..d769ab9803e50c1d3640a52f290e271e0f8ce03d 100644 (file)
@@ -11,7 +11,7 @@
                {--ADMIN_SHOW_LOGIN--}
        </td>
        <td class="bottom">
-               <div><strong>$content[login]</strong></div>
+               <div><strong>$content[admin_login]</strong></div>
                <div>[<a href="{%url=modules.php?module=admin&amp;reset_pass=1%}">{--ADMIN_CHANGE_LOGIN--}</a>]</div>
        </td>
 </tr>
@@ -20,7 +20,7 @@
                {--ADMIN_ENTER_PASSWORD1--}
        </td>
        <td class="bottom">
-               <input type="password" class="form_field" name="pass1" size="20" maxlength="255" />
+               <input type="password" class="form_field" name="admin_pass1" size="20" maxlength="255" />
        </td>
 </tr>
 <tr>
                {--ADMIN_ENTER_PASSWORD2--}
        </td>
        <td class="bottom">
-               <input type="password" class="form_field" name="pass2" size="20" maxlength="255" />
+               <input type="password" class="form_field" name="admin_pass2" size="20" maxlength="255" />
        </td>
 </tr>
 <tr>
        <td class="table_footer" colspan="2">
                <input type="hidden" name="hash" value="$content[hash]" />
-               <input type="hidden" name="login" value="$content[login]" />
+               <input type="hidden" name="login" value="$content[admin_login]" />
                <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
                <input type="submit" name="reset_pass" class="form_submit" value="{--ADMIN_RESET_PASSWORD_SUBMIT--}" />
        </td>