From: Roland Häder Date: Thu, 26 Nov 2009 21:16:15 +0000 (+0000) Subject: fooRequestElementBar() functions renamed, adding of request parameters added: X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=57227d33e870ec5cd271209c4a978a52b45c2dd6 fooRequestElementBar() functions renamed, adding of request parameters added: - All fooRequestElementBar() functions are now renamed to fooRequestParameterBar() - Adding of network request parameters basicly added, once a parameter has been added the added parameter is disabled in HTML and the choosen network type handler is pre-choosen. - Documentation updated --- diff --git a/.gitattributes b/.gitattributes index 6877e65995..6965d271ce 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1082,6 +1082,8 @@ templates/de/html/admin/admin_list_links_problem.tpl -text templates/de/html/admin/admin_list_links_row.tpl -text templates/de/html/admin/admin_list_mods.tpl -text templates/de/html/admin/admin_list_mods_row.tpl -text +templates/de/html/admin/admin_list_network_params.tpl -text +templates/de/html/admin/admin_list_network_params_row.tpl -text templates/de/html/admin/admin_list_network_types.tpl -text templates/de/html/admin/admin_list_network_types_row.tpl -text templates/de/html/admin/admin_list_networks.tpl -text @@ -1181,6 +1183,7 @@ templates/de/html/admin/admin_mods_stats2.tpl -text templates/de/html/admin/admin_mods_stats2_row.tpl -text templates/de/html/admin/admin_mods_stats_row.tpl -text templates/de/html/admin/admin_network_added.tpl -text +templates/de/html/admin/admin_network_request_param_added.tpl -text templates/de/html/admin/admin_network_type_added.tpl -text templates/de/html/admin/admin_newsletter.tpl -text templates/de/html/admin/admin_newsletter_nohtml.tpl -text diff --git a/DOCS/de/network/README.txt b/DOCS/de/network/README.txt index 00e1a5189f..cac1d42da2 100644 --- a/DOCS/de/network/README.txt +++ b/DOCS/de/network/README.txt @@ -1,7 +1,7 @@ Verwendbar Platzhalter fuer URLs: --------------------------------- -ID = Ihre Werbenetz-Id (meistens die Sie zum Einloggen verwenden) +ID = Ihre Werbenetz-Id (meistens die Sie zum Einloggen verwenden) SID = Die Seiten-Id Ihrer Eingetragen Webseite BID = Banner-Id (z.B. Forcedbanner oder Bannerklick/-view) @@ -9,3 +9,15 @@ Diese Platzhalter muessen in Prozenten eingeschlossen in die URL eingebunden sei Beispiel: http://www.anbieter-name.invalid/code/t-mail.php?id=%ID%&sid=%SID% + +------------------------------------------------------------------------------- + +Verwendete Abfrageparameter: +---------------------------- +id = Kundennummer (Merchant-Id oder Account-Id) +password = Interface-Passwort (nicht Account-Passwort) +reload = Maximale Reloadsperre in Sekunden (!) nach der gesucht werden soll +remain = Mindestanzahl an Klicks nach der gesucht werden soll +reward = Mindestverguetung nach der gesucht werden soll +size = Groesse des Werbemittels (bei Bannern, Buttons, evtl. Popup/-down) +erotic = Ob Erotik-Kampagnen erlaubt oder nicht, oder exklusiv Erotik-Kampagnen holen diff --git a/beg.php b/beg.php index 072f4b46d1..2aabc5c1c2 100644 --- a/beg.php +++ b/beg.php @@ -57,7 +57,7 @@ setContentType('text/html'); redirectOnUninstalledExtension('beg'); // Check for userid -if (isGetRequestElementSet('userid')) { +if (isGetRequestParameterSet('userid')) { // Init variables $points = '0'; @@ -65,18 +65,18 @@ if (isGetRequestElementSet('userid')) { $pay = false; // Validate if it is not a number - if (isNicknameUsed(getRequestElement('userid'))) { + if (isNicknameUsed(getRequestParameter('userid'))) { // Is the nickname extension there? if (isExtensionActive('nickname')) { // Maybe we have found a nickname? - fetchUserData(getRequestElement('userid'), 'nickname'); + fetchUserData(getRequestParameter('userid'), 'nickname'); } else { // Nickname entered but nickname is not active $errorCode = getCode('EXTENSION_PROBLEM'); } } else { // Direct userid - fetchUserData(getRequestElement('userid')); + fetchUserData(getRequestParameter('userid')); } // Check if locked in so don't pay points @@ -90,7 +90,7 @@ if (isGetRequestElementSet('userid')) { $points = mt_rand((getConfig('beg_points') * 100000), (getConfig('beg_points_max') * 100000)) / 100000; // Set nickname / userid for template - $content['userid'] = getRequestElement('userid'); + $content['userid'] = getRequestParameter('userid'); $content['clicks'] = (getUserData('beg_clicks') + 1); $content['banner'] = loadTemplate('beg_banner', true); $content['points'] = translateComma($points); @@ -187,7 +187,7 @@ if (isGetRequestElementSet('userid')) { $errorCode = generateErrorCodeFromUserStatus(); } elseif ((getUserData('userid') == '0') || (getUserData('status') == 'failed')) { // Inalid or locked account, so let's find out - if (fetchUserData(getRequestElement('userid'), 'nickname')) { + if (fetchUserData(getRequestParameter('userid'), 'nickname')) { // Locked account $errorCode = getCode('ACCOUNT_LOCKED'); } else { diff --git a/birthday_confirm.php b/birthday_confirm.php index 2f1aedc038..c228c94a13 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -56,10 +56,10 @@ setContentType('text/html'); redirectOnUninstalledExtension('birthday'); // Script is installed so let's check for his confirmation link... -$userid = bigintval(getRequestElement('userid')); +$userid = bigintval(getRequestParameter('userid')); // Only allow numbers here... -$chk = bigintval(getRequestElement('check'), false); +$chk = bigintval(getRequestParameter('check'), false); // Check if link is not clicked so far $result = SQL_QUERY_ESC("SELECT b.points, d.gender, d.surname, d.family, d.status, d.ref_payout @@ -73,7 +73,7 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1", array($userid, $chk), __FILE__, __LINE__); -//* DEBUG: */ outputHtml("userid=".$userid.",chk=".$chk." (".strlen($chk).'/'.strlen(getRequestElement('check')).'/'.SQL_NUMROWS($result).")
"); +//* DEBUG: */ outputHtml("userid=".$userid.",chk=".$chk." (".strlen($chk).'/'.strlen(getRequestParameter('check')).'/'.SQL_NUMROWS($result).")
"); // Prepare content $content = array(); diff --git a/click.php b/click.php index 703caf6284..85950763f4 100644 --- a/click.php +++ b/click.php @@ -50,16 +50,16 @@ require('inc/config-global.php'); setContentType('text/html'); // Check required parameters -if (((isGetRequestElementSet('user')) || (isGetRequestElementSet('reseller'))) && (isGetRequestElementSet('banner'))) { +if (((isGetRequestParameterSet('user')) || (isGetRequestParameterSet('reseller'))) && (isGetRequestParameterSet('banner'))) { // Update clicks counter... - SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `clicks`=`clicks`+1 WHERE `id`=%s LIMIT 1", array(bigintval(getRequestElement('banner'))), __FILE__, __LINE__); + SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `clicks`=`clicks`+1 WHERE `id`=%s LIMIT 1", array(bigintval(getRequestParameter('banner'))), __FILE__, __LINE__); // A line has been updated? if (SQL_AFFECTEDROWS() == 1) { - if (isGetRequestElementSet('user')) { - redirectToUrl('ref.php?refid=' . bigintval(getRequestElement('user'))); - } elseif (isGetRequestElementSet('reseller')) { - redirectToUrl('shop_reseller.php?reseller=' . bigintval(getRequestElement('reseller'))); + if (isGetRequestParameterSet('user')) { + redirectToUrl('ref.php?refid=' . bigintval(getRequestParameter('user'))); + } elseif (isGetRequestParameterSet('reseller')) { + redirectToUrl('shop_reseller.php?reseller=' . bigintval(getRequestParameter('reseller'))); } } // END - if } // END - if diff --git a/confirm.php b/confirm.php index 4f30d2f2eb..b413408732 100644 --- a/confirm.php +++ b/confirm.php @@ -53,9 +53,9 @@ if (isSpider()) setContentType('text/html'); $URL = 'modules.php?module=index'; // Is the hash there? -if (isGetRequestElementSet('hash')) { +if (isGetRequestParameterSet('hash')) { // We have an refid here. So we simply add it - $URL = 'modules.php?module=index&what=confirm&hash=' . getRequestElement('hash'); + $URL = 'modules.php?module=index&what=confirm&hash=' . getRequestParameter('hash'); } // END - if // Load the URL diff --git a/debug.php b/debug.php index f9fec82e77..af43626168 100644 --- a/debug.php +++ b/debug.php @@ -49,13 +49,13 @@ require('inc/config-global.php'); // Redirect only to registration page when this script is installed if ((isExtensionActive('debug')) && (getTotalFatalErrors() == '0')) { // Is the request parameter set? - if (isPostRequestElementSet('request')) { + if (isPostRequestParameterSet('request')) { // Handle the request - if (DEBUG_HANDLE_REQUEST(postRequestElement('request'))) { + if (DEBUG_HANDLE_REQUEST(postRequestParameter('request'))) { // Construct FQFN for the module $inc = sprintf("inc/debug/%s/request_%s", getConfig('debug_mode'), - SQL_ESCAPE(postRequestElement('request')) + SQL_ESCAPE(postRequestParameter('request')) ); // Is the module there? Else we log it! @@ -64,11 +64,11 @@ if ((isExtensionActive('debug')) && (getTotalFatalErrors() == '0')) { loadInclude($inc); } else { // Missing request files may happen while development - DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_404', postRequestElement('request')); + DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_404', postRequestParameter('request')); } } else { // Unhandled request detected - DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_unhandled', postRequestElement('request')); + DEBUG_ABUSE_LOG(__FILE__, __LINE__, 'request_unhandled', postRequestParameter('request')); } } else { // Empty request diff --git a/doubler.php b/doubler.php index 34668ed670..593f796f0a 100644 --- a/doubler.php +++ b/doubler.php @@ -63,17 +63,17 @@ $content = array( // Begin with doubler script... if (isFormSent()) { // Secure points (so only integer/double values are allowed - setPostRequestElement('points', bigintval(postRequestElement('points'))); + setPostRequestParameter('points', bigintval(postRequestParameter('points'))); // Begin with doubling process - if ((isPostRequestElementSet('userid')) && (isPostRequestElementSet('pass')) && (isPostRequestElementSet('points'))) { + if ((isPostRequestParameterSet('userid')) && (isPostRequestParameterSet('pass')) && (isPostRequestParameterSet('points'))) { // Probe for nickname extension and if a nickname was entered - if (isNickNameUsed(postRequestElement('userid'))) { + if (isNickNameUsed(postRequestParameter('userid'))) { // Nickname in URL, so load the id - fetchUserData(postRequestElement('userid'), 'nickname'); + fetchUserData(postRequestParameter('userid'), 'nickname'); } else { // Direct userid entered - fetchUserData(postRequestElement('userid')); + fetchUserData(postRequestParameter('userid')); } // Is the data valid? @@ -83,13 +83,13 @@ if (isFormSent()) { } // END - if // Remove any dots and unwanted chars from the points - setPostRequestElement('points', bigintval(round(convertCommaToDot(postRequestElement('points'))))); + setPostRequestParameter('points', bigintval(round(convertCommaToDot(postRequestParameter('points'))))); // Probe for enough points - $probe_points = ((postRequestElement('points') >= getConfig('doubler_min')) && (postRequestElement('points') <= getConfig('doubler_max'))); + $probe_points = ((postRequestParameter('points') >= getConfig('doubler_min')) && (postRequestParameter('points') <= getConfig('doubler_max'))); // Check all together - if ((isUserDataValid()) && (getUserData('password') == generateHash(postRequestElement('pass'), substr(getUserData('password'), 0, -40))) && (getUserData('status') == 'CONFIRMED') && ($probe_points)) { + if ((isUserDataValid()) && (getUserData('password') == generateHash(postRequestParameter('pass'), substr(getUserData('password'), 0, -40))) && (getUserData('status') == 'CONFIRMED') && ($probe_points)) { // Nickname resolved to a unique userid or direct userid entered by the member $GLOBALS['doubler_userid'] = getUserData('userid'); @@ -97,17 +97,17 @@ if (isFormSent()) { $points = countSumTotalData(getUserData('userid'), 'user_points', 'points') - countSumTotalData(getUserData('userid'), 'user_data', 'used_points'); // So let's continue with probing his points amount - if (($points - getConfig('doubler_left') - postRequestElement('points') * getConfig('doubler_charge')) >= 0) { + if (($points - getConfig('doubler_left') - postRequestParameter('points') * getConfig('doubler_charge')) >= 0) { // Enough points are left so let's continue with the doubling process // Create doubling "account" width *DOUBLED* points SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES ('%s','%s','%s','".detectRemoteAddr()."', UNIX_TIMESTAMP(), 'N','N')", - array(getUserData('userid'), determineReferalId(), bigintval(postRequestElement('points') * 2)), __FILE__, __LINE__); + array(getUserData('userid'), determineReferalId(), bigintval(postRequestParameter('points') * 2)), __FILE__, __LINE__); // Subtract entered points - subtractPoints('doubler', getUserData('userid'), postRequestElement('points')); + subtractPoints('doubler', getUserData('userid'), postRequestParameter('points')); // Add points to "total payed" including charge - $points = postRequestElement('points') - postRequestElement('points') * getConfig('doubler_charge'); + $points = postRequestParameter('points') - postRequestParameter('points') * getConfig('doubler_charge'); updateConfiguration('doubler_points', $points, '+'); incrementConfigEntry('doubler_points', $points); @@ -117,7 +117,7 @@ if (isFormSent()) { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES ('%s',0,'%s','".detectRemoteAddr()."',UNIX_TIMESTAMP(),'N','Y')", array( determineReferalId(), - bigintval(postRequestElement('points') * 2 * getConfig('doubler_ref')) + bigintval(postRequestParameter('points') * 2 * getConfig('doubler_ref')) ), __FILE__, __LINE__); // And that's why we don't want to you more than one referal level of doubler-points. ^^^ @@ -127,7 +127,7 @@ if (isFormSent()) { updateConfiguration('doubler_counter', 1, '+'); // Set constant - $content['message'] = loadTemplate('doubler_reflink', true, postRequestElement('userid')); + $content['message'] = loadTemplate('doubler_reflink', true, postRequestParameter('userid')); } else { // Not enougth points left $content['message'] = getMessage('DOUBLER_FORM_NO_POINTS_LEFT'); @@ -141,26 +141,26 @@ if (isFormSent()) { } elseif (getUserData('status') == 'LOCKED') { // Account is locked by admin / holiday! $content['message'] = getMessage('DOUBLER_FORM_STATUS_LOCKED'); - } elseif (postRequestElement('points') < getConfig('doubler_min')) { + } elseif (postRequestParameter('points') < getConfig('doubler_min')) { // Not enougth points entered $content['message'] = getMessage('DOUBLER_FORM_POINTS_MIN'); - } elseif (postRequestElement('points') > getConfig('doubler_max')) { + } elseif (postRequestParameter('points') > getConfig('doubler_max')) { // Too much points entered $content['message'] = getMessage('DOUBLER_FORM_POINTS_MAX'); - } elseif (isNickNameUsed(postRequestElement('userid'))) { + } elseif (isNickNameUsed(postRequestParameter('userid'))) { // Cannot resolv nickname -> userid $content['message'] = getMessage('DOUBLER_FORM_404_NICKNAME'); } else { // Wrong password or account not found $content['message'] = getMessage('DOUBLER_FORM_404_MEMBER'); } - } elseif (!isPostRequestElementSet('userid')) { + } elseif (!isPostRequestParameterSet('userid')) { // Login not entered $content['message'] = getMessage('DOUBLER_FORM_404_LOGIN'); - } elseif (!isPostRequestElementSet('pass')) { + } elseif (!isPostRequestParameterSet('pass')) { // Password not entered $content['message'] = getMessage('DOUBLER_FORM_404_PASSWORD'); - } elseif (!isPostRequestElementSet('points')) { + } elseif (!isPostRequestParameterSet('points')) { // points not entered $content['message'] = getMessage('DOUBLER_FORM_404_POINTS'); } diff --git a/img.php b/img.php index 6986a5e28a..baf24ea834 100644 --- a/img.php +++ b/img.php @@ -50,13 +50,13 @@ require('inc/config-global.php'); loadIncludeOnce('inc/header.php'); // Code set? -if (isGetRequestElementSet('code')) { +if (isGetRequestParameterSet('code')) { // Generate image - generateImageOrCode(bigintval(getRequestElement('code'))); -} elseif (isGetRequestElementSet('img')) { + generateImageOrCode(bigintval(getRequestParameter('code'))); +} elseif (isGetRequestParameterSet('img')) { // 'img' set so create the IFN (Include-FileName) $inc = sprintf("inc/img/tag-%s.php", - getRequestElement('img') + getRequestParameter('img') ); // Include is readable? diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index 56ec8c8459..215dc7d44d 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -84,11 +84,13 @@ PRIMARY KEY (`network_type_id`) // HTTP parameters (names) for URLs addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_request_params`'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_request_params` ( -`network_param_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_param_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`network_type_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `request_param_key` VARCHAR(10) NOT NULL DEFAULT 'invalid', `request_param_value` VARCHAR(10) NOT NULL DEFAULT 'invalid', -UNIQUE `provider_key` (`network_id`, `request_param_key`), +UNIQUE `provider_type_key` (`network_id`,`network_type_id`,`request_param_key`), +UNIQUE `provider_type_value` (`network_id`,`network_type_id`,`request_param_value`), PRIMARY KEY (`network_param_id`) ) TYPE={?_TABLE_TYPE?} COMMENT='Request parameters for GET/POST request'"); diff --git a/inc/filters.php b/inc/filters.php index 4153a13463..c28d8fb3b0 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -689,9 +689,9 @@ function FILTER_DETERMINE_WHAT_ACTION () { // Fix module if (!isModuleSet()) { // Is the request element set? - if (isGetRequestElementSet('module')) { + if (isGetRequestParameterSet('module')) { // Set module from request - setModule(getRequestElement('module')); + setModule(getRequestParameter('module')); } elseif (getOutputMode() == '0') { // Set default module 'index' setModule('index'); @@ -769,7 +769,7 @@ function FILTER_RUN_DAILY_RESET () { if ((isInstallationPhase()) || (!isInstalled()) || (!isAdminRegistered()) || (!isExtensionInstalled('sql_patches'))) return; // Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D - if (((date('d', getConfig('last_update')) != date('d', time())) || ((isConfigEntrySet('DEBUG_RESET')) && (getConfig('DEBUG_RESET') == 'Y'))) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('register')) && (getOutputMode() != 1)) { + if (((date('d', getConfig('last_update')) != date('d', time())) || ((isConfigEntrySet('DEBUG_RESET')) && (getConfig('DEBUG_RESET') == 'Y'))) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestParameterSet('register')) && (getOutputMode() != 1)) { // Tell every module we are in reset-mode! doReset(); } // END - if @@ -924,7 +924,7 @@ function FILTER_HANDLE_FATAL_ERRORS () { // Filter for displaying copyright line function FILTER_DISPLAY_COPYRIGHT () { // Shall we display the copyright notice? - if ((!isGetRequestElementSet('frame')) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && ((getConfig('WRITE_FOOTER') == 'Y') || (isInstalling())) && ($GLOBALS['header_sent'] == 2)) { + if ((!isGetRequestParameterSet('frame')) && (basename($_SERVER['PHP_SELF']) != 'mailid_top.php') && ((getConfig('WRITE_FOOTER') == 'Y') || (isInstalling())) && ($GLOBALS['header_sent'] == 2)) { // Backlink enabled? if (((isConfigEntrySet('ENABLE_BACKLINK')) && (getConfig('ENABLE_BACKLINK') == 'Y')) || (isInstalling())) { // Copyright with backlink, thanks! :-) @@ -940,7 +940,7 @@ function FILTER_DISPLAY_COPYRIGHT () { function FILTER_DISPLAY_PARSING_TIME () { // Shall we display the parsing time and number of queries? // 1234 5 54 4 5 5 4 4 5 543 3 4432 2 33 2 2 21 - if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestElementSet('frame'))) || (isInstallationPhase())) && (getOutputMode() == '0') && ($GLOBALS['header_sent'] == 2)) { + if ((((isExtensionInstalledAndNewer('sql_patches', '0.4.1')) && (getConfig('show_timings') == 'Y') && (!isGetRequestParameterSet('frame'))) || (isInstallationPhase())) && (getOutputMode() == '0') && ($GLOBALS['header_sent'] == 2)) { // Then display it here displayParsingTime(); } // END - if diff --git a/inc/functions.php b/inc/functions.php index a7cd723a8d..9bf6d0f47d 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1651,7 +1651,7 @@ function addEmailNavigation ($PAGES, $offset, $show_form, $colspan, $return=fals $NAV = ''; for ($page = 1; $page <= $PAGES; $page++) { // Is the page currently selected or shall we generate a link to it? - if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) { + if (($page == getRequestParameter('page')) || ((!isGetRequestParameterSet('page')) && ($page == 1))) { // Is currently selected, so only highlight it $NAV .= '-'; } else { @@ -1659,13 +1659,13 @@ function addEmailNavigation ($PAGES, $offset, $show_form, $colspan, $return=fals $NAV .= ''; } $NAV .= $page; - if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) { + if (($page == getRequestParameter('page')) || ((!isGetRequestParameterSet('page')) && ($page == 1))) { // Is currently selected, so only highlight it $NAV .= '-'; } else { @@ -2445,7 +2445,7 @@ function getActualVersion ($type = 'Revision') { $FQFN = sprintf("%s/.revision", getConfig('CACHE_PATH')); // Check if 'check_revision_data' is setted (switch for manually rewrite the .revision-File) - if ((isGetRequestElementSet('check_revision_data')) && (getRequestElement('check_revision_data') == 'yes')) { + if ((isGetRequestParameterSet('check_revision_data')) && (getRequestParameter('check_revision_data') == 'yes')) { // Forced rebuild of .revision file $new = true; } else { @@ -2680,11 +2680,11 @@ function getMessageFromErrorCode ($code) { case getCode('COOKIES_DISABLED') : $message = getMessage('LOGIN_COOKIES_DISABLED'); break; case getCode('BEG_SAME_AS_OWN') : $message = getMessage('BEG_SAME_UID_AS_OWN'); break; case getCode('LOGIN_FAILED') : $message = getMessage('LOGIN_FAILED_GENERAL'); break; - case getCode('MODULE_MEM_ONLY') : $message = getMaskedMessage('MODULE_MEM_ONLY', getRequestElement('mod')); break; + case getCode('MODULE_MEM_ONLY') : $message = getMaskedMessage('MODULE_MEM_ONLY', getRequestParameter('mod')); break; case getCode('OVERLENGTH') : $message = getMessage('MEMBER_TEXT_OVERLENGTH'); break; case getCode('URL_FOUND') : $message = getMessage('MEMBER_TEXT_CONTAINS_URL'); break; case getCode('SUBJ_URL') : $message = getMessage('MEMBER_SUBJ_CONTAINS_URL'); break; - case getCode('BLIST_URL') : $message = "{--MEMBER_URL_BLACK_LISTED--}
\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(getRequestElement('blist'), 0); break; + case getCode('BLIST_URL') : $message = "{--MEMBER_URL_BLACK_LISTED--}
\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(getRequestParameter('blist'), 0); break; case getCode('NO_RECS_LEFT') : $message = getMessage('MEMBER_SELECTED_MORE_RECS'); break; case getCode('INVALID_TAGS') : $message = getMessage('MEMBER_HTML_INVALID_TAGS'); break; case getCode('MORE_POINTS') : $message = getMessage('MEMBER_MORE_POINTS_NEEDED'); break; @@ -2704,8 +2704,8 @@ function getMessageFromErrorCode ($code) { break; case getCode('EXTENSION_PROBLEM'): - if (isGetRequestElementSet('ext')) { - $message = generateExtensionInactiveNotInstalledMessage(getRequestElement('ext')); + if (isGetRequestParameterSet('ext')) { + $message = generateExtensionInactiveNotInstalledMessage(getRequestParameter('ext')); } else { $message = getMessage('EXTENSION_PROBLEM_UNSET_EXT'); } @@ -2714,7 +2714,7 @@ function getMessageFromErrorCode ($code) { case getCode('URL_TLOCK'): // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ? $result = SQL_QUERY_ESC("SELECT `timestamp` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); // Load timestamp from last order list($timestamp) = SQL_FETCHROW($result); @@ -3159,18 +3159,18 @@ function determineReferalId () { // Check if refid is set if ((isset($GLOBALS['refid'])) && ($GLOBALS['refid'] > 0)) { // This is fine... - } elseif ((isGetRequestElementSet('user')) && (basename($_SERVER['PHP_SELF']) == 'click.php')) { + } elseif ((isGetRequestParameterSet('user')) && (basename($_SERVER['PHP_SELF']) == 'click.php')) { // The variable user comes from the click-counter script click.php and we only accept this here - $GLOBALS['refid'] = bigintval(getRequestElement('user')); - } elseif (isPostRequestElementSet('refid')) { + $GLOBALS['refid'] = bigintval(getRequestParameter('user')); + } elseif (isPostRequestParameterSet('refid')) { // Get referal id from variable refid (so I hope this makes my script more compatible to other scripts) - $GLOBALS['refid'] = secureString(postRequestElement('refid')); - } elseif (isGetRequestElementSet('refid')) { + $GLOBALS['refid'] = secureString(postRequestParameter('refid')); + } elseif (isGetRequestParameterSet('refid')) { // Get referal id from variable refid (so I hope this makes my script more compatible to other scripts) - $GLOBALS['refid'] = secureString(getRequestElement('refid')); - } elseif (isGetRequestElementSet('ref')) { + $GLOBALS['refid'] = secureString(getRequestParameter('refid')); + } elseif (isGetRequestParameterSet('ref')) { // Set refid=ref (the referal link uses such variable) - $GLOBALS['refid'] = secureString(getRequestElement('ref')); + $GLOBALS['refid'] = secureString(getRequestParameter('ref')); } elseif ((isSessionVariableSet('refid')) && (getSession('refid') != 0)) { // Set session refid als global $GLOBALS['refid'] = bigintval(getSession('refid')); @@ -3276,15 +3276,15 @@ function isMemberIdSet () { // Handle message codes from URL function handleCodeMessage () { - if (isGetRequestElementSet('code')) { + if (isGetRequestParameterSet('code')) { // Default extension is 'unknown' $ext = 'unknown'; // Is extension given? - if (isGetRequestElementSet('ext')) $ext = getRequestElement('ext'); + if (isGetRequestParameterSet('ext')) $ext = getRequestParameter('ext'); // Convert the 'code' parameter from URL to a human-readable message - $message = getMessageFromErrorCode(getRequestElement('code')); + $message = getMessageFromErrorCode(getRequestParameter('code')); // Load message template loadTemplate('message', false, $message); @@ -3732,7 +3732,7 @@ function sendModeMails ($mod, $modes) { $hash = generatePassString(getUserData('password')); // Does the hash match or should we change it? - if (($hash == getSession('u_hash')) || (postRequestElement('pass1') == postRequestElement('pass2'))) { + if (($hash == getSession('u_hash')) || (postRequestParameter('pass1') == postRequestParameter('pass2'))) { // Load the data $content = getUserDataArray(); @@ -3750,7 +3750,7 @@ function sendModeMails ($mod, $modes) { switch ($mode) { case 'normal': break; // Do not add any special lines case 'email': // Email was changed! - $content['message'] = getMessage('MEMBER_CHANGED_EMAIL').": ".postRequestElement('old_email')."\n"; + $content['message'] = getMessage('MEMBER_CHANGED_EMAIL').": ".postRequestParameter('old_email')."\n"; break; case 'pass': // Password was changed @@ -3766,7 +3766,7 @@ function sendModeMails ($mod, $modes) { if (isExtensionActive('country')) { // Replace code with description - $content['country'] = generateCountryInfo(postRequestElement('country_code')); + $content['country'] = generateCountryInfo(postRequestParameter('country_code')); } // END - if // Merge content with data from POST diff --git a/inc/header.php b/inc/header.php index 6b265c89d3..58ba602bd7 100644 --- a/inc/header.php +++ b/inc/header.php @@ -78,7 +78,7 @@ if (($GLOBALS['header_sent'] != 1) && ($GLOBALS['header_sent'] != 2)) { } // END - if // Add BODY tag or not? -if ((getOutputMode() != 1) && (getOutputMode() != -1) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestElementSet('frame')))) { +if ((getOutputMode() != 1) && (getOutputMode() != -1) && ($GLOBALS['header_sent'] == 1) && ((getModule() != 'frametester') || (isGetRequestParameterSet('frame')))) { loadTemplate('page_body'); $GLOBALS['header_sent'] = 2; } // END - if diff --git a/inc/install-functions.php b/inc/install-functions.php index 42b6493163..3803f72be7 100644 --- a/inc/install-functions.php +++ b/inc/install-functions.php @@ -48,27 +48,27 @@ if (!defined('__SECURITY')) { // Write the local config-local.php file from "template" function doInstallWriteLocalConfig () { // Copy the config template and verify it - copyFileVerified(postRequestElement('spath') . 'inc/config-local.php.dist', getConfig('CACHE_PATH') . 'config-local.php', 0644); + copyFileVerified(postRequestParameter('spath') . 'inc/config-local.php.dist', getConfig('CACHE_PATH') . 'config-local.php', 0644); // Ok, all done. So we can write the config data to the php files - if (postRequestElement('spath') != getConfig('PATH')) changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SERVER-PATH', "setConfigEntry('PATH', '", "');", postRequestElement('spath'), 0); - if (postRequestElement('burl') != getConfig('URL')) changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'HOST-URL', "setConfigEntry('URL', '", "');", postRequestElement('burl'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MAIN-TITLE', "setConfigEntry('MAIN_TITLE', '", "');", postRequestElement('title'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SLOGAN', "setConfigEntry('SLOGAN', '", "');", postRequestElement('slogan'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'WEBMASTER', "setConfigEntry('WEBMASTER', '", "');", postRequestElement('email'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'NULLPASS-WARNING', "setConfigEntry('WARN_NO_PASS', '", "');", postRequestElement('warn_no_pass'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'WRITE-FOOTER', "setConfigEntry('WRITE_FOOTER', '", "');", postRequestElement('wfooter'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'BACKLINK', "setConfigEntry('ENABLE_BACKLINK', '", "');", postRequestElement('blink'), 0); - // @TODO DEACTIVATED: changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-HOST', " 'host' => '", "',", postRequestElement('mysql','host'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-DBASE', " 'dbase' => '", "',", postRequestElement('mysql','dbase'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-LOGIN', " 'login' => '", "',", postRequestElement('mysql','login'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-PASSWORD', " 'password' => '", "',", postRequestElement('mysql','pass1'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-PREFIX', "setConfigEntry('_MYSQL_PREFIX', '", "');", postRequestElement('mysql','prefix'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'TABLE-TYPE', "setConfigEntry('_TABLE_TYPE', '", "');", postRequestElement('mysql','type'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SMTP-HOSTNAME', "setConfigEntry('SMTP_HOSTNAME', '", "');", postRequestElement('smtp_host'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SMTP-USER', "setConfigEntry('SMTP_USER', '", "');", postRequestElement('smtp_user'), 0); - changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SMTP-PASSWORD', "setConfigEntry('SMTP_PASSWORD', '", "');", postRequestElement('smtp_pass1'), 0); + if (postRequestParameter('spath') != getConfig('PATH')) changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SERVER-PATH', "setConfigEntry('PATH', '", "');", postRequestParameter('spath'), 0); + if (postRequestParameter('burl') != getConfig('URL')) changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'HOST-URL', "setConfigEntry('URL', '", "');", postRequestParameter('burl'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MAIN-TITLE', "setConfigEntry('MAIN_TITLE', '", "');", postRequestParameter('title'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SLOGAN', "setConfigEntry('SLOGAN', '", "');", postRequestParameter('slogan'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'WEBMASTER', "setConfigEntry('WEBMASTER', '", "');", postRequestParameter('email'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'NULLPASS-WARNING', "setConfigEntry('WARN_NO_PASS', '", "');", postRequestParameter('warn_no_pass'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'WRITE-FOOTER', "setConfigEntry('WRITE_FOOTER', '", "');", postRequestParameter('wfooter'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'BACKLINK', "setConfigEntry('ENABLE_BACKLINK', '", "');", postRequestParameter('blink'), 0); + // @TODO DEACTIVATED: changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-HOST', " 'host' => '", "',", postRequestParameter('mysql','host'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-DBASE', " 'dbase' => '", "',", postRequestParameter('mysql','dbase'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-LOGIN', " 'login' => '", "',", postRequestParameter('mysql','login'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-PASSWORD', " 'password' => '", "',", postRequestParameter('mysql','pass1'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'MYSQL-PREFIX', "setConfigEntry('_MYSQL_PREFIX', '", "');", postRequestParameter('mysql','prefix'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'TABLE-TYPE', "setConfigEntry('_TABLE_TYPE', '", "');", postRequestParameter('mysql','type'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SMTP-HOSTNAME', "setConfigEntry('SMTP_HOSTNAME', '", "');", postRequestParameter('smtp_host'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SMTP-USER', "setConfigEntry('SMTP_USER', '", "');", postRequestParameter('smtp_user'), 0); + changeDataInFile(getConfig('CACHE_PATH') . 'config-local.php', 'SMTP-PASSWORD', "setConfigEntry('SMTP_PASSWORD', '", "');", postRequestParameter('smtp_pass1'), 0); // Generate a long site key $siteKey = generatePassword(50); diff --git a/inc/install-inc.php b/inc/install-inc.php index 09f399cece..51d2fa1a2b 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.php @@ -47,43 +47,43 @@ if (!defined('__SECURITY')) { // Init variables $mysql = array(); -if ((isPostRequestElementSet('mysql')) && (is_array(postRequestElement('mysql')))) { +if ((isPostRequestParameterSet('mysql')) && (is_array(postRequestParameter('mysql')))) { // Transfer 'mysql' array - $mysql = postRequestElement('mysql'); + $mysql = postRequestParameter('mysql'); } // END - if // Check if both passwords from SMTP are matching -if ((isGetRequestElementSet('page') && (getRequestElement('page') == 5))) { +if ((isGetRequestParameterSet('page') && (getRequestParameter('page') == 5))) { // Okay, we have to check it - if (isPostRequestElementSet('smtp_user') && (!isPostRequestElementSet('smtp_host'))) { + if (isPostRequestParameterSet('smtp_user') && (!isPostRequestParameterSet('smtp_host'))) { // Hostname not set addToInstallContent('
' . getMessage('INSTALL_SMTP_HOSTNAME_EMPTY') . '
'); - setGetRequestElement('page', 3); + setGetRequestParameter('page', 3); } // END - if - if ((!isPostRequestElementSet('smtp_pass1')) && (isPostRequestElementSet('smtp_pass2'))) { + if ((!isPostRequestParameterSet('smtp_pass1')) && (isPostRequestParameterSet('smtp_pass2'))) { // Password is empty addToInstallContent('
' . getMessage('INSTALL_SMTP_PASS1_EMPTY') . '
'); - setGetRequestElement('page', 3); + setGetRequestParameter('page', 3); } // END - if - if ((isPostRequestElementSet('smtp_pass1')) && (!isPostRequestElementSet('smtp_pass2'))) { + if ((isPostRequestParameterSet('smtp_pass1')) && (!isPostRequestParameterSet('smtp_pass2'))) { // Password repeat is empty addToInstallContent('
' . getMessage('INSTALL_SMTP_PASS2_EMPTY') . '
'); - setGetRequestElement('page', 3); + setGetRequestParameter('page', 3); } // END - if - if (postRequestElement('smtp_pass1') != postRequestElement('smtp_pass1')) { + if (postRequestParameter('smtp_pass1') != postRequestParameter('smtp_pass1')) { // Passwords are not matching addToInstallContent('
' . getMessage('INSTALL_SMTP_PASS_MISMATCH') . '
'); - setGetRequestElement('page', 3); + setGetRequestParameter('page', 3); } // END - if } // END - if // Is the mailer installed or no admin registered so far? if ((!isInstalled()) || (!isAdminRegistered())) { // Output page for entered value - switch (getRequestElement('page')) { + switch (getRequestParameter('page')) { case 'welcome': // Welcome to the installation! addTemplateToInstallContent('install_welcome'); break; @@ -111,11 +111,11 @@ if ((!isInstalled()) || (!isAdminRegistered())) { $content['mysql_prefix'] = $mysql['prefix']; $content['mysql_login'] = $mysql['login']; $content['table_type'] = $mysql['type']; - $content['spath'] = postRequestElement('spath'); - $content['burl'] = postRequestElement('burl'); - $content['title'] = postRequestElement('title'); - $content['slogan'] = postRequestElement('slogan'); - $content['email'] = postRequestElement('email'); + $content['spath'] = postRequestParameter('spath'); + $content['burl'] = postRequestParameter('burl'); + $content['title'] = postRequestParameter('title'); + $content['slogan'] = postRequestParameter('slogan'); + $content['email'] = postRequestParameter('email'); // Load template addTemplateToInstallContent('install_page2', $content); @@ -123,11 +123,11 @@ if ((!isInstalled()) || (!isAdminRegistered())) { case '3': // Set more values - $content['spath'] = postRequestElement('spath'); - $content['burl'] = postRequestElement('burl'); - $content['title'] = postRequestElement('title'); - $content['slogan'] = postRequestElement('slogan'); - $content['email'] = postRequestElement('email'); + $content['spath'] = postRequestParameter('spath'); + $content['burl'] = postRequestParameter('burl'); + $content['title'] = postRequestParameter('title'); + $content['slogan'] = postRequestParameter('slogan'); + $content['email'] = postRequestParameter('email'); // Use default SMTP data $smtpHost = getConfig('SMTP_HOSTNAME'); @@ -136,11 +136,11 @@ if ((!isInstalled()) || (!isAdminRegistered())) { $smtpPass2 = getConfig('SMTP_PASSWORD'); // Overwrite it with the data from sent (failed) form - if (isPostRequestElementSet('smtp_host')) $smtpHost = postRequestElement('smtp_host'); - if (isPostRequestElementSet('smtp_user')) $smtpUser = postRequestElement('smtp_user'); - if (isPostRequestElementSet('smtp_pass')) { - $smtpPass1 = postRequestElement('smtp_pass'); - $smtpPass2 = postRequestElement('smtp_pass'); + if (isPostRequestParameterSet('smtp_host')) $smtpHost = postRequestParameter('smtp_host'); + if (isPostRequestParameterSet('smtp_user')) $smtpUser = postRequestParameter('smtp_user'); + if (isPostRequestParameterSet('smtp_pass')) { + $smtpPass1 = postRequestParameter('smtp_pass'); + $smtpPass2 = postRequestParameter('smtp_pass'); } // END - if // MySQL settings @@ -164,16 +164,16 @@ if ((!isInstalled()) || (!isAdminRegistered())) { case '5': // Misc settings // General settings - $content['spath'] = postRequestElement('spath'); - $content['burl'] = postRequestElement('burl'); - $content['title'] = postRequestElement('title'); - $content['slogan'] = postRequestElement('slogan'); - $content['email'] = postRequestElement('email'); + $content['spath'] = postRequestParameter('spath'); + $content['burl'] = postRequestParameter('burl'); + $content['title'] = postRequestParameter('title'); + $content['slogan'] = postRequestParameter('slogan'); + $content['email'] = postRequestParameter('email'); // SMTP settings - $content['smtp_host'] = postRequestElement('smtp_host'); - $content['smtp_user'] = postRequestElement('smtp_user'); - $content['smtp_pass'] = postRequestElement('smtp_pass1'); + $content['smtp_host'] = postRequestParameter('smtp_host'); + $content['smtp_user'] = postRequestParameter('smtp_user'); + $content['smtp_pass'] = postRequestParameter('smtp_pass1'); // MySQL data $OUT = ''; @@ -187,7 +187,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { break; case 'finalize': // Write captured data to files - if ((isPostRequestElementSet('finalize')) && (!isInstalled())) { + if ((isPostRequestParameterSet('finalize')) && (!isInstalled())) { // You have submitted data then we have to reset the SQLs initSqls(); @@ -197,20 +197,20 @@ if ((!isInstalled()) || (!isAdminRegistered())) { // Seems to work, also right database? if (SQL_SELECT_DB($mysql['dbase'], __FILE__, __LINE__) === true) { // Automatically run install.sql - if ((!isFileReadable(postRequestElement('spath') . 'install/tables.sql')) || (!isFileReadable(postRequestElement('spath') . 'install/menu-'.getLanguage().'.sql'))) { + if ((!isFileReadable(postRequestParameter('spath') . 'install/tables.sql')) || (!isFileReadable(postRequestParameter('spath') . 'install/menu-'.getLanguage().'.sql'))) { // Installation area not found! addFatalMessage(__FILE__, __LINE__, getMessage('INSTALL_MISSING_DUMPS')); } // END - if if (getTotalFatalErrors() == '0') { // Set type and prefix from POST data - setConfigEntry('_TABLE_TYPE' , postRequestElement('mysql', 'type')); - setConfigEntry('_MYSQL_PREFIX', postRequestElement('mysql', 'prefix')); + setConfigEntry('_TABLE_TYPE' , postRequestParameter('mysql', 'type')); + setConfigEntry('_MYSQL_PREFIX', postRequestParameter('mysql', 'prefix')); // Both exists so import them foreach (array('tables', 'menu-'.getLanguage()) as $dump) { // Should be save here because file_exists() is there but we check it again. :) - $FQFN = postRequestElement('spath') . 'install/' . $dump . '.sql'; + $FQFN = postRequestParameter('spath') . 'install/' . $dump . '.sql'; // Is the file readable? if (isFileReadable($FQFN)) { @@ -253,12 +253,12 @@ if ((!isInstalled()) || (!isAdminRegistered())) { $OUT .= ' '; } // END foreach $content['mysql_hidden'] = $OUT; - $content['spath'] = postRequestElement('spath'); - $content['burl'] = postRequestElement('burl'); - $content['title'] = postRequestElement('title'); - $content['smtp_host'] = postRequestElement('smtp_host'); - $content['smtp_user'] = postRequestElement('smtp_user'); - $content['smtp_pass'] = postRequestElement('smtp_pass1'); + $content['spath'] = postRequestParameter('spath'); + $content['burl'] = postRequestParameter('burl'); + $content['title'] = postRequestParameter('title'); + $content['smtp_host'] = postRequestParameter('smtp_host'); + $content['smtp_user'] = postRequestParameter('smtp_user'); + $content['smtp_pass'] = postRequestParameter('smtp_pass1'); // Load template addTemplateToInstallContent('install_fatal_errors', $content); @@ -283,7 +283,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) { break; default: - logDebugMessage(__FILE__, __LINE__, sprintf("Wrong page %s detected", getRequestElement('page'))); + logDebugMessage(__FILE__, __LINE__, sprintf("Wrong page %s detected", getRequestParameter('page'))); addTemplateToInstallContent('admin_settings_saved', '
{--WRONG_PAGE--}
'); break; } // END - switch diff --git a/inc/js/js-surfbar_member_edit.php b/inc/js/js-surfbar_member_edit.php index b2de5c631a..af7fe53659 100644 --- a/inc/js/js-surfbar_member_edit.php +++ b/inc/js/js-surfbar_member_edit.php @@ -45,8 +45,8 @@ if (!defined('__SECURITY')) { // Prepare content $content = array( - 'views_max' => bigintval(getRequestElement('views_max')), - 'limited' => bigintval(getRequestElement('limited')) + 'views_max' => bigintval(getRequestParameter('views_max')), + 'limited' => bigintval(getRequestParameter('limited')) ); // Simply load the JavaScript here diff --git a/inc/js/js-surfbar_stopped.php b/inc/js/js-surfbar_stopped.php index 5bc33ba892..1297d37491 100644 --- a/inc/js/js-surfbar_stopped.php +++ b/inc/js/js-surfbar_stopped.php @@ -45,8 +45,8 @@ if (!defined('__SECURITY')) { // Prepare content $content = array( - 'restart' => bigintval(getRequestElement('restart')), - 'autostart' => getRequestElement('autostart') + 'restart' => bigintval(getRequestParameter('restart')), + 'autostart' => getRequestParameter('autostart') ); // Load template diff --git a/inc/language-functions.php b/inc/language-functions.php index 21dc3ed7cb..d0dd156a6e 100644 --- a/inc/language-functions.php +++ b/inc/language-functions.php @@ -110,9 +110,9 @@ function getLanguage () { if (isConfigEntrySet('DEFAULT_LANG')) $ret = getConfig('DEFAULT_LANG'); // Is the variable set - if (isGetRequestElementSet('mx_lang')) { + if (isGetRequestParameterSet('mx_lang')) { // Accept only first 2 chars - $ret = substr(getRequestElement('mx_lang'), 0, 2); + $ret = substr(getRequestParameter('mx_lang'), 0, 2); } elseif (isset($GLOBALS['language'])) { // Use cached $ret = getCurrentLanguage(); diff --git a/inc/language/network_de.php b/inc/language/network_de.php index 67563eab71..493aa2a717 100644 --- a/inc/language/network_de.php +++ b/inc/language/network_de.php @@ -56,19 +56,22 @@ addMessages(array( 'ADMIN_NETWORK_DATA_NOT_ADDED' => "Das Werbenetzwerk mit dem Kurznamen %s wurde nicht hinzugefügt.", 'ADMIN_NETWORK_TYPES_404' => "Es wurden keine Werbearten-Handler zum Werbenetzwerk %s gefunden.", 'ADMIN_NETWORK_TYPES_HANDLE_ALREADY_ADDED' => "Ein Werbeart-Handler %s existiert bereits.", + 'ADMIN_NETWORK_REQUEST_PARAMETER_ALREADY_ADDED' => "Ein API-Abfrageparameter %s existiert bereits.", 'ADMIN_NETWORK_TYPES_NOT_ADDED' => "Der Werbeart-Handler %s wurde nicht hinzugefügt.", 'ADMIN_NETWORK_TYPES_NOTHING_FOUND' => "Es wurden keine Werbart-Handler zum Editieren oder Löschen gefunden.", 'ADMIN_NETWORK_PARAMS_404' => "Es wurden keine API-Abfrageparameter zum Werbenetzwerk %s gefunden.", + 'ADMIN_NETWORK_REQUEST_PARAMETER_NOT_ADDED' => "Der API-Abfrageparameter %s wurde nicht hinzugefügt.", // - Form titles 'ADMIN_NETWORK_ADD_TITLE' => "Neues Werbenetzwerk hinzufügen - Allgemeine Daten", 'ADMIN_NETWORK_EDIT_TITLE' => "Werbenetzwerk editieren - Allgemeine Daten", 'ADMIN_NETWORK_DELETE_TITLE' => "Werbenetzwerk löschen - Allgemeine Daten", 'ADMIN_NETWORK_SELECT_TITLE' => "Werbenetzwerk auswählen", 'ADMIN_NETWORK_TYPES_ADD_TITLE' => "Werbenetzwerk verwalten - Neue Werbeart hinzufügen", + 'ADMIN_NETWORK_TYPES_LIST_TITLE' => "Werbeart-Handler auflisten und verwalten", 'ADMIN_NETWORK_TYPES_EDIT_TITLE' => "Werbeart-Handler editieren", 'ADMIN_NETWORK_TYPES_DELETE_TITLE' => "Werbeart-Handle löschen", - 'ADMIN_NETWORK_TYPES_LIST_TITLE' => "Werbeart-Handler auflisten und verwalten", 'ADMIN_NETWORK_PARAMS_ADD_TITLE' => "Werbenetzwerk verwalten - Neuen API-Abfrageparameter hinzufügen", + 'ADMIN_NETWORK_PARAMS_LIST_TITLE' => "API-Abfrageparameter auflisten und verwalten", // - Link titles 'ADMIN_NETWORK_LIST_TYPES_LINK_TITLE' => "Weiter zu den Werbearten", 'ADMIN_NETWORK_LIST_PARAMS_LINK_TITLE' => "Weiter zu den Abfrageparametern", @@ -87,9 +90,12 @@ addMessages(array( 'ADMIN_NETWORK_TYPES_CHANGE' => "Handler ändern", 'ADMIN_NETWORK_TYPES_REMOVE' => "Handler entfernen", 'ADMIN_NETWORK_PARAMS_ADD' => "Abfrageparameter hinzufügen", + 'ADMIN_NETWORK_PARAMS_EDIT' => "Editieren", + 'ADMIN_NETWORK_PARAMS_DELETE' => "Löschen", // - Success titles 'ADMIN_NETWORK_ADDED_TITLE' => "Allgemeine Werbenetzwerkdaten hinzugefügt.", 'ADMIN_NETWORK_TYPES_ADDED_TITLE' => "Werbeart-Handler hinzugefügt.", + 'ADMIN_NETWORK_REQUEST_PARAM_ADDED_TITLE' => "API-Abfrageparameter hinzugefügt", // - Success nots 'ADMIN_NETWORK_UPDATED' => "Es wurden %s Einträge in den allgemeinen Daten aktualisiert.", 'ADMIN_NETWORK_REMOVED' => "Es wurden %s Einträge aus den allgemeinen Daten gelöscht.", @@ -101,6 +107,7 @@ addMessages(array( 'ADMIN_NETWORK_TYPES_ADD_NOTE' => "Fügen Sie hier weitere Werbearten dem ausgwählten Werbenetzwerk hinzu. Die Abfrage-, Klick- und Banner-URL müssen dabei Platzhalter enthalten, die Sie der Dokumentation und
dem Forum entnehmen können.", 'ADMIN_NETWORK_TYPES_LIST_NOTE' => "Seien Sie mit dem Löschen und Editieren von Werbeart-Handlern sehr vorsichtig. Sie sollten hierzu Rücksprache im Forum halten. Dokumentation zu den Platzhaltern (%FOO%, %BAR% usw.) finden Sie in der Dokumentation DOCs/de/network/README.txt.", 'ADMIN_NETWORK_PARAMS_ADD_NOTE' => "Fügen Sie hier weitere Abfrageparameter dem ausgwählten Werbenetzwerk hinzu. Geben Sie keine Werte an, wie z.B. 5 Sekunden oder 30 Mails, geben Sie bei Abfrageparameter den GET- bzw. POST-Parameternamen an.", + 'ADMIN_NETWORK_PARAMS_LIST_NOTE' => "Seien Sie mit dem Löschen und Editieren von API-Abfrageparameter sehr vorsichtig. Sie sollten hierzu Rücksprache im Forum halten. Dokumentation zu den Abfragenamen (%FOO%, %BAR% usw.) finden Sie in der Dokumentation DOCs/de/network/README.txt.", // - Advertise types 'ADMIN_NETWORK_TYPES_BANNERCLICK' => "Banner-Klick", 'ADMIN_NETWORK_TYPES_BANNERVIEW' => "Banner-View", @@ -143,13 +150,17 @@ addMessages(array( 'ADMIN_NETWORK_TYPES_CLICK_URL' => "Klick-URL der Werbeart", 'ADMIN_NETWORK_TYPES_BANNER_URL' => "Banner-URL der Werbeart", // - API request parameter + 'ADMIN_NETWORK_TYPE_SELECT' => "Werbeart-Handler auswählen", 'ADMIN_NETWORK_PARAMS_KEY' => "Abfragename", 'ADMIN_NETWORK_PARAMS_VALUE' => "Abfrageparameter", 'ADMIN_NETWORK_PARAMS_ID' => "Kundennummer (Id)", + 'ADMIN_NETWORK_PARAMS_SID' => "Webseiten-Id", 'ADMIN_NETWORK_PARAMS_PASSWORD' => "Interface-Kennwort", 'ADMIN_NETWORK_PARAMS_RELOAD' => "Maximale Reloadsperre", + 'ADMIN_NETWORK_PARAMS_MINIMUM_STAY' => "Mindestauffenthalt", 'ADMIN_NETWORK_PARAMS_REMAIN' => "Mindestanzahl der restlichen Klicks", 'ADMIN_NETWORK_PARAMS_REWARD' => "Mindestvergütung", + 'ADMIN_NETWORK_PARAMS_SIZE' => "Werbemittelgrösse", 'ADMIN_NETWORK_PARAMS_EROTIC' => "Erotik erlaubt", )); diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index 72b6b2e24d..273019962a 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -318,7 +318,7 @@ LIMIT 1", $bonus = (SQL_AFFECTEDROWS() == 1); } // END - if - if (($bonus === true) && (getRequestElement('mode') == 'bonus')) { + if (($bonus === true) && (getRequestParameter('mode') == 'bonus')) { // Output message with added points $GLOBALS['message'] .= '
' . getMessage('BONUS_LOGIN_BONUS_ADDED') . '
'; } elseif (isExtensionActive('bonus')) { diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index cf270436b0..cc0309615d 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -44,9 +44,9 @@ if (!defined('__SECURITY')) { // Handle a (maybe) sent form here function doNetworkHandleForm () { // Was the form sent? - if ((isFormSent()) || (isPostRequestElementSet('edit')) || (isPostRequestElementSet('del')) || (isPostRequestElementSet('change')) || (isPostRequestElementSet('remove'))) { + if ((isFormSent()) || (isPostRequestParameterSet('edit')) || (isPostRequestParameterSet('del')) || (isPostRequestParameterSet('change')) || (isPostRequestParameterSet('remove'))) { // Do we have a 'do'? - if (isGetRequestElementSet('do')) { + if (isGetRequestParameterSet('do')) { // Process the request doAdminNetworkProcessForm(); } else { @@ -59,23 +59,23 @@ function doNetworkHandleForm () { // Processes an admin form function doAdminNetworkProcessForm () { // Form really sent? - if ((!isFormSent()) && (!isPostRequestElementSet('edit')) && (!isPostRequestElementSet('del')) && (!isPostRequestElementSet('change')) && (!isPostRequestElementSet('remove'))) { + if ((!isFormSent()) && (!isPostRequestParameterSet('edit')) && (!isPostRequestParameterSet('del')) && (!isPostRequestParameterSet('change')) && (!isPostRequestParameterSet('remove'))) { // Abort here loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_FORM_NOT_SENT')); return; - } elseif (!isGetRequestElementSet('do')) { + } elseif (!isGetRequestParameterSet('do')) { // No 'do' found loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NETWORK_DO_404')); return; } // Create function name - $functionName = sprintf("doAdminNetworkProcess%sForm", ucfirst(strtolower(getRequestElement('do')))); + $functionName = sprintf("doAdminNetworkProcess%sForm", ucfirst(strtolower(getRequestParameter('do')))); // Is the function valid? if (!function_exists($functionName)) { // Invalid function name - debug_report_bug('Invalid do ' . getRequestElement('do') . ', function ' . $functionName .' does not exist.', false); + debug_report_bug('Invalid do ' . getRequestParameter('do') . ', function ' . $functionName .' does not exist.', false); } // END - if // Call-back the method handling our request @@ -114,6 +114,22 @@ function isNetworkTypeHandleValid ($type, $networkId) { return $isValid; } +// Checks wether the given network request parameter is already used (valid) +function isNetworkRequestParameterValid ($key, $type, $networkId) { + // Query for it + $result = SQL_QUERY_ESC("SELECT `network_param_id` FROM `{?_MYSQL_PREFIX?}_network_request_params` WHERE `network_id`=%s AND `network_type_id`=%s AND `request_param_key`='%s' LIMIT 1", + array($networkId, $type, $key), __FUNCTION__, __LINE__); + + // Does it exist? + $isValid = (SQL_NUMROWS($result) == 1); + + // Free result + SQL_FREERESULT($result); + + // Return result + return $isValid; +} + // "Getter" for a network's data by provided id number function getNetworkDataById ($id) { // Ids lower one are not accepted @@ -259,14 +275,14 @@ ORDER BY // Callback function to add new network function doAdminNetworkProcessAddnetworkForm () { // We can say here, the form is sent, so check if the network is already added - if (isNetworkNameValid(postRequestElement('network_short_name'))) { + if (isNetworkNameValid(postRequestParameter('network_short_name'))) { // Already there - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_ALREADY_ADDED', postRequestElement('network_short_name'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_ALREADY_ADDED', postRequestParameter('network_short_name'))); return false; } // END - if // Remove the 'ok' part - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); // Add the whole request to database SQL_QUERY("INSERT INTO @@ -278,7 +294,7 @@ function doAdminNetworkProcessAddnetworkForm () { )", __FUNCTION__, __LINE__); // Add the id for output only - setPostRequestElement('network_id', SQL_INSERTID()); + setPostRequestParameter('network_id', SQL_INSERTID()); // Output message if (SQL_AFFECTEDROWS() == 1) { @@ -286,7 +302,7 @@ function doAdminNetworkProcessAddnetworkForm () { loadTemplate('admin_network_added', false, postRequestArray()); } else { // Not added - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_DATA_NOT_ADDED', postRequestElement('network_short_name'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_DATA_NOT_ADDED', postRequestParameter('network_short_name'))); } } @@ -296,7 +312,7 @@ function doAdminNetworkProcessHandlenetworkForm () { if (countPostSelection() > 0) { // Something has been selected, so start displaying one by one $SW = 2; $OUT = ''; - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Is this selected? if ($sel == 1) { // Load this network's data @@ -307,7 +323,7 @@ function doAdminNetworkProcessHandlenetworkForm () { // Add color $networkData['sw'] = $SW; - if (isPostRequestElementSet('edit')) { + if (isPostRequestParameterSet('edit')) { // Make selection box for network_request_type $networkData['network_request_type'] = generateOptionList( '/ARRAY/', @@ -321,7 +337,7 @@ function doAdminNetworkProcessHandlenetworkForm () { // Add row template for editing $OUT .= loadTemplate('admin_edit_networks_row', true, $networkData); - } elseif (isPostRequestElementSet('del')) { + } elseif (isPostRequestParameterSet('del')) { // Translate the request type $networkData['network_request_type'] = getMessage('ADMIN_NETWORK_REQUEST_TYPE_' . $networkData['network_request_type']); @@ -341,9 +357,9 @@ function doAdminNetworkProcessHandlenetworkForm () { // If we have no rows, we don't need to display the edit form if (!empty($OUT)) { // Output main template - if (isPostRequestElementSet('edit')) { + if (isPostRequestParameterSet('edit')) { loadTemplate('admin_edit_networks', false, $OUT); - } elseif (isPostRequestElementSet('del')) { + } elseif (isPostRequestParameterSet('del')) { loadTemplate('admin_del_networks', false, $OUT); } else { // Problem! @@ -364,11 +380,11 @@ function doAdminNetworkProcessHandlenetworktypeForm () { // Do we have selections? if (countPostSelection() > 0) { // Load network data - $networkData = getNetworkDataById(getRequestElement('network')); + $networkData = getNetworkDataById(getRequestParameter('network')); // Something has been selected, so start displaying one by one $SW = 2; $OUT = ''; - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Is this selected? if ($sel == 1) { // Load this network's data @@ -379,10 +395,10 @@ function doAdminNetworkProcessHandlenetworktypeForm () { // Add color $networkTypeData['sw'] = $SW; - if (isPostRequestElementSet('edit')) { + if (isPostRequestParameterSet('edit')) { // Add row template for deleting $OUT .= loadTemplate('admin_edit_network_types_row', true, $networkTypeData); - } elseif (isPostRequestElementSet('del')) { + } elseif (isPostRequestParameterSet('del')) { // Fix empty banner URL if (trim($networkTypeData['network_type_banner_url']) == '') $networkTypeData['network_type_banner_url'] = '---'; @@ -404,13 +420,13 @@ function doAdminNetworkProcessHandlenetworktypeForm () { // Prepare content for template $content = array( 'rows' => $OUT, - 'network_data' => getNetworkDataById(getRequestElement('network')) + 'network_data' => getNetworkDataById(getRequestParameter('network')) ); // Output main template - if (isPostRequestElementSet('edit')) { + if (isPostRequestParameterSet('edit')) { loadTemplate('admin_edit_network_types', false, $content); - } elseif (isPostRequestElementSet('del')) { + } elseif (isPostRequestParameterSet('del')) { loadTemplate('admin_del_network_types', false, $content); } else { // Problem! @@ -434,7 +450,7 @@ function doAdminNetworkProcessChangenetworkForm () { $updated = 0; // Something has been selected, so start updating them - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Update this entry? if ($sel == 1) { // Init data array @@ -479,7 +495,7 @@ function doAdminNetworkProcessRemovenetworkForm () { $removed = 0; // Something has been selected, so start updating them - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Update this entry? if ($sel == 1) { // Remove this entry @@ -501,19 +517,19 @@ function doAdminNetworkProcessRemovenetworkForm () { // Add a network type handler if not yet found function doAdminNetworkProcessAddnetworktypeForm () { // Is the network type handle already used with given network? - if (isNetworkTypeHandleValid(postRequestElement('network_type_handle'), getRequestElement('network'))) { + if (isNetworkTypeHandleValid(postRequestParameter('network_type_handle'), getRequestParameter('network'))) { // Already added - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_TYPES_HANDLE_ALREADY_ADDED', postRequestElement('network_type_handle'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_TYPES_HANDLE_ALREADY_ADDED', postRequestParameter('network_type_handle'))); // ... so abort here return false; } // END - if // Remove the 'ok' part - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); // Add id - setPostRequestElement('network_id', getRequestElement('network')); + setPostRequestParameter('network_id', getRequestParameter('network')); // Add the whole request to database SQL_QUERY("INSERT INTO @@ -530,7 +546,7 @@ function doAdminNetworkProcessAddnetworktypeForm () { loadTemplate('admin_network_type_added', false, postRequestArray()); } else { // Not added - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_TYPES_NOT_ADDED', postRequestElement('network_type_handle'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_TYPES_NOT_ADDED', postRequestParameter('network_type_handle'))); } } @@ -542,7 +558,7 @@ function doAdminNetworkProcessChangenetworktypeForm () { $updated = 0; // Something has been selected, so start updating them - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Update this entry? if ($sel == 1) { // Init data array @@ -587,7 +603,7 @@ function doAdminNetworkProcessRemovenetworktypeForm () { $removed = 0; // Something has been selected, so start updating them - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Update this entry? if ($sel == 1) { // Remove this entry @@ -606,5 +622,41 @@ function doAdminNetworkProcessRemovenetworktypeForm () { } // END - if } +// Adds a request parameter to given network and type +function doAdminNetworkProcessAddnetworkparamForm () { + // Is the request parameter already used with given network? + if (isNetworkRequestParameterValid(postRequestParameter('request_param_key'), postRequestParameter('network_type_id'), getRequestParameter('network'))) { + // Already added + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_REQUEST_PARAMETER_ALREADY_ADDED', postRequestParameter('request_param_key'))); + + // ... so abort here + return false; + } // END - if + + // Remove the 'ok' part + unsetPostRequestParameter('ok'); + + // Add id + setPostRequestParameter('network_id', getRequestParameter('network')); + + // Add the whole request to database + SQL_QUERY("INSERT INTO + `{?_MYSQL_PREFIX?}_network_request_params` +( + `" . implode('`,`', array_keys(postRequestArray())) . "` +) VALUES ( + '" . implode("','", array_values(postRequestArray())) . "' +)", __FUNCTION__, __LINE__); + + // Output message + if (SQL_AFFECTEDROWS() == 1) { + // Successfully added + loadTemplate('admin_network_request_param_added', false, postRequestArray()); + } else { + // Not added + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_REQUEST_PARAMETER_NOT_ADDED', postRequestParameter('request_param_key'))); + } +} + // [EOF] ?> diff --git a/inc/libs/newsletter_functions.php b/inc/libs/newsletter_functions.php index 0de1fe33cc..5dae6a1419 100644 --- a/inc/libs/newsletter_functions.php +++ b/inc/libs/newsletter_functions.php @@ -127,7 +127,7 @@ function insertNewsletterUrls ($text) { // Wrapper for sending newsletter and wrapping URLs / HTML mail function sendNewsletter ($to, $subject, $message, $mode) { // Send mail away as HTML - if (postRequestElement('auto_urls') == 'Y') { + if (postRequestParameter('auto_urls') == 'Y') { // Automatically insert URLs into newsletter if ((isExtensionActive('html_mail')) && ($mode == 'html')) { // Send HTML mail diff --git a/inc/libs/other_functions.php b/inc/libs/other_functions.php index eefb919622..5ef70180ff 100644 --- a/inc/libs/other_functions.php +++ b/inc/libs/other_functions.php @@ -68,7 +68,7 @@ function displayDebugSqls () { // Filter for debugging SQLs function FILTER_DISPLAY_DEBUG_SQL () { // Shall we display SQL queries? - if ((isAdmin()) && (isExtensionInstalledAndNewer('other', '0.2.2')) && (getConfig('display_debug_sqls') == 'Y') && (!isGetRequestElementSet('frame')) && ($GLOBALS['header_sent'] == 2)) { + if ((isAdmin()) && (isExtensionInstalledAndNewer('other', '0.2.2')) && (getConfig('display_debug_sqls') == 'Y') && (!isGetRequestParameterSet('frame')) && ($GLOBALS['header_sent'] == 2)) { // Then display it here displayDebugSqls(); } // END - if diff --git a/inc/libs/politician_stop_functions.php b/inc/libs/politician_stop_functions.php index 47fde787e9..2390f3a7f7 100644 --- a/inc/libs/politician_stop_functions.php +++ b/inc/libs/politician_stop_functions.php @@ -50,7 +50,7 @@ function loadPoliticianStopSnippet () { // Filter for displaying politician_stop snippet function FILTER_DISPLAY_POLITICIAN_STOP_SNIPPET () { // Shall we include the politician_stop snippet? - if ((!isGetRequestElementSet('frame')) && (isExtensionActive('politician_stop')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) { + if ((!isGetRequestParameterSet('frame')) && (isExtensionActive('politician_stop')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) { // Then display it here loadPoliticianStopSnippet(); } // END - if diff --git a/inc/libs/primera_functions.php b/inc/libs/primera_functions.php index 7d58b8ee74..ef6b65c183 100644 --- a/inc/libs/primera_functions.php +++ b/inc/libs/primera_functions.php @@ -236,7 +236,7 @@ class PrimeraApi { // is not false the API data is valid, else invalid function testPrimeraApi () { // Get new instance - $api = new PrimeraApi(postRequestElement('primera_api_name'), postRequestElement('primera_api_md5')); + $api = new PrimeraApi(postRequestParameter('primera_api_name'), postRequestParameter('primera_api_md5')); // Was that fine? return ($api->getPrimera() !== false); diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index efc9e4b2ef..06abee9cc5 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -99,7 +99,7 @@ function registerGenerateCategoryTable ($mode, $return=false) { ); // Mark categories - if ((postRequestElement('cat', $content['id']) == 'Y') || ((getConfig('register_default') == 'Y') && (!isPostRequestElementSet('cat', $content['id'])))) { + if ((postRequestParameter('cat', $content['id']) == 'Y') || ((getConfig('register_default') == 'Y') && (!isPostRequestParameterSet('cat', $content['id'])))) { $content['def_y'] = ' checked="checked"'; } else { $content['def_n'] = ' checked="checked"'; diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 7ef4e61a30..99e88565e9 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -137,7 +137,7 @@ function handlSponsorRequest (&$postData, $update=false, $messageArray=array(), // Remove last ", " from SQL string $sql = substr($sql, 0, -2)." WHERE `id`='%s' LIMIT 1"; - $DATA['values'][] = bigintval(getRequestElement('id')); + $DATA['values'][] = bigintval(getRequestParameter('id')); // Generate message $message = getMessageFromIndexedArray(getMessage('ADMIN_SPONSOR_UPDATED'), 'updated', $messageArray); diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 5b2bca1ce7..fd6fac6d49 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -798,10 +798,10 @@ function SURFBAR_DETERMINE_TEMPLATE_NAME() { $templateName = "surfbar_frameset"; // Any frame set? ;-) - if (isGetRequestElementSet('frame')) { + if (isGetRequestParameterSet('frame')) { // Use the frame as a template name part... ;-) $templateName = sprintf("surfbar_frame_%s", - getRequestElement('frame') + getRequestParameter('frame') ); } // END - if diff --git a/inc/libs/theme_functions.php b/inc/libs/theme_functions.php index e39f97f3f7..4c5c934c98 100644 --- a/inc/libs/theme_functions.php +++ b/inc/libs/theme_functions.php @@ -240,17 +240,17 @@ function getActualTheme () { // Fix it to default $ret = 'default'; } // END - if - } elseif ((!isInstalled()) && ((isInstalling()) || (getOutputMode() == true)) && ((isGetRequestElementSet('theme')) || (isPostRequestElementSet('theme')))) { + } elseif ((!isInstalled()) && ((isInstalling()) || (getOutputMode() == true)) && ((isGetRequestParameterSet('theme')) || (isPostRequestParameterSet('theme')))) { // Prepare filename for checking - $themeFile = sprintf("theme/%s/theme.php", getRequestElement('theme')); + $themeFile = sprintf("theme/%s/theme.php", getRequestParameter('theme')); // Installation mode active - if ((isGetRequestElementSet('theme')) && (isIncludeReadable($theme))) { + if ((isGetRequestParameterSet('theme')) && (isIncludeReadable($theme))) { // Set cookie from URL data - setTheme(getRequestElement('theme')); - } elseif (isIncludeReadable(sprintf("theme/%s/theme.php", secureString(postRequestElement('theme'))))) { + setTheme(getRequestParameter('theme')); + } elseif (isIncludeReadable(sprintf("theme/%s/theme.php", secureString(postRequestParameter('theme'))))) { // Set cookie from posted data - setTheme(secureString(postRequestElement('theme'))); + setTheme(secureString(postRequestParameter('theme'))); } // Set return value @@ -307,9 +307,9 @@ function getThemeId ($name) { // Filter for generic handling of theme change function FILTER_HANDLE_THEME_CHANGE () { // Check if new theme is selcted - if ((isPostRequestElementSet('new_theme')) && (postRequestElement('new_theme') != getCurrentTheme())) { + if ((isPostRequestParameterSet('new_theme')) && (postRequestParameter('new_theme') != getCurrentTheme())) { // Set new theme for guests - $newTheme = postRequestElement('new_theme'); + $newTheme = postRequestParameter('new_theme'); // Change to new theme setTheme($newTheme); diff --git a/inc/libs/uberwach_functions.php b/inc/libs/uberwach_functions.php index 90b9867813..7d6b3420ec 100644 --- a/inc/libs/uberwach_functions.php +++ b/inc/libs/uberwach_functions.php @@ -53,7 +53,7 @@ function loadUberwachSnippet () { // Filter for displaying uberwach snippet function FILTER_DISPLAY_UBERWACH_SNIPPET () { // Shall we include the uberwach snippet? - if ((!isGetRequestElementSet('frame')) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) { + if ((!isGetRequestParameterSet('frame')) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) { // Then display it here loadUberwachSnippet(); } // END - if diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index 1c4bc867cc..0ef2a4c903 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -43,22 +43,22 @@ if (!defined('__SECURITY')) { // Add links for selecting some users function alpha ($sortby, $colspan, $return=false) { - if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', 0); - $add = '&page='.getRequestElement('page').'&offset='.getRequestElement('offset'); - if (isGetRequestElementSet('mode')) $add .= '&mode='.getRequestElement('mode'); + if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', 0); + $add = '&page='.getRequestParameter('page').'&offset='.getRequestParameter('offset'); + if (isGetRequestParameterSet('mode')) $add .= '&mode='.getRequestParameter('mode'); /* Creates the list of letters and makes them a link. */ $alphabet = explode(',', getMessage('_ALL2') . ',A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,' . getMessage('_OTHERS')); $num = count($alphabet) - 1; $OUT = ''; while (list($counter, $ltr) = each($alphabet)) { - if (getRequestElement('letter') == $ltr) { + if (getRequestParameter('letter') == $ltr) { // Current letter is letter from URL $OUT .= '' . $ltr . ''; } else { // Output link to letter $OUT .= '' . $ltr . ''; } @@ -83,15 +83,15 @@ function alpha ($sortby, $colspan, $return=false) { // Add links for sorting function addSortLinks ($letter, $sortby, $colspan, $return=false) { $OUT = ''; - if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', 0); - if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 0); + if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', 0); + if (!isGetRequestParameterSet('page')) setGetRequestParameter('page' , 0); // Add page and offset - $add = '&page=' . getRequestElement('page') . '&offset=' . getRequestElement('offset'); + $add = '&page=' . getRequestParameter('page') . '&offset=' . getRequestParameter('offset'); // Add status or mode - if (isGetRequestElementSet('status')) $add .= '&mode=' . getRequestElement('status'); - elseif (isGetRequestElementSet('mode')) $add .= '&mode=' . getRequestElement('mode'); + if (isGetRequestParameterSet('status')) $add .= '&mode=' . getRequestParameter('status'); + elseif (isGetRequestParameterSet('mode')) $add .= '&mode=' . getRequestParameter('mode'); // Makes order by links.. if ($letter == 'front') $letter = getMessage('_ALL2'); @@ -147,26 +147,26 @@ function addPageNavigation ($PAGES, $offset, $show_form, $colspan,$return=false) $OUT = ''; for ($page = 1; $page <= $PAGES; $page++) { - if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) { + if (($page == getRequestParameter('page')) || ((!isGetRequestParameterSet('page')) && ($page == 1))) { $OUT .= '-'; } else { - if (!isGetRequestElementSet('letter')) setGetRequestElement('letter', getMessage('_ALL2')); - if (!isGetRequestElementSet('sortby')) setGetRequestElement('sortby', 'userid'); + if (!isGetRequestParameterSet('letter')) setGetRequestParameter('letter', getMessage('_ALL2')); + if (!isGetRequestParameterSet('sortby')) setGetRequestParameter('sortby', 'userid'); // Base link $OUT .= ''; + $OUT .= '&letter=' . getRequestParameter('letter') . '&sortby=' . getRequestParameter('sortby') . '&page=' . $page . '&offset=' . $offset . '%}">'; } $OUT .= $page; - if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) { + if (($page == getRequestParameter('page')) || ((!isGetRequestParameterSet('page')) && ($page == 1))) { $OUT .= '-'; } else { $OUT .= ''; diff --git a/inc/load_config.php b/inc/load_config.php index b6fe037af4..f17c928bbe 100644 --- a/inc/load_config.php +++ b/inc/load_config.php @@ -83,7 +83,7 @@ if ((isIncludeReadable(getConfig('CACHE_PATH') . 'config-local.php')) && (isIncl } // Check if the user setups his MySQL stuff... -if ((empty($GLOBALS['mysql']['login'])) && (!isInstalling()) && (!isInstallationPhase()) && (!isGetRequestElementSet('installing')) && (isInstalled())) { +if ((empty($GLOBALS['mysql']['login'])) && (!isInstalling()) && (!isInstallationPhase()) && (!isGetRequestParameterSet('installing')) && (isInstalled())) { // No login entered and outside installation mode outputHtml('{--LANG_WARNING--}:'); if (isInstalled()) { diff --git a/inc/mails/doubler_mails.php b/inc/mails/doubler_mails.php index b47c597070..d068ffd4cb 100644 --- a/inc/mails/doubler_mails.php +++ b/inc/mails/doubler_mails.php @@ -58,8 +58,8 @@ if ($DOUBLER_POINTS == '0') { } // END - if // If not currently doubled set it to zero -unsetGetRequestElement('DOUBLER_UID'); -unsetPostRequestElement('DOUBLER_UID'); +unsetGetRequestParameter('DOUBLER_UID'); +unsetPostRequestParameter('DOUBLER_UID'); setSession('DOUBLER_UID', ''); if (empty($GLOBALS['doubler_userid'])) $GLOBALS['doubler_userid'] = '0'; diff --git a/inc/modules/admin.php b/inc/modules/admin.php index fabb665048..3455022bc7 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -53,19 +53,19 @@ $ret = 'init'; // Is no admin registered? if (!isAdminRegistered()) { // Admin is not registered so we have to inform the user - if ((isFormSent()) && ((!isPostRequestElementSet('login')) || (!isPostRequestElementSet('pass1')) || (strlen(postRequestElement('pass1')) < 4) || (!isPostRequestElementSet('pass2')) || (strlen(postRequestElement('pass2')) < 4) || (postRequestElement('pass1') != postRequestElement('pass2')))) { - setPostRequestElement('ok', '***'); + if ((isFormSent()) && ((!isPostRequestParameterSet('login')) || (!isPostRequestParameterSet('pass1')) || (strlen(postRequestParameter('pass1')) < 4) || (!isPostRequestParameterSet('pass2')) || (strlen(postRequestParameter('pass2')) < 4) || (postRequestParameter('pass1') != postRequestParameter('pass2')))) { + setPostRequestParameter('ok', '***'); } // END - if - if ((isFormSent()) && (postRequestElement('ok') != '***')) { + if ((isFormSent()) && (postRequestParameter('ok') != '***')) { // Hash the password with the old function because we are here in install mode - $hashedPass = md5(postRequestElement('pass1')); + $hashedPass = md5(postRequestParameter('pass1')); // Kill maybe existing session variables destroyAdminSession(false); // Do registration - $ret = addAdminAccount(postRequestElement('login'), $hashedPass, getConfig('WEBMASTER')); + $ret = addAdminAccount(postRequestParameter('login'), $hashedPass, getConfig('WEBMASTER')); // Check if registration wents fine switch ($ret) { @@ -98,8 +98,8 @@ if (!isAdminRegistered()) { if ($ret != 'done') { // Init login name $content['login'] = ''; - if (isPostRequestElementSet('login')) { - $content['login'] = postRequestElement('login'); + if (isPostRequestParameterSet('login')) { + $content['login'] = postRequestParameter('login'); } // END - if // Init array elements @@ -108,7 +108,7 @@ if (!isAdminRegistered()) { $content['pass2_message'] = ''; // Yet-another notice-fix - if ((isFormSent()) && (postRequestElement('ok') == '***')) { + if ((isFormSent()) && (postRequestParameter('ok') == '***')) { // Init variables $loginMessage = ''; $pass1Message = ''; @@ -121,15 +121,15 @@ if (!isAdminRegistered()) { if ((!empty($ret)) && ($ret != 'init')) $loginMessage = $ret; // No password 1 entered or to short? - if (!isPostRequestElementSet('pass1')) $pass1Message = getMessage('ADMIN_NO_PASS1'); - elseif (strlen(postRequestElement('pass1')) < 4) $pass1Message = getMessage('ADMIN_SHORT_PASS1'); + if (!isPostRequestParameterSet('pass1')) $pass1Message = getMessage('ADMIN_NO_PASS1'); + elseif (strlen(postRequestParameter('pass1')) < 4) $pass1Message = getMessage('ADMIN_SHORT_PASS1'); // No password 2 entered or to short? - if (!isPostRequestElementSet('pass2')) $pass2Message = getMessage('ADMIN_NO_PASS2'); - elseif (strlen(postRequestElement('pass2')) < 4) $pass2Message = getMessage('ADMIN_SHORT_PASS2'); + if (!isPostRequestParameterSet('pass2')) $pass2Message = getMessage('ADMIN_NO_PASS2'); + elseif (strlen(postRequestParameter('pass2')) < 4) $pass2Message = getMessage('ADMIN_SHORT_PASS2'); // Both didn't match? - if (postRequestElement('pass1') != postRequestElement('pass2')) { + if (postRequestParameter('pass1') != postRequestParameter('pass2')) { // No match if (empty($pass1Message)) $pass1Message = getMessage('ADMIN_PASS1_MISMATCH'); if (empty($pass2Message)) $pass2Message = getMessage('ADMIN_PASS2_MISMATCH'); @@ -147,24 +147,24 @@ if (!isAdminRegistered()) { // Load register template loadTemplate('admin_reg_form', false, $content); } -} elseif (isGetRequestElementSet('reset_pass')) { +} elseif (isGetRequestParameterSet('reset_pass')) { // Is the form submitted? - if ((isPostRequestElementSet('send_link')) && (isPostRequestElementSet('email'))) { + if ((isPostRequestParameterSet('send_link')) && (isPostRequestParameterSet('email'))) { // Output result - loadTemplate('admin_settings_saved', false, sendAdminPasswordResetLink(postRequestElement('email'))); - } elseif (isGetRequestElementSet('hash')) { + loadTemplate('admin_settings_saved', false, sendAdminPasswordResetLink(postRequestParameter('email'))); + } elseif (isGetRequestParameterSet('hash')) { // Output form for hash validation - loadTemplate('admin_validate_reset_hash_form', false, getRequestElement('hash')); - } elseif ((isPostRequestElementSet('validate_hash')) && (isPostRequestElementSet('login')) && (isPostRequestElementSet('hash'))) { + loadTemplate('admin_validate_reset_hash_form', false, getRequestParameter('hash')); + } elseif ((isPostRequestParameterSet('validate_hash')) && (isPostRequestParameterSet('login')) && (isPostRequestParameterSet('hash'))) { // Validate the login data and hash - $valid = adminResetValidateHashLogin(postRequestElement('hash'), postRequestElement('login')); + $valid = adminResetValidateHashLogin(postRequestParameter('hash'), postRequestParameter('login')); // Valid? if ($valid === true) { // Prepare content first $content = array( - 'hash' => secureString(postRequestElement('hash')), - 'login' => secureString(postRequestElement('login')) + 'hash' => secureString(postRequestParameter('hash')), + 'login' => secureString(postRequestParameter('login')) ); // Validation okay so display form for final password change @@ -173,11 +173,11 @@ if (!isAdminRegistered()) { // Cannot validate the login data and hash loadTemplate('admin_settings_saved', false, getMessage('ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED')); } - } elseif ((isPostRequestElementSet('reset_pass')) && (isPostRequestElementSet('hash')) && (isPostRequestElementSet('login')) && (isPostRequestElementSet('pass1')) && (postRequestElement('pass1') == postRequestElement('pass2'))) { + } elseif ((isPostRequestParameterSet('reset_pass')) && (isPostRequestParameterSet('hash')) && (isPostRequestParameterSet('login')) && (isPostRequestParameterSet('pass1')) && (postRequestParameter('pass1') == postRequestParameter('pass2'))) { // Okay, we shall the admin password here. So first revalidate the hash - if (adminResetValidateHashLogin(postRequestElement('hash'), postRequestElement('login'))) { + if (adminResetValidateHashLogin(postRequestParameter('hash'), postRequestParameter('login'))) { // Output result - loadTemplate('admin_reset_pass_done', false, doResetAdminPassword(postRequestElement('login'), postRequestElement('pass1'))); + loadTemplate('admin_reset_pass_done', false, doResetAdminPassword(postRequestParameter('login'), postRequestParameter('pass1'))); } else { // Validation failed loadTemplate('admin_settings_saved', false, getMessage('ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2')); @@ -193,19 +193,19 @@ if (!isAdminRegistered()) { redirectToUrl('modules.php?module=admin&logout=1'); } // END - if - if (isGetRequestElementSet('register')) { + if (isGetRequestParameterSet('register')) { // Registration of first admin is done - if (getRequestElement('register') == 'done') loadTemplate('admin_settings_saved', false, getMessage('ADMIN_REGISTER_DONE')); + if (getRequestParameter('register') == 'done') loadTemplate('admin_settings_saved', false, getMessage('ADMIN_REGISTER_DONE')); } // END - if // Check if the admin has submitted data or not - if ((isFormSent()) && ((!isPostRequestElementSet('login')) || (!isPostRequestElementSet('pass')) || (strlen(postRequestElement('pass')) < 4))) { - setPostRequestElement('ok', '***'); + if ((isFormSent()) && ((!isPostRequestParameterSet('login')) || (!isPostRequestParameterSet('pass')) || (strlen(postRequestParameter('pass')) < 4))) { + setPostRequestParameter('ok', '***'); } // END - if - if ((isFormSent()) && (postRequestElement('ok') != '***')) { + if ((isFormSent()) && (postRequestParameter('ok') != '***')) { // All required data was entered so we check his account - $ret = ifAdminLoginDataIsValid(postRequestElement('login'), postRequestElement('pass')); + $ret = ifAdminLoginDataIsValid(postRequestParameter('login'), postRequestParameter('pass')); // Which status do we have? switch ($ret) { @@ -221,20 +221,20 @@ if (!isAdminRegistered()) { // Add data to URL if (isWhatSet()) $URL .= 'what='.getWhat(); elseif (isActionSet()) $URL .= 'action='.getAction(); - elseif (isGetRequestElementSet('area')) $URL .= 'area='.getRequestElement('area'); + elseif (isGetRequestParameterSet('area')) $URL .= 'area='.getRequestParameter('area'); // Load URL redirectToUrl($URL); break; case '404': // Administrator login not found - setPostRequestElement('ok', $ret); - $ret = getMaskedMessage('ADMIN_404', postRequestElement('login')); + setPostRequestParameter('ok', $ret); + $ret = getMaskedMessage('ADMIN_404', postRequestParameter('login')); destroyAdminSession(); break; case 'pass': // Wrong password - setPostRequestElement('ok', $ret); + setPostRequestParameter('ok', $ret); $ret = '{--WRONG_PASS--} [{--ADMIN_RESET_PASS--}]'; destroyAdminSession(); break; @@ -248,8 +248,8 @@ if (!isAdminRegistered()) { // Error detected? if ($ret != 'done') { $content['login'] = ''; - if (isPostRequestElementSet('login')) { - $content['login'] = postRequestElement('login'); + if (isPostRequestParameterSet('login')) { + $content['login'] = postRequestParameter('login'); } // END - if // Init array elements @@ -261,19 +261,19 @@ if (!isAdminRegistered()) { $loginMessage = ''; $passwdMessage = ''; // No login entered? - if (!isPostRequestElementSet('login')) $loginMessage = getMessage('ADMIN_NO_LOGIN'); + if (!isPostRequestParameterSet('login')) $loginMessage = getMessage('ADMIN_NO_LOGIN'); // An error comes back from login? - if ((!empty($ret)) && (postRequestElement('ok') == '404')) $loginMessage = $ret; + if ((!empty($ret)) && (postRequestParameter('ok') == '404')) $loginMessage = $ret; // No password entered? - if (!isPostRequestElementSet('pass')) $passwdMessage = getMessage('ADMIN_NO_PASS'); + if (!isPostRequestParameterSet('pass')) $passwdMessage = getMessage('ADMIN_NO_PASS'); // Or password too short? - if (strlen(postRequestElement('pass')) < 4) $passwdMessage = getMessage('ADMIN_SHORT_PASS'); + if (strlen(postRequestParameter('pass')) < 4) $passwdMessage = getMessage('ADMIN_SHORT_PASS'); // An error comes back from login? - if ((!empty($ret)) && (postRequestElement('ok') == 'pass')) $passwdMessage = $ret; + if ((!empty($ret)) && (postRequestParameter('ok') == 'pass')) $passwdMessage = $ret; // Load message template $content['login_message'] = loadTemplate('admin_login_msg', true, $loginMessage); @@ -292,9 +292,9 @@ if (!isAdminRegistered()) { // Set default values $content = merge_array($content, array('target' => 'action', 'value' => 'login')); } - } elseif (isGetRequestElementSet('area')) { + } elseif (isGetRequestParameterSet('area')) { // Restore old area value - $content = merge_array($content, array('target' => 'area', 'value' => getRequestElement('area'))); + $content = merge_array($content, array('target' => 'area', 'value' => getRequestParameter('area'))); } else { // Set default values $content = merge_array($content, array('target' => 'action', 'value' => 'login')); @@ -303,19 +303,19 @@ if (!isAdminRegistered()) { // Load login form template loadTemplate('admin_login_form', false, $content); } // END - if -} elseif (isGetRequestElementSet('logout')) { +} elseif (isGetRequestParameterSet('logout')) { // Only try to remove cookies if (destroyAdminSession()) { // Load logout template - if (isGetRequestElementSet('register')) { + if (isGetRequestParameterSet('register')) { // Secure input - $register = getRequestElement('register'); + $register = getRequestParameter('register'); // Special logout redirect for installation of given extension loadTemplate(sprintf("admin_logout_%s_install", $register)); - } elseif (isGetRequestElementSet('remove')) { + } elseif (isGetRequestParameterSet('remove')) { // Secure input - $remove = getRequestElement('remove'); + $remove = getRequestParameter('remove'); // Special logout redirect for removal of given extension loadTemplate(sprintf("admin_logout_%s_remove", $remove)); @@ -349,7 +349,7 @@ if (!isAdminRegistered()) { $area = 'entrance'; // Check for similar URL variable - if (isGetRequestElementSet('area')) $area = getRequestElement('area'); + if (isGetRequestParameterSet('area')) $area = getRequestParameter('area'); // Load logical-area menu-system file loadIncludeOnce('inc/modules/admin/lasys-inc.php'); @@ -364,13 +364,13 @@ if (!isAdminRegistered()) { break; case '404': // Administrator login not found - setPostRequestElement('ok', $ret); + setPostRequestParameter('ok', $ret); loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_404', getSession('admin_login'))); destroyAdminSession(); break; case 'pass': // Wrong password - setPostRequestElement('ok', $ret); + setPostRequestParameter('ok', $ret); loadTemplate('admin_settings_saved', false, getMessage('WRONG_PASS')); destroyAdminSession(); break; diff --git a/inc/modules/admin/action-logout.php b/inc/modules/admin/action-logout.php index c8fe63df47..b490b63cd3 100644 --- a/inc/modules/admin/action-logout.php +++ b/inc/modules/admin/action-logout.php @@ -44,10 +44,10 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isPostRequestElementSet('no')) { +if (isPostRequestParameterSet('no')) { // Do not logout now redirectToUrl('admin.php'); -} elseif ((isPostRequestElementSet(('yes'))) && (getAction() == 'logout')) { +} elseif ((isPostRequestParameterSet(('yes'))) && (getAction() == 'logout')) { // Redirect to logout link redirectToUrl('modules.php?module=admin&logout=1'); } diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 0f8382245e..66e71dc159 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -827,7 +827,7 @@ function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '') { } // END - if // Is the raw userid set? - if (postRequestElement('userid_raw', $id) > 0) { + if (postRequestParameter('userid_raw', $id) > 0) { // Generate subject $subjectLine = getMessage('MEMBER_'.strtoupper($subject).'_'.strtoupper($table).'_SUBJECT'); @@ -839,7 +839,7 @@ function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '') { } // Send email out - sendEmail(postRequestElement('userid_raw', $id), $subjectLine, $mail); + sendEmail(postRequestParameter('userid_raw', $id), $subjectLine, $mail); } // END - if // Generate subject @@ -847,9 +847,9 @@ function sendAdminBuildMails ($mode, $table, $content, $id, $subjectPart = '') { // Send admin notification out if (!empty($subjectPart)) { - sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestElement('userid_raw', $id)); + sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . strtolower($subjectPart) . '_' . $table, $content, postRequestParameter('userid_raw', $id)); } else { - sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . $table, $content, postRequestElement('userid_raw', $id)); + sendAdminNotification($subjectLine, 'admin_' . $mode . '_' . $table, $content, postRequestParameter('userid_raw', $id)); } } @@ -1007,7 +1007,7 @@ function adminDeleteEntriesConfirm ($IDs, $table, $columns=array(), $filterFunct $idList = ''; foreach ($IDs as $id => $sel) { // Is there a userid? - if (isPostRequestElementSet('userid_raw', $id)) { + if (isPostRequestParameterSet('userid_raw', $id)) { // Load all data from that id $result = SQL_QUERY_ESC("SELECT * FROM `{?_MYSQL_PREFIX?}_%s` WHERE %s=%s LIMIT 1", array($table, $idColumn, $id), __FUNCTION__, __LINE__); @@ -1395,7 +1395,7 @@ function doVerifyExpertSettings () { // Ask for them if (isFormSent()) { // Is the element set, then we need to change the admin - if (isPostRequestElementSet('expert_settings')) { + if (isPostRequestParameterSet('expert_settings')) { // Get it and prepare final post data array $postData['login'][getCurrentAdminId()] = getAdminLogin(getCurrentAdminId()); $postData['expert_warning'][getCurrentAdminId()] = 'N'; @@ -1404,7 +1404,7 @@ function doVerifyExpertSettings () { adminsChangeAdminAccount($postData, 'expert_warning'); // Clear form - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); } // END - if // All fine! diff --git a/inc/modules/admin/what-add_points.php b/inc/modules/admin/what-add_points.php index 069632197f..01a9b8be9f 100644 --- a/inc/modules/admin/what-add_points.php +++ b/inc/modules/admin/what-add_points.php @@ -44,11 +44,11 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (getRequestElement('userid') == 'all') { +if (getRequestParameter('userid') == 'all') { // Add points to all accounts - if ((isFormSent()) && (postRequestElement('points') > 0)) { + if ((isFormSent()) && (postRequestParameter('points') > 0)) { // Points - $content['points'] = bigintval(postRequestElement('points')); + $content['points'] = bigintval(postRequestParameter('points')); // Select all users $result_main = SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC", @@ -62,11 +62,11 @@ if (getRequestElement('userid') == 'all') { $GLOBALS['ref_level'] = -1; // Ok, add points and send an email to him... - addPointsDirectly('admin_all', $content['userid'], bigintval(postRequestElement('points'))); + addPointsDirectly('admin_all', $content['userid'], bigintval(postRequestParameter('points'))); // Prepare content - $content['text'] = SQL_ESCAPE(postRequestElement('reason')); - $content['points'] = bigintval(postRequestElement('points')); + $content['text'] = SQL_ESCAPE(postRequestParameter('reason')); + $content['points'] = bigintval(postRequestParameter('points')); // Load email template and send email away $message = loadEmailTemplate('add-points', $content, bigintval($content['userid'])); @@ -82,38 +82,38 @@ if (getRequestElement('userid') == 'all') { // Display form add points loadTemplate('admin_add_points_all'); } -} elseif (isGetRequestElementSet('userid')) { +} elseif (isGetRequestParameterSet('userid')) { // User id found in URL so we use this give him some credits - if (fetchUserData(getRequestElement('userid'))) { + if (fetchUserData(getRequestParameter('userid'))) { // Selected user does exist $content = getUserDataArray(); - if ((isFormSent()) && (isPostRequestElementSet('points'))) { + if ((isFormSent()) && (isPostRequestParameterSet('points'))) { // Add points and send an email to him... - addPointsDirectly('admin_single', bigintval(getRequestElement('userid')), bigintval(postRequestElement('points'))); + addPointsDirectly('admin_single', bigintval(getRequestParameter('userid')), bigintval(postRequestParameter('points'))); // Prepare content $content = array( - 'text' => SQL_ESCAPE(postRequestElement('reason')), - 'points' => bigintval(postRequestElement('points')) + 'text' => SQL_ESCAPE(postRequestParameter('reason')), + 'points' => bigintval(postRequestParameter('points')) ); // Message laden - $message = loadEmailTemplate('add-points', $content, bigintval(getRequestElement('userid'))); + $message = loadEmailTemplate('add-points', $content, bigintval(getRequestParameter('userid'))); - sendEmail(bigintval(getRequestElement('userid')), getMessage('ADMIN_ADD_SUBJ'), $message); + sendEmail(bigintval(getRequestParameter('userid')), getMessage('ADMIN_ADD_SUBJ'), $message); loadTemplate('admin_settings_saved', false, getMessage('ADMIN_POINTS_ADDED')); } else { // Prepare content $content['user'] = '' . $content['surname'] . ' ' . $content['family'] . ''; - $content['userid'] = bigintval(getRequestElement('userid')); + $content['userid'] = bigintval(getRequestParameter('userid')); // Output template loadTemplate('admin_add_points', false, $content); } } else { // User not found! - loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '
'); + loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '
'); } } else { // Output selection form with all confirmed user accounts listed diff --git a/inc/modules/admin/what-add_rallye.php b/inc/modules/admin/what-add_rallye.php index 1d7c7d6f1b..3435eba37b 100644 --- a/inc/modules/admin/what-add_rallye.php +++ b/inc/modules/admin/what-add_rallye.php @@ -46,8 +46,8 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Generate timestamps - $START = mktime(postRequestElement('start_hour'), postRequestElement('start_min'), postRequestElement('start_sec'), postRequestElement('start_month'), postRequestElement('start_day'), postRequestElement('start_year')); - $END = mktime(postRequestElement('end_hour') , postRequestElement('end_min') , postRequestElement('end_sec') , postRequestElement('end_month') , postRequestElement('end_day') , postRequestElement('end_year') ); + $START = mktime(postRequestParameter('start_hour'), postRequestParameter('start_min'), postRequestParameter('start_sec'), postRequestParameter('start_month'), postRequestParameter('start_day'), postRequestParameter('start_year')); + $END = mktime(postRequestParameter('end_hour') , postRequestParameter('end_min') , postRequestParameter('end_sec') , postRequestParameter('end_month') , postRequestParameter('end_day') , postRequestParameter('end_year') ); // Is there already a rallye running? $result = SQL_QUERY_ESC("SELECT id, admin_id FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE (start_time <= %s AND end_time >= %s) OR (start_time >= %s AND start_time <= %s) LIMIT 1", @@ -59,19 +59,19 @@ if (isFormSent()) { VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')", array( getCurrentAdminId(), - postRequestElement('title'), - postRequestElement('descr'), - postRequestElement('template'), + postRequestParameter('title'), + postRequestParameter('descr'), + postRequestParameter('template'), $START, $END, - postRequestElement('auto_add'), - postRequestElement('active'), - postRequestElement('notify'), + postRequestParameter('auto_add'), + postRequestParameter('active'), + postRequestParameter('notify'), ), __FILE__, __LINE__); // Load id $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE start_time='%s' AND end_time='%s' AND `title`='%s' LIMIT 1", - array($START, $END, postRequestElement('title')), __FILE__, __LINE__); + array($START, $END, postRequestParameter('title')), __FILE__, __LINE__); list($id) = SQL_FETCHROW($result); SQL_FREERESULT($result); diff --git a/inc/modules/admin/what-add_surfbar_url.php b/inc/modules/admin/what-add_surfbar_url.php index fc01349131..ba0f6ca2f7 100644 --- a/inc/modules/admin/what-add_surfbar_url.php +++ b/inc/modules/admin/what-add_surfbar_url.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Was an URL added? -if ((isPostRequestElementSet('add')) && (isPostRequestElementSet('url'))) { +if ((isPostRequestParameterSet('add')) && (isPostRequestParameterSet('url'))) { // Initialize variables $DATA = array(); $id = 'reload_ye'; @@ -53,7 +53,7 @@ if ((isPostRequestElementSet('add')) && (isPostRequestElementSet('url'))) { $postData = postRequestArray(); // Convert the "reload selections" - // @TODO Find all convertSelectionsToTimestamp() calls and rewrite postRequestElement() calls to $postData + // @TODO Find all convertSelectionsToTimestamp() calls and rewrite postRequestParameter() calls to $postData convertSelectionsToTimestamp($postData, $DATA, $id, $skip); // Then add this URL diff --git a/inc/modules/admin/what-admin_add.php b/inc/modules/admin/what-admin_add.php index 4f3f661ee8..272d4bd6e3 100644 --- a/inc/modules/admin/what-admin_add.php +++ b/inc/modules/admin/what-admin_add.php @@ -45,8 +45,8 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Check if the admin has entered title and what-php file name... -if (((!isPostRequestElementSet('title')) || (!isPostRequestElementSet('menu')) || (!isPostRequestElementSet(('descr')))) && (isFormSent())) { - unsetPostRequestElement('ok'); +if (((!isPostRequestParameterSet('title')) || (!isPostRequestParameterSet('menu')) || (!isPostRequestParameterSet(('descr')))) && (isFormSent())) { + unsetPostRequestParameter('ok'); } // END - if if (!isFormSent()) { @@ -163,25 +163,25 @@ if (!isFormSent()) { loadTemplate('admin_admin_add', false, $content); } elseif (!isDemoModeActive()) { // Insert new menu entry - if (isPostRequestElementSet('menu')) { + if (isPostRequestParameterSet('menu')) { // Add sub menu SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('%s','%s','%s','%s','%s')", array( - postRequestElement('menu'), - postRequestElement('name'), - postRequestElement('title'), - postRequestElement('descr'), - bigintval(postRequestElement('sort')), + postRequestParameter('menu'), + postRequestParameter('name'), + postRequestParameter('title'), + postRequestParameter('descr'), + bigintval(postRequestParameter('sort')), ), __FILE__, __LINE__ ); } else { // Add main menu SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (action, title, descr, sort) VALUES ('%s','%s','%s','%s')", array( - postRequestElement('name'), - postRequestElement('title'), - postRequestElement('descr'), - bigintval(postRequestElement('sort')), + postRequestParameter('name'), + postRequestParameter('title'), + postRequestParameter('descr'), + bigintval(postRequestParameter('sort')), ), __FILE__, __LINE__ ); } diff --git a/inc/modules/admin/what-adminedit.php b/inc/modules/admin/what-adminedit.php index de04b2d671..f2db40320b 100644 --- a/inc/modules/admin/what-adminedit.php +++ b/inc/modules/admin/what-adminedit.php @@ -46,19 +46,19 @@ addMenuDescription('admin', __FILE__); // Do we edit/delete/change main menus or sub menus? $AND = "(`what` = '' OR `what` IS NULL)"; $SUB = ''; -if (isGetRequestElementSet('sub')) { - $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", getRequestElement('sub')); - $SUB = getRequestElement('sub'); +if (isGetRequestParameterSet('sub')) { + $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", getRequestParameter('sub')); + $SUB = getRequestParameter('sub'); } // END - if // List all menu points and make them editable -if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoModeActive())) { +if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Edit menu entries // @TODO Kill all constants in this file $content['sub'] = $SUB; $content['chk'] = countPostSelection(); $cnt = '0'; $SW = 2; - foreach (postRequestElement('sel') as $sel => $confirm) { + foreach (postRequestParameter('sel') as $sel => $confirm) { if ($confirm == 1) { $cnt++; $result = SQL_QUERY_ESC("SELECT `title`, `action`, `what`, `descr` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -102,14 +102,14 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM // Load template loadTemplate('admin_amenu_edit_form', false, $content); -} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0) && (!isDemoModeActive())) { +} elseif ((isPostRequestParameterSet('del')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Prepare misc content $content['sub'] = $SUB; $content['chk'] = countPostSelection(); // Del menu entries with or without confirmation $SW = 2; $cnt = '0'; $OUT = ''; - foreach (postRequestElement('sel') as $sel => $confirm) { + foreach (postRequestParameter('sel') as $sel => $confirm) { if ($confirm == 1) { $cnt++; $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -145,9 +145,9 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM loadTemplate('admin_amenu_delete', false, $content); } elseif ((isFormSent()) && (!isDemoModeActive())) { // An action is done... - switch (postRequestElement('ok')) { + switch (postRequestParameter('ok')) { case 'edit': // Edit menu - foreach (postRequestElement('sel') as $sel => $menu) { + foreach (postRequestParameter('sel') as $sel => $menu) { // Secure id $sel = bigintval($sel); @@ -160,9 +160,9 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM WHERE ".$AND." AND `id`=%s LIMIT 1", array( $menu, - postRequestElement('sel_action', $sel), - postRequestElement('sel_what', $sel), - postRequestElement('sel_desc', $sel), + postRequestParameter('sel_action', $sel), + postRequestParameter('sel_what', $sel), + postRequestParameter('sel_desc', $sel), $sel, ), __FILE__, __LINE__); } @@ -172,7 +172,7 @@ WHERE ".$AND." AND `id`=%s LIMIT 1", break; case 'del': // Delete menu - foreach (postRequestElement('sel') as $sel => $menu) { + foreach (postRequestParameter('sel') as $sel => $menu) { SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); } // END - foreach @@ -182,31 +182,31 @@ WHERE ".$AND." AND `id`=%s LIMIT 1", break; default: // Unexpected action - logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestElement('ok'))); - loadTemplate('admin_menu_unknown_okay', false, postRequestElement('ok')); + logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestParameter('ok'))); + loadTemplate('admin_menu_unknown_okay', false, postRequestParameter('ok')); break; } } else { - if ((isGetRequestElementSet(('act'))) && (isGetRequestElementSet(('tid'))) && (isGetRequestElementSet(('fid')))) { + if ((isGetRequestParameterSet(('act'))) && (isGetRequestParameterSet(('tid'))) && (isGetRequestParameterSet(('fid')))) { // Get ids - if (isGetRequestElementSet(('w'))) { + if (isGetRequestParameterSet(('w'))) { // Sub menus selected $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", - array(getRequestElement('act'), bigintval(getRequestElement('tid'))), __FILE__, __LINE__); + array(getRequestParameter('act'), bigintval(getRequestParameter('tid'))), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); SQL_FREERESULT($result); $result = SQL_QUERY("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", - array(getRequestElement('act'), bigintval(getRequestElement('fid'))), __FILE__, __LINE__); + array(getRequestParameter('act'), bigintval(getRequestParameter('fid'))), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); } else { // Main menu selected $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1", - array(bigintval(getRequestElement('tid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('tid'))), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); SQL_FREERESULT($result); $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1", - array(bigintval(getRequestElement('fid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('fid'))), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); } @@ -214,9 +214,9 @@ WHERE ".$AND." AND `id`=%s LIMIT 1", if ((!empty($tid)) && (!empty($fid))) { // Sort menu SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", - array(bigintval(getRequestElement('tid')), bigintval($fid)), __FILE__, __LINE__); + array(bigintval(getRequestParameter('tid')), bigintval($fid)), __FILE__, __LINE__); SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", - array(bigintval(getRequestElement('fid')), bigintval($tid)), __FILE__, __LINE__); + array(bigintval(getRequestParameter('fid')), bigintval($tid)), __FILE__, __LINE__); } } diff --git a/inc/modules/admin/what-admins_add.php b/inc/modules/admin/what-admins_add.php index 6bb59018e1..72788598fe 100644 --- a/inc/modules/admin/what-admins_add.php +++ b/inc/modules/admin/what-admins_add.php @@ -47,9 +47,9 @@ addMenuDescription('admin', __FILE__); // Display form is default $FORM = true; -if ((isPostRequestElementSet('add')) && (isPostRequestElementSet('login')) && (isPostRequestElementSet('email')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')) && (postRequestElement('pass1') == postRequestElement('pass2'))) { +if ((isPostRequestParameterSet('add')) && (isPostRequestParameterSet('login')) && (isPostRequestParameterSet('email')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2')) && (postRequestParameter('pass1') == postRequestParameter('pass2'))) { // Add admin when not added already - if (addAdminAccount(postRequestElement('login'), generateHash(postRequestElement('pass1')), postRequestElement('email')) == 'done') { + if (addAdminAccount(postRequestParameter('login'), generateHash(postRequestParameter('pass1')), postRequestParameter('email')) == 'done') { // Do not ouput any form! $FORM = false; diff --git a/inc/modules/admin/what-admins_contct.php b/inc/modules/admin/what-admins_contct.php index 6a5b66f07d..75d8c2fd9a 100644 --- a/inc/modules/admin/what-admins_contct.php +++ b/inc/modules/admin/what-admins_contct.php @@ -44,26 +44,26 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if ((isFormSent()) && (isGetRequestElementSet('admin'))) { +if ((isFormSent()) && (isGetRequestParameterSet('admin'))) { // Send mail or message - if ((isExtensionActive('msg')) && (postRequestElement('type') == 'message')) { + if ((isExtensionActive('msg')) && (postRequestParameter('type') == 'message')) { // Add message - $message = loadEmailTemplate('admins_msg_contct_admin', postRequestElement('text'), 0); - sendAdminMessage(getRequestElement('admin'), getMessage('ADMINS_MSG_FROM_ADMIN'), $message); + $message = loadEmailTemplate('admins_msg_contct_admin', postRequestParameter('text'), 0); + sendAdminMessage(getRequestParameter('admin'), getMessage('ADMINS_MSG_FROM_ADMIN'), $message); } else { // Load admin's email address - $email = getAdminEmail(bigintval(getRequestElement('admin'))); + $email = getAdminEmail(bigintval(getRequestParameter('admin'))); // Load email template and send the mail to the admin - $message = loadEmailTemplate('admins_mail_contct_admin', postRequestElement('text'), 0); + $message = loadEmailTemplate('admins_mail_contct_admin', postRequestParameter('text'), 0); sendEmail($email, getMessage('ADMINS_MSG_FROM_ADMIN'), $message); } // Mail / message dropped loadTemplate('admin_settings_saved', false, getMessage('ADMINS_ADMIN_CONTACTED')); -} elseif (isGetRequestElementSet('admin')) { +} elseif (isGetRequestParameterSet('admin')) { // Load contact form template - $content['admin'] = getRequestElement('admin'); + $content['admin'] = getRequestParameter('admin'); if (isExtensionActive('msg')) { // Add option to select between mail and message diff --git a/inc/modules/admin/what-admins_edit.php b/inc/modules/admin/what-admins_edit.php index d87edee344..33cc174e1b 100644 --- a/inc/modules/admin/what-admins_edit.php +++ b/inc/modules/admin/what-admins_edit.php @@ -45,29 +45,29 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Set selection data to empty array when it is empty -if (!isPostRequestElementSet('sel')) setPostRequestElement('sel', array()); +if (!isPostRequestParameterSet('sel')) setPostRequestParameter('sel', array()); // Check if direct admin account was selected -if (isGetRequestElementSet('admin')) { +if (isGetRequestParameterSet('admin')) { // Secure id number - $adminId = bigintval(getRequestElement('admin')); + $adminId = bigintval(getRequestParameter('admin')); // Set required fields - setPostRequestElement('edit', 1); - setPostRequestElement('sel', array($adminId => 1)); + setPostRequestParameter('edit', 1); + setPostRequestParameter('sel', array($adminId => 1)); } // END - if -if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { +if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { // Edit account(s) adminsEditAdminAccount(postRequestArray()); -} elseif ((isPostRequestElementSet('change')) && (count(postRequestElement('login')) > 0)) { +} elseif ((isPostRequestParameterSet('change')) && (count(postRequestParameter('login')) > 0)) { // Change admin accounts adminsChangeAdminAccount(postRequestArray()); -} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0)) { +} elseif ((isPostRequestParameterSet('del')) && (countPostSelection() > 0)) { // Show admin accounts for deletetion adminsDeleteAdminAccount(postRequestArray()); } else { - if ((isPostRequestElementSet('remove')) && (countPostSelection() > 0)) { + if ((isPostRequestParameterSet('remove')) && (countPostSelection() > 0)) { // Remove accounts now adminsRemoveAdminAccount(postRequestArray()); } // END - if diff --git a/inc/modules/admin/what-admins_mails.php b/inc/modules/admin/what-admins_mails.php index 995060ba3a..86f906e6ab 100644 --- a/inc/modules/admin/what-admins_mails.php +++ b/inc/modules/admin/what-admins_mails.php @@ -44,13 +44,13 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isPostRequestElementSet('edit')) { +if (isPostRequestParameterSet('edit')) { // Check if entires are checked if (countPostSelection() > 0) { // Add option for events $adminsList = generateOptionList('admins', 'id', 'login', '', 'email'); $SW = 2; $rows = ''; - foreach (postRequestElement('sel') as $template => $sel) { + foreach (postRequestParameter('sel') as $template => $sel) { // First of all load data from DB $result = SQL_QUERY_ESC("SELECT `admin_id`, `id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `id` ASC", array($template), __FILE__, __LINE__); @@ -121,12 +121,12 @@ ORDER BY if (SQL_NUMROWS($result) > 0) { // Shall I change entries? - if (isPostRequestElementSet('change')) { + if (isPostRequestParameterSet('change')) { // Init SQLs initSqls(); // Ok, update database - foreach (postRequestElement('admin_id') as $id => $content['admin_id']) { + foreach (postRequestParameter('admin_id') as $id => $content['admin_id']) { // Secure ids $id = bigintval($id); $content['admin_id'] = bigintval($content['admin_id']); @@ -135,16 +135,16 @@ ORDER BY addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins_mails` SET admin_id=%s WHERE `id`=%s ORDER BY `id` LIMIT 1", array($content['admin_id'], $id), __FILE__, __LINE__, false)); - if (($content['admin_id'] < 1) && (isPostRequestElementSet('template', $id))) { + if (($content['admin_id'] < 1) && (isPostRequestParameterSet('template', $id))) { // Remove any other admin entries addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE mail_template='%s' AND id != '%s'", - array(postRequestElement('template', $id), $id), __FILE__, __LINE__, false)); + array(postRequestParameter('template', $id), $id), __FILE__, __LINE__, false)); } // END - if - if (postRequestElement('admin_new', postRequestElement('template', $id)) > 0) { + if (postRequestParameter('admin_new', postRequestParameter('template', $id)) > 0) { // Add new admin addSql(SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (admin_id, mail_template) VALUES ('%s','%s')", - array($content['admin_id'], postRequestElement('template', $id)), __FILE__, __LINE__, false)); + array($content['admin_id'], postRequestParameter('template', $id)), __FILE__, __LINE__, false)); } // END - if } // END - foreach diff --git a/inc/modules/admin/what-config_admins.php b/inc/modules/admin/what-config_admins.php index b5c0af248d..0391c25e6a 100644 --- a/inc/modules/admin/what-config_admins.php +++ b/inc/modules/admin/what-config_admins.php @@ -44,10 +44,10 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { +if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { // Edit ACLs $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $selected) { + foreach (postRequestParameter('sel') as $id => $selected) { // Load data for the id $result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -79,19 +79,19 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { // Load main template loadTemplate('admin_config_admins_edit', false, $OUT); -} elseif ((isPostRequestElementSet('change')) && (countPostSelection() > 0)) { +} elseif ((isPostRequestParameterSet('change')) && (countPostSelection() > 0)) { // Change entries - foreach (postRequestElement('sel') as $id => $selected) { + foreach (postRequestParameter('sel') as $id => $selected) { // Secure id $id = bigintval($id); // Update entries SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins_acls` SET admin_id=%s, action_menu='%s', what_menu='%s', access_mode='%s' WHERE `id`=%s LIMIT 1", array( - postRequestElement('admin', $id), - postRequestElement('action_menu', $id), - postRequestElement('what_menu', $id), - postRequestElement('mode', $id), + postRequestParameter('admin', $id), + postRequestParameter('action_menu', $id), + postRequestParameter('what_menu', $id), + postRequestParameter('mode', $id), $id ),__FILE__, __LINE__); } // END - foreach @@ -103,10 +103,10 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { // Entries changed loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ENTRIES_CHANGED')); -} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0)) { +} elseif ((isPostRequestParameterSet('del')) && (countPostSelection() > 0)) { // Delete ACLs $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $selected) { + foreach (postRequestParameter('sel') as $id => $selected) { // Load data for the id $result = SQL_QUERY_ESC("SELECT admin_id, action_menu, what_menu, access_mode FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -140,10 +140,10 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { // Load main template loadTemplate('admin_config_admins_del', false, $OUT); -} elseif ((isPostRequestElementSet('remove')) && (countPostSelection() > 0)) { +} elseif ((isPostRequestParameterSet('remove')) && (countPostSelection() > 0)) { // Remove entries // @TODO Rewrite this to filter 'run_sqls' - foreach (postRequestElement('sel') as $id => $selected) { + foreach (postRequestParameter('sel') as $id => $selected) { SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `id`=%s LIMIT 1", array(bigintval($id)),__FILE__, __LINE__); } // END - foreach @@ -155,33 +155,33 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { // Entries deleted loadTemplate('admin_settings_saved', false, getMessage('ADMIN_ADMINS_ENTRIES_DELETED')); -} elseif (isPostRequestElementSet('add')) { +} elseif (isPostRequestParameterSet('add')) { // Check if everything is fine... - $mode = getAdminDefaultAcl(bigintval(postRequestElement('admin_id'))); + $mode = getAdminDefaultAcl(bigintval(postRequestParameter('admin_id'))); // Default ACL is false $ACL = false; - if (isPostRequestElementSet('what_menu')) { + if (isPostRequestParameterSet('what_menu')) { // Check parent ACL - $ACL = adminsCheckAdminAcl(getModeAction('admin', postRequestElement('what_menu')), ''); + $ACL = adminsCheckAdminAcl(getModeAction('admin', postRequestParameter('what_menu')), ''); } // END - if - if (($mode != postRequestElement('mode')) || ($ACL)) { + if (($mode != postRequestParameter('mode')) || ($ACL)) { // Mode is fine - $BOTH = ((isPostRequestElementSet('action_menu')) && (isPostRequestElementSet('what_menu'))); - if (((isPostRequestElementSet('action_menu')) || (isPostRequestElementSet('what_menu'))) && ($BOTH === false)) { + $BOTH = ((isPostRequestParameterSet('action_menu')) && (isPostRequestParameterSet('what_menu'))); + if (((isPostRequestParameterSet('action_menu')) || (isPostRequestParameterSet('what_menu'))) && ($BOTH === false)) { // Main or sub menu selected $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE admin_id=%s AND action_menu='%s' AND what_menu='%s' LIMIT 1", - array(bigintval(postRequestElement('admin_id')), postRequestElement('action_menu'), postRequestElement('what_menu')), __FILE__, __LINE__); + array(bigintval(postRequestParameter('admin_id')), postRequestParameter('action_menu'), postRequestParameter('what_menu')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == '0') { // Finally add the new ACL SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_acls` (admin_id, action_menu, what_menu, access_mode) VALUES ('%s','%s','%s','%s')", array( - bigintval(postRequestElement('admin_id')), - postRequestElement('action_menu'), - postRequestElement('what_menu'), - postRequestElement('mode') + bigintval(postRequestParameter('admin_id')), + postRequestParameter('action_menu'), + postRequestParameter('what_menu'), + postRequestParameter('mode') ), __FILE__, __LINE__); $content = getMessage('ADMIN_ADMINS_ACL_SAVED'); diff --git a/inc/modules/admin/what-config_beg.php b/inc/modules/admin/what-config_beg.php index 91e66e9d30..8fc4128de9 100644 --- a/inc/modules/admin/what-config_beg.php +++ b/inc/modules/admin/what-config_beg.php @@ -46,17 +46,17 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Translate german decimal commas to computer decimal dots - setPostRequestElement('beg_points' , convertCommaToDot(postRequestElement('beg_points') )); - setPostRequestElement('beg_points_max' , convertCommaToDot(postRequestElement('beg_points_max') )); - setPostRequestElement('beg_notify_bonus', convertCommaToDot(postRequestElement('beg_notify_bonus'))); + setPostRequestParameter('beg_points' , convertCommaToDot(postRequestParameter('beg_points') )); + setPostRequestParameter('beg_points_max' , convertCommaToDot(postRequestParameter('beg_points_max') )); + setPostRequestParameter('beg_notify_bonus', convertCommaToDot(postRequestParameter('beg_notify_bonus'))); // Save settings adminSaveSettingsFromPostData(); // Remember new settings - setConfigEntry('beg_rallye' , postRequestElement('beg_rallye')); - setConfigEntry('beg_ral_en_notify', postRequestElement('beg_ral_en_notify')); - setConfigEntry('beg_ral_di_notify', postRequestElement('beg_ral_di_notify')); + setConfigEntry('beg_rallye' , postRequestParameter('beg_rallye')); + setConfigEntry('beg_ral_en_notify', postRequestParameter('beg_ral_en_notify')); + setConfigEntry('beg_ral_di_notify', postRequestParameter('beg_ral_di_notify')); } else { // Prepare constants for the template $content['points'] = translateComma(getConfig('beg_points') , false); diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index 7d7b6dca70..0372884fd5 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -46,32 +46,32 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Replace german decimal commas to computer decimal dots - setPostRequestElement('login_bonus', convertCommaToDot(postRequestElement('login_bonus'))); - setPostRequestElement('turbo_bonus', convertCommaToDot(postRequestElement('turbo_bonus'))); - setPostRequestElement('bonus_ref', convertCommaToDot(postRequestElement('bonus_ref'))); - setPostRequestElement('bonus_order', convertCommaToDot(postRequestElement('bonus_order'))); - setPostRequestElement('bonus_notify_points', convertCommaToDot(postRequestElement('bonus_notify_points'))); + setPostRequestParameter('login_bonus', convertCommaToDot(postRequestParameter('login_bonus'))); + setPostRequestParameter('turbo_bonus', convertCommaToDot(postRequestParameter('turbo_bonus'))); + setPostRequestParameter('bonus_ref', convertCommaToDot(postRequestParameter('bonus_ref'))); + setPostRequestParameter('bonus_order', convertCommaToDot(postRequestParameter('bonus_order'))); + setPostRequestParameter('bonus_notify_points', convertCommaToDot(postRequestParameter('bonus_notify_points'))); // Generate string for saving ranks - setPostRequestElement('turbo_rates', ''); + setPostRequestParameter('turbo_rates', ''); $RATES = array(); - foreach (postRequestElement('rate') as $rate) { + foreach (postRequestParameter('rate') as $rate) { $rate = trim(convertCommaToDot($rate)); if (!empty($rate)) $RATES[] = $rate; } - setPostRequestElement('turbo_rates', trim(implode(';', $RATES))); - unsetPostRequestElement('rate'); + setPostRequestParameter('turbo_rates', trim(implode(';', $RATES))); + unsetPostRequestParameter('rate'); // Automatically calculate bonus points for ranks 2 and 3 when not set - if (!isPostRequestElementSet('turbo_rates')) setPostRequestElement('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).''); + if (!isPostRequestParameterSet('turbo_rates')) setPostRequestParameter('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).''); // Save data adminSaveSettingsFromPostData(); // Remember new settings - setConfigEntry('bonus_active' , postRequestElement('bonus_active')); - setConfigEntry('bonus_en_notify', postRequestElement('bonus_en_notify')); - setConfigEntry('bonus_di_notify', postRequestElement('bonus_di_notify')); + setConfigEntry('bonus_active' , postRequestParameter('bonus_active')); + setConfigEntry('bonus_en_notify', postRequestParameter('bonus_en_notify')); + setConfigEntry('bonus_di_notify', postRequestParameter('bonus_di_notify')); } else { // Prepare contants for the template $content['login'] = translateComma(getConfig('login_bonus') , false); diff --git a/inc/modules/admin/what-config_cats.php b/inc/modules/admin/what-config_cats.php index 96b8cfd3e2..bcb2d4a778 100644 --- a/inc/modules/admin/what-config_cats.php +++ b/inc/modules/admin/what-config_cats.php @@ -48,17 +48,17 @@ addMenuDescription('admin', __FILE__); // Init variable to avoid a notice $CATS = ''; -if (isPostRequestElementSet('add')) { +if (isPostRequestParameterSet('add')) { // Add a new category $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `cat`='%s' LIMIT 1", - array(postRequestElement('catname')), __FILE__, __LINE__); + array(postRequestParameter('catname')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == '0') { // Category does not exists, we simply add it... SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_cats` (`cat`, `visible`, `sort`) VALUES ('%s','%s','%s')", array( - postRequestElement('catname'), - postRequestElement('visible'), - bigintval(postRequestElement('parent') + 1) + postRequestParameter('catname'), + postRequestParameter('visible'), + bigintval(postRequestParameter('parent') + 1) ), __FILE__, __LINE__); $content = getMessage('CATEGORY_ADDED'); } else { @@ -71,22 +71,22 @@ if (isPostRequestElementSet('add')) { // Display message loadTemplate('admin_settings_saved', false, $content); -} elseif ((isFormSent()) && (isPostRequestElementSet('id')) && (is_array(postRequestElement('id')))) { +} elseif ((isFormSent()) && (isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id')))) { // Change or delete categories... $TEXT = ''; - foreach (postRequestElement('id') as $id => $cat) { + foreach (postRequestParameter('id') as $id => $cat) { // Secure id $id = bigintval($id); // Is the entry set? if (!empty($cat)) { - switch (getRequestElement('do')) { + switch (getRequestParameter('do')) { case 'edit': // Change categories SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_cats` SET `cat`='%s', `visible`='%s', `sort`=%s WHERE `id`=%s LIMIT 1", array( $cat, - postRequestElement('vis', $id), - postRequestElement('sort', $id), + postRequestParameter('vis', $id), + postRequestParameter('sort', $id), $id ), __FILE__, __LINE__); $TEXT = getMessage('CATEGORIES_SAVED'); @@ -110,10 +110,10 @@ if (isPostRequestElementSet('add')) { // Display message loadTemplate('admin_settings_saved', false, $TEXT); } // END - if -} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0)) { +} elseif ((isPostRequestParameterSet('del')) && (countPostSelection() > 0)) { // Delete categories $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $value) { + foreach (postRequestParameter('sel') as $id => $value) { // Load data of category $result = SQL_QUERY_ESC("SELECT `cat` FROM `{?_MYSQL_PREFIX?}_cats` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -136,10 +136,10 @@ if (isPostRequestElementSet('add')) { // Load main template loadTemplate('admin_del_cats', false, $OUT); -} elseif ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { +} elseif ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { // Edit categories $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $value) { + foreach (postRequestParameter('sel') as $id => $value) { // Load data from the category $result = SQL_QUERY_ESC("SELECT cat, visible, sort FROM `{?_MYSQL_PREFIX?}_cats` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); diff --git a/inc/modules/admin/what-config_doubler.php b/inc/modules/admin/what-config_doubler.php index a05621cc0a..32f0624c54 100644 --- a/inc/modules/admin/what-config_doubler.php +++ b/inc/modules/admin/what-config_doubler.php @@ -46,11 +46,11 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Replace commata with decimal dot - setPostRequestElement('doubler_charge', (convertCommaToDot(postRequestElement('doubler_charge')) / 100)); - setPostRequestElement('doubler_ref' , (convertCommaToDot(postRequestElement('doubler_ref')) / 100)); - setPostRequestElement('doubler_min' , convertCommaToDot(postRequestElement('doubler_min'))); - setPostRequestElement('doubler_max' , convertCommaToDot(postRequestElement('doubler_max'))); - setPostRequestElement('doubler_left' , convertCommaToDot(postRequestElement('doubler_left'))); + setPostRequestParameter('doubler_charge', (convertCommaToDot(postRequestParameter('doubler_charge')) / 100)); + setPostRequestParameter('doubler_ref' , (convertCommaToDot(postRequestParameter('doubler_ref')) / 100)); + setPostRequestParameter('doubler_min' , convertCommaToDot(postRequestParameter('doubler_min'))); + setPostRequestParameter('doubler_max' , convertCommaToDot(postRequestParameter('doubler_max'))); + setPostRequestParameter('doubler_left' , convertCommaToDot(postRequestParameter('doubler_left'))); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-config_email.php b/inc/modules/admin/what-config_email.php index 1a2fc7f55f..789a1ec484 100644 --- a/inc/modules/admin/what-config_email.php +++ b/inc/modules/admin/what-config_email.php @@ -45,16 +45,16 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Remove empty array index -if (!isPostRequestElementSet(('max'))) unsetPostRequestElement(('add_max')); +if (!isPostRequestParameterSet(('max'))) unsetPostRequestParameter(('add_max')); -if (isPostRequestElementSet(('add_max'))) { +if (isPostRequestParameterSet(('add_max'))) { // Save all settings $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value='%s' LIMIT 1", - array(bigintval(postRequestElement('max'))), __FILE__, __LINE__); + array(bigintval(postRequestParameter('max'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == '0') { // Add this value (including comment) SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (value, comment) VALUES ('%s','%s')", - array(bigintval(postRequestElement('max')), postRequestElement('comment')),__FILE__, __LINE__); + array(bigintval(postRequestParameter('max')), postRequestParameter('comment')),__FILE__, __LINE__); $content = getMessage('MAX_VALUE_SAVED'); } else { // Value does alread exists! @@ -66,20 +66,20 @@ if (isPostRequestElementSet(('add_max'))) { // Display message loadTemplate('admin_settings_saved', false, $content); -} elseif ((isFormSent()) && (isGetRequestElementSet('do'))) { +} elseif ((isFormSent()) && (isGetRequestParameterSet('do'))) { // Change or delete entries... $TEXT = ''; - foreach (postRequestElement('id') as $id => $value) { + foreach (postRequestParameter('id') as $id => $value) { // Secure id $id = bigintval($id); - switch (getRequestElement('do')) + switch (getRequestParameter('do')) { case 'edit': // Change entries SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_max_receive` SET value='%s', comment='%s' WHERE `id`=%s LIMIT 1", array( - bigintval(postRequestElement('val', $id)), - postRequestElement('comm', $id), + bigintval(postRequestParameter('val', $id)), + postRequestParameter('comm', $id), $id ),__FILE__, __LINE__); $TEXT = getMessage('MRECEIVE_SAVED'); @@ -97,10 +97,10 @@ if (isPostRequestElementSet(('add_max'))) { // Display message loadTemplate('admin_settings_saved', false, $TEXT); } // END - if -} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0)) { +} elseif ((isPostRequestParameterSet('del')) && (countPostSelection() > 0)) { // Delete entries $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $value) { + foreach (postRequestParameter('sel') as $id => $value) { // Load data $result = SQL_QUERY_ESC("SELECT value, comment FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -123,10 +123,10 @@ if (isPostRequestElementSet(('add_max'))) { // Load main template loadTemplate('admin_config_email_del', false, $content); -} elseif ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { +} elseif ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { // Edit entries $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $value) { + foreach (postRequestParameter('sel') as $id => $value) { // Load data $result = SQL_QUERY_ESC("SELECT value, comment FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); diff --git a/inc/modules/admin/what-config_home.php b/inc/modules/admin/what-config_home.php index 91d31bc0bd..106ed65c42 100644 --- a/inc/modules/admin/what-config_home.php +++ b/inc/modules/admin/what-config_home.php @@ -46,7 +46,7 @@ addMenuDescription('admin', __FILE__); // Init 'sub' value $sub = ''; -if (isGetRequestElementSet('sub')) $sub = getRequestElement('sub'); +if (isGetRequestParameterSet('sub')) $sub = getRequestParameter('sub'); switch ($sub) { case 'settings': // Settings related to the index page @@ -70,9 +70,9 @@ switch ($sub) { break; case 'target': // Set which what-file will be placed in home-page (only modules.php?module=index) - if (isGetRequestElementSet(('home'))) { + if (isGetRequestParameterSet(('home'))) { // Set new home - updateConfiguration('index_home', getRequestElement(('home'))); + updateConfiguration('index_home', getRequestParameter(('home'))); } // END - if // Load all what menu points diff --git a/inc/modules/admin/what-config_mediadata.php b/inc/modules/admin/what-config_mediadata.php index c077aa4faa..c4675ab630 100644 --- a/inc/modules/admin/what-config_mediadata.php +++ b/inc/modules/admin/what-config_mediadata.php @@ -46,25 +46,25 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Test timestamp - $STAMP = mktime(0, 0, 0, bigintval(postRequestElement('month')), bigintval(postRequestElement('day')), bigintval(postRequestElement('year'))); + $STAMP = mktime(0, 0, 0, bigintval(postRequestParameter('month')), bigintval(postRequestParameter('day')), bigintval(postRequestParameter('year'))); if ($STAMP > time()) { // Date is in the future! - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); } else { // Remove entries - unsetPostRequestElement('day'); - unsetPostRequestElement('month'); - unsetPostRequestElement('year'); + unsetPostRequestParameter('day'); + unsetPostRequestParameter('month'); + unsetPostRequestParameter('year'); // Remember timestamp - setPostRequestElement('mt_start', $STAMP); + setPostRequestParameter('mt_start', $STAMP); } // Convert some data - setPostRequestElement('mt_stage', bigintval(postRequestElement('mt_stage'))); - if (postRequestElement('mt_stage') <= countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true)) { + setPostRequestParameter('mt_stage', bigintval(postRequestParameter('mt_stage'))); + if (postRequestParameter('mt_stage') <= countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true)) { // Not enougth! - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); } } diff --git a/inc/modules/admin/what-config_mods.php b/inc/modules/admin/what-config_mods.php index fe79655097..a846a3557b 100644 --- a/inc/modules/admin/what-config_mods.php +++ b/inc/modules/admin/what-config_mods.php @@ -44,14 +44,14 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isPostRequestElementSet('edit')) { +if (isPostRequestParameterSet('edit')) { // Check if at least one module is selected if (countPostSelection() > 0) { // Output header $OUT = ''; $SW = 2; // Edit selected modules - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Load module data // @TODO This can be moved into mysql-function.php, see checkModulePermissions() function $result = SQL_QUERY_ESC("SELECT `module`, `title`, `locked`, `hidden`, `admin_only`, `mem_only` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `id`=%s LIMIT 1", @@ -86,26 +86,26 @@ if (isPostRequestElementSet('edit')) { loadTemplate('admin_settings_saved', false, getMessage('MODS_NOTHING_SELECTED')); // Remove maybe confusing data - unsetPostRequestElement('edit'); - unsetPostRequestElement('change'); + unsetPostRequestParameter('edit'); + unsetPostRequestParameter('change'); } -} elseif (isPostRequestElementSet('change')) { +} elseif (isPostRequestParameterSet('change')) { // Init SQLs initSqls(); // Change modules - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Secure id number $id = bigintval($id); // Update module addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `title`='%s', `locked`='%s', `hidden`='%s', `admin_only`='%s', `mem_only`='%s' WHERE `id`=%s LIMIT 1", array( - postRequestElement('title', $id), - postRequestElement('locked', $id), - postRequestElement('hidden', $id), - postRequestElement('admin', $id), - postRequestElement('member', $id), + postRequestParameter('title', $id), + postRequestParameter('locked', $id), + postRequestParameter('hidden', $id), + postRequestParameter('admin', $id), + postRequestParameter('member', $id), $id ), __FILE__, __LINE__, false)); } diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index 67ee4e01de..45aea71699 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -53,25 +53,25 @@ if (!isExtensionActive('other')) { // Stop saving data if one input field is !isset if (isFormSent()) { // Calculate stamps and set calculated stamps - setPostRequestElement('online_timeout' , createTimestampFromSelections('ip_timeout' , postRequestArray())); - setPostRequestElement('url_tlock' , createTimestampFromSelections('url_tlock' , postRequestArray())); - setPostRequestElement('profile_lock' , createTimestampFromSelections('profile_lock' , postRequestArray())); - setPostRequestElement('profile_update' , createTimestampFromSelections('profile_update' , postRequestArray())); - setPostRequestElement('resend_profile_update', createTimestampFromSelections('resend_profile_update', postRequestArray())); + setPostRequestParameter('online_timeout' , createTimestampFromSelections('ip_timeout' , postRequestArray())); + setPostRequestParameter('url_tlock' , createTimestampFromSelections('url_tlock' , postRequestArray())); + setPostRequestParameter('profile_lock' , createTimestampFromSelections('profile_lock' , postRequestArray())); + setPostRequestParameter('profile_update' , createTimestampFromSelections('profile_update' , postRequestArray())); + setPostRequestParameter('resend_profile_update', createTimestampFromSelections('resend_profile_update', postRequestArray())); // Online-Timeout shall be > 0 or your database will crow and crow and crow... - if (!isPostRequestElementSet('online_timeout')) { unsetPostRequestElement('ok'); } + if (!isPostRequestParameterSet('online_timeout')) { unsetPostRequestParameter('ok'); } // Chedck other timestamps (which can be zero!) - if (!isPostRequestElementSet('profile_lock')) { unsetPostRequestElement('ok'); } - if (!isPostRequestElementSet('url_tlock')) { unsetPostRequestElement('ok'); } - if (!isPostRequestElementSet('profile_update')) { unsetPostRequestElement('ok'); } - if (!isPostRequestElementSet('resend_profile_update')) { unsetPostRequestElement('ok'); } + if (!isPostRequestParameterSet('profile_lock')) { unsetPostRequestParameter('ok'); } + if (!isPostRequestParameterSet('url_tlock')) { unsetPostRequestParameter('ok'); } + if (!isPostRequestParameterSet('profile_update')) { unsetPostRequestParameter('ok'); } + if (!isPostRequestParameterSet('resend_profile_update')) { unsetPostRequestParameter('ok'); } // Check other settings - if (!isPostRequestElementSet('max_send')) { unsetPostRequestElement('ok'); } - if (!isPostRequestElementSet('code_length')) { unsetPostRequestElement('ok'); } - if (!isPostRequestElementSet('reject_url')) { unsetPostRequestElement('ok'); } + if (!isPostRequestParameterSet('max_send')) { unsetPostRequestParameter('ok'); } + if (!isPostRequestParameterSet('code_length')) { unsetPostRequestParameter('ok'); } + if (!isPostRequestParameterSet('reject_url')) { unsetPostRequestParameter('ok'); } } if (isFormSent()) { diff --git a/inc/modules/admin/what-config_payouts.php b/inc/modules/admin/what-config_payouts.php index 3ffb231efd..71c3fb52b8 100644 --- a/inc/modules/admin/what-config_payouts.php +++ b/inc/modules/admin/what-config_payouts.php @@ -44,28 +44,28 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isPostRequestElementSet('rate')) setPostRequestElement('rate', convertCommaToDot(postRequestElement('rate'))); +if (isPostRequestParameterSet('rate')) setPostRequestParameter('rate', convertCommaToDot(postRequestParameter('rate'))); -if ((isPostRequestElementSet('add')) && (isPostRequestElementSet('title')) && (postRequestElement('rate') > 0)) { +if ((isPostRequestParameterSet('add')) && (isPostRequestParameterSet('title')) && (postRequestParameter('rate') > 0)) { // Add new payout type $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE type='%s' LIMIT 1", - array(postRequestElement('title')), __FILE__, __LINE__); + array(postRequestParameter('title')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == '0') { // Add now SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_payout_types` (type, rate, min_points, from_account, from_pass, engine_url, engine_ret_ok, engine_ret_failed, pass_enc, allow_url) VALUES ('%s', %d, %d,'%s','%s','%s','%s','%s','%s','%s')", array( - postRequestElement('title'), - bigintval(postRequestElement('rate')), - bigintval(postRequestElement('min_points')), - postRequestElement('yacc'), - postRequestElement('ypass'), - postRequestElement('yurl'), - postRequestElement('yrdone'), - postRequestElement('yrfailed'), - postRequestElement('ytrans'), - postRequestElement('allow_url'), + postRequestParameter('title'), + bigintval(postRequestParameter('rate')), + bigintval(postRequestParameter('min_points')), + postRequestParameter('yacc'), + postRequestParameter('ypass'), + postRequestParameter('yurl'), + postRequestParameter('yrdone'), + postRequestParameter('yrfailed'), + postRequestParameter('ytrans'), + postRequestParameter('allow_url'), ), __FILE__, __LINE__); // Get message @@ -83,19 +83,19 @@ VALUES ('%s', %d, %d,'%s','%s','%s','%s','%s','%s','%s')", $result_mem = SQL_QUERY("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `status`='NEW' ORDER BY payout_timestamp DESC", __FILE__, __LINE__); $display = true; -if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { +if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { // Edit payout types - if ((isGetRequestElementSet('ok')) && (getRequestElement('ok') == 'ok')) { + if ((isGetRequestParameterSet('ok')) && (getRequestParameter('ok') == 'ok')) { // Init SQLs initSqls(); // Edit entries - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Secure id $id = bigintval($id); // Edit only if something is entered - if ((isPostRequestElementSet('title', $id)) && (postRequestElement('rate', $id) > 0)) { + if ((isPostRequestParameterSet('title', $id)) && (postRequestParameter('rate', $id) > 0)) { // Update entry addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_payout_types` SET type='%s', @@ -104,10 +104,10 @@ min_points=%s, allow_url='%s' WHERE `id`='".$id."' LIMIT 1", array( - postRequestElement('title', $id), - convertCommaToDot(postRequestElement('rate', $id)), - convertCommaToDot(postRequestElement('min_points' , $id)), - postRequestElement('allow', $id), + postRequestParameter('title', $id), + convertCommaToDot(postRequestParameter('rate', $id)), + convertCommaToDot(postRequestParameter('min_points' , $id)), + postRequestParameter('allow', $id), ),__FILE__, __LINE__, false)); } } @@ -120,7 +120,7 @@ WHERE `id`='".$id."' LIMIT 1", } else { $display = false; //Suppress any other outputs $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Load data $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -145,14 +145,14 @@ WHERE `id`='".$id."' LIMIT 1", // Load main template loadTemplate('admin_config_payouts_edit', false, $OUT); } -} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0)) { +} elseif ((isPostRequestParameterSet('del')) && (countPostSelection() > 0)) { // Delete payout types - if ((isGetRequestElementSet('ok')) && (getRequestElement('ok') == 'ok')) { + if ((isGetRequestParameterSet('ok')) && (getRequestParameter('ok') == 'ok')) { // Init SQLs initSqls(); // Delete entries - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__, false)); } // END - foreach @@ -165,7 +165,7 @@ WHERE `id`='".$id."' LIMIT 1", } else { $display = false; //Suppress any other outputs $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Secure id number $id = bigintval($id); diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index c763bb1edc..8c36a0770b 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -48,59 +48,59 @@ addMenuDescription('admin', __FILE__); $message = ''; // Is the 'sub' parameter set? -if (isGetRequestElementSet('sub')) { +if (isGetRequestParameterSet('sub')) { // Yes, then do some sanity-checks - switch (getRequestElement('sub')) { + switch (getRequestParameter('sub')) { case 'points': - if ((!isPostRequestElementSet(('points_register'))) || (!isPostRequestElementSet(('points_ref')))) { - unsetPostRequestElement('ok'); + if ((!isPostRequestParameterSet(('points_register'))) || (!isPostRequestParameterSet(('points_ref')))) { + unsetPostRequestParameter('ok'); } break; case 'ref': - if (isGetRequestElementSet('do')) { - if (((!isPostRequestElementSet(('level'))) || (!isPostRequestElementSet(('percents')))) && (getRequestElement('do') == 'add')) { - unsetPostRequestElement('ok'); + if (isGetRequestParameterSet('do')) { + if (((!isPostRequestParameterSet(('level'))) || (!isPostRequestParameterSet(('percents')))) && (getRequestParameter('do') == 'add')) { + unsetPostRequestParameter('ok'); } } break; } } else { // Display overview - setGetRequestElement('sub', 'overview'); + setGetRequestParameter('sub', 'overview'); } if (isFormSent()) { initSqls(); - switch (getRequestElement('sub')) { + switch (getRequestParameter('sub')) { case 'points': - updateConfiguration(array('points_register', 'points_ref'), array(postRequestElement('points_register'), postRequestElement('points_ref'))); + updateConfiguration(array('points_register', 'points_ref'), array(postRequestParameter('points_register'), postRequestParameter('points_ref'))); break; case 'ref': - switch (getRequestElement('do')) + switch (getRequestParameter('do')) { case 'add': - addSql("INSERT INTO `{?_MYSQL_PREFIX?}_refdepths` (`level`, `percents`) VALUES ('".postRequestElement('level')."','".postRequestElement('percents')."')"); + addSql("INSERT INTO `{?_MYSQL_PREFIX?}_refdepths` (`level`, `percents`) VALUES ('".postRequestParameter('level')."','".postRequestParameter('percents')."')"); break; case 'edit': // Change entries - foreach (postRequestElement('level') as $id => $value) { + foreach (postRequestParameter('level') as $id => $value) { // Secure id $id = bigintval($id); // Revert german commata - setPostRequestElement('percents', array($id => convertCommaToDot(postRequestElement('percents', $id)))); + setPostRequestParameter('percents', array($id => convertCommaToDot(postRequestParameter('percents', $id)))); // Update entry SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refdepths` SET `level`='%s', `percents`='%s' WHERE `id`=%s LIMIT 1", - array(bigintval($value), postRequestElement('percents', $id), $id), __FILE__, __LINE__); + array(bigintval($value), postRequestParameter('percents', $id), $id), __FILE__, __LINE__); } $message = getMessage('REF_DEPTHS_SAVED'); break; case 'del': - foreach (postRequestElement('id') as $id => $value) { + foreach (postRequestParameter('id') as $id => $value) { SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } @@ -115,16 +115,16 @@ if (isFormSent()) { break; case 'settings': - $REF = bigintval(postRequestElement('ref_payout')); + $REF = bigintval(postRequestParameter('ref_payout')); updateConfiguration( array('allow_direct_pay', 'reg_points_mode', 'ref_payout'), - array(postRequestElement('allow_direct_pay'), postRequestElement('reg_points_mode'), $REF) + array(postRequestParameter('allow_direct_pay'), postRequestParameter('reg_points_mode'), $REF) ); - if ((getConfig('ref_payout') == '0') && (postRequestElement('ref_payout') > 0)) { + if ((getConfig('ref_payout') == '0') && (postRequestParameter('ref_payout') > 0)) { // Update account's ref_payout for "must-confirm" addSql(sprintf("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=(%s - `mails_confirmed`) WHERE `mails_confirmed` < %s", $REF, $REF)); - } elseif ((getConfig('ref_payout') > 0) && (postRequestElement('ref_payout') == '0')) { + } elseif ((getConfig('ref_payout') > 0) && (postRequestParameter('ref_payout') == '0')) { // Update account's ref_payout for "not-must-confirm" addSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_payout`=0 WHERE `ref_payout` > 0"); addSql("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `points`=`points`+`locked_points` WHERE `locked_points` > 0"); @@ -136,7 +136,7 @@ WHERE `mails_confirmed` < %s", $REF, $REF)); if ((isSqlsValid()) && (isSqlsValid())) { if (strpos($GLOBALS['sqls'][0], 'INSERT') > -1) { $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `level`='%s' LIMIT 1", - array(bigintval(postRequestElement('level'))), __FILE__, __LINE__); + array(bigintval(postRequestParameter('level'))), __FILE__, __LINE__); SQL_FREERESULT($result); } // END - if @@ -163,7 +163,7 @@ WHERE `mails_confirmed` < %s", $REF, $REF)); // When do so... loadTemplate('admin_settings_saved', false, $message); } -} elseif (getRequestElement('sub') == 'settings') { +} elseif (getRequestParameter('sub') == 'settings') { // Setup some settings like direct pay and so on // Including new add-mode for one-time referal bonus foreach (array('allow_direct_pay') as $entry) { @@ -180,12 +180,12 @@ WHERE `mails_confirmed` < %s", $REF, $REF)); // Load template loadTemplate('admin_config_point_settings', false, $content); -} elseif (getRequestElement('sub') == 'ref') { +} elseif (getRequestParameter('sub') == 'ref') { // 12 3 32 2 3 32 2 3 4 43 21 - if ((isPostRequestElementSet('del')) && (isPostRequestElementSet('sel')) && (countPostSelection() > 0)) { + if ((isPostRequestParameterSet('del')) && (isPostRequestParameterSet('sel')) && (countPostSelection() > 0)) { // Delete entries $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $value) { + foreach (postRequestParameter('sel') as $id => $value) { $result = SQL_QUERY_ESC("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $content = SQL_FETCHARRAY($result); @@ -206,10 +206,10 @@ WHERE `mails_confirmed` < %s", $REF, $REF)); // Load main template loadTemplate('admin_points_del', false, $OUT); - } elseif ((isPostRequestElementSet('edit')) && (isPostRequestElementSet('sel')) && (countPostSelection() > 0)) { + } elseif ((isPostRequestParameterSet('edit')) && (isPostRequestParameterSet('sel')) && (countPostSelection() > 0)) { // Edit entries $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $value) { + foreach (postRequestParameter('sel') as $id => $value) { $result = SQL_QUERY_ESC("SELECT `level`, `percents` FROM `{?_MYSQL_PREFIX?}_refdepths` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $content = SQL_FETCHARRAY($result); @@ -258,7 +258,7 @@ WHERE `mails_confirmed` < %s", $REF, $REF)); // Form for adding new referal levels loadTemplate('admin_add_reflevel'); } -} elseif (getRequestElement('sub') == 'points') { +} elseif (getRequestParameter('sub') == 'points') { // Load template loadTemplate('admin_config_sub_points'); } else { diff --git a/inc/modules/admin/what-config_primera.php b/inc/modules/admin/what-config_primera.php index 7517618d23..72ce42609f 100644 --- a/inc/modules/admin/what-config_primera.php +++ b/inc/modules/admin/what-config_primera.php @@ -49,10 +49,10 @@ if (isFormSent()) { mergeConfig(postRequestArray()); // Is the password set? - if (isPostRequestElementSet(('pass'))) { + if (isPostRequestParameterSet(('pass'))) { // Then hash and remove it - setPostRequestElement('primera_api_md5', md5(postRequestElement('pass'))); - unsetPostRequestElement('pass'); + setPostRequestParameter('primera_api_md5', md5(postRequestParameter('pass'))); + unsetPostRequestParameter('pass'); } // END - if // Let's test the API first (hold your horses here, cowboy! Thank you. :) ) diff --git a/inc/modules/admin/what-config_rallye_prices.php b/inc/modules/admin/what-config_rallye_prices.php index 9104ffb2d4..86b94a69d3 100644 --- a/inc/modules/admin/what-config_rallye_prices.php +++ b/inc/modules/admin/what-config_rallye_prices.php @@ -44,23 +44,23 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isGetRequestElementSet('rallye')) { +if (isGetRequestParameterSet('rallye')) { // Price submitted? - if (isPostRequestElementSet('add')) { - if ((isPostRequestElementSet(('level'))) && ((isPostRequestElementSet('points')) || (isPostRequestElementSet(('info'))))) { + if (isPostRequestParameterSet('add')) { + if ((isPostRequestParameterSet(('level'))) && ((isPostRequestParameterSet('points')) || (isPostRequestParameterSet(('info'))))) { // Submitted data is valid, but maybe we already have this price level? $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s AND `price_level`='%s' LIMIT 1", - array(bigintval(getRequestElement('rallye')), bigintval(postRequestElement('level'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('rallye')), bigintval(postRequestParameter('level'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == '0') { // Ok, new price level entered! SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_prices` (rallye_id, price_level, points, info) VALUES ('%s','%s','%s','%s')", array( - bigintval(getRequestElement('rallye')), - bigintval(postRequestElement('level')), - postRequestElement('points'), - postRequestElement('info') + bigintval(getRequestParameter('rallye')), + bigintval(postRequestParameter('level')), + postRequestParameter('points'), + postRequestParameter('info') ), __FILE__, __LINE__); loadTemplate('admin_settings_saved', false, getMessage('RALLYE_PRICE_LEVEL_SAVED')); } else { @@ -71,11 +71,11 @@ VALUES ('%s','%s','%s','%s')", loadTemplate('admin_settings_saved', false, getMessage('RALLYE_PRICE_ALREADY_FOUND')); } } - } elseif (isPostRequestElementSet('remove')) { + } elseif (isPostRequestParameterSet('remove')) { // Check if at last one line is selected if (countPostSelection() > 0) { // Delete selected entries - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } // END - foreach @@ -85,9 +85,9 @@ VALUES ('%s','%s','%s','%s')", } else { loadTemplate('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_NOT_DELETED')); } - } elseif (isPostRequestElementSet('change')) { + } elseif (isPostRequestParameterSet('change')) { // Change entries - foreach (postRequestElement('level') as $id => $level) { + foreach (postRequestParameter('level') as $id => $level) { // Secure id $id = bigintval($id); @@ -103,10 +103,10 @@ WHERE `id`=%s LIMIT 1", array( - postRequestElement('rallye_id', $id), + postRequestParameter('rallye_id', $id), bigintval($level), - postRequestElement('points', $id), - postRequestElement('infos', $id), + postRequestParameter('points', $id), + postRequestParameter('infos', $id), $id ), __FILE__, __LINE__); } @@ -115,12 +115,12 @@ LIMIT 1", loadTemplate('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_CHANGED')); } - if (isPostRequestElementSet('edit')) { + if (isPostRequestParameterSet('edit')) { // Check if at last one line is selected if (countPostSelection() > 0) { // Make selected editable $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Load data to selected rallye $result = SQL_QUERY_ESC("SELECT rallye_id, price_level, points, info FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -144,21 +144,21 @@ LIMIT 1", $content['rows'] = $OUT; // Prepare data for the main template - $content['rallye'] = getRequestElement('rallye'); + $content['rallye'] = getRequestParameter('rallye'); // Load main template loadTemplate('admin_config_rallye_edit', false, $content); } else { // Nothing selected - $content = '{--RALLYE_NO_PRICES_SELECTED_1--}{--RALLYE_NO_PRICES_SELECTED_2--}{--RALLYE_NO_PRICES_SELECTED_3--}'; + $content = '{--RALLYE_NO_PRICES_SELECTED_1--}{--RALLYE_NO_PRICES_SELECTED_2--}{--RALLYE_NO_PRICES_SELECTED_3--}'; loadTemplate('admin_settings_saved', false, $content); } - } elseif (isPostRequestElementSet('del')) { + } elseif (isPostRequestParameterSet('del')) { // Check if at last one line is selected if (countPostSelection() > 0) { // List all prices $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Load data to selected rallye $result = SQL_QUERY_ESC("SELECT `rallye_id`, `price_level`, `points`, `info` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -183,19 +183,19 @@ LIMIT 1", $content['rows'] = $OUT; // Prepare data for the main template - $content['rallye'] = getRequestElement('rallye'); + $content['rallye'] = getRequestParameter('rallye'); // Load main template loadTemplate('admin_config_rallye_del', false, $content); } else { // Nothing selected - $content = '{--RALLYE_NO_PRICES_SELECTED_1--}{--RALLYE_NO_PRICES_SELECTED_2--}{--RALLYE_NO_PRICES_SELECTED_3--}'; + $content = '{--RALLYE_NO_PRICES_SELECTED_1--}{--RALLYE_NO_PRICES_SELECTED_2--}{--RALLYE_NO_PRICES_SELECTED_3--}'; loadTemplate('admin_settings_saved', false, $content); } } else { // a rallye was selected, so check if there are already prices assigned... $result = SQL_QUERY_ESC("SELECT `id`, `price_level`, `points`, `info` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s ORDER BY `price_level` ASC", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Load all prices for the selected rallye @@ -226,7 +226,7 @@ LIMIT 1", $content['rows'] = $OUT; // Prepare data for the main template - $content['rallye'] = getRequestElement('rallye'); + $content['rallye'] = getRequestParameter('rallye'); // Load main template loadTemplate('admin_config_rallye_prices', false, $content); @@ -234,8 +234,8 @@ LIMIT 1", } // Add form for adding new price level - if (!isPostRequestElementSet('edit')) { - loadTemplate('admin_add_rallye_prices', false, getRequestElement('rallye')); + if (!isPostRequestParameterSet('edit')) { + loadTemplate('admin_add_rallye_prices', false, getRequestParameter('rallye')); } // END - if } else { // No rallye selected so display all available without prices diff --git a/inc/modules/admin/what-config_register.php b/inc/modules/admin/what-config_register.php index c4bf6bc837..2249983a56 100644 --- a/inc/modules/admin/what-config_register.php +++ b/inc/modules/admin/what-config_register.php @@ -46,7 +46,7 @@ addMenuDescription('admin', __FILE__); // Do we want to save changes? if (isFormSent()) { - foreach (postRequestElement('sel') as $id => $value) { + foreach (postRequestParameter('sel') as $id => $value) { SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_must_register` SET field_required='%s' WHERE `id`=%s AND field_required != '%s' LIMIT 1", array($value, bigintval($id), $value),__FILE__, __LINE__); } diff --git a/inc/modules/admin/what-config_register2.php b/inc/modules/admin/what-config_register2.php index 523bb777eb..8fe76d071b 100644 --- a/inc/modules/admin/what-config_register2.php +++ b/inc/modules/admin/what-config_register2.php @@ -41,8 +41,8 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Calculate timestamp from selections... - setPostRequestElement('ip_timeout', createTimestampFromSelections('ip_timeout', postRequestArray())); - setPostRequestElement('least_cats', round(postRequestElement('least_cats'))); + setPostRequestParameter('ip_timeout', createTimestampFromSelections('ip_timeout', postRequestArray())); + setPostRequestParameter('least_cats', round(postRequestParameter('least_cats'))); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-config_rewrite.php b/inc/modules/admin/what-config_rewrite.php index d2cf11cd91..2ca1373ca6 100644 --- a/inc/modules/admin/what-config_rewrite.php +++ b/inc/modules/admin/what-config_rewrite.php @@ -47,7 +47,7 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Generate string $MODs = array(); - foreach (postRequestElement('mod') as $mod => $sel) { + foreach (postRequestParameter('mod') as $mod => $sel) { // Now you can never deselect the admin module, bah!!! ;-) if (($sel == 'Y') || ($mod == 'admin')) { // Add module to queue @@ -56,8 +56,8 @@ if (isFormSent()) { } // Implode array to string and remove posted mod array - setPostRequestElement('rewrite_skip', implode(':', $MODs)); - unsetPostRequestElement('mod'); + setPostRequestParameter('rewrite_skip', implode(':', $MODs)); + unsetPostRequestParameter('mod'); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-config_secure.php b/inc/modules/admin/what-config_secure.php index 633226bd5d..37abe1bd51 100644 --- a/inc/modules/admin/what-config_secure.php +++ b/inc/modules/admin/what-config_secure.php @@ -46,12 +46,12 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // If salt length is empty or null then we shall generate new passwords - if (!isPostRequestElementSet(('salt_length')) || (postRequestElement('salt_length') == '0')) { + if (!isPostRequestParameterSet(('salt_length')) || (postRequestParameter('salt_length') == '0')) { // Generate new passwords for all! loadInclude('inc/gen_sql_patches.php'); // Forget the wrong number! - unsetPostRequestElement(('salt_length')); + unsetPostRequestParameter(('salt_length')); // Redirect to logout link redirectToUrl('modules.php?module=admin&logout=1'); diff --git a/inc/modules/admin/what-config_session.php b/inc/modules/admin/what-config_session.php index cb36f027f3..8738d29441 100644 --- a/inc/modules/admin/what-config_session.php +++ b/inc/modules/admin/what-config_session.php @@ -46,7 +46,7 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Test Path - if ((!isPostRequestElementSet(('session_save_path'))) || ((isDirectory(postRequestElement('session_save_path'))) && (is_writeable(postRequestElement('session_save_path'))))) { + if ((!isPostRequestParameterSet(('session_save_path'))) || ((isDirectory(postRequestParameter('session_save_path'))) && (is_writeable(postRequestParameter('session_save_path'))))) { // Save configuration adminSaveSettingsFromPostData(); } else { diff --git a/inc/modules/admin/what-config_sponsor.php b/inc/modules/admin/what-config_sponsor.php index ba30ff1007..e392bf427d 100644 --- a/inc/modules/admin/what-config_sponsor.php +++ b/inc/modules/admin/what-config_sponsor.php @@ -46,8 +46,8 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Allow only direct points (non-floating) - setPostRequestElement('sponsor_min_points', bigintval(postRequestElement('sponsor_min_points'))); - setPostRequestElement('sponsor_ref_points', bigintval(postRequestElement('sponsor_ref_points'))); + setPostRequestParameter('sponsor_min_points', bigintval(postRequestParameter('sponsor_min_points'))); + setPostRequestParameter('sponsor_ref_points', bigintval(postRequestParameter('sponsor_ref_points'))); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-config_surfbar.php b/inc/modules/admin/what-config_surfbar.php index 3b34e9b656..81ac1596c6 100644 --- a/inc/modules/admin/what-config_surfbar.php +++ b/inc/modules/admin/what-config_surfbar.php @@ -47,9 +47,9 @@ addMenuDescription('admin', __FILE__); // Was the form submitted? if (isFormSent()) { // Replace german decimal comma with computer decimal dot - if (isPostRequestElementSet(('surfbar_static_reward'))) setPostRequestElement('surfbar_static_reward' , convertCommaToDot(postRequestElement('surfbar_static_reward'))); - if (isPostRequestElementSet(('surfbar_static_costs'))) setPostRequestElement('surfbar_static_costs' , convertCommaToDot(postRequestElement('surfbar_static_costs'))); - if (isPostRequestElementSet(('surfbar_dynamic_percent'))) setPostRequestElement('surfbar_dynamic_percent', convertCommaToDot(postRequestElement('surfbar_dynamic_percent'))); + if (isPostRequestParameterSet(('surfbar_static_reward'))) setPostRequestParameter('surfbar_static_reward' , convertCommaToDot(postRequestParameter('surfbar_static_reward'))); + if (isPostRequestParameterSet(('surfbar_static_costs'))) setPostRequestParameter('surfbar_static_costs' , convertCommaToDot(postRequestParameter('surfbar_static_costs'))); + if (isPostRequestParameterSet(('surfbar_dynamic_percent'))) setPostRequestParameter('surfbar_dynamic_percent', convertCommaToDot(postRequestParameter('surfbar_dynamic_percent'))); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-config_wernis.php b/inc/modules/admin/what-config_wernis.php index 8ba62a9cd4..9058c56944 100644 --- a/inc/modules/admin/what-config_wernis.php +++ b/inc/modules/admin/what-config_wernis.php @@ -52,12 +52,12 @@ if (isFormSent()) { if (WERNIS_TEST_API()) { // Revert german commata foreach (array('payout_factor', 'withdraw_factor', 'payout_fee_percent', 'withdraw_fee_percent') as $revert) { - setPostRequestElement('wernis_' . $revert, postRequestElement('wernis_' . $revert)); + setPostRequestParameter('wernis_' . $revert, postRequestParameter('wernis_' . $revert)); } // END - if // Hash the password and remove clear-text - setPostRequestElement('wernis_pass_md5', md5(postRequestElement('wernis_pass'))); - unsetPostRequestElement('wernis_pass'); + setPostRequestParameter('wernis_pass_md5', md5(postRequestParameter('wernis_pass'))); + unsetPostRequestParameter('wernis_pass'); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-del_email.php b/inc/modules/admin/what-del_email.php index b02f602fbf..ea385836ba 100644 --- a/inc/modules/admin/what-del_email.php +++ b/inc/modules/admin/what-del_email.php @@ -45,10 +45,10 @@ addMenuDescription('admin', __FILE__); // Init counter for deleted mails $cnt = '0'; -if (isGetRequestElementSet('mid')) { +if (isGetRequestParameterSet('mid')) { // Load email data $result = SQL_QUERY_ESC("SELECT `id`, `sender`, `subject`, `url`, `timestamp`, `payment_id` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('mid'))), __FILE__, __LINE__); // Delete mail only once if (SQL_NUMROWS($result) == 1) { @@ -86,7 +86,7 @@ ON WHERE s.`pool_id`=%s LIMIT 1", - array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('mid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_pool) == 1) { // Fetch stats id list($stats_id) = SQL_FETCHROW($result_pool); @@ -95,7 +95,7 @@ LIMIT 1", $links = countSumTotalData($stats_id, 'user_links', 'userid', 'stats_id', true); // Reset sent mails for recipient(s) - reduceRecipientReceivedMails('stats_id', getRequestElement('mid'), $links); + reduceRecipientReceivedMails('stats_id', getRequestParameter('mid'), $links); // Calc total points and pay them back $totalPoints = $links * $price; @@ -141,7 +141,7 @@ LIMIT 1", $cnt += SQL_AFFECTEDROWS(); // Load template for link - loadTemplate('admin_settings_saved', false, '{--ADMIN_REMOVE_STATS_ENTRY--}'); + loadTemplate('admin_settings_saved', false, '{--ADMIN_REMOVE_STATS_ENTRY--}'); } // END - if // Free the result @@ -149,7 +149,7 @@ LIMIT 1", // Delete mail from queue SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestElement('mid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('mid'))), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); // Output link for manually removing stats entry @@ -158,17 +158,17 @@ LIMIT 1", // Mail already deleted! loadTemplate('admin_settings_saved', false, getMessage('ADMIN_NORMAL_MAIL_ALREADY_DELETED')); } -} elseif (isGetRequestElementSet('pid')) { +} elseif (isGetRequestParameterSet('pid')) { // Remove stats entries SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `pool_id`=%s LIMIT 1", - array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('pid'))), __FILE__, __LINE__); // Output message loadTemplate('admin_settings_saved', false, getMessage('ADMIN_USER_STATS_REMOVED')); -} elseif ((isGetRequestElementSet('bid')) && (isExtensionActive('bonus'))) { +} elseif ((isGetRequestParameterSet('bid')) && (isExtensionActive('bonus'))) { // Load data from bonus mail $result = SQL_QUERY_ESC("SELECT `id`, `subject`, `url`, `timestamp`, `mails_sent` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s", - array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('bid'))), __FILE__, __LINE__); // Delete mail only once if (SQL_NUMROWS($result) == 1) { @@ -176,17 +176,17 @@ LIMIT 1", $content = SQL_FETCHARRAY($result); // Reset sent mails for recipient(s) - reduceRecipientReceivedMails('bonus_id', getRequestElement('bid'), $content['mails_sent']); + reduceRecipientReceivedMails('bonus_id', getRequestParameter('bid'), $content['mails_sent']); // Init counter for deleted mails $cnt = '0'; // Delete bonus mail entirely from database SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('bid'))), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s", - array(bigintval(getRequestElement('bid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('bid'))), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); // Prepare data for the template @@ -203,10 +203,10 @@ LIMIT 1", // Free result SQL_FREERESULT($result); -} elseif ((isGetRequestElementSet('nid')) && (getExtensionVersion('bonus') >= '0.8.7')) { +} elseif ((isGetRequestParameterSet('nid')) && (getExtensionVersion('bonus') >= '0.8.7')) { // Load data from bonus mail $result = SQL_QUERY_ESC("SELECT `id`, `subject`, `url`, `timestamp` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s", - array(bigintval(getRequestElement('nid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('nid'))), __FILE__, __LINE__); // Delete mail only once if (SQL_NUMROWS($result) == 1) { @@ -218,10 +218,10 @@ LIMIT 1", // Delete bonus mail entirely from database SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestElement('nid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('nid'))), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `bonus_id`=%s", - array(bigintval(getRequestElement('nid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('nid'))), __FILE__, __LINE__); $cnt += SQL_AFFECTEDROWS(); // Prepare data for the template diff --git a/inc/modules/admin/what-del_holiday.php b/inc/modules/admin/what-del_holiday.php index 9669af599c..86fbe698c2 100644 --- a/inc/modules/admin/what-del_holiday.php +++ b/inc/modules/admin/what-del_holiday.php @@ -48,7 +48,7 @@ addMenuDescription('admin', __FILE__); if (countPostSelection() > 0) { // Delete multiple holiday requests (for list_holiday) $cnt = '0'; - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Get the userid $result = SQL_QUERY_ESC("SELECT `userid`, `holiday_start`, `holiday_end` @@ -91,7 +91,7 @@ LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } } loadTemplate('admin_settings_saved', false, getMaskedMessage('HOLIDAY_ADMIN_MULTI_DEL', $cnt)); -} elseif (isGetRequestElementSet('userid')) { +} elseif (isGetRequestParameterSet('userid')) { // Set default message $message = getMessage('HOLIDAY_ADMIN_SINGLE_404'); @@ -103,7 +103,7 @@ FROM WHERE `userid`=%s LIMIT 1", - array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_load) == 1) { // Load data $content = SQL_FETCHARRAY($result_load); @@ -113,11 +113,11 @@ LIMIT 1", `{?_MYSQL_PREFIX?}_user_holidays` WHERE `userid`=%s -LIMIT 1", array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); +LIMIT 1", array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); // Send email to user - $message = loadEmailTemplate('member_holiday_removed', $content, getRequestElement('userid')); - sendEmail(getRequestElement('userid'), getMessage('HOLIDAY_ADMIN_REMOVED_SUBJ'), $message); + $message = loadEmailTemplate('member_holiday_removed', $content, getRequestParameter('userid')); + sendEmail(getRequestParameter('userid'), getMessage('HOLIDAY_ADMIN_REMOVED_SUBJ'), $message); // Set message $message = getMessage('HOLIDAY_ADMIN_SINGLE_DELETED'); diff --git a/inc/modules/admin/what-del_sponsor.php b/inc/modules/admin/what-del_sponsor.php index 504c395577..58adfcab5e 100644 --- a/inc/modules/admin/what-del_sponsor.php +++ b/inc/modules/admin/what-del_sponsor.php @@ -44,10 +44,10 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isGetRequestElementSet('id')) { +if (isGetRequestParameterSet('id')) { // Check for selected sponsor $result = SQL_QUERY_ESC("SELECT email, gender, surname, family FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1", - array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Remove sponsor if (isFormSent()) { @@ -56,39 +56,39 @@ if (isGetRequestElementSet('id')) { // Prepare data for the template $content['gender'] = translateGender($content['gender']); - $content['reason'] = secureString(postRequestElement('reason')); + $content['reason'] = secureString(postRequestParameter('reason')); // Prepare message and send it away - $message = loadEmailTemplate('del_sponsor', $content, bigintval(getRequestElement('id'))); + $message = loadEmailTemplate('del_sponsor', $content, bigintval(getRequestParameter('id'))); sendEmail($content['email'], getMessage('ADMIN_SPONSOR_DEL_SUBJECT'), $message); // Remove account SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1", - array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); // Remove orders SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_orders` WHERE `sponsorid`='%s' LIMIT 1", - array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); // Output message - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_DELETED', bigintval(getRequestElement('id')))); - } elseif (isPostRequestElementSet('no')) { + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_DELETED', bigintval(getRequestParameter('id')))); + } elseif (isPostRequestParameterSet('no')) { // Do not delete him... - redirectToUrl('modules.php?module=admin&what=list_sponsor&id='.bigintval(getRequestElement('id'))); + redirectToUrl('modules.php?module=admin&what=list_sponsor&id='.bigintval(getRequestParameter('id'))); } else { // Load data $content = SQL_FETCHARRAY($result); // Transfer data to constants for the template $content['gender'] = translateGender($content['gender']); - $content['userid'] = bigintval(getRequestElement('id')); + $content['userid'] = bigintval(getRequestParameter('id')); // Display form loadTemplate('admin_del_sponsor', false, $content); } } else { // Sponsor not found! - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestElement('id')))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id')))); } // Free result diff --git a/inc/modules/admin/what-del_transfer.php b/inc/modules/admin/what-del_transfer.php index e752aae9f3..a8c2d3ffdd 100644 --- a/inc/modules/admin/what-del_transfer.php +++ b/inc/modules/admin/what-del_transfer.php @@ -44,14 +44,14 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isPostRequestElementSet('del')) { +if (isPostRequestParameterSet('del')) { // Delete entries from tables if (countPostSelection() > 0) { // Init SQLs initSqls(); // Delete entries... - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE `trans_id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__, false)); addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_transfers_out` WHERE `trans_id`=%s LIMIT 1", diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index c455bbaed2..26459be4c7 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -45,42 +45,42 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // User exists.. -if ((isFormSent()) || ((isPostRequestElementSet('del')) && (isPostRequestElementSet(('reason'))))) { +if ((isFormSent()) || ((isPostRequestParameterSet('del')) && (isPostRequestParameterSet(('reason'))))) { // Is the account there? - if (fetchUserData(getRequestElement('userid'))) { + if (fetchUserData(getRequestParameter('userid'))) { // Delete user account - deleteUserAccount(getRequestElement('userid'), postRequestElement('reason')); + deleteUserAccount(getRequestParameter('userid'), postRequestParameter('reason')); // Output message loadTemplate('admin_settings_saved', false, getMessage('ADMIN_DEL_COMPLETED')); } else { // Account does not exists! - loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '
'); + loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '
'); } -} elseif (isPostRequestElementSet('no')) { +} elseif (isPostRequestParameterSet('no')) { // Do not delete him... - redirectToUrl(adminCreateUserLink(getRequestElement('userid'))); -} elseif (!isGetRequestElementSet('userid')) { + redirectToUrl(adminCreateUserLink(getRequestParameter('userid'))); +} elseif (!isGetRequestParameterSet('userid')) { // Output selection form with all confirmed user accounts listed addMemberSelectionBox(); } else { // Realy want to delete? - if (fetchUserData(getRequestElement('userid'))) { + if (fetchUserData(getRequestParameter('userid'))) { // Prepare content $content = array( 'email' => generateEmailLink(getUserData('email'), 'user_data'), 'surname' => getUserData('surname'), 'family' => getUserData('family'), - 'header' => getMaskedMessage('ADMIN_HEADER_DEL_ACCOUNT', getRequestElement('userid')), - 'text' => getMaskedMessage('ADMIN_TEXT_DEL_ACCOUNT', getRequestElement('userid')), - 'userid' => getRequestElement('userid') + 'header' => getMaskedMessage('ADMIN_HEADER_DEL_ACCOUNT', getRequestParameter('userid')), + 'text' => getMaskedMessage('ADMIN_TEXT_DEL_ACCOUNT', getRequestParameter('userid')), + 'userid' => getRequestParameter('userid') ); // Display form loadTemplate('admin_del_user', false, $content); } else { // Account does not exists! - loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '
'); + loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '
'); } } diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php index e41595251c..187d3c8a30 100644 --- a/inc/modules/admin/what-edit_emails.php +++ b/inc/modules/admin/what-edit_emails.php @@ -44,8 +44,8 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if ((isFormSent()) && (!isPostRequestElementSet('id'))) { - unsetPostRequestElement('ok'); +if ((isFormSent()) && (!isPostRequestParameterSet('id'))) { + unsetPostRequestParameter('ok'); } $result = SQL_QUERY("SELECT id, sender, subject, payment_id, cat_id FROM `{?_MYSQL_PREFIX?}_pool` ORDER BY timestamp", __FILE__, __LINE__); @@ -53,19 +53,19 @@ if (SQL_NUMROWS($result) > 0) { if (isFormSent()) { // Make mail editable... $result = SQL_QUERY_ESC("SELECT subject, text, url FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1", - array(bigintval(postRequestElement('id'))), __FILE__, __LINE__); + array(bigintval(postRequestParameter('id'))), __FILE__, __LINE__); list($subj, $text, $url) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Prepare constant for template - $content['id'] = bigintval(postRequestElement('id')); + $content['id'] = bigintval(postRequestParameter('id')); $content['url'] = $url; $content['subject'] = $subj; $content['text'] = $text; // Load template loadTemplate('admin_edit_email', false, $content); - } elseif (isPostRequestElementSet('save')) { + } elseif (isPostRequestParameterSet('save')) { // Save changes SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` @@ -77,10 +77,10 @@ WHERE `id`=%s LIMIT 1", array( - postRequestElement('subject'), - postRequestElement('text'), - postRequestElement('url'), - bigintval(postRequestElement('id')), + postRequestParameter('subject'), + postRequestParameter('text'), + postRequestParameter('url'), + bigintval(postRequestParameter('id')), ), __FILE__, __LINE__); if (SQL_AFFECTEDROWS() == 1) { diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php index d3895cd5c7..74ee72c204 100644 --- a/inc/modules/admin/what-edit_sponsor.php +++ b/inc/modules/admin/what-edit_sponsor.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if ((isGetRequestElementSet('id')) && (isGetRequestElementSet('mode'))) { +if ((isGetRequestParameterSet('id')) && (isGetRequestParameterSet('mode'))) { // Check for selected sponsor $result_main = SQL_QUERY_ESC("SELECT `company`, `position`, `gender`, `surname`, `family`, @@ -56,14 +56,14 @@ FROM WHERE `id`='%s' LIMIT 1", - array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_main) == 1) { // Load sponsor details $content = SQL_FETCHARRAY($result_main); // Prepare all data for the template // Sponsor's id - $content['id'] = bigintval(getRequestElement('id')); + $content['id'] = bigintval(getRequestParameter('id')); // Init gender foreach (array('m', 'f', 'c') as $gender) { @@ -78,25 +78,25 @@ LIMIT 1", $content['interval'] = createTimeSelections($content['warning_interval'], 'warning_interval', 'MWDh'); // Init variables here - $TPL = sprintf("admin_edit_sponsor_%s", getRequestElement('mode')); + $TPL = sprintf("admin_edit_sponsor_%s", getRequestParameter('mode')); initSqls(); // Sponsor was found - if ((isFormSent()) || (isPostRequestElementSet('edit'))) { + if ((isFormSent()) || (isPostRequestParameterSet('edit'))) { // Perform action on mode - switch (getRequestElement('mode')) { + switch (getRequestParameter('mode')) { case 'add_points': // Add points - if (bigintval(postRequestElement('points')) > 0) { + if (bigintval(postRequestParameter('points')) > 0) { // Replace german decimal comma with computer's decimal dot - $points = bigintval(convertCommaToDot(postRequestElement('points'))); + $points = bigintval(convertCommaToDot(postRequestParameter('points'))); // Add points to account SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `points_amount`=`points_amount`+%s WHERE `id`='%s' LIMIT 1", - array($points, bigintval(getRequestElement('id'))), __FILE__, __LINE__); + array($points, bigintval(getRequestParameter('id'))), __FILE__, __LINE__); // Remember points /reason for the template $content['points'] = translateComma($points); - $content['reason'] = secureString(postRequestElement('reason')); + $content['reason'] = secureString(postRequestParameter('reason')); // Send email $message = loadEmailTemplate('sponsor_add_points', $content); @@ -109,17 +109,17 @@ LIMIT 1", break; case 'sub_points': // Subtract points - if (bigintval(postRequestElement('points')) > 0) { + if (bigintval(postRequestParameter('points')) > 0) { // Replace german decimal comma with computer's decimal dot - $points = bigintval(convertCommaToDot(postRequestElement('points'))); + $points = bigintval(convertCommaToDot(postRequestParameter('points'))); // Add points to account SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `points_used`=`points_used`+%s WHERE `id`='%s' LIMIT 1", - array($points, bigintval(getRequestElement('id'))), __FILE__, __LINE__); + array($points, bigintval(getRequestParameter('id'))), __FILE__, __LINE__); // Remember points /reason for the template $content['points'] = translateComma($points); - $content['reason'] = secureString(postRequestElement('reason')); + $content['reason'] = secureString(postRequestParameter('reason')); // Send email $message = loadEmailTemplate('sponsor_sub_points', $content); @@ -133,10 +133,10 @@ LIMIT 1", case 'edit': // Edit sponsor account $PASS = true; - if ((postRequestElement('pass1') != postRequestElement('pass2')) || ((!isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass1')))) { + if ((postRequestParameter('pass1') != postRequestParameter('pass2')) || ((!isPostRequestParameterSet('pass1')) && (!isPostRequestParameterSet('pass1')))) { // Remove passwords - unsetPostRequestElement('pass1'); - unsetPostRequestElement('pass2'); + unsetPostRequestParameter('pass1'); + unsetPostRequestParameter('pass2'); $PASS = false; } // END - if @@ -148,19 +148,19 @@ LIMIT 1", handlSponsorRequest(postRequestArray()); // Convert some data for the email template - postRequestElement('gender' , translateGender(postRequestElement('gender'))); - postRequestElement('warning_interval', createFancyTime(postRequestElement('warning_interval'))); + postRequestParameter('gender' , translateGender(postRequestParameter('gender'))); + postRequestParameter('warning_interval', createFancyTime(postRequestParameter('warning_interval'))); - if ($PASS === false) setPostRequestElement('pass1', getMessage('SPONSOR_PASS_UNCHANGED')); + if ($PASS === false) setPostRequestParameter('pass1', getMessage('SPONSOR_PASS_UNCHANGED')); // Load email template and send the mail away $message = loadEmailTemplate('admin_sponsor_edit', postRequestArray(), false); - sendEmail(postRequestElement('email'), getMessage('ADMIN_SPONSOR_EDIT_SUBJECT'), $message); + sendEmail(postRequestParameter('email'), getMessage('ADMIN_SPONSOR_EDIT_SUBJECT'), $message); break; default: // Unknown mode - logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", getRequestElement('mode'))); - $message = getMaskedMessage('ADMIN_SPONSOR_INVALID_MODE', getRequestElement('mode')); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", getRequestParameter('mode'))); + $message = getMaskedMessage('ADMIN_SPONSOR_INVALID_MODE', getRequestParameter('mode')); break; } @@ -176,11 +176,11 @@ LIMIT 1", loadTemplate($TPL); } else { // Template not found! - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_MODUS_TPL_404', getRequestElement('mode'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_MODUS_TPL_404', getRequestParameter('mode'))); } } else { // Sponsor not found! - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestElement('id')))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id')))); } // Free result diff --git a/inc/modules/admin/what-edit_user.php b/inc/modules/admin/what-edit_user.php index fa9f1b1700..6922dbedb9 100644 --- a/inc/modules/admin/what-edit_user.php +++ b/inc/modules/admin/what-edit_user.php @@ -48,7 +48,7 @@ addMenuDescription('admin', __FILE__); // Fix a notice $result_main = false; -if (isGetRequestElementSet('userid')) { +if (isGetRequestParameterSet('userid')) { // Load user entry $result_main = SQL_QUERY_ESC("SELECT `userid`, `gender`, `surname`, `family`, `street_nr`, `zip`, `city`, `country`, @@ -61,25 +61,25 @@ WHERE `userid`=%s LIMIT 1", array( - bigintval(getRequestElement('userid')) + bigintval(getRequestParameter('userid')) ), __FILE__, __LINE__); } // END - if -if ((SQL_NUMROWS($result_main) == 1) || (!isGetRequestElementSet('userid'))) { +if ((SQL_NUMROWS($result_main) == 1) || (!isGetRequestParameterSet('userid'))) { // User found - if (!isGetRequestElementSet('userid')) { + if (!isGetRequestParameterSet('userid')) { // Output selection form with all confirmed user accounts listed addMemberSelectionBox(); - } elseif (isPostRequestElementSet('edit')) { + } elseif (isPostRequestParameterSet('edit')) { // Ok, change the account... $updateUser = false; $add = ''; - if ((!isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass2'))) { + if ((!isPostRequestParameterSet('pass1')) && (!isPostRequestParameterSet('pass2'))) { // Don't change the password $updateUser = true; - } elseif ((postRequestElement('pass1') == postRequestElement('pass2'))) { + } elseif ((postRequestParameter('pass1') == postRequestParameter('pass2'))) { // Change the password $updateUser = true; - $add = ", `password`='" . generateHash(postRequestElement('pass1')) . "'"; + $add = ", `password`='" . generateHash(postRequestParameter('pass1')) . "'"; } if ($updateUser === true) { @@ -100,15 +100,15 @@ WHERE `userid`=%s LIMIT 1", array( - substr(postRequestElement('gender'), 0, 1), - postRequestElement('surname'), - postRequestElement('family'), - postRequestElement('street_nr'), - postRequestElement('country'), - bigintval(postRequestElement('zip')), - postRequestElement('city'), - postRequestElement('email'), - bigintval(getRequestElement('userid')), + substr(postRequestParameter('gender'), 0, 1), + postRequestParameter('surname'), + postRequestParameter('family'), + postRequestParameter('street_nr'), + postRequestParameter('country'), + bigintval(postRequestParameter('zip')), + postRequestParameter('city'), + postRequestParameter('email'), + bigintval(getRequestParameter('userid')), ), __FILE__, __LINE__); $content = getMessage('USER_ACCOUNT_SAVED'); } else { @@ -135,7 +135,7 @@ LIMIT 1", } } else { // Account does not exists! - loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '
'); + loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '
'); } // Free the result diff --git a/inc/modules/admin/what-email_archiv.php b/inc/modules/admin/what-email_archiv.php index 045ec1f2ae..d5ebddd500 100644 --- a/inc/modules/admin/what-email_archiv.php +++ b/inc/modules/admin/what-email_archiv.php @@ -61,11 +61,11 @@ ORDER BY $result_maximum = SQL_QUERY($sql, __FILE__, __LINE__); // Set offset an current page to default values -if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 1); -if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', getConfig('mails_page')); +if (!isGetRequestParameterSet('page')) setGetRequestParameter('page' , 1); +if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', getConfig('mails_page')); // Add limitation to SQL string -$sql .= " LIMIT ".(getRequestElement('offset') * getRequestElement('page') - getRequestElement('offset')) . ', ' . getRequestElement('offset'); +$sql .= " LIMIT ".(getRequestParameter('offset') * getRequestParameter('page') - getRequestParameter('offset')) . ', ' . getRequestParameter('offset'); // Run SQL query for normal mails $result = SQL_QUERY($sql, __FILE__, __LINE__); diff --git a/inc/modules/admin/what-email_details.php b/inc/modules/admin/what-email_details.php index 33d0af9168..8de0c034b8 100644 --- a/inc/modules/admin/what-email_details.php +++ b/inc/modules/admin/what-email_details.php @@ -64,22 +64,22 @@ ORDER BY timestamp DESC"; $WHO = getMessage('_ALL'); $SQL2 = ''; -if (isGetRequestElementSet(('mid'))) { +if (isGetRequestParameterSet(('mid'))) { // Only a specific mail shall be displayed // 0 1 2 3 4 5 6 7 8 9 10 $sql = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id FROM `{?_MYSQL_PREFIX?}_pool` - WHERE `id`='".bigintval(getRequestElement('mid'))."' + WHERE `id`='".bigintval(getRequestParameter('mid'))."' LIMIT 1"; - $WHO = getMessage('MAIL_ID').": ".getRequestElement('mid'); -} elseif (isGetRequestElementSet('userid')) { + $WHO = getMessage('MAIL_ID').": ".getRequestParameter('mid'); +} elseif (isGetRequestParameterSet('userid')) { // All mails by a specific member shall be displayed // 0 1 2 3 4 5 6 7 8 9 10 $sql = "SELECT id, sender, subject, text, receivers, payment_id, data_type, timestamp, url, target_send, cat_id FROM `{?_MYSQL_PREFIX?}_pool` -WHERE sender='".bigintval(getRequestElement('userid'))."' +WHERE sender='".bigintval(getRequestParameter('userid'))."' ORDER by timestamp DESC"; - $WHO = getMessage('USER_ID').": ".getRequestElement('userid'); + $WHO = getMessage('USER_ID').": ".getRequestParameter('userid'); } if ((isExtensionActive('bonus')) && ($WHO == getMessage('_ALL'))) { @@ -98,22 +98,22 @@ ORDER BY timestamp DESC"; $result_normal = SQL_QUERY($sql, __FILE__, __LINE__); // Set offset an current page to default values -if (!isGetRequestElementSet('page')) setGetRequestElement('page', 1); +if (!isGetRequestParameterSet('page')) setGetRequestParameter('page', 1); -if (!isGetRequestElementSet('offset')) { +if (!isGetRequestParameterSet('offset')) { if (isConfigEntrySet('mails_page')) { // Set config entry - setGetRequestElement('offset', getConfig('mails_page')); + setGetRequestParameter('offset', getConfig('mails_page')); } else { // Set default one - setGetRequestElement('offset', 10); + setGetRequestParameter('offset', 10); } } // END - if // Add limitation to SQL string -if (!isGetRequestElementSet(('mid'))) { +if (!isGetRequestParameterSet(('mid'))) { // Create limitation line - $add = " LIMIT ".(bigintval(getRequestElement('offset')) * bigintval(getRequestElement('page')) - bigintval(getRequestElement('offset'))).", ".bigintval(getRequestElement('offset')); + $add = " LIMIT ".(bigintval(getRequestParameter('offset')) * bigintval(getRequestParameter('page')) - bigintval(getRequestParameter('offset'))).", ".bigintval(getRequestParameter('offset')); // For normal mails $sql .= $add; diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index e85fcc78a1..356a4d80af 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -47,13 +47,13 @@ addMenuDescription('admin', __FILE__); // Normally we want the overview of all registered extensions $do = 'overview'; -if (isGetRequestElementSet('reg_ext')) { +if (isGetRequestParameterSet('reg_ext')) { // We are about to register a new extension - $do = 'register'; $ext_id = bigintval(getRequestElement('reg_ext')); + $do = 'register'; $ext_id = bigintval(getRequestParameter('reg_ext')); // The id comes from task management and it is - of course - *not* the extension's name! -} elseif ((isPostRequestElementSet('change')) && (countPostSelection() > 0) && (!isDemoModeActive())) { +} elseif ((isPostRequestParameterSet('change')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // De-/activate extensions - foreach (postRequestElement('sel') as $ext_id => $active) { + foreach (postRequestParameter('sel') as $ext_id => $active) { // Shall we keep the extension always active? if ((isset($GLOBALS['cache_array']['always_active'][getExtensionName($ext_id)])) && ($GLOBALS['cache_array']['always_active'][getExtensionName($ext_id)] == 'Y') && ($active == 'Y')) { // Keep this extension active! @@ -69,12 +69,12 @@ if (isGetRequestElementSet('reg_ext')) { doExtensionSqls($ext_id, getExtensionMode()); } } -} elseif (((isPostRequestElementSet('edit')) || (isPostRequestElementSet('modify'))) && (countPostSelection() > 0) && (!isDemoModeActive())) { +} elseif (((isPostRequestParameterSet('edit')) || (isPostRequestParameterSet('modify'))) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Change settings like CSS file load - if (isPostRequestElementSet('modify')) { + if (isPostRequestParameterSet('modify')) { // Change entries $cache_update = '0'; - foreach (postRequestElement('sel') as $ext_id => $sel) { + foreach (postRequestParameter('sel') as $ext_id => $sel) { // Secure id $ext_id = bigintval($ext_id); @@ -84,13 +84,13 @@ if (isGetRequestElementSet('reg_ext')) { setExtensionMode('modify'); // Get entry for 'active' - $active = postRequestElement('active', $ext_id); + $active = postRequestParameter('active', $ext_id); // Update extension's record if (getExtensionVersion('sql_patches') >= '0.0.6') { // Update also CSS column when extensions sql_patches is newer or exact v0.0.6 SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_has_css`='%s', `ext_active`='%s' WHERE `id`=%s LIMIT 1", - array(postRequestElement('css', $ext_id), $active, $ext_id), __FILE__, __LINE__); + array(postRequestParameter('css', $ext_id), $active, $ext_id), __FILE__, __LINE__); } else { // When extension is older than v0.0.6 there is no column for the CSS information SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='%s' WHERE `id`=%s LIMIT 1", @@ -113,7 +113,7 @@ if (isGetRequestElementSet('reg_ext')) { } else { // Edit selected entries $SW = 2; $OUT = ''; - foreach (postRequestElement('sel') as $ext_id => $sel) { + foreach (postRequestParameter('sel') as $ext_id => $sel) { // Edit this extension? if (($sel == 'Y') || ($sel != 'Y')) { // Default is no CSS for non-updated mailers @@ -156,10 +156,10 @@ if (isGetRequestElementSet('reg_ext')) { loadTemplate('admin_extensions_edit', false, $OUT); $do = 'edit'; } -} elseif ((isPostRequestElementSet('delete')) && (countPostSelection() > 0) && (!isDemoModeActive())) { +} elseif ((isPostRequestParameterSet('delete')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // List extensions and when verbose is enabled SQL statements which will be executed $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $ext_id => $sel) { + foreach (postRequestParameter('sel') as $ext_id => $sel) { // Init variables $VERBOSE_OUT = ''; initSqls(); @@ -207,10 +207,10 @@ if (isGetRequestElementSet('reg_ext')) { // Load template loadTemplate('admin_extensions_delete', false, $OUT); $do = 'delete'; -} elseif ((isPostRequestElementSet('remove')) && (countPostSelection() > 0) && (!isDemoModeActive())) { +} elseif ((isPostRequestParameterSet('remove')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Remove extensions from DB (you have to delete all files manually!) $cache_update = '0'; - foreach (postRequestElement('sel') as $ext_id => $active) { + foreach (postRequestParameter('sel') as $ext_id => $active) { // Secure id number $ext_id = bigintval($ext_id); @@ -223,18 +223,18 @@ if (isGetRequestElementSet('reg_ext')) { // Extensions removed loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_EXTENSIONS_REMOVED', countPostSelection())); -} elseif ((isGetRequestElementSet('do')) && (!isDemoModeActive())) { +} elseif ((isGetRequestParameterSet('do')) && (!isDemoModeActive())) { // Other things to do - $do = SQL_ESCAPE(secureString(getRequestElement('do'))); -} elseif (isGetRequestElementSet('do')) { + $do = SQL_ESCAPE(secureString(getRequestParameter('do'))); +} elseif (isGetRequestParameterSet('do')) { // Demo mode active! $do = 'demo'; } // Shall we display active/inactive extensions? $where = ''; -if (isGetRequestElementSet(('active'))) { - $where = sprintf("WHERE `ext_active`='%s'", SQL_ESCAPE(secureString(getRequestElement('active')))); +if (isGetRequestParameterSet(('active'))) { + $where = sprintf("WHERE `ext_active`='%s'", SQL_ESCAPE(secureString(getRequestParameter('active')))); } // END - if // Case selection diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index 212b40d5ee..1728bdd498 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -45,9 +45,9 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Check if the admin has entered title and what-php file name... -if (((!isPostRequestElementSet('title')) || (!isPostRequestElementSet('menu'))) && (isFormSent())) { +if (((!isPostRequestParameterSet('title')) || (!isPostRequestParameterSet('menu'))) && (isFormSent())) { // Abort adding the menu entry - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); } // END - if if (!isFormSent()) { @@ -181,24 +181,24 @@ ORDER BY `sort` ASC", loadTemplate('admin_guest_add', false, $content); } elseif (!isDemoModeActive()) { // Insert new menu entry - if (isPostRequestElementSet('menu')) { + if (isPostRequestParameterSet('menu')) { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('%s','%s','%s','%s','%s','%s')", array( - postRequestElement('menu'), - postRequestElement('name'), - postRequestElement('title'), - bigintval(postRequestElement('sort')), - postRequestElement('visible'), - postRequestElement('active'), + postRequestParameter('menu'), + postRequestParameter('name'), + postRequestParameter('title'), + bigintval(postRequestParameter('sort')), + postRequestParameter('visible'), + postRequestParameter('active'), ), __FILE__, __LINE__); } else { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_guest_menu` (`action`, `title`, `sort`, `visible`, `locked`) VALUES ('%s','%s','%s','%s','%s')", array( - postRequestElement('name'), - postRequestElement('title'), - bigintval(postRequestElement('sort')), - postRequestElement('visible'), - postRequestElement('active'), + postRequestParameter('name'), + postRequestParameter('title'), + bigintval(postRequestParameter('sort')), + postRequestParameter('visible'), + postRequestParameter('active'), ), __FILE__, __LINE__); } loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php index 3e21f3e3cc..85998ecb3c 100644 --- a/inc/modules/admin/what-guestedit.php +++ b/inc/modules/admin/what-guestedit.php @@ -47,19 +47,19 @@ addMenuDescription('admin', __FILE__); // Do we edit/delete/change main menus or sub menus? $AND = "(`what` = '' OR `what` IS NULL)"; $SUB = ''; -if (isGetRequestElementSet('sub')) { - $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", getRequestElement('sub')); - $SUB = getRequestElement('sub'); +if (isGetRequestParameterSet('sub')) { + $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", getRequestParameter('sub')); + $SUB = getRequestParameter('sub'); } // END - if // List all menu points and make them editable -if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoModeActive())) { +if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Edit menu entries $content['sub'] = $SUB; $content['chk'] = countPostSelection(); $cnt = '0'; $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $sel => $confirm) { + foreach (postRequestParameter('sel') as $sel => $confirm) { if ($confirm == 1) { $cnt++; $result = SQL_QUERY_ESC("SELECT `title`, `action`, `what` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -100,7 +100,7 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM // Load template loadTemplate('admin_gmenu_edit_form', false, $content); -} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0) && (!isDemoModeActive())) { +} elseif ((isPostRequestParameterSet('del')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Del menu entries with or without confirmation $content['sub'] = $SUB; $content['chk'] = countPostSelection(); @@ -109,7 +109,7 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $sel => $confirm) { + foreach (postRequestParameter('sel') as $sel => $confirm) { if ($confirm == 1) { $cnt++; $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -143,21 +143,21 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM loadTemplate('admin_gmenu_delete', false, $content); } elseif ((isFormSent()) && (!isDemoModeActive())) { // An action is done... - switch (postRequestElement('ok')) { + switch (postRequestParameter('ok')) { case 'edit': // Edit menu - foreach (postRequestElement('sel') as $sel => $menu) { + foreach (postRequestParameter('sel') as $sel => $menu) { // Secure selector $sel = bigintval($sel); // Update entry SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", - array($menu, postRequestElement('sel_action', $sel), postRequestElement('sel_what', $sel), $sel),__FILE__, __LINE__); + array($menu, postRequestParameter('sel_action', $sel), postRequestParameter('sel_what', $sel), $sel),__FILE__, __LINE__); } // END - foreach loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); break; case 'del': // Delete menu - foreach (postRequestElement('sel') as $sel => $menu) { + foreach (postRequestParameter('sel') as $sel => $menu) { // Delete enty SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", array(bigintval($sel)), __FILE__, __LINE__); @@ -166,30 +166,30 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM break; case 'status': // Change access levels - foreach (postRequestElement('sel') as $sel => $menu) { + foreach (postRequestParameter('sel') as $sel => $menu) { // Secure selector $sel = bigintval($sel); // Update entry SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", - array(postRequestElement('visible', $sel), postRequestElement('locked', $sel), $sel), __FILE__, __LINE__); + array(postRequestParameter('visible', $sel), postRequestParameter('locked', $sel), $sel), __FILE__, __LINE__); } // END - foreach loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); break; default: // Unexpected action - logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestElement('ok'))); - loadTemplate('admin_menu_unknown_okay', false, postRequestElement('ok')); + logDebugMessage(__FILE__, __LINE__, sprintf("Unsupported action %s detected.", postRequestParameter('ok'))); + loadTemplate('admin_menu_unknown_okay', false, postRequestParameter('ok')); break; } // END - switch -} elseif ((isPostRequestElementSet('status')) && (countPostSelection() > 0) && (!isDemoModeActive())) { +} elseif ((isPostRequestParameterSet('status')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Change status (visible / locked) $content['sub'] = $SUB; $content['chk'] = countPostSelection(); // Load template $SW = 2; $cnt = '0'; $OUT = ''; - foreach (postRequestElement('sel') as $sel => $confirm) { + foreach (postRequestParameter('sel') as $sel => $confirm) { if ($confirm == 1) { $cnt++; $result = SQL_QUERY_ESC("SELECT `title`, `visible`, `locked` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -227,26 +227,26 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM // Load template loadTemplate('admin_gmenu_status', false, $content); } else { - if ((isGetRequestElementSet('act')) && (isGetRequestElementSet('tid')) && (isGetRequestElementSet('fid'))) { + if ((isGetRequestParameterSet('act')) && (isGetRequestParameterSet('tid')) && (isGetRequestParameterSet('fid'))) { // Get ids - if (isGetRequestElementSet('w')) { + if (isGetRequestParameterSet('w')) { // Sub menus selected $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", - array(getRequestElement('act'), bigintval(getRequestElement('tid'))), __FILE__, __LINE__); + array(getRequestParameter('act'), bigintval(getRequestParameter('tid'))), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); SQL_FREERESULT($result); $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", - array(getRequestElement('act'), bigintval(getRequestElement('fid'))), __FILE__, __LINE__); + array(getRequestParameter('act'), bigintval(getRequestParameter('fid'))), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); } else { // Main menu selected $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1", - array(bigintval(getRequestElement('tid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('tid'))), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); SQL_FREERESULT($result); $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1", - array(bigintval(getRequestElement('fid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('fid'))), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); } @@ -254,9 +254,9 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM if ((!empty($tid)) && (!empty($fid))) { // Sort menu SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", - array(bigintval(getRequestElement('tid')), bigintval($fid)), __FILE__, __LINE__); + array(bigintval(getRequestParameter('tid')), bigintval($fid)), __FILE__, __LINE__); SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", - array(bigintval(getRequestElement('fid')), bigintval($tid)), __FILE__, __LINE__); + array(bigintval(getRequestParameter('fid')), bigintval($tid)), __FILE__, __LINE__); } // END - if } // END - if diff --git a/inc/modules/admin/what-list_bank_package.php b/inc/modules/admin/what-list_bank_package.php index 3d6d246624..66b701da9a 100644 --- a/inc/modules/admin/what-list_bank_package.php +++ b/inc/modules/admin/what-list_bank_package.php @@ -46,31 +46,31 @@ addMenuDescription('admin', __FILE__); // Check if there is enougth selected $show = true; -if ((isPostRequestElementSet('id')) && (is_array(postRequestElement('id'))) && (count(postRequestElement('id')) > 0)) { +if ((isPostRequestParameterSet('id')) && (is_array(postRequestParameter('id'))) && (count(postRequestParameter('id')) > 0)) { // Okay, which button was pressed? - if (isPostRequestElementSet('change')) { + if (isPostRequestParameterSet('change')) { // Change permissions - adminChangeActivationStatus(postRequestElement('id'), 'bank_packages', 'package_active'); - } elseif (isPostRequestElementSet('edit')) { + adminChangeActivationStatus(postRequestParameter('id'), 'bank_packages', 'package_active'); + } elseif (isPostRequestParameterSet('edit')) { // Delete entries (with confirmation) adminEditEntriesConfirm( - postRequestElement('id'), + postRequestParameter('id'), 'bank_packages', array('id', 'title', 'description', 'account_fee', 'free_transfers', 'transfer_fee', 'output_system_mode', 'package_active', 'free_months_no_fee', 'interest_plus', 'interest_minus', 'first_payment', 'free_account_income', 'free_account_stuff', 'tan_lock'), array('bigintval', '', '', 'translateComma', 'bigintval', 'translateComma', '', '', 'bigintval', 'translateComma', 'translateComma', 'translateComma', 'translateComma', '', 'bigintval'), array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '') ); $show = false; - } elseif (isPostRequestElementSet('do_edit')) { + } elseif (isPostRequestParameterSet('do_edit')) { // Delete entries (with confirmation) - adminEditEntriesConfirm(postRequestElement('id'), 'bank_packages', array(), array(), array(), true); - } elseif (isPostRequestElementSet('delete')) { + adminEditEntriesConfirm(postRequestParameter('id'), 'bank_packages', array(), array(), array(), true); + } elseif (isPostRequestParameterSet('delete')) { // Delete entries (with confirmation) - adminDeleteEntriesConfirm(postRequestElement('id'), 'bank_packages', array('id', 'title', 'description', 'account_fee'), array('bigintval', '', '', 'translateComma'), array('', '', '', '')); + adminDeleteEntriesConfirm(postRequestParameter('id'), 'bank_packages', array('id', 'title', 'description', 'account_fee'), array('bigintval', '', '', 'translateComma'), array('', '', '', '')); $show = false; - } elseif (isPostRequestElementSet('remove')) { + } elseif (isPostRequestParameterSet('remove')) { // Delete entries (with confirmation) - adminDeleteEntriesConfirm(postRequestElement('id'), 'bank_packages', array(), array(), array(), true); + adminDeleteEntriesConfirm(postRequestParameter('id'), 'bank_packages', array(), array(), array(), true); } } // END - if diff --git a/inc/modules/admin/what-list_beg.php b/inc/modules/admin/what-list_beg.php index 323813c05a..626e3eed58 100644 --- a/inc/modules/admin/what-list_beg.php +++ b/inc/modules/admin/what-list_beg.php @@ -46,7 +46,7 @@ addMenuDescription('admin', __FILE__); if (getConfig('beg_rallye') == 'Y') { // Shall I withdraw now? - if (isPostRequestElementSet(('withdraw'))) { + if (isPostRequestParameterSet(('withdraw'))) { // Okay, let's prepare... $curr = date('m', time()) - 1; if (strlen($curr) == 1) $curr = '0' . $curr; diff --git a/inc/modules/admin/what-list_bonus.php b/inc/modules/admin/what-list_bonus.php index ec1055e32d..581855e47a 100644 --- a/inc/modules/admin/what-list_bonus.php +++ b/inc/modules/admin/what-list_bonus.php @@ -46,7 +46,7 @@ addMenuDescription('admin', __FILE__); if (getConfig('bonus_active') == 'Y') { // Shall I withdraw now? - if (isPostRequestElementSet(('withdraw'))) { + if (isPostRequestParameterSet(('withdraw'))) { // Okay, let's prepare... $curr = date('m', time()) - 1; if (strlen($curr) == 1) $curr = '0' . $curr; diff --git a/inc/modules/admin/what-list_cats.php b/inc/modules/admin/what-list_cats.php index 8b668b6ad0..4b41510cc5 100644 --- a/inc/modules/admin/what-list_cats.php +++ b/inc/modules/admin/what-list_cats.php @@ -45,15 +45,15 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isGetRequestElementSet('userid')) { +if (isGetRequestParameterSet('userid')) { // Check if the user already exists - if (fetchUserData(getRequestElement('userid'))) { + if (fetchUserData(getRequestParameter('userid'))) { // Loads surname, family's name and the email address $content = getUserDataArray(); // Prepare constants // @TODO No longer needed? define('__CATS_BASE' , '' . $content['surname'] . ' ' . $content['family'] . ''; @@ -66,7 +66,7 @@ if (isGetRequestElementSet('userid')) { while ($content = merge_array($content, SQL_FETCHARRAY($result_cats))) { // Check user's selection $result_user = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid`=%s AND `cat_id`=%s LIMIT 1", - array(bigintval(getRequestElement('userid')), bigintval($content['id'])), __FILE__, __LINE__); + array(bigintval(getRequestParameter('userid')), bigintval($content['id'])), __FILE__, __LINE__); // Set selection $selection = "{--NO--}"; diff --git a/inc/modules/admin/what-list_country.php b/inc/modules/admin/what-list_country.php index 58cf490974..9a0a10ef2c 100644 --- a/inc/modules/admin/what-list_country.php +++ b/inc/modules/admin/what-list_country.php @@ -45,43 +45,43 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Add new code? -if ((isPostRequestElementSet('add')) && (isPostRequestElementSet(('code'))) && (isPostRequestElementSet(('descr')))) { +if ((isPostRequestParameterSet('add')) && (isPostRequestParameterSet(('code'))) && (isPostRequestParameterSet(('descr')))) { // Check if country code does already exist $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_countries` WHERE code='%s' LIMIT 1", - array(strtoupper(postRequestElement('code'))), __FILE__, __LINE__); + array(strtoupper(postRequestParameter('code'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == '0') { // Save entry SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (code, descr, is_active) VALUES ('%s','%s','%s')", array( - strtoupper(substr(postRequestElement('code'), 0, 2)), - postRequestElement('descr'), - postRequestElement('is_active') + strtoupper(substr(postRequestParameter('code'), 0, 2)), + postRequestParameter('descr'), + postRequestParameter('is_active') ), __FILE__, __LINE__); // Country added - $message = getMaskedMessage('ADMIN_COUNTRY_ADDED', strtoupper(postRequestElement('descr'))); + $message = getMaskedMessage('ADMIN_COUNTRY_ADDED', strtoupper(postRequestParameter('descr'))); } else { // Free memory SQL_FREERESULT($result); // Does already exist - $message = getMaskedMessage('ADMIN_COUNTRY_ALREADY', strtoupper(postRequestElement('code'))); + $message = getMaskedMessage('ADMIN_COUNTRY_ALREADY', strtoupper(postRequestParameter('code'))); } // Display message loadTemplate('admin_settings_saved', false, $message); -} elseif ((isPostRequestElementSet('change')) && (isPostRequestElementSet('id'))) { +} elseif ((isPostRequestParameterSet('change')) && (isPostRequestParameterSet('id'))) { // Change all status - adminChangeActivationStatus(postRequestElement('id'), 'countries', 'is_active'); + adminChangeActivationStatus(postRequestParameter('id'), 'countries', 'is_active'); // Show next link loadTemplate('admin_next_link', false, array( 'url' => 'modules.php?module=admin&what=list_country', 'title' => getMessage('ADMIN_COUNTRY_ACTIVATION_NEXT_LINK') )); -} elseif (((isPostRequestElementSet('edit')) || (isPostRequestElementSet('delete'))) && (isPostRequestElementSet('id'))) { - if (count(postRequestElement('id')) > 0) { - if (isPostRequestElementSet('edit')) { +} elseif (((isPostRequestParameterSet('edit')) || (isPostRequestParameterSet('delete'))) && (isPostRequestParameterSet('id'))) { + if (count(postRequestParameter('id')) > 0) { + if (isPostRequestParameterSet('edit')) { // Edit template $row = 'admin_list_country_edit_row'; $post = 'modify'; @@ -101,7 +101,7 @@ if ((isPostRequestElementSet('add')) && (isPostRequestElementSet(('code'))) && ( // Edit all selected country codes $OUT = ''; $SW = 2; - foreach (postRequestElement('id') as $id => $status) { + foreach (postRequestParameter('id') as $id => $status) { // Load data from DB $result = SQL_QUERY_ESC("SELECT code, descr FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -148,18 +148,18 @@ if ((isPostRequestElementSet('add')) && (isPostRequestElementSet(('code'))) && ( } else { // Shall we modify / remove entries now? $message = ''; initSqls(); - if ((isPostRequestElementSet('modify')) && (isPostRequestElementSet('id'))) { + if ((isPostRequestParameterSet('modify')) && (isPostRequestParameterSet('id'))) { // Modify - foreach (postRequestElement('id') as $id => $sel) { - addSql("UPDATE `{?_MYSQL_PREFIX?}_countries` SET `code`='".postRequestElement('code', $id)."', `descr`='".postRequestElement('descr', $id)."', `is_active`='".postRequestElement('is_active', $id)."' WHERE `id`='".$id."' LIMIT 1"); + foreach (postRequestParameter('id') as $id => $sel) { + addSql("UPDATE `{?_MYSQL_PREFIX?}_countries` SET `code`='".postRequestParameter('code', $id)."', `descr`='".postRequestParameter('descr', $id)."', `is_active`='".postRequestParameter('is_active', $id)."' WHERE `id`='".$id."' LIMIT 1"); } // Create message $message = getMessage('ADMIN_COUNTRIES_MODIFIED'); - } elseif ((isPostRequestElementSet('remove')) && (isPostRequestElementSet('id'))) { + } elseif ((isPostRequestParameterSet('remove')) && (isPostRequestParameterSet('id'))) { // Remove - $IDs = implode(',', array_keys(postRequestElement('id'))); - addSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id` IN (".$IDs.") LIMIT ".count(postRequestElement('id')).""); + $IDs = implode(',', array_keys(postRequestParameter('id'))); + addSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_countries` WHERE `id` IN (".$IDs.") LIMIT ".count(postRequestParameter('id')).""); // Create message $message = getMessage('ADMIN_COUNTRIES_REMOVED'); diff --git a/inc/modules/admin/what-list_doubler.php b/inc/modules/admin/what-list_doubler.php index b979debaa5..f173a96cdd 100644 --- a/inc/modules/admin/what-list_doubler.php +++ b/inc/modules/admin/what-list_doubler.php @@ -44,19 +44,19 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (!isGetRequestElementSet('mode')) { +if (!isGetRequestParameterSet('mode')) { // Chosse the overview page as default - setGetRequestElement('mode', 'overview'); + setGetRequestParameter('mode', 'overview'); } else { // Set table title automatically - if (!isGetRequestElementSet('select')) setGetRequestElement('select', 'all'); + if (!isGetRequestParameterSet('select')) setGetRequestParameter('select', 'all'); // Prepare header - $content['list_' . strtolower(getRequestElement('mode'))] = getMessage('ADMIN_DOUBLER_LIST_' . strtoupper(getRequestElement('mode')) . '_' . strtoupper(getRequestElement('select')).''); + $content['list_' . strtolower(getRequestParameter('mode'))] = getMessage('ADMIN_DOUBLER_LIST_' . strtoupper(getRequestParameter('mode')) . '_' . strtoupper(getRequestParameter('select')).''); } // Load data for the template -switch (getRequestElement('mode')) { +switch (getRequestParameter('mode')) { case 'already': // Already payed out points break; @@ -112,7 +112,7 @@ switch (getRequestElement('mode')) { } // END - switch // Load mode template -loadTemplate('admin_list_doubler_' . getRequestElement('mode'), false, $content); +loadTemplate('admin_list_doubler_' . getRequestParameter('mode'), false, $content); // [EOF] ?> diff --git a/inc/modules/admin/what-list_links.php b/inc/modules/admin/what-list_links.php index 19468dcf54..fd11ffd1c9 100644 --- a/inc/modules/admin/what-list_links.php +++ b/inc/modules/admin/what-list_links.php @@ -49,19 +49,19 @@ if (!isExtensionActive('mailid')) { return; } // END - if -if (isGetRequestElementSet('userid')) { +if (isGetRequestParameterSet('userid')) { // Check if the user already exists - if (fetchUserData(getRequestElement('userid'))) { + if (fetchUserData(getRequestParameter('userid'))) { // Grab user's all unconfirmed mails // @TODO Try to rewrite this to a filter if (isExtensionActive('bonus')) { // Load bonus id $result = SQL_QUERY_ESC("SELECT `stats_id`, `bonus_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s ORDER BY `id`", - array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); } else { // Load stats id (2nd will be ignored later! But it is needed for the same fetchrow command) $result = SQL_QUERY_ESC("SELECT `stats_id`, `stats_id`, `link_type` FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s ORDER BY `id` ASC", - array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); } // Get number of rows from the query @@ -69,13 +69,13 @@ if (isGetRequestElementSet('userid')) { if ($nums > 0) { // Some unconfirmed mails left - if (getRequestElement('del') == "all") { + if (getRequestParameter('del') == "all") { // Delete all unconfirmed mails by this user SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid`=%s LIMIT %s", - array(bigintval(getRequestElement('userid')), $nums), __FILE__, __LINE__); + array(bigintval(getRequestParameter('userid')), $nums), __FILE__, __LINE__); // Prepare mail and send it away - $message = loadEmailTemplate('admin-del_links', $nums, bigintval(getRequestElement('userid'))); + $message = loadEmailTemplate('admin-del_links', $nums, bigintval(getRequestParameter('userid'))); sendEmail(getUserData('email'), getMessage('ADMIN_DEL_LINK_SUBJ'), $message); // Display message @@ -100,14 +100,14 @@ if (isGetRequestElementSet('userid')) { $result_data = SQL_QUERY_ESC("SELECT `subject`, `timestamp_ordered` AS `timestamp`, `cat_id` FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); $type = 'mailid'; $DATA = $id; $PROBLEM = getMessage('NORMAL_MAIL_PROBLEM'); - $LINK = '' . $id . ''; + $LINK = '' . $id . ''; break; case 'BONUS': $result_data = SQL_QUERY_ESC("SELECT `subject`, `timestamp`, `cat_id` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`=%s LIMIT 1", array(bigintval($id2)), __FILE__, __LINE__); $type = 'bonusid'; $DATA = $id2; $PROBLEM = getMessage('BONUS_MAIL_PROBLEM'); - $LINK = '' . $id2 . ''; + $LINK = '' . $id2 . ''; break; default: // Problem in application detected! @@ -159,18 +159,18 @@ if (isGetRequestElementSet('userid')) { $content['email'] = '' . getUserData('email') . ''; $content['rows'] = $OUT; $content['nums'] = $nums; - $content['userid'] = bigintval(getRequestElement('userid')); + $content['userid'] = bigintval(getRequestParameter('userid')); // Load final template loadTemplate('admin_list_links', false, $content); } } else { // No mails left to confirm - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_LINKS', getRequestElement('userid'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_LINKS', getRequestParameter('userid'))); } } else { // User not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid'))); } } else { // Output selection form with all confirmed user accounts listed diff --git a/inc/modules/admin/what-list_network_params.php b/inc/modules/admin/what-list_network_params.php index ce21dc9116..ef5f8443f8 100644 --- a/inc/modules/admin/what-list_network_params.php +++ b/inc/modules/admin/what-list_network_params.php @@ -63,20 +63,28 @@ if ($GLOBALS['network_display'] === false) { } // END - if // Do we have a network selected? -if (isGetRequestElementSet('network')) { +if (isGetRequestParameterSet('network')) { // Get its data for template - $networkData = getNetworkDataById(getRequestElement('network')); + $networkData = getNetworkDataById(getRequestParameter('network')); + + // Init disabled list + $networkData['disabled'] = array(); // Load all advert types for given network $result = SQL_QUERY_ESC("SELECT - `network_param_id`, `request_param_key`, `request_param_value` + p.`network_param_id`, t.`network_type_id`, t.`network_type_handle`, p.`request_param_key`, p.`request_param_value` FROM - `{?_MYSQL_PREFIX?}_network_request_params` + `{?_MYSQL_PREFIX?}_network_request_params` AS p +INNER JOIN + `{?_MYSQL_PREFIX?}_network_types` AS t +ON + p.`network_type_id`=t.`network_type_id` WHERE - `network_id`=%s + p.`network_id`=%s ORDER BY - `request_param_key` ASC", - array(getRequestElement('network')), __FILE__, __LINE__); + t.`network_type_handle` ASC, + p.`network_param_id` ASC", + array(getRequestParameter('network')), __FILE__, __LINE__); // Do we have entries? if (SQL_NUMROWS($result) > 0) { @@ -86,6 +94,12 @@ ORDER BY // Add/translate some data $row['sw'] = $SW; + // Add it to network if the type matches selected + if ($row['network_type_id'] == postRequestParameter('network_type_id')) { + // Matches, then add it for disabling this entry + $networkData['disabled'][$row['request_param_key']] = true; + } // END - if + // Add row template and switch color $OUT .= loadTemplate('admin_list_network_params_row', true, $row); $SW = 3 - $SW; @@ -94,7 +108,7 @@ ORDER BY // Prepare data for template $content = array( 'rows' => $OUT, - 'network_id' => getRequestElement('network'), + 'network_id' => getRequestParameter('network'), 'network_title' => $networkData['network_title'], 'network_reflink' => $networkData['network_reflink'], ); @@ -109,6 +123,45 @@ ORDER BY // Free result SQL_FREERESULT($result); + // Add options list for network type + $networkData['type_options'] = generateOptionList( + 'network_types', + 'network_type_id', + 'network_type_handle', + postRequestParameter('network_type_id'), + '', + sprintf("WHERE `network_id`=%s", getRequestParameter('network')) + ); + + // Add options for parameter keys + $networkData['key_options'] = generateOptionList( + '/ARRAY/', + array( + 'id', + 'sid', + 'password', + 'reload', + 'min_stay', + 'remain', + 'reward', + 'size', + 'erotic' + ), + array( + '{--ADMIN_NETWORK_PARAMS_ID--}', + '{--ADMIN_NETWORK_PARAMS_SID--}', + '{--ADMIN_NETWORK_PARAMS_PASSWORD--}', + '{--ADMIN_NETWORK_PARAMS_RELOAD--}', + '{--ADMIN_NETWORK_PARAMS_MINIMUM_STAY--}', + '{--ADMIN_NETWORK_PARAMS_REMAIN--}', + '{--ADMIN_NETWORK_PARAMS_REWARD--}', + '{--ADMIN_NETWORK_PARAMS_SIZE--}', + '{--ADMIN_NETWORK_PARAMS_EROTIC--}' + ), + '', '', '', + $networkData['disabled'] + ); + // Add form for adding new params loadTemplate('admin_add_network_params', false, $networkData); } else { diff --git a/inc/modules/admin/what-list_network_types.php b/inc/modules/admin/what-list_network_types.php index cf204b7f7f..1542f10b22 100644 --- a/inc/modules/admin/what-list_network_types.php +++ b/inc/modules/admin/what-list_network_types.php @@ -63,9 +63,9 @@ if ($GLOBALS['network_display'] === false) { } // END - if // Do we have a network selected? -if (isGetRequestElementSet('network')) { +if (isGetRequestParameterSet('network')) { // Get its data for template - $networkData = getNetworkDataById(getRequestElement('network')); + $networkData = getNetworkDataById(getRequestParameter('network')); // Load all advert types for given network $result = SQL_QUERY_ESC("SELECT @@ -76,7 +76,7 @@ WHERE `network_id`=%s ORDER BY `network_type_handle` ASC", - array(getRequestElement('network')), __FILE__, __LINE__); + array(getRequestParameter('network')), __FILE__, __LINE__); // Do we have entries? if (SQL_NUMROWS($result) > 0) { @@ -95,7 +95,7 @@ ORDER BY // Prepare data for template $content = array( 'rows' => $OUT, - 'network_id' => getRequestElement('network'), + 'network_id' => getRequestParameter('network'), 'network_title' => $networkData['network_title'], 'network_reflink' => $networkData['network_reflink'], ); diff --git a/inc/modules/admin/what-list_notifications.php b/inc/modules/admin/what-list_notifications.php index 220213e517..c03e38df9c 100644 --- a/inc/modules/admin/what-list_notifications.php +++ b/inc/modules/admin/what-list_notifications.php @@ -49,8 +49,8 @@ $SQL2 = ''; $result_max = false; // Set offset an current page to default values -if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 1); -if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', getConfig('mails_page')); +if (!isGetRequestParameterSet('page')) setGetRequestParameter('page' , 1); +if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', getConfig('mails_page')); if (isExtensionActive('bonus')) { // Bonus mails sent by you @@ -68,7 +68,7 @@ ORDER BY timestamp DESC"; } // Create limitation line -$add = " LIMIT ".(bigintval(getRequestElement('offset')) * bigintval(getRequestElement('page')) - bigintval(getRequestElement('offset'))).", ".bigintval(getRequestElement('offset')); +$add = " LIMIT ".(bigintval(getRequestParameter('offset')) * bigintval(getRequestParameter('page')) - bigintval(getRequestParameter('offset'))).", ".bigintval(getRequestParameter('offset')); // Add limitation if (!empty($SQL2)) $SQL2 .= $add; diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index 2ae26ae9ca..2c5e9ee051 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -44,15 +44,15 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isGetRequestElementSet(('pid'))) { +if (isGetRequestParameterSet(('pid'))) { // First let's get the member's id $result = SQL_QUERY_ESC("SELECT userid, target_account, payout_total, payout_timestamp, password FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `id`=%s LIMIT 1", - array(getRequestElement('pid')), __FILE__, __LINE__); + array(getRequestParameter('pid')), __FILE__, __LINE__); list($userid, $tuserid, $points, $tstamp, $tpass) = SQL_FETCHROW($result); SQL_FREERESULT($result); // Obtain some data - if (!isGetRequestElementSet(('task')) && (!empty($userid)) && ($userid > 0)) { + if (!isGetRequestParameterSet(('task')) && (!empty($userid)) && ($userid > 0)) { // Get task id from database $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `userid`=%s AND `task_type`='PAYOUT_REQUEST' AND task_created='".$tstamp."' LIMIT 1", array(bigintval($userid)), __FILE__, __LINE__); @@ -64,7 +64,7 @@ if (isGetRequestElementSet(('pid'))) { loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_USERID')); } else { // Get task id from URL - $task = getRequestElement('task'); + $task = getRequestParameter('task'); } if ((!empty($task)) && (!empty($userid)) && ($userid > 0)) { @@ -74,12 +74,12 @@ if (isGetRequestElementSet(('pid'))) { debug_report_bug('No user account ' . $userid . ' found.'); } // END - if - if ((getRequestElement('do') == 'accept') && (!empty(getUserData('email')))) { + if ((getRequestParameter('do') == 'accept') && (!empty(getUserData('email')))) { // Ok, now we can output the form or execute accepting if (isFormSent()) { // Obtain payout type and other data $result = SQL_QUERY_ESC("SELECT `payout_id` FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('pid'))), __FILE__, __LINE__); list($ptype) = SQL_FETCHROW($result); SQL_FREERESULT($result); @@ -132,10 +132,10 @@ LIMIT 1", // Clear payout request SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_payouts` SET `status`='ACCEPTED' WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('pid'))), __FILE__, __LINE__); // Send out mail - $message = loadEmailTemplate('member_payout_accepted', postRequestElement('text'), $userid); + $message = loadEmailTemplate('member_payout_accepted', postRequestParameter('text'), $userid); // Output message if ($allow == 'Y') { @@ -161,14 +161,14 @@ LIMIT 1", // Prepare content $content = array( 'task' => $task, - 'pid' => bigintval(getRequestElement('pid')), + 'pid' => bigintval(getRequestParameter('pid')), 'user' => '' . translateGender(getUserData('gender')) . ' ' . getUserData('surname') . ' ' . getUserData('family') . '', ); // Load template loadTemplate('admin_payout_accept_form', false, $content); } - } elseif ((getRequestElement('do') == 'reject') && (!empty(getUserData('email')))) { + } elseif ((getRequestParameter('do') == 'reject') && (!empty(getUserData('email')))) { // Ok, now we can output the form or execute rejecting if (isFormSent()) { if ($task > 0) { @@ -178,10 +178,10 @@ LIMIT 1", // Clear payout request SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_payouts` SET `status`='REJECTED' WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestElement('pid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('pid'))), __FILE__, __LINE__); // Send out mail - $message = loadEmailTemplate('member_payout_rejected', postRequestElement('text'), $userid); + $message = loadEmailTemplate('member_payout_rejected', postRequestParameter('text'), $userid); // Output message loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_REJECTED_NOTIFIED')); @@ -192,7 +192,7 @@ LIMIT 1", // Prepare content $content = array( 'task' => $task, - 'pid' => bigintval(getRequestElement('pid')), + 'pid' => bigintval(getRequestParameter('pid')), 'user' => '' . translateGender(getUserData('gender')) . ' ' . getUserData('surname') . ' ' . getUserData('family') . '', ); @@ -208,7 +208,7 @@ LIMIT 1", loadTemplate('admin_settings_saved', false, getMessage('PAYOUT_FAILED_OBTAIN_TASK_ID')); } } else { - if (getRequestElement('do') == 'delete') { + if (getRequestParameter('do') == 'delete') { // Delete all requests $result = SQL_QUERY("TRUNCATE `{?_MYSQL_PREFIX?}_user_payouts`", __FILE__, __LINE__); } // END - if diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index 4ebd29f3bf..89ff23fd70 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -48,52 +48,52 @@ addMenuDescription('admin', __FILE__); $message = ''; // Quick actions on a rallye -if (isGetRequestElementSet('rallye')) { +if (isGetRequestParameterSet('rallye')) { // Init SQL queries initSqls(); - if (isGetRequestElementSet('activate')) { + if (isGetRequestParameterSet('activate')) { // Activate / deactivate - switch (getRequestElement('activate')) { + switch (getRequestParameter('activate')) { case '1': // Activate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `is_active`='Y' WHERE `id`=%s AND `is_active`='N' LIMIT 1", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__, false) ); break; case '0': // Deactivate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `is_active`='N' WHERE `id`=%s AND `is_active`='Y' LIMIT 1", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__, false) ); break; } // END - switch - } elseif (isGetRequestElementSet('notify')) { + } elseif (isGetRequestParameterSet('notify')) { // Automatic notification - switch (getRequestElement('notify')) { + switch (getRequestParameter('notify')) { case '1': // Activate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `send_notify`='Y' WHERE `id`=%s AND `send_notify`='N' LIMIT 1", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__, false) ); break; case '0': // Deactivate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `send_notify`='N' WHERE `id`=%s AND `send_notify`='Y' LIMIT 1", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__, false) ); break; } // END - switch - } elseif (isGetRequestElementSet('auto')) { + } elseif (isGetRequestParameterSet('auto')) { // Automatic adding of new members - switch (getRequestElement('auto')) { + switch (getRequestParameter('auto')) { case '1': // Activate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `auto_add_new_user`='Y' WHERE `id`=%s AND `auto_add_new_user`='N' LIMIT 1", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__, false) ); break; case '0': // Deactivate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `auto_add_new_user`='N' WHERE `id`=%s AND `auto_add_new_user`='Y' LIMIT 1", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__, false) + array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__, false) ); break; } // END - switch @@ -101,14 +101,14 @@ if (isGetRequestElementSet('rallye')) { // Run SQL command runFilterChain('run_sqls'); -} elseif (isPostRequestElementSet('remove')) { +} elseif (isPostRequestParameterSet('remove')) { // Delete rallyes if (countPostSelection() > 0) { // Init SQLs initSqls(); // Delete selected rallyes and all it's data - foreach (postRequestElement('sel') as $id => $selected) { + foreach (postRequestParameter('sel') as $id => $selected) { // Remove selected rallye entirely... addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__, false)); @@ -127,20 +127,20 @@ if (isGetRequestElementSet('rallye')) { // No rallye selected to delete! $message = getMessage('RALLYE_DELETE_NOTHING_SELECTED'); } -} elseif (isPostRequestElementSet('change')) { +} elseif (isPostRequestParameterSet('change')) { // Change rallye - if (countSelection(postRequestElement('title')) > 0) { + if (countSelection(postRequestParameter('title')) > 0) { // Init SQLs initSqls(); // Change selected rallyes and all it's data - foreach (postRequestElement('title') as $id => $title) { + foreach (postRequestParameter('title') as $id => $title) { // Secure id number $id = bigintval($id); // Generate timestamps - $START = mktime(postRequestElement('start_hour', $id), postRequestElement('start_min', $id), postRequestElement('start_sec', $id), postRequestElement('start_month', $id), postRequestElement('start_day', $id), postRequestElement('start_year', $id)); - $END = mktime(postRequestElement('end_hour', $id) , postRequestElement('end_min', $id) , postRequestElement('end_sec', $id) , postRequestElement('end_month', $id) , postRequestElement('end_day', $id) , postRequestElement('end_year', $id) ); + $START = mktime(postRequestParameter('start_hour', $id), postRequestParameter('start_min', $id), postRequestParameter('start_sec', $id), postRequestParameter('start_month', $id), postRequestParameter('start_day', $id), postRequestParameter('start_year', $id)); + $END = mktime(postRequestParameter('end_hour', $id) , postRequestParameter('end_min', $id) , postRequestParameter('end_sec', $id) , postRequestParameter('end_month', $id) , postRequestParameter('end_day', $id) , postRequestParameter('end_year', $id) ); // Update entry addSql(SQL_QUERY_ESC("UPDATE @@ -158,12 +158,12 @@ WHERE LIMIT 1", array( $title, - postRequestElement('descr', $id), - postRequestElement('templ', $id), + postRequestParameter('descr', $id), + postRequestParameter('templ', $id), bigintval($START), bigintval($END), - bigintval(postRequestElement('min_users', $id)), - bigintval(postRequestElement('min_prices', $id)), + bigintval(postRequestParameter('min_users', $id)), + bigintval(postRequestParameter('min_prices', $id)), $id ), __FILE__, __LINE__, false)); } @@ -176,12 +176,12 @@ LIMIT 1", } } -if (isPostRequestElementSet('edit')) { +if (isPostRequestParameterSet('edit')) { // Check for selections if (countPostSelection() > 0) { // Make all selected and deactivated rallyes editable $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $selected) { + foreach (postRequestParameter('sel') as $id => $selected) { // Load rallye basic data $result = SQL_QUERY_ESC("SELECT `title`, `descr`, `template`, `start_time`, `end_time`, `min_users`, `min_prices` @@ -231,13 +231,13 @@ LIMIT 1", // Nothing selected to edit loadTemplate('admin_settings_saved', false, loadTemplate('admin_list_rallye_noselect', true)); } -} elseif ((getRequestElement('sub') == 'users') && (getRequestElement('rallye') > 0)) { +} elseif ((getRequestParameter('sub') == 'users') && (getRequestParameter('rallye') > 0)) { // List users and their refs before start and current $result = SQL_QUERY_ESC("SELECT `userid`, `refs`, `curr_points` FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE `rallye_id`=%s ORDER BY `userid` ASC", - array(bigintval(getRequestElement('rallye'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('rallye'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { $OUT = ''; $SW = 2; - $content['rallye'] = getRequestElement('rallye'); + $content['rallye'] = getRequestParameter('rallye'); while ($row = SQL_FETCHARRAY($result)) { // Check for referal count $cnt = getReferalRallyeRefsCount($row['userid'], $row['refs']); @@ -272,7 +272,7 @@ LIMIT 1", // Remember rows $content['rows'] = $OUT; - $content['rallye'] = getRequestElement('rallye'); + $content['rallye'] = getRequestParameter('rallye'); // Free memory SQL_FREERESULT($result); diff --git a/inc/modules/admin/what-list_refs.php b/inc/modules/admin/what-list_refs.php index 8dd04d8a50..b32ce4be69 100644 --- a/inc/modules/admin/what-list_refs.php +++ b/inc/modules/admin/what-list_refs.php @@ -45,9 +45,9 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isGetRequestElementSet('userid')) { +if (isGetRequestParameterSet('userid')) { // Secure userid - $userid = bigintval(getRequestElement('userid')); + $userid = bigintval(getRequestParameter('userid')); // Fix missing variable $result_levels = false; @@ -59,7 +59,7 @@ if (isGetRequestElementSet('userid')) { $menge_lck = countSumTotalData($userid, 'user_data', 'userid', 'refid', true, " AND `status` != 'CONFIRMED'"); // Output info message - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_USER_TOTAL_REFS', generateUserProfileLink(getRequestElement('userid')), $menge, $menge_lck)); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_USER_TOTAL_REFS', generateUserProfileLink(getRequestParameter('userid')), $menge, $menge_lck)); // Load all referal levels $result_levels = SQL_QUERY("SELECT @@ -178,7 +178,7 @@ ORDER BY // Prepare content $content = array( 'rows' => $OUT, - 'userid' => generateUserProfileLink(getRequestElement('userid')) + 'userid' => generateUserProfileLink(getRequestParameter('userid')) ); // Load main template @@ -199,7 +199,7 @@ ORDER BY SQL_FREERESULT($result_levels); } else { // User not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid'))); } } else { // Output selection form with all confirmed user accounts listed diff --git a/inc/modules/admin/what-list_sponsor.php b/inc/modules/admin/what-list_sponsor.php index 726a7f9c6d..b6369c6b44 100644 --- a/inc/modules/admin/what-list_sponsor.php +++ b/inc/modules/admin/what-list_sponsor.php @@ -44,12 +44,12 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isGetRequestElementSet('id')) { +if (isGetRequestParameterSet('id')) { // Show detailed informations to a sponsor $result = SQL_QUERY_ESC("SELECT company, position, gender, surname, family, street_nr1, street_nr2, zip, city, country, phone, fax, cell, email, url, tax_ident, status, sponsor_created, last_online, last_change, receive_warnings, points_amount, points_used, remote_addr, warning_interval, refid, ref_count FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1", - array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Load sponsor details @@ -63,14 +63,14 @@ WHERE `id`='%s' LIMIT 1", // Check for sponsor's orders (only count) $result_orders = SQL_QUERY_ESC("SELECT COUNT(id) FROM `{?_MYSQL_PREFIX?}_sponsor_orders` WHERE sponsorid='%s'", - array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); list($orders) = SQL_FETCHROW($result_orders); SQL_FREERESULT($result_orders); if (empty($orders)) $orders = '0'; // Prepare all data for the template // Sponsor's id - $content['id'] = getRequestElement('id'); + $content['id'] = getRequestParameter('id'); // Personal data $content['gender'] = translateGender($content['gender']); // Contact data @@ -95,12 +95,12 @@ WHERE `id`='%s' LIMIT 1", loadTemplate('admin_list_sponsor_details', false, $content); } else { // Sponsor not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', getRequestElement('id'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', getRequestParameter('id'))); } -} elseif (isGetRequestElementSet('rid')) { +} elseif (isGetRequestParameterSet('rid')) { // Search for sponsor $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1", - array(bigintval(getRequestElement('rid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('rid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Free memory SQL_FREERESULT($result); @@ -116,7 +116,7 @@ WHERE `refid`='%s' ORDER BY `id` ASC", - array(bigintval(getRequestElement('rid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('rid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) > 0) { // List refs now @@ -124,11 +124,11 @@ ORDER BY SQL_FREERESULT($result); } else { // No refs made so far - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_REFS_404', '' . bigintval(getRequestElement('rid')) . '')); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_REFS_404', '' . bigintval(getRequestParameter('rid')) . '')); } } else { // Sponsor not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestElement('rid')))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('rid')))); } } else { // List all sponsors diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index 09607f03fe..2e04f5f189 100644 --- a/inc/modules/admin/what-list_sponsor_pay.php +++ b/inc/modules/admin/what-list_sponsor_pay.php @@ -46,27 +46,27 @@ addMenuDescription('admin', __FILE__); $message = ''; -if (isPostRequestElementSet('add')) { +if (isPostRequestParameterSet('add')) { // Check input variables - if (!isPostRequestElementSet('pay_name')) unsetPostRequestElement('add'); - if ((round(postRequestElement('pay_rate')) == '0') || (!isPostRequestElementSet('pay_rate'))) unsetPostRequestElement('add'); + if (!isPostRequestParameterSet('pay_name')) unsetPostRequestParameter('add'); + if ((round(postRequestParameter('pay_rate')) == '0') || (!isPostRequestParameterSet('pay_rate'))) unsetPostRequestParameter('add'); - setPostRequestElement('pay_min_count', bigintval(postRequestElement('pay_min_count'))); + setPostRequestParameter('pay_min_count', bigintval(postRequestParameter('pay_min_count'))); - if ((postRequestElement('pay_min_count') == '0') || (!isPostRequestElementSet('pay_min_count'))) unsetPostRequestElement('add'); - if (!isPostRequestElementSet('pay_currency')) unsetPostRequestElement('add'); + if ((postRequestParameter('pay_min_count') == '0') || (!isPostRequestParameterSet('pay_min_count'))) unsetPostRequestParameter('add'); + if (!isPostRequestParameterSet('pay_currency')) unsetPostRequestParameter('add'); -} elseif ((isPostRequestElementSet('edit')) || (isPostRequestElementSet('del')) || (isPostRequestElementSet('change')) || (isPostRequestElementSet('remove'))) { +} elseif ((isPostRequestParameterSet('edit')) || (isPostRequestParameterSet('del')) || (isPostRequestParameterSet('change')) || (isPostRequestParameterSet('remove'))) { // Check if at least one entry was selected - if (!isPostRequestElementSet('id')) { + if (!isPostRequestParameterSet('id')) { // Nothing selected for editing / deleting??? - unsetPostRequestElement('edit'); - unsetPostRequestElement('del'); - unsetPostRequestElement('change'); - unsetPostRequestElement('remove'); - } elseif (isPostRequestElementSet('change')) { + unsetPostRequestParameter('edit'); + unsetPostRequestParameter('del'); + unsetPostRequestParameter('change'); + unsetPostRequestParameter('remove'); + } elseif (isPostRequestParameterSet('change')) { // Change entries here... - foreach (postRequestElement('id') as $id => $sel) { + foreach (postRequestParameter('id') as $id => $sel) { // Secure id $id = bigintval($id); @@ -82,19 +82,19 @@ WHERE `id`='%s' LIMIT 1", array( - postRequestElement('name', $id), - postRequestElement('rate', $id), - bigintval(postRequestElement('min', $id)), - postRequestElement('curr', $id), + postRequestParameter('name', $id), + postRequestParameter('rate', $id), + bigintval(postRequestParameter('min', $id)), + postRequestParameter('curr', $id), $id ), __FILE__, __LINE__); } // Generate message $message = getMessage('SPONSOR_PAY_ENTRIES_CHANGED'); - } elseif (isPostRequestElementSet('remove')) { + } elseif (isPostRequestParameterSet('remove')) { // Remove entries here... - foreach (postRequestElement('id') as $id => $sel) { + foreach (postRequestParameter('id') as $id => $sel) { // Remove entry SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`='%s' LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -110,36 +110,36 @@ LIMIT 1", } // END - if } -if (isPostRequestElementSet('add')) { +if (isPostRequestParameterSet('add')) { // Check if entry with same name does exists $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `pay_name`='%s' LIMIT 1", - array(postRequestElement('pay_name')), __FILE__, __LINE__); + array(postRequestParameter('pay_name')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == '0') { // No entry found so add this line SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_sponsor_paytypes` (`pay_name`, `pay_rate`, `pay_min_count`, `pay_currency`) VALUES ('%s','%s','%s','%s')", array( - postRequestElement('pay_name'), - convertCommaToDot(postRequestElement('pay_rate')), - bigintval(postRequestElement('pay_min_count')), - postRequestElement('pay_currency') + postRequestParameter('pay_name'), + convertCommaToDot(postRequestParameter('pay_rate')), + bigintval(postRequestParameter('pay_min_count')), + postRequestParameter('pay_currency') ), __FILE__, __LINE__); // Payment type added! - $message = getMaskedMessage('ADMIN_SPONSOR_PAYTYPE_ADDED', postRequestElement('pay_name')); + $message = getMaskedMessage('ADMIN_SPONSOR_PAYTYPE_ADDED', postRequestParameter('pay_name')); } else { // Free memory SQL_FREERESULT($result); // Entry does already exists - $message = getMaskedMessage('ADMIN_SPONSOR_PAYTYPE_ALREADY', postRequestElement('pay_name')); + $message = getMaskedMessage('ADMIN_SPONSOR_PAYTYPE_ALREADY', postRequestParameter('pay_name')); } // Output message loadTemplate('admin_settings_saved', false, $message); -} elseif ((isPostRequestElementSet('edit')) || (isPostRequestElementSet('del'))) { +} elseif ((isPostRequestParameterSet('edit')) || (isPostRequestParameterSet('del'))) { // Load all data $OUT = ''; $SW = 2; - foreach (postRequestElement('id') as $id => $sel) { + foreach (postRequestParameter('id') as $id => $sel) { // Load entry $result = SQL_QUERY_ESC("SELECT `pay_name`, `pay_rate`, `pay_min_count`, `pay_currency` FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`='%s' LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -158,7 +158,7 @@ if (isPostRequestElementSet('add')) { 'curr' => htmlspecialchars($curr) ); - if (isPostRequestElementSet('edit')) { + if (isPostRequestParameterSet('edit')) { // Edit entry $OUT .= loadTemplate('admin_list_sponsor_pay_edit_row', true, $content); } else { @@ -175,7 +175,7 @@ if (isPostRequestElementSet('add')) { } // END - foreach // Load main template depending on mode (edit/delete) - if (isPostRequestElementSet('edit')) { + if (isPostRequestParameterSet('edit')) { // Load main edit template loadTemplate('admin_list_sponsor_pay_edit', false, $OUT); } else { diff --git a/inc/modules/admin/what-list_sponsor_pays.php b/inc/modules/admin/what-list_sponsor_pays.php index c734d3882b..571c0645df 100644 --- a/inc/modules/admin/what-list_sponsor_pays.php +++ b/inc/modules/admin/what-list_sponsor_pays.php @@ -44,17 +44,17 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isGetRequestElementSet('id')) { +if (isGetRequestParameterSet('id')) { // Check for selected sponsor $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1", - array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // ... // Free memory SQL_FREERESULT($result); } else { // Sponsor not found! - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestElement('id')))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id')))); } } else { // Not called by what-list_sponsor.php diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index f486a47d3c..68efa515e5 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -48,7 +48,7 @@ addMenuDescription('admin', __FILE__); $show = true; // Check for 'id' element -if ((countRequestPost() > 0) && ((!isPostRequestElementSet('id')) || (!is_array(postRequestElement('id'))) || (count(postRequestElement('id')) == '0'))) { +if ((countRequestPost() > 0) && ((!isPostRequestParameterSet('id')) || (!is_array(postRequestParameter('id'))) || (count(postRequestParameter('id')) == '0'))) { // Not found so output message loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_NO_SELECTIONS')); @@ -57,53 +57,53 @@ if ((countRequestPost() > 0) && ((!isPostRequestElementSet('id')) || (!is_array( } // END - if // Edit or delete button hit? -if (isPostRequestElementSet('edit')) { +if (isPostRequestParameterSet('edit')) { // Show entries for editing adminEditEntriesConfirm( - postRequestElement('id'), + postRequestParameter('id'), 'surfbar_urls', array('id', 'userid', 'url'), array('bigintval', 'addMemberSelectionBox', ''), array('', array(false, true, true), '') ); $show = false; -} elseif (isPostRequestElementSet('do_edit')) { +} elseif (isPostRequestParameterSet('do_edit')) { // Change data of entries adminEditEntriesConfirm( - postRequestElement('id'), + postRequestParameter('id'), 'surfbar_urls', array(), array(), array(), true ); -} elseif (isPostRequestElementSet('delete')) { +} elseif (isPostRequestParameterSet('delete')) { // Show entries for deletion adminDeleteEntriesConfirm( - postRequestElement('id'), + postRequestParameter('id'), 'surfbar_urls', array('id', 'userid', 'url', 'registered'), array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', ''), array('', '', '', '') ); $show = false; -} elseif (isPostRequestElementSet('do_delete')) { +} elseif (isPostRequestParameterSet('do_delete')) { // Remove entries from database - adminDeleteEntriesConfirm(postRequestElement('id'), 'surfbar_urls', array(), array(), array(), true); -} elseif (isPostRequestElementSet('lock')) { + adminDeleteEntriesConfirm(postRequestParameter('id'), 'surfbar_urls', array(), array(), array(), true); +} elseif (isPostRequestParameterSet('lock')) { // Un-/lock selected URLs. This does not work for pending URLs adminLockEntriesConfirm( - postRequestElement('id'), + postRequestParameter('id'), 'surfbar_urls', array('id', 'userid', 'url', 'registered', 'status'), array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'translateSurfbarUrlStatus'), array('', '', '', '', '') ); $show = false; -} elseif (isPostRequestElementSet('do_lock')) { +} elseif (isPostRequestParameterSet('do_lock')) { // Un-/lock selected URLs. This does not work for pending URLs adminLockEntriesConfirm( - postRequestElement('id'), + postRequestParameter('id'), 'surfbar_urls', array(), array(), @@ -111,20 +111,20 @@ if (isPostRequestElementSet('edit')) { array('status' => array('ACTIVE' => 'LOCKED', 'LOCKED' => 'ACTIVE')), true ); -} elseif (isPostRequestElementSet('undelete')) { +} elseif (isPostRequestParameterSet('undelete')) { // Undelete selected URLs. This does only work for deleted URLs... ;-) adminUndeleteEntriesConfirm( - postRequestElement('id'), + postRequestParameter('id'), 'surfbar_urls', array('id', 'userid', 'url', 'registered', 'status'), array('bigintval', 'generateUserProfileLink', 'FRAMETESTER', '', 'translateSurfbarUrlStatus'), array('', '', '', '', '') ); $show = false; -} elseif (isPostRequestElementSet('do_undelete')) { +} elseif (isPostRequestParameterSet('do_undelete')) { // Undelete selected URLs. This does only work for deleted URLs... ;-) adminUndeleteEntriesConfirm( - postRequestElement('id'), + postRequestParameter('id'), 'surfbar_urls', array(), array(), diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index c14cecc846..2249daa7c4 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -50,9 +50,9 @@ if (!isExtensionActive('task')) { } // END - if $whereStatement = ''; -if (!isGetRequestElementSet('type')) setGetRequestElement('type', 'your'); +if (!isGetRequestParameterSet('type')) setGetRequestParameter('type', 'your'); -switch (getRequestElement('type')) { +switch (getRequestParameter('type')) { case 'your': // List only your own open (new) tasks $whereStatement = "`assigned_admin`='".getCurrentAdminId()."' AND `status`='NEW' AND `task_type` != 'EXTENSION_UPDATE'"; break; @@ -78,13 +78,13 @@ switch (getRequestElement('type')) { break; default: // Unknown type - logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", getRequestElement('type'))); - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_TASK_UNKNOWN_MODE', getRequestElement('type'))); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown task type %s detected.", getRequestParameter('type'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_TASK_UNKNOWN_MODE', getRequestParameter('type'))); break; } // END - switch if (!empty($whereStatement)) { - if ((isPostRequestElementSet('assign')) && (countPostSelection() > 0)) { + if ((isPostRequestParameterSet('assign')) && (countPostSelection() > 0)) { // Assign / do tasks loadIncludeOnce('inc/modules/admin/overview-inc.php'); if (empty($dmy)) $dmy = ''; @@ -105,16 +105,16 @@ ORDER BY __FILE__, __LINE__); if ((countPostSelection() > 0) && (!isDemoModeActive())) { // Only unassign / delete tasks when there are selected tasks posted - if (isPostRequestElementSet('unassign')) { + if (isPostRequestParameterSet('unassign')) { // Unassign from tasks - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_task_system` SET `assigned_admin`=0 WHERE `id`=%s AND `assigned_admin`=%s LIMIT 1", array(bigintval($id), getCurrentAdminId()), __FILE__, __LINE__); } // END - foreach - } elseif (isPostRequestElementSet('del')) { + } elseif (isPostRequestParameterSet('del')) { // Delete tasks - foreach (postRequestElement('sel') as $id => $sel) { - if (getRequestElement('type') == 'deleted') { + foreach (postRequestParameter('sel') as $id => $sel) { + if (getRequestParameter('type') == 'deleted') { // Delete task immediately SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_task_system` WHERE `id`=%s LIMIT 1", array(bigintval($id)),__FILE__, __LINE__); @@ -141,11 +141,11 @@ ORDER BY } // There are uncompleted jobs! - $type = getMessage('ADMIN_OVERVIEW_TASK_'.strtoupper(getRequestElement('type')).'_TYPE'); + $type = getMessage('ADMIN_OVERVIEW_TASK_'.strtoupper(getRequestParameter('type')).'_TYPE'); // @TODO Rewrite these templates to one and add $OUT loadTemplate('admin_overview_header_task', false, array( 'message' => $type, - 'type' => getRequestElement('type') + 'type' => getRequestParameter('type') )); $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_tasks)) { @@ -204,7 +204,7 @@ ORDER BY SQL_FREERESULT($result_tasks); // Load footer template - if (getRequestElement('type') == 'deleted') { + if (getRequestParameter('type') == 'deleted') { // Delete now button loadTemplate('admin_overview_footer_task'); } else { diff --git a/inc/modules/admin/what-list_unconfirmed.php b/inc/modules/admin/what-list_unconfirmed.php index bc1611bd4c..568ebf4c63 100644 --- a/inc/modules/admin/what-list_unconfirmed.php +++ b/inc/modules/admin/what-list_unconfirmed.php @@ -53,7 +53,7 @@ if (!isExtensionActive('mailid')) { $listed = false; // List confirmation links from normal or bonus mails -if (isGetRequestElementSet('mid')) { +if (isGetRequestParameterSet('mid')) { // SQL query for mail data $sql = "SELECT s.id, p.sender, p.subject, p.text, p.url, p.timestamp, s.max_rec @@ -64,22 +64,22 @@ LEFT JOIN ON p.id=s.pool_id WHERE - p.id='".getRequestElement('mid')."' + p.id='".getRequestParameter('mid')."' LIMIT 1"; // Column, type and id for member's mail $col = 'stats_id'; $type = 'NORMAL'; $ID = '-1'; // Load admin_list_unconfirmed template - $listed = true; $DATA = getRequestElement('mid'); $LINK = 'mailid'; -} elseif ((isGetRequestElementSet('bid')) && (isExtensionActive('bonus'))) { + $listed = true; $DATA = getRequestParameter('mid'); $LINK = 'mailid'; +} elseif ((isGetRequestParameterSet('bid')) && (isExtensionActive('bonus'))) { // @TODO This constant might be unused? define('__LIST_UNCON_TITLE', getMessage('LIST_UNCONFIRMED_BONUS_LINKS')); // SQL query for mail data (both ids are required for compatiblity to above normal mail - $sql = "SELECT `id`, `id`, `subject`, `text`, `url`, `timestamp`, `mails_sent` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`='".getRequestElement('bid')."' LIMIT 1"; + $sql = "SELECT `id`, `id`, `subject`, `text`, `url`, `timestamp`, `mails_sent` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `id`='".getRequestParameter('bid')."' LIMIT 1"; // Column, type and id for member's mail - $col = 'bonus_id'; $type = 'BONUS'; $ID = getRequestElement('bid'); + $col = 'bonus_id'; $type = 'BONUS'; $ID = getRequestParameter('bid'); // Load admin_list_unconfirmed template $listed = true; $DATA = $ID; $LINK = 'bonusid'; @@ -165,7 +165,7 @@ WHERE // Load final template loadTemplate('admin_list_unconfirmed', false, $content); - } elseif (getRequestElement('mid') > 0) { + } elseif (getRequestParameter('mid') > 0) { // Data in pool or in user_stats not found, so let's find out where data is missing $result1 = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1", array(bigintval($ID)), __FILE__, __LINE__); @@ -186,7 +186,7 @@ WHERE // Free memory SQL_FREERESULT($result1); SQL_FREERESULT($result2); - } elseif (isGetRequestElementSet('bid')) { + } elseif (isGetRequestParameterSet('bid')) { // Data in bonus table not found loadTemplate('admin_settings_saved', false, getMessage('ADMIN_UNCONFIRMED_INVALID_LINK')); } diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index 3d497c18d3..0c4281e215 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -85,16 +85,16 @@ if (isExtensionActive('country')) { } // Init unset data -if (!isGetRequestElementSet('letter')) { setGetRequestElement('letter', getMessage('_ALL2')); } -if (!isGetRequestElementSet('sortby')) { setGetRequestElement('sortby', 'userid'); } -if (!isGetRequestElementSet('page')) { setGetRequestElement('page' , 1); } +if (!isGetRequestParameterSet('letter')) { setGetRequestParameter('letter', getMessage('_ALL2')); } +if (!isGetRequestParameterSet('sortby')) { setGetRequestParameter('sortby', 'userid'); } +if (!isGetRequestParameterSet('page')) { setGetRequestParameter('page' , 1); } // Set base URL $base = '[ 1) { define('__PAGE_NAV', addPageNavigation($PAGES, getConfig('user_limit'), true, $colspan, true)); @@ -362,12 +362,12 @@ LIMIT 1", // Init title with "all accounts" $content['title'] = getMessage('ADMIN_ALL_ACCOUNTS'); - if (isGetRequestElementSet(('status'))) { + if (isGetRequestParameterSet(('status'))) { // Set title according to the 'status' - $content['title'] = getMessage(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(getRequestElement(('status'))))); - } elseif (isGetRequestElementSet('mode')) { + $content['title'] = getMessage(sprintf("ADMIN_LIST_STATUS_%s_ACCOUNTS", strtoupper(getRequestParameter(('status'))))); + } elseif (isGetRequestParameterSet('mode')) { // Set title according to the "mode" - $content['title'] = getMessage(sprintf("ADMIN_LIST_MODE_%s_ACCOUNTS", strtoupper(getRequestElement('mode')))); + $content['title'] = getMessage(sprintf("ADMIN_LIST_MODE_%s_ACCOUNTS", strtoupper(getRequestParameter('mode')))); } // Load main template diff --git a/inc/modules/admin/what-list_yoomedia_tm.php b/inc/modules/admin/what-list_yoomedia_tm.php index c01d2ac69e..eee9364eba 100644 --- a/inc/modules/admin/what-list_yoomedia_tm.php +++ b/inc/modules/admin/what-list_yoomedia_tm.php @@ -56,13 +56,13 @@ if (isFormSent()) { // Prepare mail for delivery YOOMEDIA_PREPARE_MAIL_DELIVERY(postRequestArray()); return; -} elseif (isPostRequestElementSet('sent')) { +} elseif (isPostRequestParameterSet('sent')) { // Sent mail YOOMEDIA_SEND_BONUS_MAIL(postRequestArray(), 'normal'); -} elseif (isPostRequestElementSet('remove')) { +} elseif (isPostRequestParameterSet('remove')) { // Add mail to exclude list YOOMEDIA_EXCLUDE_MAIL(postRequestArray(), 'normal'); -} elseif (isPostRequestElementSet('unlist')) { +} elseif (isPostRequestParameterSet('unlist')) { // Remove mail from exclude list YOOMEDIA_UNLIST_MAIL(postRequestArray(), 'normal'); } diff --git a/inc/modules/admin/what-lock_sponsor.php b/inc/modules/admin/what-lock_sponsor.php index 85ed036d3c..75a0b2856f 100644 --- a/inc/modules/admin/what-lock_sponsor.php +++ b/inc/modules/admin/what-lock_sponsor.php @@ -45,10 +45,10 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); $message = ''; -if (isGetRequestElementSet('id')) { +if (isGetRequestParameterSet('id')) { // Check for selected sponsor $result_sponsor = SQL_QUERY_ESC("SELECT `gender`, `surname`, `family`, `email`, `status` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' LIMIT 1", - array(bigintval(getRequestElement('id'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('id'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_sponsor) == 1) { // Get sponsor's current status and let only confirmed and locked status pass $content = SQL_FETCHARRAY($result_sponsor); @@ -56,8 +56,8 @@ if (isGetRequestElementSet('id')) { if (($content['status'] == 'CONFIRMED') || ($content['status'] == 'LOCKED')) { // Transfer data to constants $content['gender'] = translateGender($content['gender']); - $content['id'] = bigintval(getRequestElement('id')); - $content['reason'] = secureString(postRequestElement('reason')); + $content['id'] = bigintval(getRequestParameter('id')); + $content['reason'] = secureString(postRequestParameter('reason')); if (isFormSent()) { // Create messages @@ -74,17 +74,17 @@ if (isGetRequestElementSet('id')) { } // Load email message - $message = loadEmailTemplate('lock_sponsor', $content, bigintval(getRequestElement('id'))); + $message = loadEmailTemplate('lock_sponsor', $content, bigintval(getRequestParameter('id'))); // And send it away sendEmail($content['email'], $subject, $message); // Update sponsor's account SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `status`='%s' WHERE `id`='%s' LIMIT 1", - array($content['status'], bigintval(getRequestElement('id'))), __FILE__, __LINE__); - } elseif (isPostRequestElementSet('no')) { + array($content['status'], bigintval(getRequestParameter('id'))), __FILE__, __LINE__); + } elseif (isPostRequestParameterSet('no')) { // No don't lock / unlock now! - redirectToUrl('modules.php?module=admin&what=list_sponsor&id=' . bigintval(getRequestElement('id'))); + redirectToUrl('modules.php?module=admin&what=list_sponsor&id=' . bigintval(getRequestParameter('id'))); } else { // Create header and text messages if ($content['status'] == 'CONFIRMED') { @@ -109,7 +109,7 @@ if (isGetRequestElementSet('id')) { } } else { // Sponsor not found! - $message = getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestElement('id'))); + $message = getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id'))); } // Free result diff --git a/inc/modules/admin/what-lock_user.php b/inc/modules/admin/what-lock_user.php index 7d0068360b..5d8d9b1e23 100644 --- a/inc/modules/admin/what-lock_user.php +++ b/inc/modules/admin/what-lock_user.php @@ -45,38 +45,38 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Is a userid set? -if (isGetRequestElementSet('userid')) { +if (isGetRequestParameterSet('userid')) { // Action not performed by default $ACT = false; // Load user's data - if (fetchUserData(getRequestElement('userid'))) { + if (fetchUserData(getRequestParameter('userid'))) { // Is a lock reason set? - if ((isPostRequestElementSet('lock')) && (getUserData('status') != 'LOCKED')) { + if ((isPostRequestParameterSet('lock')) && (getUserData('status') != 'LOCKED')) { // Ok, lock the account! if (getExtensionVersion('user') >= '0.3.5') { // Lock with reason SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='LOCKED', `lock_reason`='%s', `lock_timestamp`=NOW() WHERE `userid`=%s LIMIT 1", - array(postRequestElement('reason'), bigintval(getRequestElement('userid'))), __FILE__, __LINE__); + array(postRequestParameter('reason'), bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); } else { // Lock with no lock reason saved SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='LOCKED' WHERE `userid`=%s LIMIT 1", - array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); } // Entry updated? if (SQL_AFFECTEDROWS() == 1) { // Send an email to the user! In later version you can optionally switch this feature off - $message = loadEmailTemplate('lock-user', array('text' => postRequestElement('reason')), bigintval(getRequestElement('userid'))); + $message = loadEmailTemplate('lock-user', array('text' => postRequestParameter('reason')), bigintval(getRequestParameter('userid'))); // Send away... - sendEmail(bigintval(getRequestElement('userid')), getMessage('ADMIN_LOCKED_SUBJ'), $message); + sendEmail(bigintval(getRequestParameter('userid')), getMessage('ADMIN_LOCKED_SUBJ'), $message); } // END - if // Prepare message - $message = getMaskedMessage('USER_ACCOUNT_LOCKED', getRequestElement('userid')); + $message = getMaskedMessage('USER_ACCOUNT_LOCKED', getRequestParameter('userid')); $ACT = true; - } elseif ((isPostRequestElementSet('unlock')) && (getUserData('status') == 'LOCKED')) { + } elseif ((isPostRequestParameterSet('unlock')) && (getUserData('status') == 'LOCKED')) { // Ok, unlock the account! if (getExtensionVersion('user') >= '0.3.5') { // Reset lock reason as well @@ -89,44 +89,44 @@ SET WHERE `userid`=%s LIMIT 1", - array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); } else { // No lock reason to reset SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='CONFIRMED' WHERE `userid`=%s LIMIT 1", - array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); } // Entry updated? if (SQL_AFFECTEDROWS() == 1) { // Send an email to the user! In later version you can optionally switch this feature off - $message = loadEmailTemplate('unlock-user', array('text' => postRequestElement('reason')), bigintval(getRequestElement('userid'))); + $message = loadEmailTemplate('unlock-user', array('text' => postRequestParameter('reason')), bigintval(getRequestParameter('userid'))); // Send away... - sendEmail(bigintval(getRequestElement('userid')), getMessage('ADMIN_UNLOCKED_SUBJ'), $message); + sendEmail(bigintval(getRequestParameter('userid')), getMessage('ADMIN_UNLOCKED_SUBJ'), $message); if (isExtensionActive('rallye')) { - addUserToReferalRallye(getRequestElement('userid')); + addUserToReferalRallye(getRequestParameter('userid')); } // END - if } // END - if // Prepare message - $message = getMaskedMessage('USER_ACCOUNT_UNLOCKED', getRequestElement('userid')); + $message = getMaskedMessage('USER_ACCOUNT_UNLOCKED', getRequestParameter('userid')); $ACT = true; - } elseif (isPostRequestElementSet('del')) { + } elseif (isPostRequestParameterSet('del')) { // Delete the account $ACT = true; loadIncludeOnce('inc/modules/admin/what-del_user.php'); - } elseif (isPostRequestElementSet('no')) { + } elseif (isPostRequestParameterSet('no')) { // Do not lock him... - $URL = adminCreateUserLink(getRequestElement('userid')); + $URL = adminCreateUserLink(getRequestParameter('userid')); } else { // Load user data we need - if (fetchUserData(getRequestElement('userid'))) { + if (fetchUserData(getRequestParameter('userid'))) { // Transfer data to constants for the template $content['email'] = generateEmailLink(getUserData('email'), 'user_data'); $content['surname'] = getUserData('surname'); $content['family'] = getUserData('family'); $content['status'] = getUserData('status'); - $content['userid'] = bigintval(getRequestElement('userid')); + $content['userid'] = bigintval(getRequestParameter('userid')); // Realy want to lock? switch ($content['status']) { @@ -156,7 +156,7 @@ LIMIT 1", loadTemplate('admin_lock_user', false, $content); } else { // Account does not exists! - loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '
'); + loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '
'); } } @@ -174,7 +174,7 @@ LIMIT 1", } } else { // Account does not exists! - loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '
'); + loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '
'); } } else { // List all users diff --git a/inc/modules/admin/what-logs.php b/inc/modules/admin/what-logs.php index b4e22c8234..93a38da324 100644 --- a/inc/modules/admin/what-logs.php +++ b/inc/modules/admin/what-logs.php @@ -44,9 +44,9 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isGetRequestElementSet('access')) { +if (isGetRequestParameterSet('access')) { // Secure input and construct FQFN - $access = SQL_ESCAPE(secureString(getRequestElement('access'))); + $access = SQL_ESCAPE(secureString(getRequestParameter('access'))); $target = sprintf("%slogs/%s", getConfig('PATH'), $access); // Is the file valid and readable? diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index 53541a8fe1..008915782e 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -46,8 +46,8 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Check if the admin has entered title and what-php file name... -if ((!isPostRequestElementSet('title')) && (isFormSent())) { - unsetPostRequestElement('ok'); +if ((!isPostRequestParameterSet('title')) && (isFormSent())) { + unsetPostRequestParameter('ok'); } // END - if if (!isFormSent()) { @@ -170,24 +170,24 @@ if (!isFormSent()) { loadTemplate('admin_member_add', false, $content); } elseif (!isDemoModeActive()) { // Insert new menu entry - if (isPostRequestElementSet('menu')) { + if (isPostRequestParameterSet('menu')) { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s','%s')", array( - postRequestElement('menu'), - postRequestElement('name'), - postRequestElement('title'), - postRequestElement('visible'), - postRequestElement('active'), - bigintval(postRequestElement('sort')), + postRequestParameter('menu'), + postRequestParameter('name'), + postRequestParameter('title'), + postRequestParameter('visible'), + postRequestParameter('active'), + bigintval(postRequestParameter('sort')), ), __FILE__, __LINE__); } else { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`title`,`visible`,`locked`,`sort`) VALUES ('%s','%s','%s','%s','%s')", array( - postRequestElement('name'), - postRequestElement('title'), - postRequestElement('visible'), - postRequestElement('active'), - bigintval(postRequestElement('sort')), + postRequestParameter('name'), + postRequestParameter('title'), + postRequestParameter('visible'), + postRequestParameter('active'), + bigintval(postRequestParameter('sort')), ), __FILE__, __LINE__); } loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index e47bea6168..0370abeeb8 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -47,18 +47,18 @@ addMenuDescription('admin', __FILE__); // Do we edit/delete/change main menus or sub menus? $AND = "(`what` = '' OR `what` IS NULL)"; $SUB = ''; -if (isGetRequestElementSet('sub')) { - $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", getRequestElement('sub')); - $SUB = getRequestElement('sub'); +if (isGetRequestParameterSet('sub')) { + $AND = sprintf("`action`='%s' AND `what` IS NOT NULL", getRequestParameter('sub')); + $SUB = getRequestParameter('sub'); } // END - if // List all menu points and make them editable -if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoModeActive())) { +if ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Edit menu entries $content['sub'] = $SUB; $content['chk'] = countPostSelection(); $SW = 2; $cnt = '0'; $OUT = ''; - foreach (postRequestElement('sel') as $sel => $confirm) { + foreach (postRequestParameter('sel') as $sel => $confirm) { if ($confirm == 1) { $cnt++; $result = SQL_QUERY_ESC("SELECT `title`, `action`, `what` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -96,12 +96,12 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM // Load template loadTemplate('admin_mmenu_edit', false, $content); -} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0) && (!isDemoModeActive())) { +} elseif ((isPostRequestParameterSet('del')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Del menu entries with or without confirmation $content['sub'] = $SUB; $content['chk'] = countPostSelection(); $SW = 2; $cnt = '0'; $OUT = ''; - foreach (postRequestElement('sel') as $sel => $confirm) { + foreach (postRequestParameter('sel') as $sel => $confirm) { if ($confirm == 1) { $cnt++; $result = SQL_QUERY_ESC("SELECT `title` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -135,12 +135,12 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM // Load template loadTemplate('admin_mmenu_delete', false, $content); -} elseif ((isPostRequestElementSet('status')) && (countPostSelection() > 0) && (!isDemoModeActive())) { +} elseif ((isPostRequestParameterSet('status')) && (countPostSelection() > 0) && (!isDemoModeActive())) { // Change status (visible / locked) $content['sub'] = $SUB; $content['chk'] = countPostSelection(); $SW = 2; $cnt = '0'; $OUT = ''; - foreach (postRequestElement('sel') as $sel => $confirm) { + foreach (postRequestParameter('sel') as $sel => $confirm) { if ($confirm == 1) { $cnt++; $result = SQL_QUERY_ESC("SELECT `title`, `visible`, `locked` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE ".$AND." AND `id`=%s LIMIT 1", @@ -180,14 +180,14 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM loadTemplate('admin_mmenu_status', false, $content); } elseif ((isFormSent()) && (!isDemoModeActive())) { // An act is done... - foreach (postRequestElement('sel') as $sel => $menu) { + foreach (postRequestParameter('sel') as $sel => $menu) { $AND = "(`what` = '' OR `what` IS NULL)"; $sel = bigintval($sel); if (!empty($SUB)) $AND = "`action`='".$SUB."'"; - switch (postRequestElement('ok')) { + switch (postRequestParameter('ok')) { case 'edit': // Edit menu SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", - array($menu, postRequestElement('sel_act', $sel), postRequestElement('sel_what', $sel), $sel), __FILE__, __LINE__); + array($menu, postRequestParameter('sel_act', $sel), postRequestParameter('sel_what', $sel), $sel), __FILE__, __LINE__); break; case 'del': // Delete menu @@ -197,7 +197,7 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM case 'status': // Change status of menus SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='%s', `locked`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", - array(postRequestElement('visible', $sel), postRequestElement('locked', $sel), $sel), __FILE__, __LINE__); + array(postRequestParameter('visible', $sel), postRequestParameter('locked', $sel), $sel), __FILE__, __LINE__); break; } // END - switch break; @@ -206,37 +206,37 @@ if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0) && (!isDemoM // Load template loadTemplate('admin_settings_saved', false, getMessage('SETTINGS_SAVED')); } else { - if ((isGetRequestElementSet('act')) && (isGetRequestElementSet('tid')) && (isGetRequestElementSet('fid'))) { + if ((isGetRequestParameterSet('act')) && (isGetRequestParameterSet('tid')) && (isGetRequestParameterSet('fid'))) { // Init $tid = ''; $fid = ''; // Get ids - if (isGetRequestElementSet('w')) { + if (isGetRequestParameterSet('w')) { // Sub menus selected $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", - array(bigintval(getRequestElement('act')), bigintval(getRequestElement('tid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('act')), bigintval(getRequestParameter('tid'))), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); SQL_FREERESULT($result); $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1", - array(bigintval(getRequestElement('act')), bigintval(getRequestElement('fid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('act')), bigintval(getRequestParameter('fid'))), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); SQL_FREERESULT($result); } else { // Main menu selected $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1", - array(bigintval(getRequestElement('tid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('tid'))), __FILE__, __LINE__); list($tid) = SQL_FETCHROW($result); $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE (`what`='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1", - array(bigintval(getRequestElement('fid'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('fid'))), __FILE__, __LINE__); list($fid) = SQL_FETCHROW($result); } if ((!empty($tid)) && (!empty($fid))) { // Sort menu SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", - array(bigintval(getRequestElement('tid')), bigintval($fid)), __FILE__, __LINE__); + array(bigintval(getRequestParameter('tid')), bigintval($fid)), __FILE__, __LINE__); SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`='%s' WHERE ".$AND." AND `id`=%s LIMIT 1", - array(bigintval(getRequestElement('fid')), bigintval($tid)), __FILE__, __LINE__); + array(bigintval(getRequestParameter('fid')), bigintval($tid)), __FILE__, __LINE__); } // END - -fi } // END - if diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php index 0c2925958c..3424bf9a0a 100644 --- a/inc/modules/admin/what-payments.php +++ b/inc/modules/admin/what-payments.php @@ -44,16 +44,16 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (((!isPostRequestElementSet(('t_wait'))) || (!isPostRequestElementSet(('payment')))) && (isGetRequestElementSet('do')) && (getRequestElement('do') == 'add')) { - unsetPostRequestElement('ok'); +if (((!isPostRequestParameterSet(('t_wait'))) || (!isPostRequestParameterSet(('payment')))) && (isGetRequestParameterSet('do')) && (getRequestParameter('do') == 'add')) { + unsetPostRequestParameter('ok'); } // END - if if (isFormSent()) { - switch (getRequestElement('do')) { + switch (getRequestParameter('do')) { case 'add': - addSql("INSERT INTO `{?_MYSQL_PREFIX?}_payments` (time, payment, mail_title, price) VALUES ('".postRequestElement('t_wait')."','".postRequestElement('payment')."','".postRequestElement('title')."','".postRequestElement('price')."')"); + addSql("INSERT INTO `{?_MYSQL_PREFIX?}_payments` (time, payment, mail_title, price) VALUES ('".postRequestParameter('t_wait')."','".postRequestParameter('payment')."','".postRequestParameter('title')."','".postRequestParameter('price')."')"); $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_payments` WHERE time='%s' LIMIT 1", - array(postRequestElement('t_wait')), __FILE__, __LINE__); + array(postRequestParameter('t_wait')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Re-init the array here initSqls(); @@ -64,13 +64,13 @@ if (isFormSent()) { break; case 'edit': - foreach (postRequestElement('time') as $id => $value) { - addSql("UPDATE `{?_MYSQL_PREFIX?}_payments` SET time='".$value."', payment='".postRequestElement('pay', $id)."', price='".postRequestElement('price', $id)."', mail_title='".postRequestElement('title', $id)."' WHERE `id`='".$id."' LIMIT 1"); + foreach (postRequestParameter('time') as $id => $value) { + addSql("UPDATE `{?_MYSQL_PREFIX?}_payments` SET time='".$value."', payment='".postRequestParameter('pay', $id)."', price='".postRequestParameter('price', $id)."', mail_title='".postRequestParameter('title', $id)."' WHERE `id`='".$id."' LIMIT 1"); } break; case 'del': - foreach (postRequestElement('id') as $id => $value) { + foreach (postRequestParameter('id') as $id => $value) { addSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`='".$id."' LIMIT 1"); } break; @@ -88,10 +88,10 @@ if (isFormSent()) { // Output template loadTemplate('admin_settings_saved', false, $content); -} elseif ((isPostRequestElementSet('del')) && (countPostSelection() > 0)) { +} elseif ((isPostRequestParameterSet('del')) && (countPostSelection() > 0)) { // Delete entries here $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $value) { + foreach (postRequestParameter('sel') as $id => $value) { $result = SQL_QUERY_ESC("SELECT time, mail_title FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($time, $title) = SQL_FETCHROW($result); @@ -112,10 +112,10 @@ if (isFormSent()) { // Load main template loadTemplate('admin_del_payments', false, $OUT); -} elseif ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { +} elseif ((isPostRequestParameterSet('edit')) && (countPostSelection() > 0)) { // Edit entries $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $value) { + foreach (postRequestParameter('sel') as $id => $value) { $result = SQL_QUERY_ESC("SELECT time, payment, mail_title, price FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); list($time, $pay, $title, $price) = SQL_FETCHROW($result); diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index 33a3ff3933..1d0171b880 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -45,24 +45,24 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Some sanity-check -if ((!isPostRequestElementSet('url')) || (!isPostRequestElementSet(('alternate')))) { - unsetPostRequestElement('ok'); +if ((!isPostRequestParameterSet('url')) || (!isPostRequestParameterSet(('alternate')))) { + unsetPostRequestParameter('ok'); } if (isFormSent()) { // Fix older calls from add-new-banner-form - if (!isGetRequestElementSet('mode')) setGetRequestElement('mode', 'add'); + if (!isGetRequestParameterSet('mode')) setGetRequestParameter('mode', 'add'); $sql = ''; - switch (getRequestElement('mode')) { + switch (getRequestParameter('mode')) { case 'add': // Check if banner is already added $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE url='%s' LIMIT 1", - array(postRequestElement('url')), __FILE__, __LINE__); + array(postRequestParameter('url')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == '0') { // Add banner SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refbanner` (url, alternate, visible) VALUES ('%s','%s','%s')", - array(postRequestElement('url'), postRequestElement('alternate'), postRequestElement('visible')), __FILE__, __LINE__); + array(postRequestParameter('url'), postRequestParameter('alternate'), postRequestParameter('visible')), __FILE__, __LINE__); } else { // Free memory SQL_FREERESULT($result); @@ -70,16 +70,16 @@ VALUES ('%s','%s','%s')", break; case 'edit': // Update banner - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Secure id $id = bigintval($id); // Update entry SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET url='%s', alternate='%s', `visible`='%s' WHERE `id`=%s LIMIT 1", array( - postRequestElement('url', $id), - postRequestElement('alternate', $id), - postRequestElement('visible'), + postRequestParameter('url', $id), + postRequestParameter('alternate', $id), + postRequestParameter('visible'), $id ), __FILE__, __LINE__); } @@ -92,10 +92,10 @@ VALUES ('%s','%s','%s')", $content = "{--SETTINGS_NOT_SAVED--}"; } loadTemplate('admin_settings_saved', false, $content); -} elseif ((countPostSelection() > 0) && (isPostRequestElementSet('edit'))) { +} elseif ((countPostSelection() > 0) && (isPostRequestParameterSet('edit'))) { // Edit banner $SW = 2; $OUT = ''; - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { // Load data $result = SQL_QUERY_ESC("SELECT url, alternate, visible FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); @@ -119,9 +119,9 @@ VALUES ('%s','%s','%s')", // Load main template loadTemplate('admin_refbanner_edit', false, $OUT); } else { - if ((countPostSelection() > 0) && (isPostRequestElementSet('del'))) { + if ((countPostSelection() > 0) && (isPostRequestParameterSet('del'))) { // Delete banner - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); } // END - foreach diff --git a/inc/modules/admin/what-send_bonus.php b/inc/modules/admin/what-send_bonus.php index affb36f43e..6cc0db906e 100644 --- a/inc/modules/admin/what-send_bonus.php +++ b/inc/modules/admin/what-send_bonus.php @@ -50,20 +50,20 @@ if (!isExtensionActive('order')) { } // END - if // Set empty mode to "select" -if (!isGetRequestElementSet('mode')) setGetRequestElement('mode', "select"); +if (!isGetRequestParameterSet('mode')) setGetRequestParameter('mode', "select"); if (isFormSent()) { // Deliver bonus mail - addNewBonusMail(postRequestArray(), getRequestElement('mode')); + addNewBonusMail(postRequestArray(), getRequestParameter('mode')); } else { // Get all available users - $content['all'] = translateComma(getTotalReceivers(getRequestElement('mode'))); + $content['all'] = translateComma(getTotalReceivers(getRequestParameter('mode'))); // Prepare option lines - $content['options_lines'] = generateCategoryOptionsList(getRequestElement('mode')); + $content['options_lines'] = generateCategoryOptionsList(getRequestParameter('mode')); // Store send mode - $content['mode'] = getRequestElement('mode'); + $content['mode'] = getRequestParameter('mode'); $content['html_select'] = ''; if (isExtensionActive('html_mail')) { @@ -72,7 +72,7 @@ if (isFormSent()) { } // END - if // Select template - switch(getRequestElement('mode')) { + switch(getRequestParameter('mode')) { case 'html': // HTML mails case 'normal': // Normal mails $template = 'admin_send_bonus_form'; diff --git a/inc/modules/admin/what-send_newsletter.php b/inc/modules/admin/what-send_newsletter.php index 95e28e8d60..6711aa3ede 100644 --- a/inc/modules/admin/what-send_newsletter.php +++ b/inc/modules/admin/what-send_newsletter.php @@ -60,22 +60,22 @@ ORDER BY $template = 'newsletter'; // Check for extension and sending-mode - if (!isExtensionActive('html_mail', true) && (postRequestElement('mode') == 'html')) { + if (!isExtensionActive('html_mail', true) && (postRequestParameter('mode') == 'html')) { // Set mode to text mode - postRequestElement('mode') == 'text'; - } elseif (postRequestElement('mode') == 'html') { + postRequestParameter('mode') == 'text'; + } elseif (postRequestParameter('mode') == 'html') { // Set HTML templates $template = 'newsletter_html'; } // Compile message - setPostRequestElement('text', compileCode(postRequestElement('text'))); + setPostRequestParameter('text', compileCode(postRequestParameter('text'))); // Load template - $message = loadEmailTemplate($template, array('text' => postRequestElement('text')), $content['userid']); + $message = loadEmailTemplate($template, array('text' => postRequestParameter('text')), $content['userid']); // ... and send it away! - sendNewsletter($content['email'], postRequestElement('subject'), $message, postRequestElement('mode')); + sendNewsletter($content['email'], postRequestParameter('subject'), $message, postRequestParameter('mode')); } // Free memory diff --git a/inc/modules/admin/what-stats_mods.php b/inc/modules/admin/what-stats_mods.php index 80ba39b44d..c6d08c379a 100644 --- a/inc/modules/admin/what-stats_mods.php +++ b/inc/modules/admin/what-stats_mods.php @@ -45,9 +45,9 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Check if module was selected -if ((getRequestElement('mod') == 'index') || (getRequestElement('mod') == 'login')) { +if ((getRequestParameter('mod') == 'index') || (getRequestParameter('mod') == 'login')) { // Select menu system - $mod = mapModuleToTable(getRequestElement('mod')); + $mod = mapModuleToTable(getRequestParameter('mod')); // Load module's detail statistic $result = SQL_QUERY_ESC("SELECT `action`, `title`, `counter` FROM `{?_MYSQL_PREFIX?}_%s_menu` WHERE `what` != '' AND `what` IS NOT NULL ORDER BY `counter` DESC", diff --git a/inc/modules/admin/what-sub_points.php b/inc/modules/admin/what-sub_points.php index 813cf06a92..d498b284bd 100644 --- a/inc/modules/admin/what-sub_points.php +++ b/inc/modules/admin/what-sub_points.php @@ -44,21 +44,21 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (getRequestElement('userid') == 'all') { +if (getRequestParameter('userid') == 'all') { // Add points to all accounts - $content['points'] = bigintval(postRequestElement('points')); + $content['points'] = bigintval(postRequestParameter('points')); // Is the form sent? - if ((isFormSent()) && (postRequestElement('points') > 0)) { + if ((isFormSent()) && (postRequestParameter('points') > 0)) { $result_main = SQL_QUERY("SELECT userid, email FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' ORDER BY `userid` ASC", __FILE__, __LINE__); while ($content = merge_array($content, SQL_FETCHARRAY($result_main))) { // Ok, add points to used points and send an email to him... - subtractPoints('admin_all', $content['userid'], postRequestElement('points')); + subtractPoints('admin_all', $content['userid'], postRequestParameter('points')); // Add more content - $content['text'] = SQL_ESCAPE(postRequestElement('reason')); - $content['points'] = bigintval(postRequestElement('points')); + $content['text'] = SQL_ESCAPE(postRequestParameter('reason')); + $content['points'] = bigintval(postRequestParameter('points')); // Load message and send it away $message = loadEmailTemplate('sub-points', $content, bigintval($content['userid'])); @@ -74,22 +74,22 @@ if (getRequestElement('userid') == 'all') { // Display form add points loadTemplate('admin_sub_points_all'); } -} elseif (isGetRequestElementSet('userid')) { +} elseif (isGetRequestParameterSet('userid')) { // User id found in URL so we use this give him some credits - if (fetchUserData(getRequestElement('userid'))) { + if (fetchUserData(getRequestParameter('userid'))) { // Selected user does exist $content = getUserDataArray(); - if ((isFormSent()) && (isPostRequestElementSet('points'))) { + if ((isFormSent()) && (isPostRequestParameterSet('points'))) { // Ok, add to used points and send an email to him... - subtractPoints('admin_single', bigintval(getRequestElement('userid')), postRequestElement('points')); + subtractPoints('admin_single', bigintval(getRequestParameter('userid')), postRequestParameter('points')); // Add more content - $content['text'] = SQL_ESCAPE(postRequestElement('reason')); - $content['points'] = bigintval(postRequestElement('points')); + $content['text'] = SQL_ESCAPE(postRequestParameter('reason')); + $content['points'] = bigintval(postRequestParameter('points')); // Load email and send it away - $message = loadEmailTemplate('sub-points', $content, bigintval(getRequestElement('userid'))); + $message = loadEmailTemplate('sub-points', $content, bigintval(getRequestParameter('userid'))); sendEmail($content['email'], getMessage('ADMIN_SUB_SUBJ'), $message); // Output message @@ -97,14 +97,14 @@ if (getRequestElement('userid') == 'all') { } else { // Prepare content $content['user'] = '
' . $content['surname'] . ' ' . $content['family'] . ''; - $content['userid'] = bigintval(getRequestElement('userid')); + $content['userid'] = bigintval(getRequestParameter('userid')); // Load form loadTemplate('admin_sub_points', false, $content); } } else { // User not found! - loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '
'); + loadTemplate('admin_settings_saved', false, '
' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '
'); } } else { // Output selection form with all confirmed user accounts listed diff --git a/inc/modules/admin/what-surfbar_stats.php b/inc/modules/admin/what-surfbar_stats.php index adf2c6a5bd..fc10c5fca3 100644 --- a/inc/modules/admin/what-surfbar_stats.php +++ b/inc/modules/admin/what-surfbar_stats.php @@ -45,13 +45,13 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Is the 'url_id' set? -if (isGetRequestElementSet(('url_id'))) { +if (isGetRequestParameterSet(('url_id'))) { // Generate general statistics $result = SQL_QUERY_ESC("SELECT `userid`,`count` AS `total_visits`, UNIX_TIMESTAMP(`last_surfed`) AS `last_surfed` FROM `{?_MYSQL_PREFIX?}_surfbar_stats` WHERE `url_id`=%s ORDER BY `userid` ASC", - array(bigintval(getRequestElement('url_id'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('url_id'))), __FILE__, __LINE__); // Entries found? if (SQL_NUMROWS($result) > 0) { diff --git a/inc/modules/admin/what-theme_edit.php b/inc/modules/admin/what-theme_edit.php index df950f622f..8b2c80037b 100644 --- a/inc/modules/admin/what-theme_edit.php +++ b/inc/modules/admin/what-theme_edit.php @@ -52,18 +52,18 @@ if (!isExtensionActive('theme')) { // Check for selected themes if (countPostSelection() > 0) { $OUT = ''; - foreach (postRequestElement('sel') as $id => $sel) { + foreach (postRequestParameter('sel') as $id => $sel) { $sql = ''; // Shall I de-/activate or delete themes? - if (isPostRequestElementSet(('status'))) { + if (isPostRequestParameterSet(('status'))) { // Change status - if (postRequestElement('active', $id) == 'Y') { + if (postRequestParameter('active', $id) == 'Y') { $sql = "UPDATE `{?_MYSQL_PREFIX?}_themes` SET theme_active='N' WHERE `id`='".$id."' LIMIT 1"; } else { $sql = "UPDATE `{?_MYSQL_PREFIX?}_themes` SET theme_active='Y' WHERE `id`='".$id."' LIMIT 1"; } $OUT = getMessage('ADMIN_THEMES_UPDATED'); - } elseif (isPostRequestElementSet('del')) { + } elseif (isPostRequestParameterSet('del')) { // Delete themes $sql = "DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_themes` WHERE `id`='".$id."' LIMIT 1"; $OUT = getMessage('ADMIN_THEMES_DELETED'); @@ -81,9 +81,9 @@ if (countPostSelection() > 0) { // Output generated? if (empty($OUT)) $OUT = getMessage('ADMIN_THEME_NO_OUTPUT'); -} elseif (isGetRequestElementSet('default_theme')) { +} elseif (isGetRequestParameterSet('default_theme')) { // Escape string from input - $postData['default_theme'] = getRequestElement('default_theme'); + $postData['default_theme'] = getRequestParameter('default_theme'); // Set session setTheme($postData['default_theme']); diff --git a/inc/modules/admin/what-theme_import.php b/inc/modules/admin/what-theme_import.php index 0e91fc4cf7..302558b4da 100644 --- a/inc/modules/admin/what-theme_import.php +++ b/inc/modules/admin/what-theme_import.php @@ -53,11 +53,11 @@ if (!isExtensionActive('theme')) { $GLOBALS['theme_mode'] = 'test'; // Import selected theme if not present -if (isPostRequestElementSet('theme')) { +if (isPostRequestParameterSet('theme')) { // Check if theme is there - if (!ifThemeExists(postRequestElement('theme'))) { + if (!ifThemeExists(postRequestParameter('theme'))) { // Import theme - $inc = sprintf("theme/%s/theme.php", SQL_ESCAPE(postRequestElement('theme'))); + $inc = sprintf("theme/%s/theme.php", SQL_ESCAPE(postRequestParameter('theme'))); // Is the theme readable? if (isIncludeReadable($inc)) { @@ -68,7 +68,7 @@ if (isPostRequestElementSet('theme')) { SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_themes` (`theme_path`,`theme_active`,`theme_ver`,`theme_name`) VALUES ('%s','N','%s','%s')", array( - postRequestElement('theme'), + postRequestParameter('theme'), $GLOBALS['theme_data']['version'], $GLOBALS['theme_data']['name'] ), __FILE__, __LINE__); @@ -77,14 +77,14 @@ VALUES ('%s','N','%s','%s')", rebuildCacheFile('themes', 'them'); // Prepare message - $message = getMaskedMessage('ADMIN_THEME_IMPORTED', postRequestElement('theme')); + $message = getMaskedMessage('ADMIN_THEME_IMPORTED', postRequestParameter('theme')); } else { // Include file not found! - $message = getMaskedMessage('ADMIN_THEME_INC_404', postRequestElement('theme')); + $message = getMaskedMessage('ADMIN_THEME_INC_404', postRequestParameter('theme')); } } else { // Theme already imported - $message = getMaskedMessage('ADMIN_THEME_ALREADY_INSTALLED', postRequestElement('theme')); + $message = getMaskedMessage('ADMIN_THEME_ALREADY_INSTALLED', postRequestParameter('theme')); } // Output message diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index 6a9ef73d15..9dc0209a74 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -57,11 +57,11 @@ WHERE ORDER BY `timestamp` ASC", __FILE__, __LINE__); -if ((SQL_NUMROWS($result_main) > 0) || (isPostRequestElementSet('lock'))) { - if (isPostRequestElementSet('accept')) { +if ((SQL_NUMROWS($result_main) > 0) || (isPostRequestParameterSet('lock'))) { + if (isPostRequestParameterSet('accept')) { if (countPostSelection() > 0) { // Accept mail orders - foreach (postRequestElement('sel') as $id => $value) { + foreach (postRequestParameter('sel') as $id => $value) { // Secure id number $id = bigintval($id); @@ -125,11 +125,11 @@ LIMIT 1", // Mails unlocked for mail delivery loadTemplate('admin_settings_saved', false, $message); - } elseif (isPostRequestElementSet(('reject'))) { + } elseif (isPostRequestParameterSet(('reject'))) { if (countPostSelection() > 0) { // Reject mail orders $OUT = ''; $SW = 2; - foreach (postRequestElement('sel') as $id => $value) { + foreach (postRequestParameter('sel') as $id => $value) { // Secure id number $id = bigintval($id); @@ -148,17 +148,17 @@ LIMIT 1", sendEmail($content['sender'], getMessage('MEMBER_ORDER_REJECTED'), $message_user); // If you do not enter an URL to redirect to, your URL will be set! - if ((!isPostRequestElementSet('redirect')) || (postRequestElement('redirect') == 'http://')) setPostRequestElement('redirect', getConfig('URL')); + if ((!isPostRequestParameterSet('redirect')) || (postRequestParameter('redirect') == 'http://')) setPostRequestParameter('redirect', getConfig('URL')); // Redirect URL SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET url='%s', `data_type`='NEW' WHERE `id`=%s LIMIT 1", - array(postRequestElement('redirect'), $id),__FILE__, __LINE__); + array(postRequestParameter('redirect'), $id),__FILE__, __LINE__); // Prepare data for the row template $content = array( 'sw' => $SW, 'id' => $id, - 'url' => postRequestElement('url', $id), + 'url' => postRequestParameter('url', $id), ); // Load row template and switch colors @@ -172,9 +172,9 @@ LIMIT 1", // Nothing selected loadTemplate('admin_settings_saved', false, getMessage('ADMIN_MAILS_NOTHING_CHECKED')); } - } elseif ((isPostRequestElementSet('lock')) && (countPostSelection() > 0) && (getConfig('url_blacklist') == 'Y')) { + } elseif ((isPostRequestParameterSet('lock')) && (countPostSelection() > 0) && (getConfig('url_blacklist') == 'Y')) { // Lock URLs - foreach (postRequestElement('sel') as $id => $url) { + foreach (postRequestParameter('sel') as $id => $url) { // Secure id number $id = bigintval($id); @@ -193,7 +193,7 @@ LIMIT 1", // Output message loadTemplate('admin_settings_saved', false, getMessage('ADMIN_URLS_BLOCKED')); - } elseif ((!isPostRequestElementSet('lock')) && (!isPostRequestElementSet('accept')) && (!isPostRequestElementSet(('reject'))) && (getConfig('url_blacklist') == 'Y')) { + } elseif ((!isPostRequestParameterSet('lock')) && (!isPostRequestParameterSet('accept')) && (!isPostRequestParameterSet(('reject'))) && (getConfig('url_blacklist') == 'Y')) { // Mail orders are in pool so we can display them $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result_main)) { @@ -227,7 +227,7 @@ LIMIT 1", // Load main template loadTemplate('admin_unlock_emails', false, $content); - } elseif ((isPostRequestElementSet('lock')) && (getConfig('url_blacklist') != 'Y')) { + } elseif ((isPostRequestParameterSet('lock')) && (getConfig('url_blacklist') != 'Y')) { // URL blacklist not activated loadTemplate('admin_settings_saved', false, getMessage('ADMIN_URL_BLACKLIST_DISABLED')); } else { diff --git a/inc/modules/admin/what-unlock_sponsor.php b/inc/modules/admin/what-unlock_sponsor.php index c78f24e4ad..e6924acb4f 100644 --- a/inc/modules/admin/what-unlock_sponsor.php +++ b/inc/modules/admin/what-unlock_sponsor.php @@ -47,9 +47,9 @@ addMenuDescription('admin', __FILE__); // Check if admin has submitted form if (isFormSent()) { // Does he have selected at least one sponsor? - if (countSelection(postRequestElement('id')) > 0) { + if (countSelection(postRequestParameter('id')) > 0) { // At least one entry selected - foreach (postRequestElement('id') as $id => $selected) { + foreach (postRequestParameter('id') as $id => $selected) { // Secure id number and init $content $content = array( 'id' => bigintval($id), diff --git a/inc/modules/admin/what-unlock_surfbar_urls.php b/inc/modules/admin/what-unlock_surfbar_urls.php index af1505ff7d..52ee49a717 100644 --- a/inc/modules/admin/what-unlock_surfbar_urls.php +++ b/inc/modules/admin/what-unlock_surfbar_urls.php @@ -45,18 +45,18 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Is the form sent? -if ((isPostRequestElementSet('unlock')) && (is_array(postRequestElement('id'))) && (count(postRequestElement('id')) > 0)) { +if ((isPostRequestParameterSet('unlock')) && (is_array(postRequestParameter('id'))) && (count(postRequestParameter('id')) > 0)) { // Unlock selected URLs - if (SURFBAR_ADMIN_UNLOCK_URL_IDS(postRequestElement('id'))) { + if (SURFBAR_ADMIN_UNLOCK_URL_IDS(postRequestParameter('id'))) { // Unlock done! :-) loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_DONE')); } else { // Unlock failed! loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_FAILED')); } -} elseif ((isPostRequestElementSet(('reject'))) && (is_array(postRequestElement('id'))) && (count(postRequestElement('id')) > 0)) { +} elseif ((isPostRequestParameterSet(('reject'))) && (is_array(postRequestParameter('id'))) && (count(postRequestParameter('id')) > 0)) { // Reject selected URLs - if (SURFBAR_ADMIN_REJECT_URL_IDS(postRequestElement('id'))) { + if (SURFBAR_ADMIN_REJECT_URL_IDS(postRequestParameter('id'))) { // Unlock done! :-) loadTemplate('admin_settings_saved', false, getMessage('ADMIN_SURFBAR_UNLOCK_DONE')); } else { diff --git a/inc/modules/admin/what-usage.php b/inc/modules/admin/what-usage.php index b64e5ec7f6..b693fd86c8 100644 --- a/inc/modules/admin/what-usage.php +++ b/inc/modules/admin/what-usage.php @@ -47,19 +47,19 @@ addMenuDescription('admin', __FILE__); // Base directory (should be moved to database) $usage = getConfig('usage_base') . '/'; -if (isGetRequestElementSet('image')) { - if (getRequestElement('type') == 'usage') { +if (isGetRequestParameterSet('image')) { + if (getRequestParameter('type') == 'usage') { $FQFN = sprintf("%s%s/usage.png", getConfig('PATH'), getConfig('usage_base') ); } else { - if (strpos(getRequestElement('image'), "\\") > 0) setGetRequestElement('image', substr(getRequestElement('image'), 0, strpos(getRequestElement('image'), "\\"))); + if (strpos(getRequestParameter('image'), "\\") > 0) setGetRequestParameter('image', substr(getRequestParameter('image'), 0, strpos(getRequestParameter('image'), "\\"))); $FQFN = sprintf("%s%s/%s_usage_%s.png", getConfig('PATH'), getConfig('usage_base'), - getRequestElement('type'), - getRequestElement('image') + getRequestParameter('type'), + getRequestParameter('image') ); } @@ -70,7 +70,7 @@ if (isGetRequestElementSet('image')) { imagedestroy($image); } shutdown(); -} elseif (!isGetRequestElementSet('usage')) { +} elseif (!isGetRequestParameterSet('usage')) { $FQFN = sprintf("%s%s/index.html", getConfig('PATH'), getConfig('usage_base') @@ -79,7 +79,7 @@ if (isGetRequestElementSet('image')) { $FQFN = sprintf("%s%s/usage_%s.html", getConfig('PATH'), getConfig('usage_base'), - getRequestElement('usage') + getRequestParameter('usage') ); } diff --git a/inc/modules/admin/what-user_contct.php b/inc/modules/admin/what-user_contct.php index 51b3000469..9e211f2dc9 100644 --- a/inc/modules/admin/what-user_contct.php +++ b/inc/modules/admin/what-user_contct.php @@ -45,19 +45,19 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Is a user id given? -if ((isGetRequestElementSet('userid')) && (bigintval(getRequestElement('userid')) > 0)) { +if ((isGetRequestParameterSet('userid')) && (bigintval(getRequestParameter('userid')) > 0)) { // Is a user account found? - if (fetchUserData(getRequestElement('userid'))) { + if (fetchUserData(getRequestParameter('userid'))) { // Load the data $content = getUserDataArray(); // Including user id - $content['userid'] = bigintval(getRequestElement('userid')); + $content['userid'] = bigintval(getRequestParameter('userid')); // Shall we send the email? if (isFormSent()) { // Insert text - $content['text'] = trim(secureString(postRequestElement('text'))); + $content['text'] = trim(secureString(postRequestParameter('text'))); // Send contact form out $message = loadEmailTemplate('member_contct', $content); @@ -69,7 +69,7 @@ if ((isGetRequestElementSet('userid')) && (bigintval(getRequestElement('userid') } } else { // Not found? - loadTemplate('admin_settings_saved', false, getMaskedMessage('USER_ACCOUNT_404', bigintval(getRequestElement('userid')))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('USER_ACCOUNT_404', bigintval(getRequestParameter('userid')))); } } else { // Display selection box diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index 1bff771c2f..da3dbd8426 100644 --- a/inc/modules/frametester.php +++ b/inc/modules/frametester.php @@ -43,12 +43,12 @@ if (!defined('__SECURITY')) { $mode = 'guest'; -if (isGetRequestElementSet('order')) { +if (isGetRequestParameterSet('order')) { // Order number placed, is he also logged in? if (isMember()) { // Ok, test passed... :) $result = SQL_QUERY_ESC("SELECT `subject`, `url` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s AND `sender`=%s AND `data_type`='TEMP' LIMIT 1", - array(bigintval(getRequestElement('order')), getMemberId()), __FILE__, __LINE__); + array(bigintval(getRequestParameter('order')), getMemberId()), __FILE__, __LINE__); // Finally is the entry valid? if (SQL_NUMROWS($result) == 1) { @@ -56,7 +56,7 @@ if (isGetRequestElementSet('order')) { list($sub, $url) = SQL_FETCHROW($result); // This fixes a white page - setPostRequestElement('url', $url); + setPostRequestParameter('url', $url); // Mode is member $mode = 'member'; @@ -73,28 +73,28 @@ if (isGetRequestElementSet('order')) { } } // END - if -if ((isPostRequestElementSet('url')) || (isGetRequestElementSet('url')) || (isGetRequestElementSet('frame'))) { +if ((isPostRequestParameterSet('url')) || (isGetRequestParameterSet('url')) || (isGetRequestParameterSet('frame'))) { // Default URL is ours $url = getConfig('URL'); // Use URL from POST or GET data if set - if (isPostRequestElementSet('url')) { + if (isPostRequestParameterSet('url')) { // POST data comes first - $url = postRequestElement('url'); - } elseif (isGetRequestElementSet('url')) { + $url = postRequestParameter('url'); + } elseif (isGetRequestParameterSet('url')) { // Then GET data - $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestElement('url'))))); + $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestParameter('url'))))); } // Add missing element $frame = ''; - if (isGetRequestElementSet('frame')) $frame = getRequestElement('frame'); + if (isGetRequestParameterSet('frame')) $frame = getRequestParameter('frame'); switch ($frame) { case '': switch ($mode) { case 'member': // Build frameset - $content['order'] = bigintval(getRequestElement('order')); + $content['order'] = bigintval(getRequestParameter('order')); $content['url'] = generateDerefererUrl($url); loadTemplate('member_order_frametester', false, $content); break; @@ -111,11 +111,11 @@ if ((isPostRequestElementSet('url')) || (isGetRequestElementSet('url')) || (isGe break; case 'back': // Back buttom - loadTemplate('member_order_back', false, getRequestElement('order')); + loadTemplate('member_order_back', false, getRequestParameter('order')); break; case 'send': // Send mail away - loadTemplate('member_order_send', false, getRequestElement('order')); + loadTemplate('member_order_send', false, getRequestParameter('order')); break; } // END - switch } else { diff --git a/inc/modules/guest/what-confirm.php b/inc/modules/guest/what-confirm.php index dc271286bf..73d25eef45 100644 --- a/inc/modules/guest/what-confirm.php +++ b/inc/modules/guest/what-confirm.php @@ -50,13 +50,13 @@ $content = array( 'userid' => 0, ); -if (isGetRequestElementSet('hash')) { +if (isGetRequestParameterSet('hash')) { // Initialize the user id $userid = '0'; // Search for an unconfirmed or confirmed account $result = SQL_QUERY_ESC("SELECT `userid`, `email`, `refid`,`gender` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `user_hash`='%s' AND (`status`='UNCONFIRMED' OR `status`='CONFIRMED') LIMIT 1", - array(getRequestElement('hash')), __FILE__, __LINE__); + array(getRequestParameter('hash')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Ok, he want's to confirm now so we load some data list($userid, $email, $rid, $gender) = SQL_FETCHROW($result); @@ -74,7 +74,7 @@ if (isGetRequestElementSet('hash')) { // Unlock his account (but only when it is on UNCONFIRMED!) SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='CONFIRMED', ref_payout={?ref_payout?}, `user_hash`=NULL WHERE `user_hash`='%s' AND `status`='UNCONFIRMED' LIMIT 1", - array(getRequestElement('hash')), __FILE__, __LINE__); + array(getRequestParameter('hash')), __FILE__, __LINE__); if (SQL_AFFECTEDROWS() == 1) { // Send email if updated $message = loadEmailTemplate('confirm-member', $content, bigintval($userid)); @@ -148,9 +148,9 @@ if (isGetRequestElementSet('hash')) { // Load template loadTemplate('admin_settings_saved', false, $content['message']); -} elseif ((isFormSent()) && (isPostRequestElementSet('email'))) { +} elseif ((isFormSent()) && (isPostRequestParameterSet('email'))) { // Confirmation link requested 0 1 2 - if (fetchUserData(postRequestElement('email'), 'email')) { + if (fetchUserData(postRequestParameter('email'), 'email')) { // Email address found $content = getUserDataArray(); @@ -161,7 +161,7 @@ if (isGetRequestElementSet('hash')) { $message = loadEmailTemplate('guest_request_confirm', array('hash' => $content['user_hash']), $content['userid']); // Send email - sendEmail(postRequestElement('email'), getMessage('REQUEST_CONFIRM_LINK_SUBJ'), $message); + sendEmail(postRequestParameter('email'), getMessage('REQUEST_CONFIRM_LINK_SUBJ'), $message); // And set message $content['message'] = getMessage('CONFIRM_LINK_SENT'); diff --git a/inc/modules/guest/what-login.php b/inc/modules/guest/what-login.php index 0799b79fa3..bb5750c03e 100644 --- a/inc/modules/guest/what-login.php +++ b/inc/modules/guest/what-login.php @@ -61,19 +61,19 @@ $add = ''; if ((isMemberIdSet()) && (isSessionVariableSet('u_hash'))) { // Maybe, then continue with it $userid = getMemberId(); -} elseif ((isPostRequestElementSet('id')) && (isPostRequestElementSet('password')) && (isFormSent())) { +} elseif ((isPostRequestParameterSet('id')) && (isPostRequestParameterSet('password')) && (isFormSent())) { // Set userid and crypt password when login data was submitted - if ((isExtensionActive('nickname')) && (isNicknameUsed(postRequestElement('id')))) { + if ((isExtensionActive('nickname')) && (isNicknameUsed(postRequestParameter('id')))) { // Nickname entered - $userid = SQL_ESCAPE(postRequestElement('id')); + $userid = SQL_ESCAPE(postRequestParameter('id')); } else { // Direct userid entered - $userid = bigintval(postRequestElement('id')); + $userid = bigintval(postRequestParameter('id')); } -} elseif (isPostRequestElementSet('new_pass')) { +} elseif (isPostRequestParameterSet('new_pass')) { // New password requested $userid = '0'; - if ((isPostRequestElementSet('id')) && (postRequestElement('id') > 0)) $userid = bigintval(postRequestElement('id')); + if ((isPostRequestParameterSet('id')) && (postRequestParameter('id') > 0)) $userid = bigintval(postRequestParameter('id')); } else { // Not logged in $userid = '0'; $hash = ''; @@ -82,21 +82,21 @@ if ((isMemberIdSet()) && (isSessionVariableSet('u_hash'))) { if (isMember()) { // Login immidiately... $URL = 'modules.php?module=login'; -} elseif ((isFormSent()) && ('' . $userid . '' != '' . postRequestElement('id') . '')) { +} elseif ((isFormSent()) && ('' . $userid . '' != '' . postRequestParameter('id') . '')) { // Invalid input (no nickname extension installed but nickname entered) $errorCode = getCode('EXTENSION_PROBLEM'); } elseif (isFormSent()) { // Try the login (see inc/libs/user_functions.php) - $URL = doUserLogin(postRequestElement('id'), postRequestElement('password')); -} elseif ((isPostRequestElementSet('new_pass')) && (isset($userid))) { + $URL = doUserLogin(postRequestParameter('id'), postRequestParameter('password')); +} elseif ((isPostRequestParameterSet('new_pass')) && (isset($userid))) { // Try the userid/email lookup (see inc/libs/user_functions.php) - $errorCode = doNewUserPassword(postRequestElement('email'), $userid); + $errorCode = doNewUserPassword(postRequestParameter('email'), $userid); } // Login problems? -if (isGetRequestElementSet('login')) { +if (isGetRequestParameterSet('login')) { // Use code from URL - $errorCode = getRequestElement('login'); + $errorCode = getRequestParameter('login'); } // END - if // No problems, no output by detault diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index 30f65f14cb..3b7d77f2d1 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -59,16 +59,16 @@ $cats = '0'; $ipTimedOut = false; // Default refid is zero -setPostRequestElement('refid', 0); +setPostRequestParameter('refid', 0); if (determineReferalId() > 0) { // Test if the refid is valid if (!fetchUserData(determineReferalId())) { // Not found so we set your refid! - setPostRequestElement('refid', getConfig('def_refid')); + setPostRequestParameter('refid', getConfig('def_refid')); setSession('refid', getConfig('def_refid')); } else { // Use the refid here - setPostRequestElement('refid', determineReferalId()); + setPostRequestParameter('refid', determineReferalId()); } } // END - if @@ -76,25 +76,25 @@ if (isFormSent()) { // First we only check the submitted data then we continue... :) // // Did he agree to our Terms Of Usage? - if (postRequestElement('agree') != 'Y') { - setPostRequestElement('agree', '!'); + if (postRequestParameter('agree') != 'Y') { + setPostRequestParameter('agree', '!'); $isOkay = false; } // END - if // Did he enter a valid email address? (we really don't care about // that, he has to click on a confirmation link :P ) - if ((!isPostRequestElementSet('email')) || (!isEmailValid(postRequestElement('email')))) { - setPostRequestElement('email', '!'); + if ((!isPostRequestParameterSet('email')) || (!isEmailValid(postRequestParameter('email')))) { + setPostRequestParameter('email', '!'); $isOkay = false; } // END - if // And what about surname and family's name? - if (!isPostRequestElementSet('surname')) { - setPostRequestElement('surname', '!'); + if (!isPostRequestParameterSet('surname')) { + setPostRequestParameter('surname', '!'); $isOkay = false; } // END - if - if (!isPostRequestElementSet('family')) { - setPostRequestElement('family', '!'); + if (!isPostRequestParameterSet('family')) { + setPostRequestParameter('family', '!'); $isOkay = false; } // END - if @@ -108,19 +108,19 @@ if (isFormSent()) { setPostRequestArray($postArray); // Did he enter his password twice? - if (((!isPostRequestElementSet('pass1')) || (!isPostRequestElementSet('pass2'))) || ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')))) { - if ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2'))) { - setPostRequestElement('pass1', '!'); - setPostRequestElement('pass2', '!'); + if (((!isPostRequestParameterSet('pass1')) || (!isPostRequestParameterSet('pass2'))) || ((postRequestParameter('pass1') != postRequestParameter('pass2')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2')))) { + if ((postRequestParameter('pass1') != postRequestParameter('pass2')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2'))) { + setPostRequestParameter('pass1', '!'); + setPostRequestParameter('pass2', '!'); } else { - if (!isPostRequestElementSet('pass1')) { setPostRequestElement('pass1', '!'); } else { setPostRequestElement('pass1', ''); } - if (!isPostRequestElementSet('pass2')) { setPostRequestElement('pass2', '!'); } else { setPostRequestElement('pass2', ''); } + if (!isPostRequestParameterSet('pass1')) { setPostRequestParameter('pass1', '!'); } else { setPostRequestParameter('pass1', ''); } + if (!isPostRequestParameterSet('pass2')) { setPostRequestParameter('pass2', '!'); } else { setPostRequestParameter('pass2', ''); } } $isOkay = false; } // END - if // Is the password long enouth? - if ((strlen(postRequestElement('pass1')) < getConfig('pass_len')) && ($isOkay === true)) { + if ((strlen(postRequestParameter('pass1')) < getConfig('pass_len')) && ($isOkay === true)) { $shortPass = true; $isOkay = false; } // END - if @@ -128,7 +128,7 @@ if (isFormSent()) { // No admin? Admins can always register! if (!isAdmin()) { // Do this check only when no admin is logged in - foreach (postRequestElement('cat') as $id => $answer) { + foreach (postRequestParameter('cat') as $id => $answer) { if ($answer == 'Y') $cats++; } // END - foreach @@ -138,10 +138,10 @@ if (isFormSent()) { } // END - if } // END - if - if ((postRequestElement('email') != '!') && (getConfig('check_double_email') == 'Y')) { + if ((postRequestParameter('email') != '!') && (getConfig('check_double_email') == 'Y')) { // Does the email address already exists in our database? - if ((!isAdmin()) && (isEmailTaken(postRequestElement('email')))) { - setPostRequestElement('email', '?'); + if ((!isAdmin()) && (isEmailTaken(postRequestParameter('email')))) { + setPostRequestParameter('email', '?'); $isOkay = false; } // END - if } // END - if @@ -174,8 +174,8 @@ LIMIT 1", //* DEBUG: */ print intval(isFormSent()).'/'.intval($isOkay).'/'.intval(isAdmin()).'
'; if ((isFormSent()) && (($isOkay === true) || (isAdmin()))) { // Prepapre month and day of birth - if (strlen(postRequestElement('day')) == 1) setPostRequestElement('day' , 0 . postRequestElement('day')); - if (strlen(postRequestElement('month')) == 1) setPostRequestElement('month', 0 . postRequestElement('month')); + if (strlen(postRequestParameter('day')) == 1) setPostRequestParameter('day' , 0 . postRequestParameter('day')); + if (strlen(postRequestParameter('month')) == 1) setPostRequestParameter('month', 0 . postRequestParameter('month')); // Get total ... // ... confirmed, ... @@ -186,7 +186,7 @@ if ((isFormSent()) && (($isOkay === true) || (isAdmin()))) { $lockedUsers = countSumTotalData('LOCKED' , 'user_data', 'userid', 'status', true); // Generate hash which will be inserted into confirmation mail - $hash = generateHash(sha1($confirmedUsers.getConfig('ENCRYPT_SEPERATOR').$unconfirmedUsers.getConfig('ENCRYPT_SEPERATOR').$lockedUsers.getConfig('ENCRYPT_SEPERATOR').postRequestElement('month') . '-'.postRequestElement('day') . '-'.postRequestElement('year').getConfig('ENCRYPT_SEPERATOR').getenv('SERVER_NAME').getConfig('ENCRYPT_SEPERATOR').detectRemoteAddr().getConfig('ENCRYPT_SEPERATOR').detectUserAgent() . '/' . getConfig('SITE_KEY') . '/' . getConfig('DATE_KEY') . '/'. getConfig('CACHE_BUSTER'))); + $hash = generateHash(sha1($confirmedUsers.getConfig('ENCRYPT_SEPERATOR').$unconfirmedUsers.getConfig('ENCRYPT_SEPERATOR').$lockedUsers.getConfig('ENCRYPT_SEPERATOR').postRequestParameter('month') . '-'.postRequestParameter('day') . '-'.postRequestParameter('year').getConfig('ENCRYPT_SEPERATOR').getenv('SERVER_NAME').getConfig('ENCRYPT_SEPERATOR').detectRemoteAddr().getConfig('ENCRYPT_SEPERATOR').detectUserAgent() . '/' . getConfig('SITE_KEY') . '/' . getConfig('DATE_KEY') . '/'. getConfig('CACHE_BUSTER'))); // Add design when extension sql_patches is v0.2.7 or greater // @TODO Rewrite these all to a single filter @@ -222,11 +222,11 @@ if ((isFormSent()) && (($isOkay === true) || (isAdmin()))) { if (isExtensionActive('country')) { // Save with new selectable country code $countryRow = '`country_code`'; - $countryData = bigintval(postRequestElement('country_code')); + $countryData = bigintval(postRequestParameter('country_code')); } else { // Old way with enterable two-char-code $countryRow = '`country`'; - $countryData = substr(postRequestElement('cntry'), 0, 2); + $countryData = substr(postRequestParameter('cntry'), 0, 2); } ////////////////////////////// @@ -237,21 +237,21 @@ if ((isFormSent()) && (($isOkay === true) || (isAdmin()))) { VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONFIRMED','%s','%s', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()".$ADD2.")", array( $countryRow, - substr(postRequestElement('gender'), 0, 1), - postRequestElement('surname'), - postRequestElement('family'), - postRequestElement('street_nr'), + substr(postRequestParameter('gender'), 0, 1), + postRequestParameter('surname'), + postRequestParameter('family'), + postRequestParameter('street_nr'), $countryData, - bigintval(postRequestElement('zip')), - postRequestElement('city'), - postRequestElement('email'), - bigintval(postRequestElement('day')), - bigintval(postRequestElement('month')), - bigintval(postRequestElement('year')), - generateHash(postRequestElement('pass1')), - bigintval(postRequestElement('max_mails')), - bigintval(postRequestElement('max_mails')), - bigintval(postRequestElement('refid')), + bigintval(postRequestParameter('zip')), + postRequestParameter('city'), + postRequestParameter('email'), + bigintval(postRequestParameter('day')), + bigintval(postRequestParameter('month')), + bigintval(postRequestParameter('year')), + generateHash(postRequestParameter('pass1')), + bigintval(postRequestParameter('max_mails')), + bigintval(postRequestParameter('max_mails')), + bigintval(postRequestParameter('refid')), $hash, detectRemoteAddr(), ), __FILE__, __LINE__); @@ -295,8 +295,8 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF } // END - if // Write catgories - if ((is_array(postRequestElement('cat'))) && (count(postRequestElement('cat')))) { - foreach (postRequestElement('cat') as $cat => $joined) { + if ((is_array(postRequestParameter('cat'))) && (count(postRequestParameter('cat')))) { + foreach (postRequestParameter('cat') as $cat => $joined) { if ($joined == 'Y') { // Insert category entry SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_cats` (userid, cat_id) VALUES (%s, %s)", @@ -306,28 +306,28 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF } // END - if // Rewrite gender - $gender = translateGender(postRequestElement('gender')); + $gender = translateGender(postRequestParameter('gender')); // ... rewrite a zero referal id to the main title - if (postRequestElement('refid') == '0') setPostRequestElement('refid', getConfig('MAIN_TITLE')); + if (postRequestParameter('refid') == '0') setPostRequestParameter('refid', getConfig('MAIN_TITLE')); // Is ZIP code set? - if (isPostRequestElementSet('zip')) { + if (isPostRequestParameterSet('zip')) { // Prepare data array for the email template // Start with the gender... $content = array( 'hash' => $hash, 'userid' => $userid, 'gender' => $gender, - 'surname' => SQL_ESCAPE(postRequestElement('surname')), - 'family' => SQL_ESCAPE(postRequestElement('family')), - 'email' => SQL_ESCAPE(postRequestElement('email')), - 'street' => SQL_ESCAPE(postRequestElement('street_nr')), - 'city' => SQL_ESCAPE(postRequestElement('city')), - 'zip' => bigintval(postRequestElement('zip')), + 'surname' => SQL_ESCAPE(postRequestParameter('surname')), + 'family' => SQL_ESCAPE(postRequestParameter('family')), + 'email' => SQL_ESCAPE(postRequestParameter('email')), + 'street' => SQL_ESCAPE(postRequestParameter('street_nr')), + 'city' => SQL_ESCAPE(postRequestParameter('city')), + 'zip' => bigintval(postRequestParameter('zip')), 'country' => $countryData, - 'refid' => SQL_ESCAPE(postRequestElement('refid')), - 'pass' => SQL_ESCAPE(postRequestElement('pass1')), + 'refid' => SQL_ESCAPE(postRequestParameter('refid')), + 'pass' => SQL_ESCAPE(postRequestParameter('pass1')), ); } else { // No ZIP code entered @@ -335,26 +335,26 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF 'hash' => $hash, 'userid' => $userid, 'gender' => $gender, - 'surname' => SQL_ESCAPE(postRequestElement('surname')), - 'family' => SQL_ESCAPE(postRequestElement('family')), - 'email' => SQL_ESCAPE(postRequestElement('email')), - 'street' => SQL_ESCAPE(postRequestElement('street_nr')), - 'city' => SQL_ESCAPE(postRequestElement('city')), + 'surname' => SQL_ESCAPE(postRequestParameter('surname')), + 'family' => SQL_ESCAPE(postRequestParameter('family')), + 'email' => SQL_ESCAPE(postRequestParameter('email')), + 'street' => SQL_ESCAPE(postRequestParameter('street_nr')), + 'city' => SQL_ESCAPE(postRequestParameter('city')), 'zip' => '', 'country' => $countryData, - 'refid' => SQL_ESCAPE(postRequestElement('refid')), - 'pass' => SQL_ESCAPE(postRequestElement('pass1')), + 'refid' => SQL_ESCAPE(postRequestParameter('refid')), + 'pass' => SQL_ESCAPE(postRequestParameter('pass1')), ); } // Continue with birthday... switch (getLanguage()) { case 'de': - $content['birthday'] = bigintval(postRequestElement('day')) . '.' . bigintval(postRequestElement('month')) . '.' . bigintval(postRequestElement('year')); + $content['birthday'] = bigintval(postRequestParameter('day')) . '.' . bigintval(postRequestParameter('month')) . '.' . bigintval(postRequestParameter('year')); break; default: - $content['birthday'] = bigintval(postRequestElement('month')) . '/' . bigintval(postRequestElement('day')) . '/' . bigintval(postRequestElement('year')); + $content['birthday'] = bigintval(postRequestParameter('month')) . '/' . bigintval(postRequestParameter('day')) . '/' . bigintval(postRequestParameter('year')); break; } // END - switch @@ -372,33 +372,33 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF // Output success registration loadTemplate('admin_settings_saved', false, getMessage('REGISTRATION_DONE')); } else { - if (postRequestElement('agree') == '!') { + if (postRequestParameter('agree') == '!') { registerOutputFailedMessage('HAVE_TO_AGREE'); } // END - if - if (postRequestElement('email') == '!') { + if (postRequestParameter('email') == '!') { registerOutputFailedMessage('ENTER_EMAIL'); - setPostRequestElement('email', ''); - } elseif (postRequestElement('email') == '?') { + setPostRequestParameter('email', ''); + } elseif (postRequestParameter('email') == '?') { registerOutputFailedMessage('EMAIL_ALREADY_DB'); - setPostRequestElement('email', ''); + setPostRequestParameter('email', ''); } - if (postRequestElement('surname') == '!') { + if (postRequestParameter('surname') == '!') { registerOutputFailedMessage('ENTER_SURNAME'); - setPostRequestElement('surname', ''); + setPostRequestParameter('surname', ''); } // END - if - if (postRequestElement('family') == '!') { + if (postRequestParameter('family') == '!') { registerOutputFailedMessage('ENTER_FAMILY'); - setPostRequestElement('family', ''); + setPostRequestParameter('family', ''); } // END - if - if ((postRequestElement('pass1') == '!') && (postRequestElement('pass2') == '!')) { + if ((postRequestParameter('pass1') == '!') && (postRequestParameter('pass2') == '!')) { registerOutputFailedMessage('ENTER_BOTH_PASSWORDS'); - } elseif (postRequestElement('pass1') == '!') { + } elseif (postRequestParameter('pass1') == '!') { registerOutputFailedMessage('ENTER_PASS1'); - } elseif (postRequestElement('pass2') == '!') { + } elseif (postRequestParameter('pass2') == '!') { registerOutputFailedMessage('ENTER_PASS2'); } @@ -417,11 +417,11 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF // Generate birthday selection switch (getLanguage()) { case 'de': // German date format - $content['birthday_selection'] = addSelectionBox('day', postRequestElement('day')).addSelectionBox('month', postRequestElement('month')).addSelectionBox('year', postRequestElement('year')); + $content['birthday_selection'] = addSelectionBox('day', postRequestParameter('day')).addSelectionBox('month', postRequestParameter('month')).addSelectionBox('year', postRequestParameter('year')); break; default: // Default is the US date format... :) - $content['birthday_selection'] = addSelectionBox('month', postRequestElement('month')).addSelectionBox('day', postRequestElement('day')).addSelectionBox('year', postRequestElement('year')); + $content['birthday_selection'] = addSelectionBox('month', postRequestParameter('month')).addSelectionBox('day', postRequestParameter('day')).addSelectionBox('year', postRequestParameter('year')); break; } @@ -444,21 +444,21 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF $content['header_content'] = loadTemplate('register_header', true); // Other values - $content['surname'] = SQL_ESCAPE(postRequestElement('surname')); - $content['family'] = SQL_ESCAPE(postRequestElement('family')); - $content['street_nr'] = SQL_ESCAPE(postRequestElement('street_nr')); + $content['surname'] = SQL_ESCAPE(postRequestParameter('surname')); + $content['family'] = SQL_ESCAPE(postRequestParameter('family')); + $content['street_nr'] = SQL_ESCAPE(postRequestParameter('street_nr')); $content['zip'] = ''; - if (isPostRequestElementSet('zip')) { - $content['zip'] = bigintval(postRequestElement('zip')); + if (isPostRequestParameterSet('zip')) { + $content['zip'] = bigintval(postRequestParameter('zip')); } // END - if - $content['city'] = SQL_ESCAPE(postRequestElement('city')); - $content['email'] = SQL_ESCAPE(postRequestElement('email')); + $content['city'] = SQL_ESCAPE(postRequestParameter('city')); + $content['email'] = SQL_ESCAPE(postRequestParameter('email')); // Prepare country selection box $OUT = ""; $content['country'] = $OUT; diff --git a/inc/modules/guest/what-sponsor_login.php b/inc/modules/guest/what-sponsor_login.php index df5fd3e162..3bfc7d14f9 100644 --- a/inc/modules/guest/what-sponsor_login.php +++ b/inc/modules/guest/what-sponsor_login.php @@ -50,16 +50,16 @@ if ((!isExtensionActive('sponsor'))) { } // END - if $mode = ''; -if (isGetRequestElementSet('mode')) { +if (isGetRequestParameterSet('mode')) { // A "special" mode of the login system was requested - switch (getRequestElement('mode')) { + switch (getRequestParameter('mode')) { case 'activate' : $mode = 'activate'; break; // Activation link requested case 'lost_pass': $mode = 'lost_pass'; break; // Request new password } // END - switch } // END - if // Check if hash for confirmation of email address is given... -if (isGetRequestElementSet('hash')) { +if (isGetRequestParameterSet('hash')) { // Lookup sponsor $result = SQL_QUERY_ESC("SELECT `id`, `status`, `gender`, `surname`, `family`, @@ -70,7 +70,7 @@ FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `hash='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') -LIMIT 1", array(getRequestElement('hash')), __FILE__, __LINE__); +LIMIT 1", array(getRequestParameter('hash')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Sponsor found, load his data... $SPONSOR = SQL_FETCHARRAY($result); @@ -85,7 +85,7 @@ LIMIT 1", array(getRequestElement('hash')), __FILE__, __LINE__); // Set account to pending SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `status`='PENDING' WHERE `id`='%s' AND hash='%s' AND `status`='UNCONFIRMED' LIMIT 1", - array(bigintval($SPONSOR['id']), getRequestElement('hash')), __FILE__, __LINE__); + array(bigintval($SPONSOR['id']), getRequestParameter('hash')), __FILE__, __LINE__); // Check on success if (SQL_AFFECTEDROWS() == 1) { @@ -106,7 +106,7 @@ WHERE `id`='%s' AND hash='%s' AND `status`='UNCONFIRMED' LIMIT 1", // Changed email adress need to be confirmed SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `status`='CONFIRMED' WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1", - array(bigintval($SPONSOR['id']), getRequestElement('hash')), __FILE__, __LINE__); + array(bigintval($SPONSOR['id']), getRequestParameter('hash')), __FILE__, __LINE__); // Check on success if (SQL_AFFECTEDROWS() == 1) { @@ -122,7 +122,7 @@ WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1", } } else { // No sponsor found - loadTemplate('admin_settings_saved', false, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getRequestElement('hash'))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('SPONSOR_ACCOUNT_404'), getRequestParameter('hash'))); } // Free memory @@ -131,7 +131,7 @@ WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1", // Send activation link again if (isFormSent()) { // Check submitted data - if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok'); + if (!isPostRequestParameterSet('email')) unsetPostRequestParameter('ok'); } if (isFormSent()) { @@ -139,7 +139,7 @@ WHERE `id`='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1", $result = SQL_QUERY_ESC("SELECT id, hash, status, remote_addr, gender, surname, family, sponsor_created FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1", - array(postRequestElement('email')), __FILE__, __LINE__); + array(postRequestParameter('email')), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -158,7 +158,7 @@ WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1", // Confirmed email address $message_sponsor = loadEmailTemplate('sponsor_email', $SPONSOR); } - sendEmail(postRequestElement('email'), getMessage('SPONSOR_ACTIVATION_LINK_SUBJ'), $message_sponsor); + sendEmail(postRequestParameter('email'), getMessage('SPONSOR_ACTIVATION_LINK_SUBJ'), $message_sponsor); // Output message loadTemplate('admin_settings_saved', false, getMessage('SPONSOR_ACTIVATION_LINK_SENT')); @@ -177,7 +177,7 @@ WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1", // Send new password if (isFormSent()) { // Check submitted data - if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok'); + if (!isPostRequestParameterSet('email')) unsetPostRequestParameter('ok'); } // END - if if (isFormSent()) { @@ -185,7 +185,7 @@ WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1", $result = SQL_QUERY_ESC("SELECT `id`, `hash`, `remote_addr`, `gender`, `surname`, `family`, `sponsor_created` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `email`='%s' AND `id`='%s' AND `status`='CONFIRMED' LIMIT 1", - array(postRequestElement('email'), bigintval(postRequestElement('id'))), __FILE__, __LINE__); + array(postRequestParameter('email'), bigintval(postRequestParameter('id'))), __FILE__, __LINE__); // Entry found? if (SQL_NUMROWS($result) == 1) { @@ -201,7 +201,7 @@ WHERE `email`='%s' AND `id`='%s' AND `status`='CONFIRMED' LIMIT 1", // Prepare email and send it to the sponsor $message_sponsor = loadEmailTemplate('sponsor_lost', $DATA); - sendEmail(postRequestElement('email'), getMessage('SPONSOR_LOST_PASSWORD_SUBJ'), $message_sponsor); + sendEmail(postRequestParameter('email'), getMessage('SPONSOR_LOST_PASSWORD_SUBJ'), $message_sponsor); // Update password SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_sponsor_data` SET `password`='%s' @@ -225,15 +225,15 @@ WHERE `id`='%s' LIMIT 1", // Check status and login data ... $result = SQL_QUERY_ESC("SELECT status FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `id`='%s' AND password='%s' LIMIT 1", - array(bigintval(postRequestElement('sponsorid')), md5(postRequestElement('pass'))), __FILE__, __LINE__); + array(bigintval(postRequestParameter('sponsorid')), md5(postRequestParameter('pass'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Okay, first login data check passed, now has he/she an approved (CONFIRMED) account? list($status) = SQL_FETCHROW($result); if ($status == 'CONFIRMED') { // Is confirmed so both is fine and we can continue with login procedure - $login = ((setSession('sponsorid' , bigintval(postRequestElement('sponsorid')))) && - (setSession('sponsorpass', md5(postRequestElement('pass')) )) + $login = ((setSession('sponsorid' , bigintval(postRequestParameter('sponsorid')))) && + (setSession('sponsorpass', md5(postRequestParameter('pass')) )) ); if ($login === true) { diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index bd0e3820dd..10f1c8c937 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -57,145 +57,145 @@ if (isFormSent()) { // Check submitted form data // // 1. Salutation / Surname / family name - if (!isPostRequestElementSet('gender')) { + if (!isPostRequestParameterSet('gender')) { // Surname is empty $FORM_ERRORS[] = getMessage('SPONSOR_NO_GENDER_SELECTED'); } // END - if - if (!isPostRequestElementSet('surname')) { + if (!isPostRequestParameterSet('surname')) { // Surname is empty $FORM_ERRORS[] = getMessage('SPONSOR_SURNAME_IS_EMPTY'); } // END - if - if (!isPostRequestElementSet('family')) { + if (!isPostRequestParameterSet('family')) { // Surname is empty $FORM_ERRORS[] = getMessage('SPONSOR_FAMILY_IS_EMPTY'); } // END - if // 2. Company name // 012 3 32 23 4 43 3 4 4321 12 3 32 2 3 3210 - if (((!isPostRequestElementSet('company')) && ((isPostRequestElementSet('tax_ident')) || (isPostRequestElementSet('position')))) || ((isPostRequestElementSet('company')) && (!isPostRequestElementSet('tax_ident')))) { - if (!isPostRequestElementSet('company')) { + if (((!isPostRequestParameterSet('company')) && ((isPostRequestParameterSet('tax_ident')) || (isPostRequestParameterSet('position')))) || ((isPostRequestParameterSet('company')) && (!isPostRequestParameterSet('tax_ident')))) { + if (!isPostRequestParameterSet('company')) { // Company name is empty $FORM_ERRORS[] = getMessage('SPONSOR_COMPANY_IS_EMPTY'); - } elseif (!isPostRequestElementSet('tax_ident')) { + } elseif (!isPostRequestParameterSet('tax_ident')) { // Tax ident number name is empty $FORM_ERRORS[] = getMessage('SPONSOR_TAX_IDENT_IS_EMPTY'); } - if (!isPostRequestElementSet('position')) { + if (!isPostRequestParameterSet('position')) { // Not fatal but not nice: position in company is empty $FORM_ERRORS[] = getMessage('SPONSOR_POSITION_IS_EMPTY'); } // END - if } // END - if // 3. Street and number - if (!isPostRequestElementSet('street_nr1')) { + if (!isPostRequestParameterSet('street_nr1')) { // Street name and house number are empty $FORM_ERRORS[] = getMessage('SPONSOR_STREET_NR1_IS_EMPTY'); - } elseif ((isPostRequestElementSet('street_nr2')) && (!isPostRequestElementSet('street_nr1'))) { + } elseif ((isPostRequestParameterSet('street_nr2')) && (!isPostRequestParameterSet('street_nr1'))) { // 1st line for street is empty, but 2nd line not $FORM_ERRORS[] = getMessage('SPONSOR_STREET_NR1_IS_EMPTY_2_NOT'); } // 4. Country code - if (!isPostRequestElementSet('country')) { + if (!isPostRequestParameterSet('country')) { // Country code is empty $FORM_ERRORS[] = getMessage('SPONSOR_COUNTRY_IS_EMPTY'); - } elseif (strlen(postRequestElement('country')) != 2) { + } elseif (strlen(postRequestParameter('country')) != 2) { // Country code is invalid $FORM_ERRORS[] = getMessage('SPONSOR_COUNTRY_IS_INVALID'); } // 3. ZIP code - if (!isPostRequestElementSet('zip')) { + if (!isPostRequestParameterSet('zip')) { // ZIP code is empty $FORM_ERRORS[] = getMessage('SPONSOR_ZIP_IS_EMPTY'); - } elseif (bigintval(postRequestElement('zip')) != postRequestElement('zip')) { + } elseif (bigintval(postRequestParameter('zip')) != postRequestParameter('zip')) { // ZIP is invalid $FORM_ERRORS[] = getMessage('SPONSOR_ZIP_IS_INVALID'); - setPostRequestElement('zip', ''); + setPostRequestParameter('zip', ''); } // 4. City - if (!isPostRequestElementSet('city')) { + if (!isPostRequestParameterSet('city')) { // City is empty $FORM_ERRORS[] = getMessage('SPONSOR_CITY_IS_EMPTY'); } // END - if // 5. Phone number - if (!isPostRequestElementSet('phone')) { + if (!isPostRequestParameterSet('phone')) { // City is empty $FORM_ERRORS[] = getMessage('SPONSOR_PHONE_IS_EMPTY'); } // END - if // 6. Homepage URL - if (!isPostRequestElementSet('url')) { + if (!isPostRequestParameterSet('url')) { // Homepage URL is empty $FORM_ERRORS[] = getMessage('SPONSOR_URL_IS_EMPTY'); - } elseif (!isUrlValid(postRequestElement('url'))) { + } elseif (!isUrlValid(postRequestParameter('url'))) { // Homepage URL is invalid $FORM_ERRORS[] = getMessage('SPONSOR_URL_IS_INVALID'); - setPostRequestElement('url', ''); + setPostRequestParameter('url', ''); } // 7. Light validation of email address - if ((!isPostRequestElementSet('email')) || (postRequestElement('email') == '@')) { + if ((!isPostRequestParameterSet('email')) || (postRequestParameter('email') == '@')) { // Email is invalid/empty $FORM_ERRORS[] = getMessage('SPONSOR_EMAIL_IS_INVALID'); - } elseif (isSponsorRegisteredWithEmail(postRequestElement('email'))) { + } elseif (isSponsorRegisteredWithEmail(postRequestParameter('email'))) { // Email already found in database! $FORM_ERRORS[] = getMessage('SPONSOR_EMAIL_IS_ALREADY_REGISTERED'); - setPostRequestElement('email', ''); + setPostRequestParameter('email', ''); } // 8. Pay type selected? - if (!isPostRequestElementSet('pay_type')) { + if (!isPostRequestParameterSet('pay_type')) { // Not pay type selected $FORM_ERRORS[] = getMessage('SPONSOR_NO_PAYTYPE_SELECTED'); } // END - if // 9. Interval of mails - if (!isPostRequestElementSet('warning_interval')) { + if (!isPostRequestParameterSet('warning_interval')) { // No warning interval selected $FORM_ERRORS[] = getMessage('SPONSOR_NO_WARNING_INTERVAL_SELECTED'); } // END - if // 10. Mail notifications disabled/enabled - if (!isPostRequestElementSet('receive_warnings')) { + if (!isPostRequestParameterSet('receive_warnings')) { // Option not selected! $FORM_ERRORS[] = getMessage('SPONSOR_NO_RECEIVE_WARNINGS_SELECTED'); } // END - if // Did he enter his password twice? - if (((!isPostRequestElementSet('pass1')) || (!isPostRequestElementSet('pass2'))) || ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')))) { - if ((postRequestElement('pass1') != postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2'))) { + if (((!isPostRequestParameterSet('pass1')) || (!isPostRequestParameterSet('pass2'))) || ((postRequestParameter('pass1') != postRequestParameter('pass2')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2')))) { + if ((postRequestParameter('pass1') != postRequestParameter('pass2')) && (isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2'))) { // Passwords missmatch $FORM_ERRORS[] = getMessage('SPONSOR_PASSWORDS_MISMATCH'); } else { - if (!isPostRequestElementSet('pass1')) { + if (!isPostRequestParameterSet('pass1')) { // Password 1 is empty $FORM_ERRORS[] = getMessage('SPONSOR_PASSWORD1_EMPTY'); } - if (!isPostRequestElementSet('pass2')) { + if (!isPostRequestParameterSet('pass2')) { // Password 2 is empty $FORM_ERRORS[] = getMessage('SPONSOR_PASSWORD2_EMPTY'); } } - } elseif (strlen(postRequestElement('pass1')) < getConfig('pass_len')) { + } elseif (strlen(postRequestParameter('pass1')) < getConfig('pass_len')) { // Password is to short! $FORM_ERRORS[] = getMessage('SPONSOR_PASSWORD_TOO_SHORT'); } // Check if he has accepted the terms&conditions - if (!isPostRequestElementSet('terms')) { + if (!isPostRequestParameterSet('terms')) { // Homepage URL is empty $FORM_ERRORS[] = getMessage('SPONSOR_TERMS_NOT_ACCEPTED'); } // END - if // If there is something wrong/missing stop registration - if (count($FORM_ERRORS) > 0) unsetPostRequestElement('ok'); + if (count($FORM_ERRORS) > 0) unsetPostRequestParameter('ok'); } if ((isFormSent()) && (count($FORM_ERRORS) == '0')) { @@ -209,17 +209,17 @@ if ((isFormSent()) && (count($FORM_ERRORS) == '0')) { $result = SQL_QUERY_ESC("SELECT (`pay_rate` * `pay_min_count`) AS points, `pay_min_count` AS pay, `pay_currency` AS curr FROM `{?_MYSQL_PREFIX?}_sponsor_paytypes` WHERE `id`='%s' LIMIT 1", - array(postRequestElement('pay_type')), __FILE__, __LINE__); + array(postRequestParameter('pay_type')), __FILE__, __LINE__); list($points, $pay, $curr) = SQL_FETCHROW($result); // Free memory SQL_FREERESULT($result); // Add points to array - postRequestElement('points_amount', $points); - postRequestElement('points_used' , '0.00000'); - postRequestElement('last_pay' , $pay); - postRequestElement('last_curr' , $curr); + postRequestParameter('points_amount', $points); + postRequestParameter('points_used' , '0.00000'); + postRequestParameter('last_pay' , $pay); + postRequestParameter('last_curr' , $curr); // Register sponsor but never ever update here! $STATUS = handlSponsorRequest(postRequestArray(), true, $messageArray, true); @@ -229,7 +229,7 @@ WHERE `id`='%s' LIMIT 1", case 'added': // Sponsor successfully added with account status = UNCONFIRMED! // Check for his id number $result = SQL_QUERY_ESC("SELECT `id`, `hash` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `email`='%s' LIMIT 1", - array(postRequestElement('email')), __FILE__, __LINE__); + array(postRequestParameter('email')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // id found so let's load it for the confirmation email list($id, $hash) = SQL_FETCHROW($result); @@ -237,16 +237,16 @@ WHERE `id`='%s' LIMIT 1", // Prepare data for the email template $content['id'] = $id; $content['hash'] = $hash; - $content['email'] = secureString(postRequestElement('email')); - $content['surname'] = secureString(postRequestElement('surname')); - $content['family'] = secureString(postRequestElement('family')); - $content['gender'] = translateGender(postRequestElement('gender')); + $content['email'] = secureString(postRequestParameter('email')); + $content['surname'] = secureString(postRequestParameter('surname')); + $content['family'] = secureString(postRequestParameter('family')); + $content['gender'] = translateGender(postRequestParameter('gender')); $content['timestamp'] = generateDateTime(time(), 0); - $content['password'] = secureString(postRequestElement('pass1')); + $content['password'] = secureString(postRequestParameter('pass1')); // Generate email and send it to the new sponsor $message = loadEmailTemplate('sponsor_confirm', $hash); - sendEmail(postRequestElement('email'), getMessage('SPONSOR_PLEASE_CONFIRM_SUBJ'), $message); + sendEmail(postRequestParameter('email'), getMessage('SPONSOR_PLEASE_CONFIRM_SUBJ'), $message); // Send mail to admin sendAdminNotification(getMessage('ADMIN_NEW_SPONSOR'), 'admin_sponsor_reg', $hash); @@ -255,7 +255,7 @@ WHERE `id`='%s' LIMIT 1", $message = $messageArray['added']; } else { // Sponsor account not found??? - $message = getMaskedMessage('SPONSOR_EMAIL_404', postRequestElement('email')); + $message = getMaskedMessage('SPONSOR_EMAIL_404', postRequestParameter('email')); } // Free memory @@ -309,7 +309,7 @@ ORDER BY `pay_name`", __FILE__, __LINE__); if (count($FORM_ERRORS) > 0) { // Some found... :-( foreach (array('company','position','tax_ident','surname','family','street_nr1','street_nr2','country','zip','city','phone','fix','cell','email','url') as $entry) { - $content[$entry] = secureString(postRequestElement($entry)); + $content[$entry] = secureString(postRequestParameter($entry)); } // END - foreach // Init gender @@ -318,14 +318,14 @@ ORDER BY `pay_name`", __FILE__, __LINE__); } // END - foreach // Check for gender selection - $content['gender_' . strtolower(postRequestElement('gender'))] = ' selected="selected"'; + $content['gender_' . strtolower(postRequestParameter('gender'))] = ' selected="selected"'; // Init receive selection $content['rec_y'] = ''; $content['rec_n'] = ''; // Check for receive_warnings - $content['rec_' . strtolower(postRequestElement('receive_warnings'))] = ' selected="selected"'; + $content['rec_' . strtolower(postRequestParameter('receive_warnings'))] = ' selected="selected"'; $OUT = ''; // Errors found? @@ -342,7 +342,7 @@ ORDER BY `pay_name`", __FILE__, __LINE__); } // END - if $content['form_errors'] = $OUT; - $content['refid'] = bigintval(postRequestElement('refid')); + $content['refid'] = bigintval(postRequestParameter('refid')); } // END - if // Prepare referal id diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php index c57629a7f2..5e5512d158 100644 --- a/inc/modules/guest/what-stats.php +++ b/inc/modules/guest/what-stats.php @@ -45,12 +45,12 @@ if (!defined('__SECURITY')) { addMenuDescription('guest', __FILE__); // Derterminate which stats we want and set mode and title for the link below stats block -if (!isGetRequestElementSet('mode')) setGetRequestElement('mode', strtolower(getConfig('guest_stats'))); +if (!isGetRequestParameterSet('mode')) setGetRequestParameter('mode', strtolower(getConfig('guest_stats'))); // Set config temporarily -setConfigEntry('guest_stats', strtoupper(getRequestElement('mode'))); +setConfigEntry('guest_stats', strtoupper(getRequestParameter('mode'))); -switch (getRequestElement('mode')) { +switch (getRequestParameter('mode')) { case 'members' : $lmode = 'modules'; break; @@ -65,7 +65,7 @@ switch (getRequestElement('mode')) { default: // Unsupported mode - debug_report_bug(sprintf("Unsupported mode %s detected.", secureString(getRequestElement('mode')))); + debug_report_bug(sprintf("Unsupported mode %s detected.", secureString(getRequestParameter('mode')))); break; } diff --git a/inc/modules/loader.php b/inc/modules/loader.php index 6224e80ba4..3cb4076516 100644 --- a/inc/modules/loader.php +++ b/inc/modules/loader.php @@ -42,9 +42,9 @@ if (!defined('__SECURITY')) { } // END - if // Is an URL specified? -if (isGetRequestElementSet('url')) { +if (isGetRequestParameterSet('url')) { // Decode URL - $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestElement('url'))))); + $url = decodeString(str_replace(' ', '+', compileUriCode(urldecode(getRequestParameter('url'))))); // Validate the URL if (isUrlValid($url)) { diff --git a/inc/modules/member/what-categories.php b/inc/modules/member/what-categories.php index 228c699b4a..bc0a421362 100644 --- a/inc/modules/member/what-categories.php +++ b/inc/modules/member/what-categories.php @@ -56,12 +56,12 @@ if ($cats > 0) { $LEAST = false; if (isFormSent()) { $cnt = '0'; - foreach (postRequestElement('cat') as $cat => $joined) { + foreach (postRequestParameter('cat') as $cat => $joined) { if ($joined != 'Y') $cnt++; } // END - foreach if (($cats - $cnt) < getConfig('least_cats')) { - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); $LEAST = true; } // END - if } // END - if @@ -72,7 +72,7 @@ if ($cats > 0) { $cnt = '0'; // Go through all entries - foreach (postRequestElement('cat') as $cat => $joined) { + foreach (postRequestParameter('cat') as $cat => $joined) { // Ini sql here $sql = ''; @@ -133,9 +133,9 @@ if ($cats > 0) { $content['jy'] = ''; // When we found an entry don't read it, just change the jx elements - if (isPostRequestElementSet(('cat'))) { + if (isPostRequestParameterSet(('cat'))) { // Form sent? - if (postRequestElement('cat', $content['id']) =='Y') { + if (postRequestParameter('cat', $content['id']) =='Y') { $content['jy'] = ' checked="checked"'; $content['jn'] = ''; } diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index e445def99e..3c9344564a 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -87,8 +87,8 @@ if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) { if ((($content['timestamp'] + getConfig('holiday_lock')) > time()) || (($content['timestamp_ordered'] + getConfig('holiday_lock')) > time())) { // Mail order is to close away! - unsetPostRequestElement('ok'); - unsetPostRequestElement('stop'); + unsetPostRequestParameter('ok'); + unsetPostRequestParameter('stop'); if (($content['timestamp'] + getConfig('holiday_lock')) > time()) { // Mail found in pool @@ -110,18 +110,18 @@ SQL_FREERESULT($result2); if (isFormSent()) { // Check holiday request... - $START = mktime(0, 0, 0, postRequestElement('start_month'), postRequestElement('start_day'), postRequestElement('start_year')); - $content['holiday_end'] = mktime(0, 0, 0, postRequestElement('end_month') , postRequestElement('end_day') , postRequestElement('end_year') ); + $START = mktime(0, 0, 0, postRequestParameter('start_month'), postRequestParameter('start_day'), postRequestParameter('start_year')); + $content['holiday_end'] = mktime(0, 0, 0, postRequestParameter('end_month') , postRequestParameter('end_day') , postRequestParameter('end_year') ); // Test both values $TEST = $content['holiday_end'] - $START; if (($TEST < 0) || ($TEST > (getConfig('ONE_DAY') * getConfig('holiday_max'))) || ($START < time()) || ($content['holiday_end'] < time())) { // Time test failed - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); } else { // Everything went okay so let's store his request and send mails SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_holidays` (`userid`, `holiday_start`, `holiday_end`, `comments`) VALUES ('%s','%s','%s','%s')", - array(getMemberId(), $START, $content['holiday_end'], postRequestElement('comments')), __FILE__, __LINE__); + array(getMemberId(), $START, $content['holiday_end'], postRequestParameter('comments')), __FILE__, __LINE__); // Activate holiday system SQL_QUERY_ESC("UPDATE @@ -134,13 +134,13 @@ LIMIT 1", array(getMemberId()), __FILE__, __LINE__); // Prepare constants - $content['start_day'] = bigintval(postRequestElement('start_day')); - $content['start_month'] = $GLOBALS['month_descr'][postRequestElement('start_month')]; - $content['start_year'] = bigintval(postRequestElement('start_year')); - $content['end_day'] = bigintval(postRequestElement('end_day')); - $content['end_month'] = $GLOBALS['month_descr'][postRequestElement('end_month')]; - $content['end_year'] = bigintval(postRequestElement('end_year')); - $content['comments'] = secureString(postRequestElement('comments')); + $content['start_day'] = bigintval(postRequestParameter('start_day')); + $content['start_month'] = $GLOBALS['month_descr'][postRequestParameter('start_month')]; + $content['start_year'] = bigintval(postRequestParameter('start_year')); + $content['end_day'] = bigintval(postRequestParameter('end_day')); + $content['end_month'] = $GLOBALS['month_descr'][postRequestParameter('end_month')]; + $content['end_year'] = bigintval(postRequestParameter('end_year')); + $content['comments'] = secureString(postRequestParameter('comments')); // Send mail to member $message = loadEmailTemplate('member_holiday_request', $content, getMemberId()); @@ -158,7 +158,7 @@ LIMIT 1", } // END - if // Holiday shall be ended now -if (isPostRequestElementSet('stop')) { +if (isPostRequestParameterSet('stop')) { // Okay, end the holiday here... $result = SQL_QUERY_ESC("SELECT `holiday_active`, `holiday_activated` @@ -222,7 +222,7 @@ LIMIT 1", } // END - if // If something is wrong or link in menu is just clicked display form -if ((!isFormSent()) && (!isPostRequestElementSet('stop'))) { +if ((!isFormSent()) && (!isPostRequestParameterSet('stop'))) { // Check if user is in holiday... $result = SQL_QUERY_ESC("SELECT `holiday_active`, `holiday_activated` diff --git a/inc/modules/member/what-html_mail.php b/inc/modules/member/what-html_mail.php index 25fff7aec6..37db5aaa92 100644 --- a/inc/modules/member/what-html_mail.php +++ b/inc/modules/member/what-html_mail.php @@ -55,7 +55,7 @@ if ((!isExtensionActive('html_mail')) && (!isAdmin())) { if (isFormSent()) { // Save settings SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `html`='%s' WHERE `userid`=%s LIMIT 1", - array(postRequestElement('html'), getMemberId()), __FILE__, __LINE__); + array(postRequestParameter('html'), getMemberId()), __FILE__, __LINE__); loadTemplate('admin_settings_saved', false, getMessage('MEMBER_SETTINGS_SAVED')); } else { // Prepare it diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index 61de7486e9..4f5d1142d6 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -61,9 +61,9 @@ $URL = ''; // Detect what the member wants to do $mode = 'show'; // Show his data -if (isPostRequestElementSet('save')) $mode = 'save'; // Save entered data -if (isPostRequestElementSet('edit')) $mode = 'edit'; // Edit data -if (isPostRequestElementSet('notify')) $mode = 'notify'; // Switch off notification +if (isPostRequestParameterSet('save')) $mode = 'save'; // Save entered data +if (isPostRequestParameterSet('edit')) $mode = 'edit'; // Edit data +if (isPostRequestParameterSet('notify')) $mode = 'notify'; // Switch off notification switch ($mode) { case 'show': // Show his data @@ -201,13 +201,13 @@ LIMIT 1", // You cannot change your account loadTemplate('admin_settings_saved', false, $content['update_check']); - } elseif ((!isEmailValid(postRequestElement('email'))) && (!isAdmin())) { + } elseif ((!isEmailValid(postRequestParameter('email'))) && (!isAdmin())) { // Invalid email address! loadTemplate('admin_settings_saved', false, getMessage('INVALID_EMAIL_ENTERED')); } else { // Generate hash - $hash = generateHash(postRequestElement('pass1'), substr($content['password'], 0, -40)); - if ((($hash == $content['password']) || (postRequestElement('pass1') == postRequestElement('pass2'))) && (isPostRequestElementSet('pass1'))) { + $hash = generateHash(postRequestParameter('pass1'), substr($content['password'], 0, -40)); + if ((($hash == $content['password']) || (postRequestParameter('pass1') == postRequestParameter('pass2'))) && (isPostRequestParameterSet('pass1'))) { // Only on simple changes normal mode is active = no email or password changed $mode = 'normal'; $AND = ''; @@ -219,14 +219,14 @@ LIMIT 1", } // END - if // Or did he changed his password? - if (postRequestElement('email') != $content['email']) { + if (postRequestParameter('email') != $content['email']) { // Jupp if ($mode == 'normal') { $mode = 'email'; } else { $mode .= ';email'; } - setPostRequestElement('old_email', $content['email']); + setPostRequestParameter('old_email', $content['email']); } // END - if // Update member's profile @@ -248,18 +248,18 @@ WHERE `userid`=%s LIMIT 1", array( - postRequestElement('gender'), - postRequestElement('surname'), - postRequestElement('family'), - postRequestElement('street_nr'), - bigintval(postRequestElement('country_code')), - bigintval(postRequestElement('zip')), - postRequestElement('city'), - postRequestElement('email'), - bigintval(postRequestElement('day')), - bigintval(postRequestElement('month')), - bigintval(postRequestElement('year')), - bigintval(postRequestElement('max_mails')), + postRequestParameter('gender'), + postRequestParameter('surname'), + postRequestParameter('family'), + postRequestParameter('street_nr'), + bigintval(postRequestParameter('country_code')), + bigintval(postRequestParameter('zip')), + postRequestParameter('city'), + postRequestParameter('email'), + bigintval(postRequestParameter('day')), + bigintval(postRequestParameter('month')), + bigintval(postRequestParameter('year')), + bigintval(postRequestParameter('max_mails')), getMemberId() ), __FILE__, __LINE__); } else { @@ -280,18 +280,18 @@ WHERE `userid`=%s LIMIT 1", array( - postRequestElement('gender'), - postRequestElement('surname'), - postRequestElement('family'), - postRequestElement('street_nr'), - postRequestElement('cntry'), - bigintval(postRequestElement('zip')), - postRequestElement('city'), - postRequestElement('email'), - bigintval(postRequestElement('day')), - bigintval(postRequestElement('month')), - bigintval(postRequestElement('year')), - bigintval(postRequestElement('max_mails')), + postRequestParameter('gender'), + postRequestParameter('surname'), + postRequestParameter('family'), + postRequestParameter('street_nr'), + postRequestParameter('cntry'), + bigintval(postRequestParameter('zip')), + postRequestParameter('city'), + postRequestParameter('email'), + bigintval(postRequestParameter('day')), + bigintval(postRequestParameter('month')), + bigintval(postRequestParameter('year')), + bigintval(postRequestParameter('max_mails')), getMemberId() ), __FILE__, __LINE__); } diff --git a/inc/modules/member/what-nickname.php b/inc/modules/member/what-nickname.php index 33e0908c40..c69d7eec52 100644 --- a/inc/modules/member/what-nickname.php +++ b/inc/modules/member/what-nickname.php @@ -55,12 +55,12 @@ $isValid = false; if (isFormSent()) { // Nickname was submitted so let's check if it is not already in use - if (isPostRequestElementSet('nickname')) { + if (isPostRequestParameterSet('nickname')) { // Check if nickname is valid $PATTERN = '[' . getConfig('nickname_pattern') . ']{' . getConfig('nickname_len') . ',}'; - if (ereg($PATTERN, postRequestElement('nickname'), $array)) { + if (ereg($PATTERN, postRequestParameter('nickname'), $array)) { // Entered nickname is valid? - $isValid = ($array[0] == postRequestElement('nickname')); + $isValid = ($array[0] == postRequestParameter('nickname')); } // END - if } // END - if } // END - if @@ -68,11 +68,11 @@ if (isFormSent()) { if ($isValid === true) { // Look for nickname in database (we only need just one entry so don't worry about the "LIMIT 1" !) $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `nickname`='%s' AND `userid` != '%s' LIMIT 1", - array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__); + array(postRequestParameter('nickname'), getMemberId()), __FILE__, __LINE__); if (SQL_NUMROWS($result) == '0') { // Nickname not in use, so set it now SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `nickname`='%s' WHERE `userid`=%s LIMIT 1", - array(postRequestElement('nickname'), getMemberId()), __FILE__, __LINE__); + array(postRequestParameter('nickname'), getMemberId()), __FILE__, __LINE__); $content = getMessage('NICKNAME_SAVED'); } else { // Free result @@ -86,7 +86,7 @@ if ($isValid === true) { loadTemplate('admin_settings_saved', false, $content); } else { // Do we have already submit the form? - if (isPostRequestElementSet('nickname')) { + if (isPostRequestParameterSet('nickname')) { loadTemplate('admin_settings_saved', false, '
{--NICKNAME_IS_INVALID--}
'); } // END - if diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index d067869ada..a51cf0f7ea 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -96,7 +96,7 @@ $total = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTot if (($HOLIDAY == 'Y') && (getExtensionVersion('holiday') >= '0.1.3')) { // Holiday is active! loadTemplate('admin_settings_saved', false, getMessage('HOLIDAY_ORDER_NOT_POSSIBLE')); -} elseif ((isPostRequestElementSet('frametester')) && ($ALLOWED > 0) && (postRequestElement('receiver') > 0)) { +} elseif ((isPostRequestParameterSet('frametester')) && ($ALLOWED > 0) && (postRequestParameter('receiver') > 0)) { // Continue with the frametester, we first need to store the data temporary in the pool // // First we would like to store the data and get it's pool position back... @@ -110,7 +110,7 @@ WHERE LIMIT 1", array( getMemberId(), - postRequestElement('url'), + postRequestParameter('url'), getConfig('url_tlock') ), __FILE__, __LINE__); @@ -129,13 +129,13 @@ LIMIT 1", $URL = ''; if (getConfig('allow_url_in_text') == 'Y') { // Test submitted text against some filters (length, URLs in text etc.) - if ((strpos(strtolower(postRequestElement('text')), 'https://') > -1) || (strpos(strtolower(postRequestElement('text')), 'http://') > -1) || (strpos(strtolower(postRequestElement('text')), "www") > -1)) { + if ((strpos(strtolower(postRequestParameter('text')), 'https://') > -1) || (strpos(strtolower(postRequestParameter('text')), 'http://') > -1) || (strpos(strtolower(postRequestParameter('text')), "www") > -1)) { // URL found! $URL = 'modules.php?module=login&what=order&code=' . getCode('URL_FOUND'); } // END - if // Remove new-line and carriage-return characters - $TEST = str_replace("\n", '', str_replace("\r", '', postRequestElement('text'))); + $TEST = str_replace("\n", '', str_replace("\r", '', postRequestParameter('text'))); // Text length within allowed length? if (strlen($TEST) > getConfig('max_tlength')) { @@ -147,8 +147,8 @@ LIMIT 1", // Shall I test the subject line against URLs? if (getConfig('allow_url_in_subject') == 'Y') { // Check the subject line for issues - setPostRequestElement('subject', str_replace("\\", '[nl]', substr(postRequestElement('subject'), 0, 200))); - if ((strpos(strtolower(postRequestElement('subject')), 'http://') > -1) || (strpos(strtolower(postRequestElement('subject')), "www") > -1)) { + setPostRequestParameter('subject', str_replace("\\", '[nl]', substr(postRequestParameter('subject'), 0, 200))); + if ((strpos(strtolower(postRequestParameter('subject')), 'http://') > -1) || (strpos(strtolower(postRequestParameter('subject')), "www") > -1)) { // URL in subject found $URL = 'modules.php?module=login&what=order&code=' . getCode('SUBJ_URL'); } // END - if @@ -158,7 +158,7 @@ LIMIT 1", if (getConfig('url_blacklist') == 'Y') { // Ok, I do that for you know... $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS tstamp FROM `{?_MYSQL_PREFIX?}_url_blacklist` WHERE `url`='%s' LIMIT 1", - array(postRequestElement('url')), __FILE__, __LINE__); + array(postRequestParameter('url')), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // Jupp, we got one listed @@ -173,13 +173,13 @@ LIMIT 1", } // END - if // Enougth receivers entered? - if ((postRequestElement('receiver') < getConfig('order_min')) && (!isAdmin())) { + if ((postRequestParameter('receiver') < getConfig('order_min')) && (!isAdmin())) { // Less than allowed receivers entered! $URL = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS3'); } // END - if // Validate URL - if (!isUrlValid(postRequestElement('url'))) { + if (!isUrlValid(postRequestParameter('url'))) { // URL is invalid! $URL = 'modules.php?module=login&what=order&code=' . getCode('INVALID_URL'); } // END - if @@ -187,15 +187,15 @@ LIMIT 1", // Probe for HTML extension if (isExtensionActive('html_mail')) { // HTML or regular text mail? - if (postRequestElement('html') == 'Y') { + if (postRequestParameter('html') == 'Y') { // Chek for valid HTML tags - setPostRequestElement('text', checkHtmlTags(postRequestElement('text'))); + setPostRequestParameter('text', checkHtmlTags(postRequestParameter('text'))); // Maybe invalid tags found? - if (!isPostRequestElementSet('text')) $URL = 'modules.php?module=login&what=order&code=' . getCode('INVALID_TAGS')."&id=".$id; + if (!isPostRequestParameterSet('text')) $URL = 'modules.php?module=login&what=order&code=' . getCode('INVALID_TAGS')."&id=".$id; } else { // Remove any HTML code - setPostRequestElement('text', str_replace('<', '{OPEN_HTML}', str_replace('>', '{CLOSE_HTML}', postRequestElement('text')))); + setPostRequestParameter('text', str_replace('<', '{OPEN_HTML}', str_replace('>', '{CLOSE_HTML}', postRequestParameter('text')))); } } } elseif (!isAdmin()) { @@ -207,9 +207,9 @@ LIMIT 1", if (empty($URL)) { // Check if category and number of receivers is okay $add = ''; - if ((getConfig('order_multi_page') == 'Y') && (isPostRequestElementSet('zip'))) { + if ((getConfig('order_multi_page') == 'Y') && (isPostRequestParameterSet('zip'))) { // Choose recipients by ZIP code - $add = " AND d.zip LIKE '".bigintval(postRequestElement('zip'))."{PER}'"; + $add = " AND d.zip LIKE '".bigintval(postRequestParameter('zip'))."{PER}'"; } // END - if // Check for userids @@ -226,14 +226,14 @@ WHERE ORDER BY d.%s %s", array( - bigintval(postRequestElement('cat')), + bigintval(postRequestParameter('cat')), getMemberId(), getConfig('order_select'), getConfig('order_mode'), ), __FILE__, __LINE__); // Do we enougth receivers left? - if (SQL_NUMROWS($result) >= postRequestElement('receiver')) { + if (SQL_NUMROWS($result) >= postRequestParameter('receiver')) { // Check for holiday extensions $HOLIDAY = false; if (getExtensionVersion('holiday') >= '0.1.3') { @@ -281,13 +281,13 @@ LIMIT 1", array(convertReceivers($receiver), $content['target_send']), __FILE__, __LINE__); // Is calculated max receivers larger than wanted receivers then reset it - if ($content['target_send'] > postRequestElement('receiver')) $content['target_send'] = bigintval(postRequestElement('receiver')); + if ($content['target_send'] > postRequestParameter('receiver')) $content['target_send'] = bigintval(postRequestParameter('receiver')); // Calculate used points - $USED = $content['target_send'] * getPaymentPoints(bigintval(postRequestElement('type'))); + $USED = $content['target_send'] * getPaymentPoints(bigintval(postRequestParameter('type'))); // Fix empty zip code - if (!isPostRequestElementSet('zip')) setPostRequestElement('zip', 0); + if (!isPostRequestParameterSet('zip')) setPostRequestParameter('zip', 0); // Check if he has enougth points for this order and selected more than 0 receivers if (($USED > 0) && ($USED <= $total) && ($content['target_send'] > 0)) { @@ -301,15 +301,15 @@ LIMIT 1", VALUES ('%s','%s','%s','%s','%s','TEMP',UNIX_TIMESTAMP(),'%s','%s','%s','%s','%s')", array( getMemberId(), - postRequestElement('subject'), - postRequestElement('text'), + postRequestParameter('subject'), + postRequestParameter('text'), $receiver, - bigintval(postRequestElement('type')), - postRequestElement('url'), - bigintval(postRequestElement('cat')), + bigintval(postRequestParameter('type')), + postRequestParameter('url'), + bigintval(postRequestParameter('cat')), $content['target_send'], - bigintval(postRequestElement('zip')), - postRequestElement('html') + bigintval(postRequestParameter('zip')), + postRequestParameter('html') ), __FILE__, __LINE__); } else { // No HTML extension is active @@ -317,14 +317,14 @@ LIMIT 1", VALUES ('%s','%s','%s','%s','%s','TEMP',UNIX_TIMESTAMP(),'%s','%s','%s','%s')", array( getMemberId(), - postRequestElement('subject'), - postRequestElement('text'), + postRequestParameter('subject'), + postRequestParameter('text'), $receiver, - bigintval(postRequestElement('type')), - postRequestElement('url'), - bigintval(postRequestElement('cat')), + bigintval(postRequestParameter('type')), + postRequestParameter('url'), + bigintval(postRequestParameter('cat')), $content['target_send'], - bigintval(postRequestElement('zip')), + bigintval(postRequestParameter('zip')), ), __FILE__, __LINE__); } } else { @@ -348,15 +348,15 @@ WHERE `id`=%s LIMIT 1", array( - postRequestElement('subject'), - postRequestElement('text'), + postRequestParameter('subject'), + postRequestParameter('text'), $receiver, - bigintval(postRequestElement('type')), - postRequestElement('url'), - bigintval(postRequestElement('cat')), + bigintval(postRequestParameter('type')), + postRequestParameter('url'), + bigintval(postRequestParameter('cat')), $content['target_send'], - bigintval(postRequestElement('zip')), - postRequestElement('html'), + bigintval(postRequestParameter('zip')), + postRequestParameter('html'), bigintval($id) ), __FILE__, __LINE__); } else { @@ -377,14 +377,14 @@ WHERE `id`=%s LIMIT 1", array( - postRequestElement('subject'), - postRequestElement('text'), + postRequestParameter('subject'), + postRequestParameter('text'), $receiver, - bigintval(postRequestElement('type')), - postRequestElement('url'), - bigintval(postRequestElement('cat')), + bigintval(postRequestParameter('type')), + postRequestParameter('url'), + bigintval(postRequestParameter('cat')), $content['target_send'], - bigintval(postRequestElement('zip')), + bigintval(postRequestParameter('zip')), bigintval($id) ), __FILE__, __LINE__); } @@ -396,8 +396,8 @@ LIMIT 1", $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `sender`=%s AND `subject`='%s' AND `payment_id`=%s AND `data_type`='TEMP' AND `timestamp`=UNIX_TIMESTAMP() LIMIT 1", array( getMemberId(), - postRequestElement('subject'), - bigintval(postRequestElement('type')) + postRequestParameter('subject'), + bigintval(postRequestParameter('type')) ), __FILE__, __LINE__); // Get pool id @@ -421,7 +421,7 @@ LIMIT 1", $URL = 'modules.php?module=login&what=order&code=' . getCode('NO_RECS_LEFT'); } } -} elseif (postRequestElement('receiver') == '0') { +} elseif (postRequestParameter('receiver') == '0') { // Not enougth receivers selected $URL = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS1'); } elseif (($ALLOWED == '0') && (getConfig('order_max_full') == 'ORDER')) { @@ -448,7 +448,7 @@ ORDER BY // Enable HTML checking // @TODO Rewrite this to a filter $HTML = ''; $HOLIDAY = false; $HOL_STRING = ''; - if ((isExtensionActive('html_mail')) && (postRequestElement('html') == 'Y')) $HTML = " AND `html`='Y'"; + if ((isExtensionActive('html_mail')) && (postRequestParameter('html') == 'Y')) $HTML = " AND `html`='Y'"; if (getExtensionVersion('holiday') >= '0.1.3') { // Extension's version is fine $HOLIDAY = true; $HOL_STRING = " AND `holiday_active`='N'"; @@ -497,10 +497,10 @@ LIMIT 1", $result_ver = SQL_QUERY_ESC("SELECT `zip` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`=%s".$HTML." AND `receive_mails` > 0 AND `status`='CONFIRMED' LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); - if ((SQL_NUMROWS($result_ver) == 1) && (isPostRequestElementSet('zip')) && (getConfig('order_multi_page') == 'Y')) { + if ((SQL_NUMROWS($result_ver) == 1) && (isPostRequestParameterSet('zip')) && (getConfig('order_multi_page') == 'Y')) { // Get zip code list($zip) = SQL_FETCHROW($result_ver); - if (substr($zip, 0, strlen(postRequestElement('zip'))) == postRequestElement('zip')) { + if (substr($zip, 0, strlen(postRequestParameter('zip'))) == postRequestParameter('zip')) { // Ok, ZIP part is found $userid_cnt++; } // END - if @@ -528,7 +528,7 @@ LIMIT 1", $types = array(); if (SQL_NUMROWS($result) > 0) { // Check for message id in URL - $message = getMessageFromErrorCode(getRequestElement('code')); + $message = getMessageFromErrorCode(getRequestParameter('code')); if (!empty($message)) { // We got system message so we drop it out to the user @@ -605,7 +605,7 @@ LIMIT 1", // Free result SQL_FREERESULT($result); - if ((isPostRequestElementSet('data')) || ((getConfig('order_multi_page') != 'Y') && ((!isAdmin()) && (!isExtensionActive('html_mail'))))) { + if ((isPostRequestParameterSet('data')) || ((getConfig('order_multi_page') != 'Y') && ((!isAdmin()) && (!isExtensionActive('html_mail'))))) { // Pre-output categories $content['category_selection'] = ''; foreach ($categories['id'] as $key => $value) { @@ -626,15 +626,15 @@ LIMIT 1", } // END - if } // END - foreach - if (isPostRequestElementSet('zip')) { + if (isPostRequestParameterSet('zip')) { // Output entered ZIP code - $content['zip_content'] = loadTemplate('member_order-zip', true, postRequestElement('zip')); + $content['zip_content'] = loadTemplate('member_order-zip', true, postRequestParameter('zip')); } else { $content['zip_content'] = " "; } // HTML extension - if ((isExtensionActive('html_mail')) && (postRequestElement('html') == 'Y')) { + if ((isExtensionActive('html_mail')) && (postRequestParameter('html') == 'Y')) { // Extension is active so output valid HTML tags $content['html_extension'] = loadTemplate('member_order-html_ext', true, addValidHtmlTags()); } else { @@ -662,9 +662,9 @@ LIMIT 1", // Do we want ZIP code or not? if ((getConfig('order_multi_page') == 'Y') || (isAdmin())) { // Yes - if (postRequestElement('zip') > 0) { + if (postRequestParameter('zip') > 0) { $data = array( - 'zip' => bigintval(postRequestElement('zip')), + 'zip' => bigintval(postRequestParameter('zip')), 'add' => $add ); } else { diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 9d495c37d8..3a7c048194 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -65,7 +65,7 @@ $totalPoints = ($totalPoints - $usedPoints); // Sanity check... if (empty($totalPoints)) $totalPoints = '0.00000'; -if (!isGetRequestElementSet('payout')) { +if (!isGetRequestParameterSet('payout')) { // Load payout types $result = SQL_QUERY_ESC("SELECT `id`, `type`, `rate`, `min_points`, `allow_url` @@ -150,7 +150,7 @@ ORDER BY } else { // Chedk if he can get paid by selected type $result = SQL_QUERY_ESC("SELECT type, rate, min_points, allow_url AS allow FROM `{?_MYSQL_PREFIX?}_payout_types` WHERE `id`=%s LIMIT 1", - array(bigintval(getRequestElement('payout'))), __FILE__, __LINE__); + array(bigintval(getRequestParameter('payout'))), __FILE__, __LINE__); if (SQL_NUMROWS($result) == 1) { // id is valid so load the data @@ -162,8 +162,8 @@ ORDER BY // Calulcate points from submitted amount $points = '0'; - if (isPostRequestElementSet('payout')) { - $points = bigintval(postRequestElement('payout')) / $content['rate']; + if (isPostRequestParameterSet('payout')) { + $points = bigintval(postRequestParameter('payout')) / $content['rate']; $PAY_MAX = $max / $content['rate']; } @@ -172,8 +172,8 @@ ORDER BY // Ok, he can get be paid if ((isFormSent()) && ($points <= $PAY_MAX) && ($points >= $content['min_points'])) { // Remember points in array - setPostRequestElement('payout_points', translateComma($points)); - setPostRequestElement('type' , $content['type']); + setPostRequestParameter('payout_points', translateComma($points)); + setPostRequestParameter('type' , $content['type']); // Subtract points from member's account subtractPoints('payout', getMemberId(), $points); @@ -185,11 +185,11 @@ ORDER BY VALUES (%s,%s,%s, UNIX_TIMESTAMP(), 'NEW','%s','%s','%s')", array( getMemberId(), - bigintval(postRequestElement('payout')), - bigintval(getRequestElement('payout')), - postRequestElement('turl'), - postRequestElement('alt'), - postRequestElement('banner') + bigintval(postRequestParameter('payout')), + bigintval(getRequestParameter('payout')), + postRequestParameter('turl'), + postRequestParameter('alt'), + postRequestParameter('banner') ), __FILE__, __LINE__); // Load templates @@ -205,11 +205,11 @@ VALUES (%s,%s,%s, UNIX_TIMESTAMP(), 'NEW','%s','%s','%s')", VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')", array( getMemberId(), - bigintval(postRequestElement('payout')), - bigintval(postRequestElement('account')), - postRequestElement('bank'), - bigintval(getRequestElement('payout')), - postRequestElement('pass') + bigintval(postRequestParameter('payout')), + bigintval(postRequestParameter('account')), + postRequestParameter('bank'), + bigintval(getRequestParameter('payout')), + postRequestParameter('pass') ), __FILE__, __LINE__); // Load templates @@ -239,7 +239,7 @@ VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')", $content = array( 'max' => $max, 'type' => $content['type'], - 'payout' => bigintval(getRequestElement('payout')) + 'payout' => bigintval(getRequestParameter('payout')) ); // Generate banner order form @@ -249,7 +249,7 @@ VALUES (%s,%s,%s,'%s',%s, UNIX_TIMESTAMP(), 'NEW','%s')", $content = array( 'max' => $max, 'type' => $content['type'], - 'payout' => bigintval(getRequestElement('payout')) + 'payout' => bigintval(getRequestParameter('payout')) ); // Generate normal form diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index f87b0b5ba6..505bd1e70b 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -65,14 +65,14 @@ $content = array(); $points = false; // Is the mode set (payout only) -if (!isGetRequestElementSet('mode')) { +if (!isGetRequestParameterSet('mode')) { // Get referal id $content['refid'] = getConfig(('primera_refid')); // Is there an id? - if ((!empty($content['primera_nickname'])) && (!isGetRequestElementSet('mode'))) { + if ((!empty($content['primera_nickname'])) && (!isGetRequestParameterSet('mode'))) { // Then use an other "mode" - setGetRequestElement('mode', 'list'); + setGetRequestParameter('mode', 'list'); // And load all rows! $result = SQL_QUERY_ESC("SELECT `id`,`primera_account`,`primera_amount`,`primera_timestamp`,`primera_type` FROM `{?_MYSQL_PREFIX?}_user_primera` WHERE `userid`=%s ORDER BY `primera_timestamp` DESC", @@ -100,11 +100,11 @@ if (!isGetRequestElementSet('mode')) { SQL_FREERESULT($result); } else { // Mode pay - setGetRequestElement('mode', 'pay'); + setGetRequestParameter('mode', 'pay'); } } // END - if -if (getRequestElement('mode') == 'pay') { +if (getRequestParameter('mode') == 'pay') { // Get total points and check if the user can request a payout $points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points'); @@ -126,37 +126,37 @@ if (getRequestElement('mode') == 'pay') { $content['points'] = $points; } else { // Invalid mode! - loadTemplate('admin_settings_saved', false, getMaskedMessage('PRIMERA_MEMBER_MODE_INVALID', getRequestElement('mode'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('PRIMERA_MEMBER_MODE_INVALID', getRequestParameter('mode'))); return; } // Is the formular sent? -if ((isFormSent()) && (isGetRequestElementSet('mode'))) { +if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { // Check input data depending on the mode and execute the requested mode - switch (getRequestElement('mode')) { + switch (getRequestParameter('mode')) { case 'pay': // Payout this exchange -> Primus // Is the user id and password set? - if (!isPostRequestElementSet(('primera_nickname'))) { + if (!isPostRequestParameterSet(('primera_nickname'))) { // Nothing entered in Primus nickname loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_EMPTY_USERNAME')); - } elseif (!isPostRequestElementSet(('primera_password'))) { + } elseif (!isPostRequestParameterSet(('primera_password'))) { // Nothing entered in Primera password loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_EMPTY_PASSWORD')); - } elseif (!isPostRequestElementSet(('amount'))) { + } elseif (!isPostRequestParameterSet(('amount'))) { // Nothing entered in amount loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_EMPTY_AMOUNT')); - } elseif (postRequestElement('amount') != bigintval(postRequestElement('amount'))) { + } elseif (postRequestParameter('amount') != bigintval(postRequestParameter('amount'))) { // Only numbers in amount! loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_INVALID_AMOUNT')); - } elseif (postRequestElement('amount') < getConfig('primera_min_payout')) { + } elseif (postRequestParameter('amount') < getConfig('primera_min_payout')) { // Not enougth entered! loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_AMOUNT_SMALLER_MIN')); - } elseif (postRequestElement('amount') > $points) { + } elseif (postRequestParameter('amount') > $points) { // Not enougth points left! - loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestElement('amount')), bigintval($points))); + loadTemplate('admin_settings_saved', false, sprintf(getMessage('PRIMERA_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestParameter('amount')), bigintval($points))); } else { // All is fine here so do the payout - $success = executePrimeraPayout(postRequestElement('primera_nickname'), md5(postRequestElement('primera_password')), postRequestElement('amount')); + $success = executePrimeraPayout(postRequestParameter('primera_nickname'), md5(postRequestParameter('primera_password')), postRequestParameter('amount')); if ($success) { // Default is locked! $locked = true; @@ -168,11 +168,11 @@ if ((isFormSent()) && (isGetRequestElementSet('mode'))) { } // END - if // Remove points from account - subtractPoints('primera_payout', getMemberId(), postRequestElement('amount')); + subtractPoints('primera_payout', getMemberId(), postRequestParameter('amount')); // Update primera nickname SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `primera_nickname`=%s WHERE `userid`=%s LIMIT 1", - array(postRequestElement('primera_nickname'), getMemberId()), __FILE__, __LINE__); + array(postRequestParameter('primera_nickname'), getMemberId()), __FILE__, __LINE__); // All done! loadTemplate('admin_settings_saved', false, getMessage('PRIMERA_MEMBER_PAYOUT_DONE')); @@ -188,14 +188,14 @@ if ((isFormSent()) && (isGetRequestElementSet('mode'))) { break; default: // Invalid mode! - logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestElement('mode'))); - loadTemplate('admin_settings_saved', false, getMaskedMessage('PRIMERA_MEMBER_MODE_INVALID', getRequestElement('mode'))); + logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestParameter('mode'))); + loadTemplate('admin_settings_saved', false, getMaskedMessage('PRIMERA_MEMBER_MODE_INVALID', getRequestParameter('mode'))); return; } } // END - if // Prepare mode for template name -$mode = sprintf("member_primera_mode_%s", getRequestElement('mode')); +$mode = sprintf("member_primera_mode_%s", getRequestParameter('mode')); // Load the template loadTemplate($mode, false, $content); diff --git a/inc/modules/member/what-refback.php b/inc/modules/member/what-refback.php index 11f28a843f..50c1f59eb1 100644 --- a/inc/modules/member/what-refback.php +++ b/inc/modules/member/what-refback.php @@ -61,16 +61,16 @@ if ((!isExtensionActive('refback')) && (!isAdmin())) { } // END - if // Was the form submitted? -if ((isPostRequestElementSet('edit')) && (isPostRequestElementSet('id'))) { +if ((isPostRequestParameterSet('edit')) && (isPostRequestParameterSet('id'))) { // Okay, has the user entered some values? - if (isPostRequestElementSet('percents')) { + if (isPostRequestParameterSet('percents')) { // Revert german commta for testing - $percents = convertCommaToDot(postRequestElement('percents')); + $percents = convertCommaToDot(postRequestParameter('percents')); // Validate percents if ((($percents >= getConfig('refback_min_perc')) || (round($percents) == '0')) && ($percents <= getConfig('refback_max_perc'))) { // Change ref-back for this direct id - $status = updateMemberRefbackPercents(postRequestElement('id'), postRequestElement('percents')); + $status = updateMemberRefbackPercents(postRequestParameter('id'), postRequestParameter('percents')); // Check status if (isset($status['ok'])) { @@ -91,7 +91,7 @@ if ((isPostRequestElementSet('edit')) && (isPostRequestElementSet('id'))) { // Insert line } else { // Read data from refback table - $content = getArrayFromUserRefbackData(postRequestElement('id')); + $content = getArrayFromUserRefbackData(postRequestParameter('id')); // Translate comma $content['refback'] = translateComma($content['refback']); diff --git a/inc/modules/member/what-support.php b/inc/modules/member/what-support.php index 44276318a9..e3539424db 100644 --- a/inc/modules/member/what-support.php +++ b/inc/modules/member/what-support.php @@ -51,20 +51,20 @@ if ((!isExtensionActive('support')) && (!isAdmin())) { return; } // END - if -if ((!isFormSent()) || (!isPostRequestElementSet(('qsummary')))) { +if ((!isFormSent()) || (!isPostRequestParameterSet(('qsummary')))) { // Output form loadTemplate('member_support_form', false, getUserDataArray()); } else { // Load mail template based on your member's decision if (getExtensionVersion('admins') >= '0.4.1') { - $a_tpl = 'admin_support-' . postRequestElement('qsummary'); + $a_tpl = 'admin_support-' . postRequestParameter('qsummary'); } else { - $message_a = loadEmailTemplate('admin_support-' . postRequestElement('qsummary'), array('text' => postRequestElement('qdetails')), getMemberId()); + $message_a = loadEmailTemplate('admin_support-' . postRequestParameter('qsummary'), array('text' => postRequestParameter('qdetails')), getMemberId()); } - $message_m = loadEmailTemplate('member_support-' . postRequestElement('qsummary'), array('text' => postRequestElement('qdetails')), getMemberId()); + $message_m = loadEmailTemplate('member_support-' . postRequestParameter('qsummary'), array('text' => postRequestParameter('qdetails')), getMemberId()); // Select right subject - switch (postRequestElement('qsummary')) { + switch (postRequestParameter('qsummary')) { case 'ordr': $subj_a = getMessage('SUPPORT_SUBJ_ADMIN_ORDER'); $subj_m = getMessage('SUPPORT_SUBJ_MEMBER_ORDER'); @@ -82,13 +82,13 @@ if ((!isFormSent()) || (!isPostRequestElementSet(('qsummary')))) { } // END - switch // Send mail to admin - sendAdminNotification($subj_a, $a_tpl, array('text' => postRequestElement('qdetails')), getMemberId()); + sendAdminNotification($subj_a, $a_tpl, array('text' => postRequestParameter('qdetails')), getMemberId()); // Send mail to user sendEmail(getMemberId(), $subj_m, $message_m); // Drop a message in the admin's area - createNewTask($subj_a, postRequestElement('qsummary') . ' : ' . postRequestElement('qdetails'), 'SUPPORT_MEMBER', getMemberId()); + createNewTask($subj_a, postRequestParameter('qsummary') . ' : ' . postRequestParameter('qdetails'), 'SUPPORT_MEMBER', getMemberId()); // Form sent loadTemplate('member_support_contcted'); diff --git a/inc/modules/member/what-surfbar_book.php b/inc/modules/member/what-surfbar_book.php index 50553b5d6e..f712de3e64 100644 --- a/inc/modules/member/what-surfbar_book.php +++ b/inc/modules/member/what-surfbar_book.php @@ -56,15 +56,15 @@ if ((!isExtensionActive('surfbar')) && (!isAdmin())) { if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { // No more URLs allowed to book! loadTemplate('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_NO_MORE_ALLOWED')); -} elseif ((isFormSent()) && (isPostRequestElementSet(('limited')))) { +} elseif ((isFormSent()) && (isPostRequestParameterSet(('limited')))) { // Is limitation "no" and "limit" is > 0? - if ((postRequestElement('limited') != 'Y') && ((isPostRequestElementSet(('limit'))) && (postRequestElement('limit') > 0)) || (!isPostRequestElementSet(('limit')))) { + if ((postRequestParameter('limited') != 'Y') && ((isPostRequestParameterSet(('limit'))) && (postRequestParameter('limit') > 0)) || (!isPostRequestParameterSet(('limit')))) { // Set it to unlimited - setPostRequestElement('limit', 0); + setPostRequestParameter('limit', 0); } // END - if // Register the new URL - $insertId = SURFBAR_MEMBER_ADD_URL(postRequestElement('url'), postRequestElement('limit')); + $insertId = SURFBAR_MEMBER_ADD_URL(postRequestParameter('url'), postRequestParameter('limit')); // By default something went wrong $message = getMessage('MEMBER_SURFBAR_URL_NOT_ADDED'); diff --git a/inc/modules/member/what-surfbar_list.php b/inc/modules/member/what-surfbar_list.php index 48b0f136c4..b096222d07 100644 --- a/inc/modules/member/what-surfbar_list.php +++ b/inc/modules/member/what-surfbar_list.php @@ -55,11 +55,11 @@ if ((!isExtensionActive('surfbar')) && (!isAdmin())) { $URLs = SURFBAR_GET_USER_URLS(); // Are there entries or form is submitted? -if ((isFormSent()) && (isPostRequestElementSet(('action'))) && (isPostRequestElementSet('id'))) { +if ((isFormSent()) && (isPostRequestParameterSet(('action'))) && (isPostRequestParameterSet('id'))) { // Process the form if (SURFBAR_MEMBER_DO_FORM(postRequestArray(), $URLs)) { // Action performed but shall we display it? - if (((postRequestElement('action') != 'edit') && (postRequestElement('action') != "delete")) || (isPostRequestElementSet(('execute')))) { + if (((postRequestParameter('action') != 'edit') && (postRequestParameter('action') != "delete")) || (isPostRequestParameterSet(('execute')))) { // Display "action done" message if action is wether 'edit' nor 'delete' or has been executed loadTemplate('admin_settings_saved', false, getMessage('MEMBER_SURFBAR_ACTION_DONE')); } // END - if diff --git a/inc/modules/member/what-themes.php b/inc/modules/member/what-themes.php index 5a7b2343cf..3f1a845950 100644 --- a/inc/modules/member/what-themes.php +++ b/inc/modules/member/what-themes.php @@ -51,13 +51,13 @@ if ((!isExtensionActive('theme')) && (!isAdmin())) { return; } // END - if -if (isPostRequestElementSet('member_theme')) { +if (isPostRequestParameterSet('member_theme')) { // Save theme to member's profile SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `curr_theme`='%s' WHERE `userid`=%s LIMIT 1", - array(postRequestElement('member_theme'), getMemberId()), __FILE__, __LINE__); + array(postRequestParameter('member_theme'), getMemberId()), __FILE__, __LINE__); // Set new theme for guests - $newTheme = SQL_ESCAPE(postRequestElement('member_theme')); + $newTheme = SQL_ESCAPE(postRequestParameter('member_theme')); // Change to new theme setTheme($newTheme); diff --git a/inc/modules/member/what-transfer.php b/inc/modules/member/what-transfer.php index d4c987d89f..a41be9a31e 100644 --- a/inc/modules/member/what-transfer.php +++ b/inc/modules/member/what-transfer.php @@ -53,7 +53,7 @@ if ((!isExtensionActive('transfer')) && (!isAdmin())) { // Check for mode in GET $mode = ''; -if (isGetRequestElementSet('mode')) $mode = getRequestElement('mode'); +if (isGetRequestParameterSet('mode')) $mode = getRequestParameter('mode'); // Check for "faker" if ((getUserData('opt_in') != 'Y') && ($mode == 'new')) $mode = ''; @@ -70,24 +70,24 @@ switch ($mode) { // Add new transfer if (getConfig('transfer_code') > 0) { // Check for code - $code = generateRandomCode(getConfig('transfer_code'), postRequestElement('code_chk'), getMemberId(), $content['max_transferable']); - $valid_code = ($code == postRequestElement('code')); + $code = generateRandomCode(getConfig('transfer_code'), postRequestParameter('code_chk'), getMemberId(), $content['max_transferable']); + $valid_code = ($code == postRequestParameter('code')); } else { // Zero length (= disabled) is always valid! $valid_code = true; } // Test password - $valid_pass = ($pass == generateHash(postRequestElement('password'), $pass)); + $valid_pass = ($pass == generateHash(postRequestParameter('password'), $pass)); // Test transfer amount - $valid_amount = ((isPostRequestElementSet('points')) && (postRequestElement('points') <= $content['max_transferable'])); + $valid_amount = ((isPostRequestParameterSet('points')) && (postRequestParameter('points') <= $content['max_transferable'])); // Test reason for transfer - $valid_reason = (isPostRequestElementSet('reason')); + $valid_reason = (isPostRequestParameterSet('reason')); // Test if a recipient is selected - $valid_recipient = (postRequestElement('to_userid') > 0); + $valid_recipient = (postRequestParameter('to_userid') > 0); // Check for nickname extension and set additional data // @TODO Rewrite this to a filter @@ -100,7 +100,7 @@ switch ($mode) { $result = SQL_QUERY_ESC("SELECT `userid`, `gender`, `surname`, `family`, `email`".$add." FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid` IN ('%s','%s') AND `status`='CONFIRMED' LIMIT 2", array( getMemberId(), - bigintval(postRequestElement('to_userid')) + bigintval(postRequestParameter('to_userid')) ), __FILE__, __LINE__); // Do we have two entries? @@ -129,7 +129,7 @@ switch ($mode) { // Default is userids for subject line $SENDER = getMemberId(); - $RECIPIENT = bigintval(postRequestElement('to_userid')); + $RECIPIENT = bigintval(postRequestParameter('to_userid')); // If nickname is installed we can set the nickname // @TODO Rewrite this to a filter @@ -138,32 +138,32 @@ switch ($mode) { $SENDER = $content['sender']['nickname']; } - if (($TEST_NICK_REC != postRequestElement('to_userid')) && (!empty($TEST_NICK_REC))) { + if (($TEST_NICK_REC != postRequestParameter('to_userid')) && (!empty($TEST_NICK_REC))) { $RECIPIENT = $content['recipient']['nickname']; } } // END - if // Remember transfer reason and fancy date/time in constants - $content['reason'] = secureString(postRequestElement('reason')); + $content['reason'] = secureString(postRequestParameter('reason')); $content['expires'] = createFancyTime(getConfig('transfer_age')); // Generate tranafer id - $content['trans_id'] = bigintval(generateRandomCode('10', mt_rand(0, 99999), getMemberId(), postRequestElement('reason'))); + $content['trans_id'] = bigintval(generateRandomCode('10', mt_rand(0, 99999), getMemberId(), postRequestParameter('reason'))); // Add entries to both tables SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_transfers_in` (`userid`, `from_userid`, `points`, `reason`, `time_trans`, `trans_id`) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')", - array(bigintval(postRequestElement('to_userid')), getMemberId(), bigintval(postRequestElement('points')), postRequestElement('reason'), $content['trans_id']), __FILE__, __LINE__); + array(bigintval(postRequestParameter('to_userid')), getMemberId(), bigintval(postRequestParameter('points')), postRequestParameter('reason'), $content['trans_id']), __FILE__, __LINE__); SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_transfers_out` (`userid`, `to_userid`, `points`, `reason`, `time_trans`, `trans_id`) VALUES ('%s','%s','%s','%s', UNIX_TIMESTAMP(),'%s')", - array(getMemberId(), bigintval(postRequestElement('to_userid')), bigintval(postRequestElement('points')), postRequestElement('reason'), $content['trans_id']), __FILE__, __LINE__); + array(getMemberId(), bigintval(postRequestParameter('to_userid')), bigintval(postRequestParameter('points')), postRequestParameter('reason'), $content['trans_id']), __FILE__, __LINE__); // Add points to account *directly* ... - addPointsDirectly('member_transfer', bigintval(postRequestElement('to_userid')), bigintval(postRequestElement('points'))); + addPointsDirectly('member_transfer', bigintval(postRequestParameter('to_userid')), bigintval(postRequestParameter('points'))); // ... and add it to current user's used points - subtractPoints('transfer', getMemberId(), postRequestElement('points')); + subtractPoints('transfer', getMemberId(), postRequestParameter('points')); // First send email to recipient - $message = loadEmailTemplate('member_transfer_recipient', $content, postRequestElement('to_userid')); + $message = loadEmailTemplate('member_transfer_recipient', $content, postRequestParameter('to_userid')); sendEmail($content['recipient']['email'], getMessage('TRANSFER_MEMBER_RECIPIENT_SUBJ') . ': ' . $SENDER, $message); // Second send email to sender @@ -179,27 +179,27 @@ switch ($mode) { } elseif ($valid_code === false) { // Invalid Touring code! loadTemplate('admin_settings_saved', false, '
{--TRANSFER_INVALID_CODE--}
'); - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); } elseif ($valid_pass === false) { // Wrong password entered loadTemplate('admin_settings_saved', false, '
{--TRANSFER_INVALID_PASSWORD--}
'); - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); } elseif ($valid_amount === false) { // Too much points entered loadTemplate('admin_settings_saved', false, '
{--TRANSFER_INVALID_POINTS--}
'); - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); } elseif ($valid_reason === false) { // No transfer reason entered loadTemplate('admin_settings_saved', false, '
{--TRANSFER_INVALID_REASON--}
'); - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); } elseif ($valid_recipient === false) { // No recipient selected loadTemplate('admin_settings_saved', false, '
{--TRANSFER_INVALID_RECIPIENT--}
'); - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); } elseif ($valid_data === false) { // No recipient/sender selected loadTemplate('admin_settings_saved', false, '
{--TRANSFER_INVALID_DATA--}
'); - unsetPostRequestElement('ok'); + unsetPostRequestParameter('ok'); } // Free result @@ -225,7 +225,7 @@ switch ($mode) { // @TODO Try to rewrite his to $content = SQL_FETCHARRAY(), see some lines above for two different queries while (list($userid, $nick) = SQL_FETCHROW($result)) { $OUT .= "