]> git.mxchange.org Git - mailer.git/commitdiff
Code cosmetics applied
authorRoland Häder <roland@mxchange.org>
Sat, 18 Apr 2009 10:58:52 +0000 (10:58 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 18 Apr 2009 10:58:52 +0000 (10:58 +0000)
26 files changed:
inc/footer.php
inc/header.php
inc/libs/sponsor_functions.php
inc/libs/surfbar_functions.php
inc/modules/admin.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-add_surfbar_url.php
inc/modules/admin/what-admins_add.php
inc/modules/admin/what-admins_mails.php
inc/modules/admin/what-config_admins.php
inc/modules/admin/what-config_rallye_prices.php
inc/modules/admin/what-edit_emails.php
inc/modules/admin/what-list_rallyes.php
inc/modules/admin/what-list_user.php
inc/modules/admin/what-lock_sponsor.php
inc/modules/admin/what-lock_user.php
inc/modules/admin/what-refbanner.php
inc/modules/frametester.php
inc/modules/guest/what-confirm.php
inc/modules/guest/what-sponsor_login.php
inc/modules/guest/what-sponsor_reg.php
inc/modules/loader.php
inc/modules/member/what-categories.php
inc/modules/member/what-mydata.php
inc/modules/member/what-order.php
surfbar.php

index 49b2f4e8312720494d0b7367e8a710a88a8f8cad..68432f83c4475df9b7e30d05261abf8cf4ff5229 100644 (file)
@@ -53,7 +53,7 @@ if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != '1') &&
        } // END - if
 
        // Shall we display the copyright notice?
-       if ((!REQUEST_ISSET_GET(('frame'))) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && (getConfig('WRITE_FOOTER') == 'Y') && ($GLOBALS['header_sent'] == '2')) {
+       if ((!REQUEST_ISSET_GET('frame')) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && (getConfig('WRITE_FOOTER') == 'Y') && ($GLOBALS['header_sent'] == '2')) {
                // Backlink enabled?
                if ((getConfig('ENABLE_BACKLINK') == 'Y') || (isInstalling())) {
                        // Copyright with backlink, thanks! :-)
@@ -65,7 +65,7 @@ if ((((!isset($GLOBALS['footer_sent'])) || (($GLOBALS['footer_sent'] != '1') &&
        } // END - if
 
        // Shall we display the parsing time and number of queries?
-       if ((GET_EXT_VERSION('sql_patches') >= '0.4.1') && (getConfig('show_timings') == 'Y') && (!REQUEST_ISSET_GET(('frame'))) && ($GLOBALS['header_sent'] == '2')) {
+       if ((GET_EXT_VERSION('sql_patches') >= '0.4.1') && (getConfig('show_timings') == 'Y') && (!REQUEST_ISSET_GET('frame')) && ($GLOBALS['header_sent'] == '2')) {
                // Then display it here
                displayParsingTime();
        } // END - if
index 7ec799623caaab9b03e5a8c2c2096f8c495ebcb9..a7dc3af343c08feabefed1aff7628d1f08e59225 100644 (file)
@@ -127,7 +127,7 @@ if (($GLOBALS['header_sent'] != '1') && ($GLOBALS['header_sent'] != '2')) {
 } // END - if
 
 // Load body or not
-if (($GLOBALS['module'] != 'frametester') || (($GLOBALS['module'] == 'frametester') && (REQUEST_ISSET_GET(('frame')))) || (($GLOBALS['header_sent'] == '1') && (REQUEST_ISSET_GET(('frame')))) && ($GLOBALS['output_mode'] != '1')) {
+if (($GLOBALS['module'] != 'frametester') || (($GLOBALS['module'] == 'frametester') && (REQUEST_ISSET_GET('frame'))) || (($GLOBALS['header_sent'] == '1') && (REQUEST_ISSET_GET('frame'))) && ($GLOBALS['output_mode'] != '1')) {
        // Is the header sent and the script is not the mail confirmation script and not a CSS?
        if (($GLOBALS['header_sent'] == '1') && (basename($_SERVER['PHP_SELF']) != 'mailid.php') && ($GLOBALS['output_mode'] != '1')) {
                // Add BODY tag
index 63de70b3bafe730e49f936b6cdc791e086cdc232..5dd6d1aa713403bbd698baa82250ae154cf279da 100644 (file)
@@ -148,10 +148,10 @@ function SPONSOR_HANDLE_SPONSOR (&$POST, $NO_UPDATE=false, $messageArray=array()
                                $DATA['keys'][] = 'status';
                                if ((!$NO_UPDATE) && (IS_ADMIN()) && ($GLOBALS['what'] == "add_sponsor")) {
                                        // Only allowed for admin
-                                       $DATA['values'][] = "PENDING";
+                                       $DATA['values'][] = 'PENDING';
                                } else {
                                        // Guest area
-                                       $DATA['values'][] = "UNCONFIRMED";
+                                       $DATA['values'][] = 'UNCONFIRMED';
 
                                        // Generate hash code
                                        $DATA['keys'][] = "hash";
@@ -228,7 +228,7 @@ function sponsorTranslateUserStatus ($status) {
 // Search for an email address in the database
 function SPONSOR_FOUND_EMAIL_DB ($email) {
        // Do we already have the provided email address in our DB?
-       $ret = (GET_TOTAL_DATA($email, "sponsor_data", "id", 'email', true) == 1);
+       $ret = (GET_TOTAL_DATA($email, "sponsor_data", 'id', 'email', true) == 1);
 
        // Return result
        return $ret;
index d9585d024b8677874ec192ce614615a5a09dcf67..3eecd87c8eae46c76ba60ae70c8ae968ef92c4f1 100644 (file)
@@ -534,19 +534,19 @@ function SURFBAR_LOOKUP_BY_URL ($url, $uid) {
 }
 
 // Load URL data by given search term and column
-function SURFBAR_GET_URL_DATA ($searchTerm, $column="id", $order="id", $sort="ASC", $group="id", $add = '') {
+function SURFBAR_GET_URL_DATA ($searchTerm, $column='id', $order='id', $sort="ASC", $group='id', $add = '') {
        // By default nothing is found
        $GLOBALS['last_url_data'] = array();
 
        // Is the column an id number?
-       if (($column == "id") || ($column == 'userid')) {
+       if (($column == 'id') || ($column == 'userid')) {
                // Extra secure input
                $searchTerm = bigintval($searchTerm);
        } // END - if
 
-       // If the column is "id" there can be only one entry
+       // If the column is 'id' there can be only one entry
        $limit = '';
-       if ($column == "id") {
+       if ($column == 'id') {
                $limit = "LIMIT 1";
        } // END - if
 
@@ -563,7 +563,7 @@ ORDER BY %s %s
                // Then load all!
                while ($dataRow = SQL_FETCHARRAY($result)) {
                        // Shall we group these results?
-                       if ($group == "id") {
+                       if ($group == 'id') {
                                // Add the row by id as index
                                $GLOBALS['last_url_data'][$dataRow['id']] = $dataRow;
                        } else {
@@ -581,9 +581,11 @@ ORDER BY %s %s
 }
 
 // Registers an URL with the surfbar. You should have called SURFBAR_LOOKUP_BY_URL() first!
-function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg", $extraFields = array()) {
+function SURFBAR_REGISTER_URL ($url, $uid, $status = 'PENDING', $addMode = 'reg', $extraFields = array()) {
        // Make sure by the user registered URLs are always pending
-       if ($addMode == "reg") $status = "PENDING";
+       if ($addMode == 'reg') {
+               $status = 'PENDING';
+       } // END - if
 
        // Prepare content
        $content = merge_array($extraFields, array(
@@ -594,8 +596,12 @@ function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg", $e
        ));
 
        // Is limit/reload set?
-       if (!isset($config['limit']))  $content['limit']  = 0;
-       if (!isset($config['reload'])) $content['reload'] = 0;
+       if (!isset($config['limit'])) {
+               $content['limit']  = 0;
+       } // END - if
+       if (!isset($config['reload'])) {
+               $content['reload'] = 0;
+       } // END - if
 
        // Insert the URL into database
        $content['insert_id'] = SURFBAR_INSERT_URL_BY_ARRAY($content);
@@ -610,7 +616,7 @@ function SURFBAR_REGISTER_URL ($url, $uid, $status="PENDING", $addMode="reg", $e
        $content['limit'] = surfbarTranslateLimit($content['limit']);
 
        // If in reg-mode we notify admin
-       if (($addMode == "reg") || (getConfig('surfbar_notify_admin_unlock') == 'Y')) {
+       if (($addMode == 'reg') || (getConfig('surfbar_notify_admin_unlock') == 'Y')) {
                // Notify admin even when he as unlocked an email
                SURFBAR_NOTIFY_ADMIN("url_{$addMode}", $content);
        } // END - if
@@ -797,10 +803,10 @@ function SURFBAR_DETERMINE_TEMPLATE_NAME() {
        $templateName = "surfbar_frameset";
 
        // Any frame set? ;-)
-       if (REQUEST_ISSET_GET(('frame'))) {
+       if (REQUEST_ISSET_GET('frame')) {
                // Use the frame as a template name part... ;-)
                $templateName = sprintf("surfbar_frame_%s",
-               REQUEST_GET(('frame'))
+               REQUEST_GET('frame')
                );
        } // END - if
 
index 76f07380d12ac78ebc2c2f71ad3806eaea9931c7..c347fa817d6677ae05707b5126b51a4a479280a4 100644 (file)
@@ -150,7 +150,7 @@ if (!isAdminRegistered()) {
        }
 } elseif (REQUEST_ISSET_GET(('reset_pass'))) {
        // Is the form submitted?
-       if ((REQUEST_ISSET_POST(('send_link'))) && (REQUEST_ISSET_POST(('email')))) {
+       if ((REQUEST_ISSET_POST(('send_link'))) && (REQUEST_ISSET_POST('email'))) {
                // Try to send the link out
                $OUT = ADMIN_SEND_PASSWORD_RESET_LINK(REQUEST_POST('email'));
 
index 3ce4e97ca2e30ff4efe7eae997a4ab42178e029d..6caa384580c4f8ad998687125d7d4f1729e81417 100644 (file)
@@ -740,7 +740,7 @@ function ADMIN_CHECK_MENU_MODE () {
 }
 
 // Change activation status
-function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = "id") {
+function ADMIN_CHANGE_ACTIVATION_STATUS ($IDs, $table, $row, $idRow = 'id') {
        $cnt = 0; $newStatus = 'Y';
        if ((is_array($IDs)) && (count($IDs) > 0)) {
                // "Walk" all through and count them
@@ -965,7 +965,7 @@ function ADMIN_BUILD_STATUS_HANDLER ($mode, $IDs, $table, $columns, $filterFunct
 }
 
 // Delete rows by given ID numbers
-function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $deleteNow=false, $idColumn="id", $userIdColumn='userid') {
+function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $deleteNow=false, $idColumn='id', $userIdColumn='userid') {
        // All valid entries? (We hope so here!)
        if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues))) {
                // Shall we delete here or list for deletion?
@@ -1015,7 +1015,7 @@ function ADMIN_DELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFu
 }
 
 // Edit rows by given ID numbers
-function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $editNow=false, $idColumn="id", $userIdColumn='userid') {
+function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $editNow=false, $idColumn='id', $userIdColumn='userid') {
        // All valid entries? (We hope so here!)
        if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues))) {
                // Shall we change here or list for editing?
@@ -1105,7 +1105,7 @@ function ADMIN_EDIT_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc
 }
 
 // Un-/lock rows by given ID numbers
-function ADMIN_LOCK_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn="id", $userIdColumn='userid') {
+function ADMIN_LOCK_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn='id', $userIdColumn='userid') {
        // All valid entries? (We hope so here!)
        if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && ((!$lockNow) || (count($statusArray) == 1))) {
                // Shall we un-/lock here or list for locking?
@@ -1120,7 +1120,7 @@ function ADMIN_LOCK_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunc
 }
 
 // Undelete rows by given ID numbers
-function ADMIN_UNDELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn="id", $userIdColumn='userid') {
+function ADMIN_UNDELETE_ENTRIES_CONFIRM ($IDs, $table, $columns=array(), $filterFunctions=array(), $extraValues=array(), $statusArray=array(), $lockNow=false, $idColumn='id', $userIdColumn='userid') {
        // All valid entries? (We hope so here!)
        if ((is_array($IDs)) && (count($IDs) > 0) && (count($columns) == count($filterFunctions)) && (count($columns) == count($extraValues)) && ((!$lockNow) || (count($statusArray) == 1))) {
                // Shall we un-/lock here or list for locking?
index 7a432fa319c164d6ddb9596daf400aa1299b922a..521ebfcdae2322d714cacd3fc7d797798e20c92b 100644 (file)
@@ -46,7 +46,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR('admin', __FILE__);
 
 // Was an URL added?
-if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST(('url')))) {
+if ((REQUEST_ISSET_POST(('add'))) && (REQUEST_ISSET_POST('url'))) {
        // Dummy variables
        $DATA = array(); $id = "reload_ye"; $skip = false;
 
index 139bbaf5bec28e43ff5150753c484c95f3911e6e..a3d9b1f931b705925b1445fe7f65cfaff41876d1 100644 (file)
@@ -48,7 +48,7 @@ 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') {
                // Do not ouput any form!
@@ -67,7 +67,7 @@ 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', '');
+       if (!REQUEST_ISSET_POST('email')) REQUEST_SET_POST('email', '');
 
        // Load form from template
        LOAD_TEMPLATE("admin_admins_add");
index 101f6f21a8448fed92d5d06c76d9beae68d3e377..a004f02bf099fc905dd0aa66bdbb87eee81e23a5 100644 (file)
@@ -50,7 +50,7 @@ if (REQUEST_ISSET_POST('edit')) {
        $SEL = countPostSelection();
        if ($SEL > 0) {
                // Add option for events
-               $GLOBALS['cache_array']['admins'] = generateOptionList('admins', "id", "login", '', 'email');
+               $GLOBALS['cache_array']['admins'] = generateOptionList('admins', 'id', "login", '', 'email');
                $SW = 2; $rowNameS = '';
                foreach (REQUEST_POST('sel') as $template => $sel) {
                        // First of all load data from DB
@@ -68,7 +68,7 @@ if (REQUEST_ISSET_POST('edit')) {
                                        if ($content['admin_id'] == '-1') $OUT .= ' selected="selected"';
                                        $OUT .= ">{--ADMINS_TO_USER_EVENTS--}</option>\n";
                                }
-                               $OUT .= generateOptionList('admins', "id", "login", $content['admin_id'], 'email');
+                               $OUT .= generateOptionList('admins', 'id', "login", $content['admin_id'], 'email');
                                $OUT .= "</select>\n<br />\n";
                                $aid2 = $content['admin_id']; $id2 = $content['id'];
                        }
index 16933597a9cac21e795a96fdf6d1a41e34c5ffe3..19fe918eed2d8b5b6a1037e9e342c4f889755a17 100644 (file)
@@ -62,7 +62,7 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) {
                $content = array(
                        'sw'               => $SW,
                        'id'               => $id,
-                       'admins_selection' => generateOptionList('admins', "id", "login", $aid, "default_acl"),
+                       'admins_selection' => generateOptionList('admins', 'id', "login", $aid, "default_acl"),
                        'action_selection' => ADMIN_MENU_SELECTION("action", $act, $id),
                        'what_selection'   => ADMIN_MENU_SELECTION("what", $wht, $id),
                        'mode_options'     => generateOptionList(
@@ -256,7 +256,7 @@ VALUES ('%s','%s','%s','%s')",
        }
 
        // Prepare some constants for the template
-       define('_ADMINS_SELECTION', generateOptionList('admins', "id", "login", '', "default_acl"));
+       define('_ADMINS_SELECTION', generateOptionList('admins', 'id', "login", '', "default_acl"));
        define('_ACTION_SELECTION', ADMIN_MENU_SELECTION("action"));
        define('_WHAT_SELECTION'  , ADMIN_MENU_SELECTION("what"));
        define('_MODE_OPTIONS'    ,
index 82fee1e1552249d2c7081067e72c1f9086a936b5..380f1856be9982285a0cf6d503a59884005e5d11 100644 (file)
@@ -125,7 +125,7 @@ VALUES ('%s','%s','%s','%s')",
                                $content = array(
                                        'sw'      => $SW,
                                        'id'      => $id,
-                                       'rallyes' => generateOptionList("rallye_data", "id", "title", $rallye),
+                                       'rallyes' => generateOptionList("rallye_data", 'id', "title", $rallye),
                                        'level'   => $level,
                                        'points'  => $points,
                                        'infos'   => $infos,
index 264bb43b5ca9c6736cb3f7cab93de2b963c80041..72308c7e01e2df31d9f61d48a60ff5b1199e98c0 100644 (file)
@@ -65,7 +65,7 @@ if (SQL_NUMROWS($result) > 0) {
 
                // Load template
                LOAD_TEMPLATE("admin_edit_email");
-       } elseif (REQUEST_ISSET_POST(('save'))) {
+       } elseif (REQUEST_ISSET_POST('save')) {
                // Save changes
                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET
 subject='%s',
index a302b092241b165d2a73781e20886e950e63bfdb..44d0d721b2ae9bbb2543db02ee40bb54108cc057 100644 (file)
@@ -65,7 +65,7 @@ if (REQUEST_ISSET_GET(('rallye'))) {
                                ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_rallye_data` SET is_active='N' WHERE `id`=%s AND is_active='Y' LIMIT 1");
                                break;
                }
-       } elseif (REQUEST_ISSET_GET(('notify'))) {
+       } elseif (REQUEST_ISSET_GET('notify')) {
                // Automatic notification
                switch (REQUEST_GET('notify'))
                {
@@ -292,7 +292,7 @@ ORDER BY start_time DESC",
                        $content['alogin'] = getAdminLogin($content['admin_id']);
 
                        // Count joined userids
-                       $joined = GET_TOTAL_DATA($content['id'], "rallye_users", "id", "rallye_id", true);
+                       $joined = GET_TOTAL_DATA($content['id'], "rallye_users", 'id', "rallye_id", true);
 
                        // Did some users joined this rallye?
                        if ($joined > 0) {
index 284edf0d0f6928e231ce3c320d90e1917a6def99..6775e97209972c7d54f860fac7260a9ca2c3d1bc 100644 (file)
@@ -113,8 +113,8 @@ LIMIT 1",
 
                // Get count/sum of refs, selected categories, unconfirmed mails
                $REFS  = GET_TOTAL_DATA($uid, "refsystem", "counter");
-               $CATS  = GET_TOTAL_DATA($uid, "user_cats", "id", 'userid', true);
-               $LINKS = GET_TOTAL_DATA($uid, "user_links", "id", 'userid', true);
+               $CATS  = GET_TOTAL_DATA($uid, "user_cats", 'id', 'userid', true);
+               $LINKS = GET_TOTAL_DATA($uid, "user_links", 'id', 'userid', true);
 
                // Add links to the numbers
                if ($LINKS > 0) $LINKS = $base."&amp;what=list_links&amp;uid=".$uid."\">".$LINKS."</a>]";
@@ -298,7 +298,7 @@ LIMIT 1",
                        if ($content['refid'] > 0) $content['refid'] = generateUserProfileLink($content['refid']);
 
                        // Get number of unconfirmed mails
-                       $LINKS = GET_TOTAL_DATA($content['userid'], "user_links", "id", 'userid', true);
+                       $LINKS = GET_TOTAL_DATA($content['userid'], "user_links", 'id', 'userid', true);
                        if ($LINKS > 0) $LINKS = $base."&amp;what=list_links&amp;uid=".$content['userid']."\">".translateComma($LINKS)."</a>]";
 
                        // Set link to sent mails if present
index 37f54d1bee1e7f79b8f5189d60d58ee49bc06b9c..7acd09d1c2291e667dac7d066c621a777bb04da9 100644 (file)
@@ -55,7 +55,7 @@ if (REQUEST_ISSET_GET('id')) {
                list($gender, $sname, $fname, $email, $status) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
 
-               if (($status == 'CONFIRMED') || ($status == "LOCKED")) {
+               if (($status == 'CONFIRMED') || ($status == 'LOCKED')) {
                        // Transfer data to constants
                        define('__GENDER'  , translateGender($gender));
                        define('__SURNAME', $sname);
@@ -68,7 +68,7 @@ if (REQUEST_ISSET_GET('id')) {
                                        // Message when sponsor's account got lock
                                        define('__EMAIL_MSG', getMessage('SPONSOR_ACCOUNT_LOCKED'));
                                        $subject = getMessage('SPONSOR_SUBJECT_LOCKED');
-                                       $status = "LOCKED";
+                                       $status = 'LOCKED';
                                } else {
                                        // Message when sponsor's account got unlock
                                        define('__EMAIL_MSG', getMessage('SPONSOR_ACCOUNT_UNLOCKED'));
index a23e065e6d94662030d0e32cbec7f8ab1abde745..818716540253fed21f6b6881946311a197af03e7 100644 (file)
@@ -59,7 +59,7 @@ if (REQUEST_ISSET_GET('uid')) {
                SQL_FREERESULT($result_user);
 
                // Is a lock reason set?
-               if ((REQUEST_ISSET_POST(('lock'))) && ($status != "LOCKED")) {
+               if ((REQUEST_ISSET_POST(('lock'))) && ($status != 'LOCKED')) {
                        // Ok, lock the account!
                        if (GET_EXT_VERSION('user') >= '0.3.5') {
                                // Lock with reason
@@ -83,7 +83,7 @@ if (REQUEST_ISSET_GET('uid')) {
                        // Prepare message
                        $message = sprintf(getMessage('USER_ACCOUNT_LOCKED'), REQUEST_GET('uid'));
                        $ACT = true;
-               } elseif ((REQUEST_ISSET_POST(('unlock'))) && ($status == "LOCKED")) {
+               } elseif ((REQUEST_ISSET_POST(('unlock'))) && ($status == 'LOCKED')) {
                        // Ok, unlock the account!
                        if (GET_EXT_VERSION('user') >= '0.3.5') {
                                // Reset lock reason as well
index 525e427f7d56d1945745ca6fe034f0eb78c2d927..8be4f99466c24678cd55411f19d323f0fb09a760 100644 (file)
@@ -49,7 +49,7 @@ ADD_DESCR('admin', __FILE__);
 $SEL = 0;
 
 // Some sanity-check
-if ((!REQUEST_ISSET_POST(('url'))) || (!REQUEST_ISSET_POST(('alternate')))) {
+if ((!REQUEST_ISSET_POST('url')) || (!REQUEST_ISSET_POST(('alternate')))) {
        REQUEST_UNSET_POST('ok');
 }
 
index 3c81aa5e3b2d37874a516d5db4f94405e572d5f3..bbe2c5a122eeccd9e625f6661d8dd4c7117328eb 100644 (file)
@@ -74,19 +74,19 @@ if (REQUEST_ISSET_GET(('order'))) {
        }
 }
 
-if ((REQUEST_ISSET_POST(('url'))) || (REQUEST_ISSET_GET(('url'))) || (REQUEST_ISSET_GET(('frame')))) {
+if ((REQUEST_ISSET_POST('url')) || (REQUEST_ISSET_GET('url')) || (REQUEST_ISSET_GET('frame'))) {
        // Default URL is ours
        $url = constant('URL');
 
        // Decode URL if set in GET parameters
-       if (REQUEST_ISSET_GET(('url')))  $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(REQUEST_GET('url')))));
+       if (REQUEST_ISSET_GET('url'))  $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(REQUEST_GET('url')))));
 
        // Use URL from POST data if set
-       if (REQUEST_ISSET_POST(('url'))) $url = REQUEST_POST('url');
+       if (REQUEST_ISSET_POST('url')) $url = REQUEST_POST('url');
 
        // Add missing element
        $frame = '';
-       if (REQUEST_ISSET_GET(('frame'))) $frame = REQUEST_GET(('frame'));
+       if (REQUEST_ISSET_GET('frame')) $frame = REQUEST_GET('frame');
        switch ($frame)
        {
                case '':
index 75ddaba89b46491d10f61ea6eb8b35a02e59e014..31a55f147f4dd6b5278b53494045d3b4591f1e7e 100644 (file)
@@ -129,24 +129,24 @@ if (REQUEST_ISSET_GET(('hash'))) {
                        // Nobody was found unter this hash key... or our new member want's to confirm twice?
                        define('__CONFIRM_MSG', getMessage('GUEST_CONFIRMED_TWICE'));
                        define('__UID', '0');
-                       LOAD_TEMPLATE("guest_confirm_table");
+                       LOAD_TEMPLATE('guest_confirm_table');
                }
        } else {
                // Nobody was found unter this hash key... or our new member want's to confirm twice?
                define('__CONFIRM_MSG', getMessage('GUEST_CONFIRMED_TWICE'));
                define('__UID', '0');
-               LOAD_TEMPLATE("guest_confirm_table");
+               LOAD_TEMPLATE('guest_confirm_table');
        }
-} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_POST(('email')))) {
+} elseif ((IS_FORM_SENT()) && (REQUEST_ISSET_POST('email'))) {
        // Confirmation link requested      0     1         2
        $result = SQL_QUERY_ESC("SELECT userid, status, user_hash FROM `{!_MYSQL_PREFIX!}_user_data` WHERE email='%s' LIMIT 1",
-       array(REQUEST_POST('email')), __FILE__, __LINE__);
+               array(REQUEST_POST('email')), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Email address found
                $DATA = SQL_FETCHROW($result);
                switch ($DATA[1])
                {
-                       case "UNCONFIRMED": // Account not confirmed
+                       case 'UNCONFIRMED': // Account not confirmed
                                $msg = LOAD_EMAIL_TEMPLATE("guest_request_confirm", array('hash' => $DATA[2]), $DATA[0]);
                                sendEmail(REQUEST_POST('email'), getMessage('REQUEST_CONFIRM_LINK_SUBJ'), $msg);
                                $content = getMessage('CONFIRM_LINK_SENT');
@@ -156,7 +156,7 @@ if (REQUEST_ISSET_GET(('hash'))) {
                                $content = getMessage('LOGIN_ID_CONFIRMED');
                                break;
 
-                       case "LOCKED": // Account is locked
+                       case 'LOCKED': // Account is locked
                                $content = getMessage('LOGIN_ID_LOCKED');
                                break;
                }
index 4eefc1343b0f4fb8a28dc6a7f8440f5b6f67c95e..40ecd01c95b3347afbb118c90a7eb78c9d0c31c6 100644 (file)
@@ -127,7 +127,7 @@ WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1",
        // Send activation link again
        if (IS_FORM_SENT()) {
                // Check submitted data
-               if (!REQUEST_ISSET_POST(('email'))) REQUEST_UNSET_POST('ok');
+               if (!REQUEST_ISSET_POST('email')) REQUEST_UNSET_POST('ok');
        }
 
        if (IS_FORM_SENT()) {
@@ -173,7 +173,7 @@ WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1",
        // Send new password
        if (IS_FORM_SENT()) {
                // Check submitted data
-               if (!REQUEST_ISSET_POST(('email'))) REQUEST_UNSET_POST('ok');
+               if (!REQUEST_ISSET_POST('email')) REQUEST_UNSET_POST('ok');
        } // END - if
 
        if (IS_FORM_SENT()) {
index 6bcfa6c4078cae9f8d8e5819c6b1a1a1acae1385..d44d67cfd708fa97e8c7373c961c0acdc2381b70 100644 (file)
@@ -128,7 +128,7 @@ if (IS_FORM_SENT()) {
        }
 
        // 6. Homepage URL
-       if (!REQUEST_ISSET_POST(('url'))) {
+       if (!REQUEST_ISSET_POST('url')) {
                // Homepage URL is empty
                $FORM_ERRORS[] = getMessage('SPONSOR_URL_IS_EMPTY');
        } elseif (!isUrlValid(REQUEST_POST('url'))) {
@@ -138,7 +138,7 @@ if (IS_FORM_SENT()) {
        }
 
        // 7. Light validation of email address
-       if ((!REQUEST_ISSET_POST(('email'))) || (REQUEST_POST('email') == "@")) {
+       if ((!REQUEST_ISSET_POST('email')) || (REQUEST_POST('email') == "@")) {
                // Email is invalid/empty
                $FORM_ERRORS[] = getMessage('SPONSOR_EMAIL_IS_INVALID');
        } elseif (SPONSOR_FOUND_EMAIL_DB(REQUEST_POST('email'))) {
index 7a1f7cc08634fb320914f6bb7c7f7b3c83aa7540..17eefbfadd88ccdf250846ed162c5a038c05be67 100644 (file)
@@ -42,7 +42,7 @@ if (!defined('__SECURITY')) {
        require($INC);
 }
 
-if (REQUEST_ISSET_GET(('url'))) {
+if (REQUEST_ISSET_GET('url')) {
        // Decode URL
        $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(REQUEST_GET('url')))));
 
index 34beb1f902228748529fdd1c96b815934bf88374..20b9853d6deb9515a59e5886f2ff364b1e2c6581 100644 (file)
@@ -125,7 +125,7 @@ if ($cats > 0) {
                                }
                        } else {
                                // Check if he has an entry
-                               if (GET_TOTAL_DATA($UID, "user_cats", "id", 'userid', true, sprintf(" AND cat_id=%s", bigintval($content['id']))) == 1) {
+                               if (GET_TOTAL_DATA($UID, "user_cats", 'id', 'userid', true, sprintf(" AND cat_id=%s", bigintval($content['id']))) == 1) {
                                        $content['jn'] = '';
                                        $content['jy'] = ' checked="checked"';
                                }
index 2e8b77d3b13f7b503bb922bfecb89bbd9055c044..3687072c756685f3bcbeb8c4440834ffdf4d18a3 100644 (file)
@@ -50,25 +50,28 @@ if (!defined('__SECURITY')) {
 // Add description as navigation point
 ADD_DESCR('member', __FILE__);
 
-define('UID_VALUE', getUserId()); $URL = '';
+// @TODO Try to rewrite this constant
+define('UID_VALUE', getUserId());
+
+// Init variable to prevent notices
+$URL = '';
 
 // Detect what the member wants to do
 $mode = 'show'; // Show his data
-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
+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)
-{
+switch ($mode) {
        case 'show': // Show his data
                if (EXT_IS_ACTIVE('country', true)) {
                        // New way                         0        1         2          3         4     5     6        7           8            9       10      11           12           13
                        $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                       array(getUserId()), __FILE__, __LINE__);
+                               array(getUserId()), __FILE__, __LINE__);
                } else {
                        // Old way                         0        1         2        3      4     5     6        7           8            9       10      11           12           13
                        $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                       array(getUserId()), __FILE__, __LINE__);
+                               array(getUserId()), __FILE__, __LINE__);
                }
                $DATA = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
@@ -92,217 +95,220 @@ switch ($mode)
                switch (getLanguage()) {
                        case 'de': define('DOB', $DATA[7].'.'.$DATA[8].'.'.$DATA[9]); break;
                        default  : define('DOB', $DATA[8].'-'.$DATA[7].'-'.$DATA[9]); break;
-               }
+               } // END - switch
 
                if (EXT_IS_ACTIVE('country')) {
                        // Load country's description and code
                        $DATA[3] = COUNTRY_GENERATE_INFO($DATA[3]);
-               }
+               } // END - if
 
                // Load template
                LOAD_TEMPLATE('member_mydata_overview');
                break;
 
-                       case 'edit': // Edit data
-                               if (EXT_IS_ACTIVE('country', true)) {
-                                       // New way                         0        1         2          3         4     5     6        7           8            9       10      11           12           13
-                                       $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
+       case 'edit': // Edit data
+               if (EXT_IS_ACTIVE('country', true)) {
+                       // New way                         0        1         2          3         4     5     6        7           8            9       10      11           12           13
+                       $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country_code, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
 FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                                       array(constant('UID_VALUE')), __FILE__, __LINE__);
-                               } else {
-                                       // Old way                         0        1         2        3      4     5     6        7           8            9       10      11           12           13
-                                       $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
+                       array(getUserId()), __FILE__, __LINE__);
+               } else {
+                       // Old way                         0        1         2        3      4     5     6        7           8            9       10      11           12           13
+                       $result = SQL_QUERY_ESC("SELECT surname, family, street_nr, country, zip, city, email, birth_day, birth_month, birth_year, gender, max_mails, receive_mails, last_update
 FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                                       array(constant('UID_VALUE')), __FILE__, __LINE__);
-                               }
+                               array(getUserId()), __FILE__, __LINE__);
+               }
 
-                               $DATA = SQL_FETCHROW($result);
-                               SQL_FREERESULT($result);
-                               $DATA[13] = $DATA[12] + getConfig('profile_lock');
+               $DATA = SQL_FETCHROW($result);
+               SQL_FREERESULT($result);
+               $DATA[13] = $DATA[12] + getConfig('profile_lock');
 
-                               // How far is last change on his profile away from now?
-                               if (($DATA[13] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
-                                       $DATA[13] = generateDateTime($DATA[13] + getConfig('profile_lock'), '0');
-                                       // You cannot change your account
-                                       LOAD_TEMPLATE('member_mydata_locked');
-                               } else {
-                                       // He is allowed to change his profile
-                                       switch ($DATA[10])
-                                       {
-                                               case 'M':
-                                                       define('M_DEFAULT', ' selected="selected"');
-                                                       define('F_DEFAULT', '');
-                                                       define('C_DEFAULT', '');
-                                                       break;
-
-                                               case 'F':
-                                                       define('M_DEFAULT', '');
-                                                       define('F_DEFAULT', ' selected="selected"');
-                                                       define('C_DEFAULT', '');
-                                                       break;
-
-                                               case 'C':
-                                                       define('M_DEFAULT', '');
-                                                       define('F_DEFAULT', '');
-                                                       define('C_DEFAULT', ' selected="selected"');
-                                                       break;
-                                       }
-                                       $DOB = '';
-                                       switch (getLanguage())
-                                       {
-                                               case 'de': // German date format
-                                                       // Day
-                                                       $DOB .= ADD_SELECTION('day', $DATA[7]);
-
-                                                       // Month
-                                                       $DOB .= ADD_SELECTION('month', $DATA[8]);
-
-                                                       // Year
-                                                       $DOB .= ADD_SELECTION('year', $DATA[9]);
-                                                       break;
-
-                                               default: // Default is the US date format... :)
-                                                       break;
-                                       }
+               // How far is last change on his profile away from now?
+               if (($DATA[13] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
+                       $DATA[13] = generateDateTime($DATA[13] + getConfig('profile_lock'), '0');
+                       // You cannot change your account
+                       LOAD_TEMPLATE('member_mydata_locked');
+               } else {
+                       // He is allowed to change his profile
+                       switch ($DATA[10])
+                       {
+                               case 'M':
+                                       define('M_DEFAULT', ' selected="selected"');
+                                       define('F_DEFAULT', '');
+                                       define('C_DEFAULT', '');
+                                       break;
+
+                               case 'F':
+                                       define('M_DEFAULT', '');
+                                       define('F_DEFAULT', ' selected="selected"');
+                                       define('C_DEFAULT', '');
+                                       break;
+
+                               case 'C':
+                                       define('M_DEFAULT', '');
+                                       define('F_DEFAULT', '');
+                                       define('C_DEFAULT', ' selected="selected"');
+                                       break;
+                       }
+                       $DOB = '';
+                       switch (getLanguage()) {
+                               case 'de': // German date format
+                                       // Day
+                                       $DOB .= ADD_SELECTION('day', $DATA[7]);
+
+                                       // Month
+                                       $DOB .= ADD_SELECTION('month', $DATA[8]);
+
+                                       // Year
+                                       $DOB .= ADD_SELECTION('year', $DATA[9]);
+                                       break;
+
+                               default: // Default is the US date format... :)
+                                       break;
+                       } // END - if
+
+                       define('DOB', $DOB);
+                       define('MAX_REC_LIST', addMaxReceiveList('member', $DATA[11], true));
+
+                       if (EXT_IS_ACTIVE('country')) {
+                               // Generate selection box
+                               $OUT  = "<select name=\"country_code\" class=\"member_select\" size=\"1\">\n";
+                               $whereStatement = "WHERE `is_active`='Y'";
+                               if (IS_ADMIN()) $whereStatement = '';
+                               $OUT .= generateOptionList("countries", 'id', "descr", $DATA[3], "code", $whereStatement);
+                               $OUT .= "</select>";
+                               define('__COUNTRY_CONTENT', $OUT);
+                       } else {
+                               // Ouput default input box
+                               define('__COUNTRY_CONTENT', "<input type=\"text\" name=\"cntry\" class=\"member_normal\" size=\"2\" maxlength=\"3\" value=\"".$DATA[3]."\" />");
+                       }
+
+                       // Load template
+                       LOAD_TEMPLATE('member_mydata_edit');
+               }
+               break;
+
+       case 'save': // Save entered data
+               // Load old email / password:      0        1          2
+               $result = SQL_QUERY_ESC("SELECT email, password, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
+                       array(getUserId()), __FILE__, __LINE__);
+               $DATA = SQL_FETCHROW($result);
+               SQL_FREERESULT($result);
+               $DATA[3] = $DATA[2] + getConfig('profile_lock');
 
-                                       define('DOB', $DOB);
-                                       define('MAX_REC_LIST', addMaxReceiveList('member', $DATA[11], true));
-
-                                       if (EXT_IS_ACTIVE('country')) {
-                                               // Generate selection box
-                                               $OUT  = "<select name=\"country_code\" class=\"member_select\" size=\"1\">\n";
-                                               $whereStatement = "WHERE is_active='Y'";
-                                               if (IS_ADMIN()) $whereStatement = '';
-                                               $OUT .= generateOptionList("countries", "id", "descr", $DATA[3], "code", $whereStatement);
-                                               $OUT .= "</select>";
-                                               define('__COUNTRY_CONTENT', $OUT);
+               // How far is last change on his profile away from now?
+               if (($DATA[3] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
+                       $DATA[3] = generateDateTime($DATA[3] + getConfig('profile_lock'), '0');
+                       // You cannot change your account
+                       LOAD_TEMPLATE('member_mydata_locked');
+               } elseif (!isEmailValid(REQUEST_POST('addy'))) {
+                       // Invalid email address!
+                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED'));
+               } else {
+                       // Generate hash
+                       $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 = '';
+
+                               // Did the user changed the password?
+                               if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $mode = 'pass'; }
+
+                               // Or did he changed his password?
+                               if (REQUEST_POST('addy') != $DATA[0]) {
+                                       // Jupp
+                                       if ($mode == 'normal') {
+                                               $mode = 'email';
                                        } else {
-                                               // Ouput default input box
-                                               define('__COUNTRY_CONTENT', "<input type=\"text\" name=\"cntry\" class=\"member_normal\" size=\"2\" maxlength=\"3\" value=\"".$DATA[3]."\" />");
+                                               $mode .= ";email";
                                        }
-
-                                       // Load template
-                                       LOAD_TEMPLATE('member_mydata_edit');
+                                       REQUEST_SET_POST('old_addy', $DATA[0]);
+                               } // END - if
+
+                               // Update member's profile
+                               if (EXT_IS_ACTIVE('country')) {
+                                       // New way
+                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
+`gender`='%s', `surname`='%s', `family`='%s',
+`street_nr`='%s',
+`country_code`=%s, `zip`=%s, `city`='%s',
+`email`='%s',
+`birth_day`=%s, `birth_month`=%s, `birth_year`=%s,
+`max_mails`=%s,
+`last_update`=UNIX_TIMESTAMP()".$AND.",
+`notified`='N',
+`last_profile_sent`=UNIX_TIMESTAMP()
+WHERE `userid`=%s AND `password`='%s' LIMIT 1",
+                                               array(
+                                                       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')),
+                                                       getUserId(),
+                                                       getSession('u_hash')
+                                               ), __FILE__, __LINE__);
+                               } else {
+                                       // Old way
+                                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
+`gender`='%s', `surname`='%s', `family`='%s',
+`street_nr`='%s',
+`country`='%s', `zip`=%s, `city`='%s',
+`email`='%s',
+`birth_day`=%s, `birth_month`=%s, `birth_year`=%s,
+`max_mails`='%s',
+`last_update`=UNIX_TIMESTAMP()".$AND.",
+`notified`='N',
+`last_profile_sent`=UNIX_TIMESTAMP()
+WHERE `userid`=%s AND `password`='%s' LIMIT 1",
+                                               array(
+                                                       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')),
+                                                       getUserId(),
+                                                       getSession('u_hash')
+                                               ), __FILE__, __LINE__);
                                }
-                               break;
-
-                                               case 'save': // Save entered data
-                                                       // Load old email / password:      0        1          2
-                                                       $result = SQL_QUERY_ESC("SELECT email, password, last_update FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s LIMIT 1",
-                                                       array(getUserId()), __FILE__, __LINE__);
-                                                       $DATA = SQL_FETCHROW($result);
-                                                       SQL_FREERESULT($result);
-                                                       $DATA[3] = $DATA[2] + getConfig('profile_lock');
-
-                                                       // How far is last change on his profile away from now?
-                                                       if (($DATA[3] > time()) && (!IS_ADMIN()) && (getConfig('profile_lock') > 0)) {
-                                                               $DATA[3] = generateDateTime($DATA[3] + getConfig('profile_lock'), '0');
-                                                               // You cannot change your account
-                                                               LOAD_TEMPLATE("member_mydata_locked");
-                                                       } elseif (!isEmailValid(REQUEST_POST('addy'))) {
-                                                               // Invalid email address!
-                                                               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('INVALID_EMAIL_ADDRESS_ENTERED'));
-                                                       } else {
-                                                               // Generate hash
-                                                               $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 = '';
-
-                                                                       // Did the user changed the password?
-                                                                       if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $mode = 'pass'; }
-
-                                                                       // Or did he changed his password?
-                                                                       if (REQUEST_POST('addy') != $DATA[0]) {
-                                                                               // Jupp
-                                                                               if ($mode == 'normal') { $mode = 'email'; } else { $mode .= ";email"; }
-                                                                               REQUEST_SET_POST('old_addy', $DATA[0]);
-                                                                       }
-
-                                                                       // Update member's profile
-                                                                       if (EXT_IS_ACTIVE('country')) {
-                                                                               // New way
-                                                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
-gender='%s', surname='%s', family='%s',
-street_nr='%s',
-country_code=%s, zip=%s, city='%s',
-email='%s',
-birth_day=%s, birth_month=%s, birth_year=%s,
-max_mails=%s,
-last_update=UNIX_TIMESTAMP()".$AND.",
-notified='N',
-last_profile_sent=UNIX_TIMESTAMP()
-WHERE userid=%s AND password='%s' LIMIT 1",
-                                                                               array(
-                                                                               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,
-                                                                               getSession('u_hash')
-                                                                               ), __FILE__, __LINE__);
-                                                                       } else {
-                                                                               // Old way
-                                                                               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET
-gender='%s', surname='%s', family='%s',
-street_nr='%s',
-country='%s', zip=%s, city='%s',
-email='%s',
-birth_day=%s, birth_month=%s, birth_year=%s,
-max_mails='%s',
-last_update=UNIX_TIMESTAMP()".$AND.",
-notified='N',
-last_profile_sent=UNIX_TIMESTAMP()
-WHERE userid=%s AND password='%s' LIMIT 1",
-                                                                               array(
-                                                                               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,
-                                                                               getSession('u_hash')
-                                                                               ), __FILE__, __LINE__);
-                                                                       }
-
-                                                                       // Get all modes ...
-                                                                       $modes = explode(';', $mode);
-
-                                                                       // ... and run them through
-                                                                       sendModeMails ('mydata', $modes);
-                                                               } else {
-                                                                       // Entered wrong pass for updating profile
-                                                                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEBER_UPDATE_PWD_WRONG'));
-                                                               }
-                                                       }
-                                                       break;
-
-                                               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(getUserId()), __FILE__, __LINE__);
-                                                       $URL = 'modules.php?module=login&amp;what=welcome&amp;msg=' . urlencode(getMessage('PROFILE_UPDATED'));
-                                                       break;
+
+                               // Get all modes ...
+                               $modes = explode(';', $mode);
+
+                               // ... and run them through
+                               sendModeMails ('mydata', $modes);
+                       } else {
+                               // Entered wrong pass for updating profile
+                               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEBER_UPDATE_PWD_WRONG'));
+                       }
+               }
+               break;
+
+       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(getUserId()), __FILE__, __LINE__);
+               $URL = 'modules.php?module=login&amp;what=welcome&amp;msg=' . urlencode(getMessage('PROFILE_UPDATED'));
+               break;
 }
 
 if (!empty($URL)) {
        // Load generated URL
        redirectToUrl($URL);
-}
+} // END - if
 
 //
 ?>
index 5c4f57833a2e9c0b354904df434f9f96742f0b7f..84aee47079a27202a12fe6409970a2e356af0dfb 100644 (file)
@@ -64,7 +64,7 @@ if (IS_ADMIN()) $whereStatement = '';
 define('__MIN_VALUE', getConfig('order_min'));
 
 // Count unconfirmed mails
-$links = GET_TOTAL_DATA(getUserId(), "user_links", "id", 'userid', true);
+$links = GET_TOTAL_DATA(getUserId(), "user_links", 'id', 'userid', true);
 
 // Does the user has more than 0 mails per day set?
 $HOLIDAY = 'userid';
index 7a328c8f202d4ccf3ac92540cce4ae11fbb2b759..6d70c83dda3a4617c2d6bdbe4ff3529decc0bfba 100644 (file)
@@ -70,13 +70,13 @@ if (isInstalled()) {
        SURFBAR_HANDLE_SELF_MAINTENANCE();
 
        // Is there a check value?
-       if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET(('frame'))) && (in_array(REQUEST_GET('frame'), array('stop', 'stop2', 'stats', 'textlinks'))))) {
+       if ((SURFBAR_CHECK_RELOAD_FULL()) || ((REQUEST_ISSET_GET('frame')) && (in_array(REQUEST_GET('frame'), array('stop', 'stop2', 'stats', 'textlinks'))))) {
                // Reload-lock is full, surfbar stopped so...
                // Load header
                loadIncludeOnce('inc/header.php');
 
                // Load template
-               if (((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == 'stop')) || (!REQUEST_ISSET_GET(('frame')))) {
+               if (((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'stop')) || (!REQUEST_ISSET_GET('frame'))) {
                        // Load template for "start" page
                        LOAD_TEMPLATE('surfbar_frame_start');
 
@@ -84,8 +84,8 @@ if (isInstalled()) {
                        LOAD_TEMPLATE('surfbar_start_banner');
 
                        // This makes the footer appear again
-                       REQUEST_UNSET_GET(('frame'));
-               } elseif ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == 'stats')) {
+                       REQUEST_UNSET_GET('frame');
+               } elseif ((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'stats')) {
                        // Get total points amount
                        $points = GET_TOTAL_DATA(getUserId(), 'user_points', 'points') - GET_TOTAL_DATA(getUserId(), 'user_data', 'used_points');
 
@@ -103,7 +103,7 @@ if (isInstalled()) {
 
                        // Load template for "stats" page
                        LOAD_TEMPLATE('surfbar_frame_stats', false, $content);
-               } elseif ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == 'textlinks')) {
+               } elseif ((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'textlinks')) {
                        // Prepare content
                        $content = array(
                                'online'   => SURFBAR_DETERMINE_TOTAL_ONLINE(),
@@ -155,7 +155,7 @@ if (isInstalled()) {
                $templateName = SURFBAR_DETERMINE_TEMPLATE_NAME();
 
                // Frame "top" set?
-               if ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == 'top')) {
+               if ((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'top')) {
                        // Determine next id
                        $nextId = SURFBAR_DETERMINE_NEXT_ID();
 
@@ -180,9 +180,9 @@ if (isInstalled()) {
                                // Load new URL
                                SURFBAR_RELOAD_TO_STOP_PAGE('stop2');
                        }
-               } elseif ((REQUEST_ISSET_GET(('frame'))) && (REQUEST_GET('frame') == 'start')) {
+               } elseif ((REQUEST_ISSET_GET('frame')) && (REQUEST_GET('frame') == 'start')) {
                        // Starter frame found so let the footer display
-                       REQUEST_UNSET_GET(('frame'));
+                       REQUEST_UNSET_GET('frame');
                } else {
                        // Load header in frameset mode
                        $isFrameset = true;