]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-mydata.php
Fixed logfile writing in installation phase, .revision is now ignored
[mailer.git] / inc / modules / member / what-mydata.php
index f863e221df5afe8ce35160c0aa87736f3b1f21bc..2db92cb197e4b3ce6f37053a92b3327cef46d287 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Mitglieder koennen hier ihre Profildaten aendern *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision:: 856                                                    $ *
+ * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009)              $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author:: stelzi                                                   $ *
+ * Needs to be in all Files and every File needs "svn propset           *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
  * For more information visit: http://www.mxchange.org                  *
@@ -38,7 +43,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        LOAD_URL("modules.php?module=index");
 } elseif ((!EXT_IS_ACTIVE("mydata")) && (!IS_ADMIN())) {
-       addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mydata");
+       addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "mydata");
        return;
 }
 
@@ -49,9 +54,9 @@ define('UID_VALUE', $GLOBALS['userid']); $URL = "";
 
 // Detect what the member wants to do
 $MODE = "show"; // Show his data
-if (!empty($_POST['save']))   $MODE = "save";   // Save entered data
-if (isset($_POST['edit']))   $MODE = "edit";   // Edit data
-if (!empty($_POST['notify'])) $MODE = "notify"; // Switch off notification
+if (REQUEST_ISSET_POST(('save')))   $MODE = "save";   // Save entered data
+if (REQUEST_ISSET_POST('edit'))    $MODE = "edit";   // Edit data
+if (REQUEST_ISSET_POST(('notify'))) $MODE = "notify"; // Switch off notification
 
 switch ($MODE)
 {
@@ -75,7 +80,7 @@ case "show": // Show his data
        // How far is last change on his profile away from now?
        if ((($DATA[13] + getConfig('profile_lock')) > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
                // You cannot change your account
-               define('CHANGE', "<div class=\"member_failed\">".MEMBER_PROFILE_LOCKED_1.MAKE_DATETIME($DATA[13] + getConfig('profile_lock'), "0").MEMBER_PROFILE_LOCKED_2."</div>");
+               define('CHANGE', "<div class=\"member_failed\">".sprintf(getMessage('MEMBER_PROFILE_LOCKED'), MAKE_DATETIME($DATA[13] + getConfig('profile_lock'), "0"))."</div>");
        } else {
                // He is allowed to change his profile
                define('CHANGE', LOAD_TEMPLATE("member_mydata_button", true));
@@ -194,13 +199,13 @@ case "save": // Save entered data
                $DATA[3] = MAKE_DATETIME($DATA[3] + getConfig('profile_lock'), "0");
                // You cannot change your account
                LOAD_TEMPLATE("member_mydata_locked");
-       } elseif (!VALIDATE_EMAIL($_POST['addy'])) {
+       } elseif (!VALIDATE_EMAIL(REQUEST_POST('addy'))) {
                // Invalid email address!
                LOAD_TEMPLATE("admin_settings_saved", false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED'));
        } else {
                // Generate hash
-               $hash = generateHash($_POST['pass1'], substr($DATA[1], 0, -40));
-               if ((($hash == $DATA[1]) || ($_POST['pass1'] == $_POST['pass2'])) && (!empty($_POST['pass1']))) {
+               $hash = generateHash(REQUEST_POST('pass1'), substr($DATA[1], 0, -40));
+               if ((($hash == $DATA[1]) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) && (REQUEST_ISSET_POST(('pass1')))) {
                        // Only on simple changes normal mode is active = no email or password changed
                        $MODE = "normal"; $AND = "";
 
@@ -208,10 +213,10 @@ case "save": // Save entered data
                        if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $MODE = "pass"; }
 
                        // Or did he changed his password?
-                       if ($_POST['addy'] != $DATA[0]) {
+                       if (REQUEST_POST('addy') != $DATA[0]) {
                                // Jupp
                                if ($MODE == "normal") { $MODE = "email"; } else { $MODE .= ";email"; }
-                               $_POST['old_addy'] = $DATA[0];
+                               REQUEST_SET_POST('old_addy', $DATA[0]);
                        }
 
                        // Update member's profile
@@ -229,18 +234,18 @@ notified='N',
 last_profile_sent=UNIX_TIMESTAMP()
 WHERE userid=%s AND password='%s' LIMIT 1",
 array(
-       $_POST['gender'],
-       $_POST['surname'],
-       $_POST['family_name'],
-       $_POST['street_nr'],
-       bigintval($_POST['country_code']),
-       bigintval($_POST['zip']),
-       $_POST['city'],
-       $_POST['addy'],
-       bigintval($_POST['day']),
-       bigintval($_POST['month']),
-       bigintval($_POST['year']),
-       bigintval($_POST['max_mails']),
+       REQUEST_POST('gender'),
+       REQUEST_POST('surname'),
+       REQUEST_POST('family'),
+       REQUEST_POST('street_nr'),
+       bigintval(REQUEST_POST('country_code')),
+       bigintval(REQUEST_POST('zip')),
+       REQUEST_POST('city'),
+       REQUEST_POST('addy'),
+       bigintval(REQUEST_POST('day')),
+       bigintval(REQUEST_POST('month')),
+       bigintval(REQUEST_POST('year')),
+       bigintval(REQUEST_POST('max_mails')),
        UID_VALUE,
        get_session('u_hash')
  ), __FILE__, __LINE__);
@@ -258,18 +263,18 @@ notified='N',
 last_profile_sent=UNIX_TIMESTAMP()
 WHERE userid=%s AND password='%s' LIMIT 1",
 array(
-       $_POST['gender'],
-       $_POST['surname'],
-       $_POST['family_name'],
-       $_POST['street_nr'],
-       $_POST['cntry'],
-       bigintval($_POST['zip']),
-       $_POST['city'],
-       $_POST['addy'],
-       bigintval($_POST['day']),
-       bigintval($_POST['month']),
-       bigintval($_POST['year']),
-       bigintval($_POST['max_mails']),
+       REQUEST_POST('gender'),
+       REQUEST_POST('surname'),
+       REQUEST_POST('family'),
+       REQUEST_POST('street_nr'),
+       REQUEST_POST('cntry'),
+       bigintval(REQUEST_POST('zip')),
+       REQUEST_POST('city'),
+       REQUEST_POST('addy'),
+       bigintval(REQUEST_POST('day')),
+       bigintval(REQUEST_POST('month')),
+       bigintval(REQUEST_POST('year')),
+       bigintval(REQUEST_POST('max_mails')),
        UID_VALUE,
        get_session('u_hash')
  ), __FILE__, __LINE__);