]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-mydata.php
A lot CSS classes rewritten, please update all your themes.
[mailer.git] / inc / modules / member / what-mydata.php
index 28a0f11ad17e9ce30c0bb68ab711534a091b217a..23f0b933c34cff8802c6b1047bb753b999a7d438 100644 (file)
@@ -53,9 +53,7 @@ if ((!isExtensionActive('mydata')) && (!isAdmin())) {
 } // END - if
 
 // Add userid
-$content = array(
-       'userid' => getMemberId()
-);
+$content = array();
 
 // Init variable to prevent notices
 $url = '';
@@ -77,7 +75,7 @@ switch ($mode) {
                // How far is last change on his profile away from now?
                if ((($content['last_update'] + getConfig('profile_lock')) > time()) && (!isAdmin()) && (getConfig('profile_lock') > 0)) {
                        // You cannot change your account
-                       $content['change'] = loadTemplate('admin_settings_saved', true, '<div class="member_failed">' . getMaskedMessage('MEMBER_PROFILE_LOCKED', generateDateTime($content['last_update'] + getConfig('profile_lock'), 0)) . '</div>');
+                       $content['change'] = loadTemplate('admin_settings_saved', true, '<div class="notice">' . getMaskedMessage('MEMBER_PROFILE_LOCKED', generateDateTime($content['last_update'] + getConfig('profile_lock'), 0)) . '</div>');
                } else {
                        // He is allowed to change his profile
                        $content['change'] = loadTemplate('member_mydata_button', true);
@@ -172,15 +170,15 @@ LIMIT 1",
 
                        if (isExtensionActive('country')) {
                                // Generate selection box
-                               $OUT  = "<select name=\"country_code\" class=\"member_select\" size=\"1\">\n";
+                               $OUT  = '<select name="country_code" class="form_select" size="1">';
                                $whereStatement = "WHERE `is_active`='Y'";
                                if (isAdmin()) $whereStatement = '';
                                $OUT .= generateOptionList('countries', 'id', 'descr', $content['country_code'], 'code', $whereStatement);
-                               $OUT .= "</select>";
+                               $OUT .= '</select>';
                                $content['country'] = $OUT;
                        } else {
                                // Ouput default input box
-                               $content['country'] = '<input type="text" name="cntry" class="member_normal" size="2" maxlength="3" value="' . $content['country'] . '" />';
+                               $content['country'] = '<input type="text" name="cntry" class="form_field" size="2" maxlength="3" value="' . $content['country'] . '" />';
                        }
 
                        // Load template
@@ -203,7 +201,7 @@ LIMIT 1",
                        loadTemplate('admin_settings_saved', false, $content['update_check']);
                } elseif ((!isEmailValid(postRequestParameter('email'))) && (!isAdmin())) {
                        // Invalid email address!
-                       loadTemplate('admin_settings_saved', false, getMessage('INVALID_EMAIL_ENTERED'));
+                       loadTemplate('admin_settings_saved', false, '{--INVALID_EMAIL_ENTERED--}');
                } else {
                        // Generate hash
                        $hash = generateHash(postRequestParameter('pass1'), substr($content['password'], 0, -40));
@@ -215,7 +213,7 @@ LIMIT 1",
                                // Did the user changed the password?
                                if ($hash != $content['password']) {
                                        $AND = ", `password`='" . $hash . "'";
-                                       $mode = 'pass';
+                                       $mode = 'password';
                                } // END - if
 
                                // Or did he changed his password?
@@ -305,11 +303,11 @@ LIMIT 1",
                                        sendModeMails ('mydata', $modes);
                                } else {
                                        // Something went wrong
-                                       loadTemplate('admin_settings_saved', false, getMessage('MEMBER_UPDATE_FAILED'));
+                                       loadTemplate('admin_settings_saved', false, '{--MEMBER_UPDATE_FAILED--}');
                                }
                        } else {
                                // Entered wrong pass for updating profile
-                               loadTemplate('admin_settings_saved', false, getMessage('MEBER_UPDATE_PWD_WRONG'));
+                               loadTemplate('admin_settings_saved', false, '{--MEBER_UPDATE_PWD_WRONG--}');
                        }
                }
                break;
@@ -317,7 +315,7 @@ LIMIT 1",
        case 'notify': // Switch off notfication
                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `notified`='N', `last_update`=UNIX_TIMESTAMP() WHERE `userid`=%s LIMIT 1",
                        array(getMemberId()), __FILE__, __LINE__);
-               $url = 'modules.php?module=login&amp;what=welcome&amp;code=' . urlencode(getMessage('PROFILE_UPDATED'));
+               $url = 'modules.php?module=login&amp;what=mydata&amp;code=' . getCode('PROFILE_UPDATED');
                break;
 } // END - switch