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 49b2f4e..68432f8 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 7ec7996..a7dc3af 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 63de70b..5dd6d1a 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 d9585d0..3eecd87 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 76f0738..c347fa8 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 3ce4e97..6caa384 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 7a432fa..521ebfc 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 139bbaf..a3d9b1f 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 101f6f2..a004f02 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 1693359..19fe918 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 82fee1e..380f185 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 264bb43..72308c7 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 a302b09..44d0d72 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 284edf0..6775e97 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 37f54d1..7acd09d 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 a23e065..8187165 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 525e427..8be4f99 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 3c81aa5..bbe2c5a 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 75ddaba..31a55f1 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 4eefc13..40ecd01 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 6bcfa6c..d44d67c 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 7a1f7cc..17eefbf 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 34beb1f..20b9853 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 2e8b77d..3687072 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 5c4f578..84aee47 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 7a328c8..6d70c83 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;