From 5b8d588fdbfa375fa859ca80a9b9e1735a13300e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 18 Apr 2009 10:58:52 +0000 Subject: [PATCH] Code cosmetics applied --- inc/footer.php | 4 +- inc/header.php | 2 +- inc/libs/sponsor_functions.php | 6 +- inc/libs/surfbar_functions.php | 30 +- inc/modules/admin.php | 2 +- inc/modules/admin/admin-inc.php | 10 +- inc/modules/admin/what-add_surfbar_url.php | 2 +- inc/modules/admin/what-admins_add.php | 4 +- inc/modules/admin/what-admins_mails.php | 4 +- inc/modules/admin/what-config_admins.php | 4 +- .../admin/what-config_rallye_prices.php | 2 +- inc/modules/admin/what-edit_emails.php | 2 +- inc/modules/admin/what-list_rallyes.php | 4 +- inc/modules/admin/what-list_user.php | 6 +- inc/modules/admin/what-lock_sponsor.php | 4 +- inc/modules/admin/what-lock_user.php | 4 +- inc/modules/admin/what-refbanner.php | 2 +- inc/modules/frametester.php | 8 +- inc/modules/guest/what-confirm.php | 12 +- inc/modules/guest/what-sponsor_login.php | 4 +- inc/modules/guest/what-sponsor_reg.php | 4 +- inc/modules/loader.php | 2 +- inc/modules/member/what-categories.php | 2 +- inc/modules/member/what-mydata.php | 400 +++++++++--------- inc/modules/member/what-order.php | 2 +- surfbar.php | 16 +- 26 files changed, 277 insertions(+), 265 deletions(-) diff --git a/inc/footer.php b/inc/footer.php index 49b2f4e831..68432f83c4 100644 --- a/inc/footer.php +++ b/inc/footer.php @@ -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 diff --git a/inc/header.php b/inc/header.php index 7ec799623c..a7dc3af343 100644 --- a/inc/header.php +++ b/inc/header.php @@ -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 diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 63de70b3ba..5dd6d1aa71 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -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; diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index d9585d024b..3eecd87c8e 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -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 diff --git a/inc/modules/admin.php b/inc/modules/admin.php index 76f07380d1..c347fa817d 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -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')); diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 3ce4e97ca2..6caa384580 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -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? diff --git a/inc/modules/admin/what-add_surfbar_url.php b/inc/modules/admin/what-add_surfbar_url.php index 7a432fa319..521ebfcdae 100644 --- a/inc/modules/admin/what-add_surfbar_url.php +++ b/inc/modules/admin/what-add_surfbar_url.php @@ -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; diff --git a/inc/modules/admin/what-admins_add.php b/inc/modules/admin/what-admins_add.php index 139bbaf5be..a3d9b1f931 100644 --- a/inc/modules/admin/what-admins_add.php +++ b/inc/modules/admin/what-admins_add.php @@ -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"); diff --git a/inc/modules/admin/what-admins_mails.php b/inc/modules/admin/what-admins_mails.php index 101f6f21a8..a004f02bf0 100644 --- a/inc/modules/admin/what-admins_mails.php +++ b/inc/modules/admin/what-admins_mails.php @@ -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--}\n"; } - $OUT .= generateOptionList('admins', "id", "login", $content['admin_id'], 'email'); + $OUT .= generateOptionList('admins', 'id', "login", $content['admin_id'], 'email'); $OUT .= "\n
\n"; $aid2 = $content['admin_id']; $id2 = $content['id']; } diff --git a/inc/modules/admin/what-config_admins.php b/inc/modules/admin/what-config_admins.php index 16933597a9..19fe918eed 100644 --- a/inc/modules/admin/what-config_admins.php +++ b/inc/modules/admin/what-config_admins.php @@ -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' , diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php index 82fee1e155..380f1856be 100644 --- a/inc/modules/admin/what-config_rallye_prices.php +++ b/inc/modules/admin/what-config_rallye_prices.php @@ -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, diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php index 264bb43b5c..72308c7e01 100644 --- a/inc/modules/admin/what-edit_emails.php +++ b/inc/modules/admin/what-edit_emails.php @@ -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', diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index a302b09224..44d0d721b2 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -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) { diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index 284edf0d0f..6775e97209 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -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."&what=list_links&uid=".$uid."\">".$LINKS."]"; @@ -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."&what=list_links&uid=".$content['userid']."\">".translateComma($LINKS)."]"; // Set link to sent mails if present diff --git a/inc/modules/admin/what-lock_sponsor.php b/inc/modules/admin/what-lock_sponsor.php index 37f54d1bee..7acd09d1c2 100644 --- a/inc/modules/admin/what-lock_sponsor.php +++ b/inc/modules/admin/what-lock_sponsor.php @@ -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')); diff --git a/inc/modules/admin/what-lock_user.php b/inc/modules/admin/what-lock_user.php index a23e065e6d..8187165402 100644 --- a/inc/modules/admin/what-lock_user.php +++ b/inc/modules/admin/what-lock_user.php @@ -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 diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index 525e427f7d..8be4f99466 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -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'); } diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index 3c81aa5e3b..bbe2c5a122 100644 --- a/inc/modules/frametester.php +++ b/inc/modules/frametester.php @@ -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 '': diff --git a/inc/modules/guest/what-confirm.php b/inc/modules/guest/what-confirm.php index 75ddaba89b..31a55f147f 100644 --- a/inc/modules/guest/what-confirm.php +++ b/inc/modules/guest/what-confirm.php @@ -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; } diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index 4eefc1343b..40ecd01c95 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -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()) { diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index 6bcfa6c407..d44d67cfd7 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -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'))) { diff --git a/inc/modules/loader.php b/inc/modules/loader.php index 7a1f7cc086..17eefbfadd 100644 --- a/inc/modules/loader.php +++ b/inc/modules/loader.php @@ -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'))))); diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 34beb1f902..20b9853d6d 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -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"'; } diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index 2e8b77d3b1..3687072c75 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -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 = ""; + define('__COUNTRY_CONTENT', $OUT); + } else { + // Ouput default input box + define('__COUNTRY_CONTENT', ""); + } + + // 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 = ""; - 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', ""); + $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&what=welcome&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&what=welcome&msg=' . urlencode(getMessage('PROFILE_UPDATED')); + break; } if (!empty($URL)) { // Load generated URL redirectToUrl($URL); -} +} // END - if // ?> diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index 5c4f57833a..84aee47079 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -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'; diff --git a/surfbar.php b/surfbar.php index 7a328c8f20..6d70c83dda 100644 --- a/surfbar.php +++ b/surfbar.php @@ -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; -- 2.39.2