- 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
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
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
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)
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
redirectOnUninstalledExtension('beg');
// Check for userid
-if (isGetRequestElementSet('userid')) {
+if (isGetRequestParameterSet('userid')) {
// Init variables
$points = '0';
$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
$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);
$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 {
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
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).")<br />");
+//* DEBUG: */ outputHtml("userid=".$userid.",chk=".$chk." (".strlen($chk).'/'.strlen(getRequestParameter('check')).'/'.SQL_NUMROWS($result).")<br />");
// Prepare content
$content = array();
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
$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
// 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!
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
// 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?
} // 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');
$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);
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. ^^^
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');
} 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');
}
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?
// 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'");
// 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');
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
// 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! :-)
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
$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 .= '<strong>-';
} else {
$NAV .= '<a href="{%url=modules.php?module=admin&what=' . getWhat() . '&page=' . $page . '&offset=' . $offset;
// Add userid when we shall show all mails from a single member
- if ((isGetRequestElementSet('userid')) && (bigintval(getRequestElement('userid')) > 0)) $NAV .= '&userid=' . bigintval(getRequestElement('userid'));
+ if ((isGetRequestParameterSet('userid')) && (bigintval(getRequestParameter('userid')) > 0)) $NAV .= '&userid=' . bigintval(getRequestParameter('userid'));
// Close open anchor tag
$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 .= '-</strong>';
} else {
$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 {
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--}<br />\n{--MEMBER_BLIST_TIME--}: ".generateDateTime(getRequestElement('blist'), 0); break;
+ case getCode('BLIST_URL') : $message = "{--MEMBER_URL_BLACK_LISTED--}<br />\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;
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');
}
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);
// 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'));
// 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);
$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();
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
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
} // 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
// 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);
// 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('<div class="para">' . getMessage('INSTALL_SMTP_HOSTNAME_EMPTY') . '</div>');
- 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('<div class="para">' . getMessage('INSTALL_SMTP_PASS1_EMPTY') . '</div>');
- 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('<div class="para">' . getMessage('INSTALL_SMTP_PASS2_EMPTY') . '</div>');
- 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('<div class="para">' . getMessage('INSTALL_SMTP_PASS_MISMATCH') . '</div>');
- 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;
$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);
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');
$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
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 = '';
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();
// 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)) {
$OUT .= ' <input type="hidden" name="mysql[' . $key . ']" value="' . $value . '" />';
} // 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);
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', '<div class="install_error">{--WRONG_PAGE--}</div>');
break;
} // END - switch
// 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
// Prepare content
$content = array(
- 'restart' => bigintval(getRequestElement('restart')),
- 'autostart' => getRequestElement('autostart')
+ 'restart' => bigintval(getRequestParameter('restart')),
+ 'autostart' => getRequestParameter('autostart')
);
// Load template
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();
'ADMIN_NETWORK_DATA_NOT_ADDED' => "Das Werbenetzwerk mit dem Kurznamen <span class=\"data\">%s</span> wurde nicht hinzugefügt.",
'ADMIN_NETWORK_TYPES_404' => "Es wurden keine Werbearten-Handler zum Werbenetzwerk <span class=\"data\">%s</span> gefunden.",
'ADMIN_NETWORK_TYPES_HANDLE_ALREADY_ADDED' => "Ein Werbeart-Handler <span class=\"data\">%s</span> existiert bereits.",
+ 'ADMIN_NETWORK_REQUEST_PARAMETER_ALREADY_ADDED' => "Ein API-Abfrageparameter <span class=\"data\">%s</span> existiert bereits.",
'ADMIN_NETWORK_TYPES_NOT_ADDED' => "Der Werbeart-Handler <span class=\"data\">%s</span> 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 <span class=\"data\">%s</span> gefunden.",
+ 'ADMIN_NETWORK_REQUEST_PARAMETER_NOT_ADDED' => "Der API-Abfrageparameter <span class=\"data\">%s</span> 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",
'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 <span class=\"data\">%s</span> Einträge in den allgemeinen Daten aktualisiert.",
'ADMIN_NETWORK_REMOVED' => "Es wurden <span class=\"data\">%s</span> Einträge aus den allgemeinen Daten gelöscht.",
'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 <a href=\"http://forum.mxchange.org/forum-43.html\" rel=\"external\" title=\"Direkt-Link zur Forumkategorie Werbenetzwerke\" target=\"_blank\">dem Forum</a> 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 <a href=\"http://forum.mxchange.org/forum-43.html\" target=\"_blank\" title=\"Direktlink zum Forum\">im Forum</a> 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 <a href=\"http://forum.mxchange.org/forum-43.html\" target=\"_blank\" title=\"Direktlink zum Forum\">im Forum</a> 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",
'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",
));
$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'] .= '<div class="tiny">' . getMessage('BONUS_LOGIN_BONUS_ADDED') . '</div>';
} elseif (isExtensionActive('bonus')) {
// 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 {
// 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
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
// 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
)", __FUNCTION__, __LINE__);
// Add the id for output only
- setPostRequestElement('network_id', SQL_INSERTID());
+ setPostRequestParameter('network_id', SQL_INSERTID());
// Output message
if (SQL_AFFECTEDROWS() == 1) {
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')));
}
}
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
// Add color
$networkData['sw'] = $SW;
- if (isPostRequestElementSet('edit')) {
+ if (isPostRequestParameterSet('edit')) {
// Make selection box for network_request_type
$networkData['network_request_type'] = generateOptionList(
'/ARRAY/',
// 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']);
// 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!
// 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
// 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'] = '---';
// 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!
$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
$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
// 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
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')));
}
}
$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
$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
} // 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]
?>
// 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
// 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
// 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
// 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);
);
// 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"';
// 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);
$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
// 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
// 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);
// 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
// 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 .= '<strong>' . $ltr . '</strong>';
} else {
// Output link to letter
$OUT .= '<a href="{%url=modules.php?module=admin&what=' . getWhat();
- if (isGetRequestElementSet('mode')) $OUT .= '&mode=' . getRequestElement('mode');
+ if (isGetRequestParameterSet('mode')) $OUT .= '&mode=' . getRequestParameter('mode');
$OUT .= '&letter=' . $ltr . '&sortby=' . $sortby . $add . '%}">' . $ltr . '</a>';
}
// 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');
$OUT = '';
for ($page = 1; $page <= $PAGES; $page++) {
- if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) {
+ if (($page == getRequestParameter('page')) || ((!isGetRequestParameterSet('page')) && ($page == 1))) {
$OUT .= '<strong>-';
} 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 .= '<a href="{%url=modules.php?module=admin&what=' . getWhat();
// Add status or mode
- if (isGetRequestElementSet('status')) $OUT .= '&mode=' . getRequestElement('status');
- elseif (isGetRequestElementSet('mode')) $OUT .= '&mode=' . getRequestElement('mode');
+ if (isGetRequestParameterSet('status')) $OUT .= '&mode=' . getRequestParameter('status');
+ elseif (isGetRequestParameterSet('mode')) $OUT .= '&mode=' . getRequestParameter('mode');
// Letter and so on
- $OUT .= '&letter=' . getRequestElement('letter') . '&sortby=' . getRequestElement('sortby') . '&page=' . $page . '&offset=' . $offset . '%}">';
+ $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 .= '-</strong>';
} else {
$OUT .= '</a>';
}
// 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('<strong>{--LANG_WARNING--}:</strong>');
if (isInstalled()) {
} // 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';
// 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) {
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
$content['pass2_message'] = '';
// Yet-another notice-fix
- if ((isFormSent()) && (postRequestElement('ok') == '***')) {
+ if ((isFormSent()) && (postRequestParameter('ok') == '***')) {
// Init variables
$loginMessage = '';
$pass1Message = '';
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');
// 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
// 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'));
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) {
// 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--} [<a href="{%url=modules.php?module=admin&reset_pass=1%}">{--ADMIN_RESET_PASS--}</a>]';
destroyAdminSession();
break;
// 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
$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);
// 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'));
// 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));
$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');
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;
// 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');
}
} // 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');
}
// Send email out
- sendEmail(postRequestElement('userid_raw', $id), $subjectLine, $mail);
+ sendEmail(postRequestParameter('userid_raw', $id), $subjectLine, $mail);
} // END - if
// Generate subject
// 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));
}
}
$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__);
// 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';
adminsChangeAdminAccount($postData, 'expert_warning');
// Clear form
- unsetPostRequestElement('ok');
+ unsetPostRequestParameter('ok');
} // END - if
// All fine!
// 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",
$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']));
// 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'] = '<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['surname'] . ' ' . $content['family'] . '</a>';
- $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, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
+ loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '</div>');
}
} else {
// Output selection form with all confirmed user accounts listed
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",
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);
addMenuDescription('admin', __FILE__);
// Was an URL added?
-if ((isPostRequestElementSet('add')) && (isPostRequestElementSet('url'))) {
+if ((isPostRequestParameterSet('add')) && (isPostRequestParameterSet('url'))) {
// Initialize variables
$DATA = array();
$id = 'reload_ye';
$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
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()) {
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__
);
}
// 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",
// 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",
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);
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__);
}
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
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);
}
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__);
}
}
// 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;
// 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
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
// 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__);
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']);
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
// 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__);
// 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
// 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__);
// 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
// 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');
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);
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);
// 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 {
// 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');
// 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__);
// 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__);
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();
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!
// 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');
// 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__);
// 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__);
// 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
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
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');
}
}
// 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",
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));
}
// 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()) {
// 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
$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',
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));
}
}
} 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__);
// 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
} 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);
$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__);
}
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");
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
// 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) {
// 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);
// 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);
// 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 {
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. :) )
// 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 {
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
} 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);
`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__);
}
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__);
$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--}<a href="{%url=modules.php?module=admin&what=config_rallye_prices&rallye=' . getRequestElement('rallye') . '%}">{--RALLYE_NO_PRICES_SELECTED_2--}</a>{--RALLYE_NO_PRICES_SELECTED_3--}';
+ $content = '{--RALLYE_NO_PRICES_SELECTED_1--}<a href="{%url=modules.php?module=admin&what=config_rallye_prices&rallye=' . getRequestParameter('rallye') . '%}">{--RALLYE_NO_PRICES_SELECTED_2--}</a>{--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__);
$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--}<a href="{%url=modules.php?module=admin&what=config_rallye_prices&rallye=' . getRequestElement('rallye') . '%}">{--RALLYE_NO_PRICES_SELECTED_2--}</a>{--RALLYE_NO_PRICES_SELECTED_3--}';
+ $content = '{--RALLYE_NO_PRICES_SELECTED_1--}<a href="{%url=modules.php?module=admin&what=config_rallye_prices&rallye=' . getRequestParameter('rallye') . '%}">{--RALLYE_NO_PRICES_SELECTED_2--}</a>{--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
$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);
}
// 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
// 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__);
}
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();
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
}
// 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();
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');
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 {
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();
// 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();
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();
// 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) {
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);
$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;
$cnt += SQL_AFFECTEDROWS();
// Load template for link
- loadTemplate('admin_settings_saved', false, '<a href="{%url=modules.php?module=admin&what=del_email&pid=' . bigintval(getRequestElement('mid')) . '%}">{--ADMIN_REMOVE_STATS_ENTRY--}</a>');
+ loadTemplate('admin_settings_saved', false, '<a href="{%url=modules.php?module=admin&what=del_email&pid=' . bigintval(getRequestParameter('mid')) . '%}">{--ADMIN_REMOVE_STATS_ENTRY--}</a>');
} // END - if
// Free the result
// 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
// 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) {
$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
// 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) {
// 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
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`
}
}
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');
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);
`{?_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');
// 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()) {
// 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
// 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",
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, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
+ loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '</div>');
}
-} 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, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
+ loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '</div>');
}
}
// 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__);
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`
`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) {
// 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`,
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) {
$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);
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);
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
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;
}
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
// 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`,
`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) {
`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 {
}
} else {
// Account does not exists!
- loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
+ loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '</div>');
}
// Free the result
$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__);
$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'))) {
$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;
// 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!
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);
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",
} 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
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();
// 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);
// 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
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()) {
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'));
// 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",
// 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();
$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",
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__);
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",
// 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);
}
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
// 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
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;
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;
// 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' , '<a href="{%url=modules.php?module=admin&userid=');
- $content['userid'] = bigintval(getRequestElement('userid'));
+ $content['userid'] = bigintval(getRequestParameter('userid'));
$content['member_links'] = generateMemberAdminActionLinks($content['userid']);
$content['email'] = '<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['surname'] . ' ' . $content['family'] . '</a>';
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 = "<font color=\"#ee0000\">{--NO--}</div>";
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';
// 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__);
} 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');
// 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;
} // END - switch
// Load mode template
-loadTemplate('admin_list_doubler_' . getRequestElement('mode'), false, $content);
+loadTemplate('admin_list_doubler_' . getRequestParameter('mode'), false, $content);
// [EOF]
?>
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
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
$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 = '<a href="{%url=mailid.php?userid=' . getRequestElement('userid') . '&mailid=' . $id . '%}" target="_blank">' . $id . '</a>';
+ $LINK = '<a href="{%url=mailid.php?userid=' . getRequestParameter('userid') . '&mailid=' . $id . '%}" target="_blank">' . $id . '</a>';
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 = '<a href="{%url=mailid.php?userid=' . getRequestElement('userid') . '&bonusid=' . $id2 . '%}" target="_blank">' . $id2 . '</a>';
+ $LINK = '<a href="{%url=mailid.php?userid=' . getRequestParameter('userid') . '&bonusid=' . $id2 . '%}" target="_blank">' . $id2 . '</a>';
break;
default: // Problem in application detected!
$content['email'] = '<a href="' . generateEmailLink(getUserData('email'), 'user_data') . '">' . getUserData('email') . '</a>';
$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
} // 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) {
// 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;
// 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'],
);
// 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 {
} // 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
`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) {
// 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'],
);
$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
}
// 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;
// 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__);
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)) {
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);
// 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') {
// Prepare content
$content = array(
'task' => $task,
- 'pid' => bigintval(getRequestElement('pid')),
+ 'pid' => bigintval(getRequestParameter('pid')),
'user' => '<a href="' . generateEmailLink(getUserData('email'), 'user_data') . '">' . translateGender(getUserData('gender')) . ' ' . getUserData('surname') . ' ' . getUserData('family') . '</a>',
);
// 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) {
// 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'));
// Prepare content
$content = array(
'task' => $task,
- 'pid' => bigintval(getRequestElement('pid')),
+ 'pid' => bigintval(getRequestParameter('pid')),
'user' => '<a href="' . generateEmailLink(getUserData('email'), 'user_data') . '">' . translateGender(getUserData('gender')) . ' ' . getUserData('surname') . ' ' . getUserData('family') . '</a>',
);
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
$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
// 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));
// 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
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));
}
}
}
-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`
// 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']);
// Remember rows
$content['rows'] = $OUT;
- $content['rallye'] = getRequestElement('rallye');
+ $content['rallye'] = getRequestParameter('rallye');
// Free memory
SQL_FREERESULT($result);
// 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;
$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
// Prepare content
$content = array(
'rows' => $OUT,
- 'userid' => generateUserProfileLink(getRequestElement('userid'))
+ 'userid' => generateUserProfileLink(getRequestParameter('userid'))
);
// Load main template
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
// 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
// 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
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);
`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
SQL_FREERESULT($result);
} else {
// No refs made so far
- loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_REFS_404', '<a href="{%url=modules.php?module=admin&what=list_sponsor&id=' . bigintval(getRequestElement('rid')) . '%}">' . bigintval(getRequestElement('rid')) . '</a>'));
+ loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_SPONSOR_REFS_404', '<a href="{%url=modules.php?module=admin&what=list_sponsor&id=' . bigintval(getRequestParameter('rid')) . '%}">' . bigintval(getRequestParameter('rid')) . '</a>'));
}
} 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
$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);
`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__);
} // 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__);
'curr' => htmlspecialchars($curr)
);
- if (isPostRequestElementSet('edit')) {
+ if (isPostRequestParameterSet('edit')) {
// Edit entry
$OUT .= loadTemplate('admin_list_sponsor_pay_edit_row', true, $content);
} else {
} // 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 {
// 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
$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'));
} // 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(),
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(),
} // 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;
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 = '';
__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__);
}
// 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)) {
SQL_FREERESULT($result_tasks);
// Load footer template
- if (getRequestElement('type') == 'deleted') {
+ if (getRequestParameter('type') == 'deleted') {
// Delete now button
loadTemplate('admin_overview_footer_task');
} else {
$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
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';
// 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__);
// 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'));
}
}
// 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 = '[<a href="{%url=modules.php?module=admin';
-if (isGetRequestElementSet('userid')) {
+if (isGetRequestParameterSet('userid')) {
// Secure the user id
- $userid = bigintval(getRequestElement('userid'));
+ $userid = bigintval(getRequestParameter('userid'));
// Does the account exists?
$result_user = SQL_QUERY_ESC("SELECT
SQL_FREERESULT($result_user);
} else {
$whereStatement = '';
- if ((getRequestElement('letter') != getMessage('_ALL2')) && (getRequestElement('letter') != getMessage('_OTHERS')) && (isGetRequestElementSet('letter'))) {
+ if ((getRequestParameter('letter') != getMessage('_ALL2')) && (getRequestParameter('letter') != getMessage('_OTHERS')) && (isGetRequestParameterSet('letter'))) {
// List only persons w
- $whereStatement = " WHERE `family` LIKE '".getRequestElement('letter') . "%'";
+ $whereStatement = " WHERE `family` LIKE '".getRequestParameter('letter') . "%'";
} // END - if
// Parse the status or mode parameter
- if (isGetRequestElementSet(('status'))) {
+ if (isGetRequestParameterSet(('status'))) {
// Is a WHERE statement already there?
if (!empty($whereStatement)) {
// Then append the status column
- $whereStatement .= sprintf(" AND `status`='%s'", SQL_ESCAPE(secureString(strtoupper(getRequestElement('status')))));
+ $whereStatement .= sprintf(" AND `status`='%s'", SQL_ESCAPE(secureString(strtoupper(getRequestParameter('status')))));
} else {
// Start a new one
- $whereStatement = sprintf(" WHERE `status`='%s'", SQL_ESCAPE(secureString(strtoupper(getRequestElement('status')))));
+ $whereStatement = sprintf(" WHERE `status`='%s'", SQL_ESCAPE(secureString(strtoupper(getRequestParameter('status')))));
}
- } elseif (isGetRequestElementSet('mode')) {
+ } elseif (isGetRequestParameterSet('mode')) {
// Choose what we need to list
- switch (getRequestElement('mode')) {
+ switch (getRequestParameter('mode')) {
case 'norefs': // Users w/o refs
if (!empty($whereStatement)) {
// Add AND statement
break;
default: // Invalid list mode
- logDebugMessage(__FILE__, __LINE__, sprintf("Invalid list mode %s detected.", getRequestElement('mode')));
+ logDebugMessage(__FILE__, __LINE__, sprintf("Invalid list mode %s detected.", getRequestParameter('mode')));
break;
} // END - switch
} // END - if
// Generate master query string
$sql = sprintf("SELECT `userid`, `gender`, `surname`, `family`, `email`, `REMOTE_ADDR`, `refid`, `status`, `emails_sent`, `mails_confirmed`, `emails_received`" . $MORE . " FROM `{?_MYSQL_PREFIX?}_user_data`" . $whereStatement . " ORDER BY `%s` ASC",
- getRequestElement('sortby')
+ getRequestParameter('sortby')
);
// Prepare SQL and run it
// Activate the extension please!
$PAGES = round(SQL_NUMROWS($result_master) / getConfig('user_limit') + 0.5);
- if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 1);
- if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', getConfig('user_limit'));
+ if (!isGetRequestParameterSet('page')) setGetRequestParameter('page' , 1);
+ if (!isGetRequestParameterSet('offset')) setGetRequestParameter('offset', getConfig('user_limit'));
// Add limitation to SQL string and run him again
- $sql .= " LIMIT ".(getRequestElement('offset') * getRequestElement('page') - getRequestElement('offset')).", ".getRequestElement('offset');
+ $sql .= " LIMIT ".(getRequestParameter('offset') * getRequestParameter('page') - getRequestParameter('offset')).", ".getRequestParameter('offset');
$result = SQL_QUERY($sql, __FILE__, __LINE__);
// Count all confirmed users
define('__USER_CNT' , $user_count);
// Sorting links
- define('__ALPHA_SORT', alpha(getRequestElement('sortby'), $colspan, true));
- define('__SORT_LINKS', addSortLinks(getRequestElement('letter'), getRequestElement('sortby'), $colspan, true));
+ define('__ALPHA_SORT', alpha(getRequestParameter('sortby'), $colspan, true));
+ define('__SORT_LINKS', addSortLinks(getRequestParameter('letter'), getRequestParameter('sortby'), $colspan, true));
if ($PAGES > 1) {
define('__PAGE_NAV', addPageNavigation($PAGES, getConfig('user_limit'), true, $colspan, true));
// 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
// 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');
}
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);
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
}
// 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') {
}
} else {
// Sponsor not found!
- $message = getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestElement('id')));
+ $message = getMaskedMessage('ADMIN_SPONSOR_404', bigintval(getRequestParameter('id')));
}
// Free result
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
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']) {
loadTemplate('admin_lock_user', false, $content);
} else {
// Account does not exists!
- loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
+ loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '</div>');
}
}
}
} else {
// Account does not exists!
- loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
+ loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '</div>');
}
} else {
// List all users
// 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?
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()) {
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'));
// 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",
// 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",
// 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",
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
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;
// 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
// 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();
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;
// 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);
// 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);
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);
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__);
}
$content = "<span class=\"admin_failed\">{--SETTINGS_NOT_SAVED--}</span>";
}
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__);
// 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
} // 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')) {
} // END - if
// Select template
- switch(getRequestElement('mode')) {
+ switch(getRequestParameter('mode')) {
case 'html': // HTML mails
case 'normal': // Normal mails
$template = 'admin_send_bonus_form';
$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
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",
// 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']));
// 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
} else {
// Prepare content
$content['user'] = '<a href="' . generateEmailLink($content['email'], 'user_data') . '">' . $content['surname'] . ' ' . $content['family'] . '</a>';
- $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, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestElement('userid')) . '</div>');
+ loadTemplate('admin_settings_saved', false, '<div class="admin_failed">' . getMaskedMessage('ADMIN_MEMBER_404', getRequestParameter('userid')) . '</div>');
}
} else {
// Output selection form with all confirmed user accounts listed
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) {
// 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');
// 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']);
$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)) {
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__);
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
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);
// 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);
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
// 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);
// 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)) {
// 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 {
// 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),
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 {
// 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')
);
}
imagedestroy($image);
}
shutdown();
-} elseif (!isGetRequestElementSet('usage')) {
+} elseif (!isGetRequestParameterSet('usage')) {
$FQFN = sprintf("%s%s/index.html",
getConfig('PATH'),
getConfig('usage_base')
$FQFN = sprintf("%s%s/usage_%s.html",
getConfig('PATH'),
getConfig('usage_base'),
- getRequestElement('usage')
+ getRequestParameter('usage')
);
}
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);
}
} 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
$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) {
list($sub, $url) = SQL_FETCHROW($result);
// This fixes a white page
- setPostRequestElement('url', $url);
+ setPostRequestParameter('url', $url);
// Mode is member
$mode = 'member';
}
} // 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;
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 {
'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);
// 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));
// 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();
$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');
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 = '';
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
$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
// 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
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
// 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
} // 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
//* DEBUG: */ print intval(isFormSent()).'/'.intval($isOkay).'/'.intval(isAdmin()).'<br />';
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, ...
$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
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);
}
//////////////////////////////
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__);
} // 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)",
} // 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
'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
// 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');
}
// 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;
}
$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 = "<select name=\"country_code\" class=\"guest_select\" size=\"1\">\n";
$whereStatement = "WHERE `is_active`='Y'";
if (isAdmin()) $whereStatement = '';
- $OUT .= generateOptionList('countries', 'id', 'descr', postRequestElement('country_code'), 'code', $whereStatement);
+ $OUT .= generateOptionList('countries', 'id', 'descr', postRequestParameter('country_code'), 'code', $whereStatement);
$OUT .= "</select>";
$content['country'] = $OUT;
} // 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`,
`{?_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);
// 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) {
// 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) {
}
} 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
// Send activation link again
if (isFormSent()) {
// Check submitted data
- if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok');
+ if (!isPostRequestParameterSet('email')) unsetPostRequestParameter('ok');
}
if (isFormSent()) {
$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) {
// 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'));
// Send new password
if (isFormSent()) {
// Check submitted data
- if (!isPostRequestElementSet('email')) unsetPostRequestElement('ok');
+ if (!isPostRequestParameterSet('email')) unsetPostRequestParameter('ok');
} // END - if
if (isFormSent()) {
$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) {
// 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'
// 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) {
// 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')) {
$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);
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);
// 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);
$message = $messageArray['added'];
} else {
// Sponsor account not found???
- $message = getMaskedMessage('SPONSOR_EMAIL_404', postRequestElement('email'));
+ $message = getMaskedMessage('SPONSOR_EMAIL_404', postRequestParameter('email'));
}
// Free memory
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
} // 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?
} // END - if
$content['form_errors'] = $OUT;
- $content['refid'] = bigintval(postRequestElement('refid'));
+ $content['refid'] = bigintval(postRequestParameter('refid'));
} // END - if
// Prepare referal id
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;
default:
// Unsupported mode
- debug_report_bug(sprintf("Unsupported mode <strong>%s</strong> detected.", secureString(getRequestElement('mode'))));
+ debug_report_bug(sprintf("Unsupported mode <strong>%s</strong> detected.", secureString(getRequestParameter('mode'))));
break;
}
} // 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)) {
$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
$cnt = '0';
// Go through all entries
- foreach (postRequestElement('cat') as $cat => $joined) {
+ foreach (postRequestParameter('cat') as $cat => $joined) {
// Ini sql here
$sql = '';
$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'] = '';
}
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
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
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());
} // 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`
} // 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`
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
// 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
// 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 = '';
} // 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
`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 {
`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__);
}
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
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
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, '<div class="member_failed">{--NICKNAME_IS_INVALID--}</div>');
} // END - if
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...
LIMIT 1",
array(
getMemberId(),
- postRequestElement('url'),
+ postRequestParameter('url'),
getConfig('url_tlock')
), __FILE__, __LINE__);
$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')) {
// 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
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
} // 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
// 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()) {
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
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') {
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)) {
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
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 {
`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 {
`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__);
}
$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
$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')) {
// 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'";
$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
$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
// 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) {
} // 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'] = "<tr><td colspan=\"5\" height=\"5\" class=\"seperator\"> </td></tr>";
}
// 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 {
// 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 {
// 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`
} 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
// 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'];
}
// 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);
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
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
$content = array(
'max' => $max,
'type' => $content['type'],
- 'payout' => bigintval(getRequestElement('payout'))
+ 'payout' => bigintval(getRequestParameter('payout'))
);
// Generate banner order form
$content = array(
'max' => $max,
'type' => $content['type'],
- 'payout' => bigintval(getRequestElement('payout'))
+ 'payout' => bigintval(getRequestParameter('payout'))
);
// Generate normal form
$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",
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');
$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;
} // 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'));
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);
} // 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'])) {
// Insert line
} else {
// Read data from refback table
- $content = getArrayFromUserRefbackData(postRequestElement('id'));
+ $content = getArrayFromUserRefbackData(postRequestParameter('id'));
// Translate comma
$content['refback'] = translateComma($content['refback']);
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');
} // 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');
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');
$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
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);
// 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 = '';
// 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
$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?
// 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
$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
} elseif ($valid_code === false) {
// Invalid Touring code!
loadTemplate('admin_settings_saved', false, '<div class="member_note">{--TRANSFER_INVALID_CODE--}</div>');
- unsetPostRequestElement('ok');
+ unsetPostRequestParameter('ok');
} elseif ($valid_pass === false) {
// Wrong password entered
loadTemplate('admin_settings_saved', false, '<div class="member_note">{--TRANSFER_INVALID_PASSWORD--}</div>');
- unsetPostRequestElement('ok');
+ unsetPostRequestParameter('ok');
} elseif ($valid_amount === false) {
// Too much points entered
loadTemplate('admin_settings_saved', false, '<div class="member_note">{--TRANSFER_INVALID_POINTS--}</div>');
- unsetPostRequestElement('ok');
+ unsetPostRequestParameter('ok');
} elseif ($valid_reason === false) {
// No transfer reason entered
loadTemplate('admin_settings_saved', false, '<div class="member_note">{--TRANSFER_INVALID_REASON--}</div>');
- unsetPostRequestElement('ok');
+ unsetPostRequestParameter('ok');
} elseif ($valid_recipient === false) {
// No recipient selected
loadTemplate('admin_settings_saved', false, '<div class="member_note">{--TRANSFER_INVALID_RECIPIENT--}</div>');
- unsetPostRequestElement('ok');
+ unsetPostRequestParameter('ok');
} elseif ($valid_data === false) {
// No recipient/sender selected
loadTemplate('admin_settings_saved', false, '<div class="member_note">{--TRANSFER_INVALID_DATA--}</div>');
- unsetPostRequestElement('ok');
+ unsetPostRequestParameter('ok');
}
// Free result
// @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 .= " <option value=\"".$userid."\"";
- if ((isPostRequestElementSet(('to_userid'))) && (postRequestElement('to_userid') == $userid)) $OUT .= ' selected="selected"';
+ if ((isPostRequestParameterSet(('to_userid'))) && (postRequestParameter('to_userid') == $userid)) $OUT .= ' selected="selected"';
$OUT .= ">";
if (($nick != $userid) && (!empty($nick))) {
// Output nickname
$content['reason'] = '';
// Transfer maybe already entered valued'
- if (isGetRequestElementSet('ok')) {
+ if (isGetRequestParameterSet('ok')) {
// Get values from form
- $content['points'] = bigintval(postRequestElement('points'));
- $content['reason'] = secureString(postRequestElement('reason'));
+ $content['points'] = bigintval(postRequestParameter('points'));
+ $content['reason'] = secureString(postRequestParameter('reason'));
} // END - if
// Translate some array elements for template
if (isFormSent()) {
// Save settings
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `opt_in`='%s' WHERE `userid`=%s LIMIT 1",
- array(postRequestElement('opt_in'), getMemberId()), __FILE__, __LINE__);
+ array(postRequestParameter('opt_in'), getMemberId()), __FILE__, __LINE__);
// Rember for next switch() command
- getUserData('opt_in') = substr(postRequestElement('opt_in'), 0, 1);
+ getUserData('opt_in') = substr(postRequestParameter('opt_in'), 0, 1);
// "Settings saved..."
loadTemplate('admin_settings_saved', false, '<div class="member_done">{--SETTINGS_SAVED--}</div>');
addMenuDescription('member', __FILE__);
// Shall we display a mail?
-if ((isGetRequestElementSet('bonusid')) && (isExtensionActive('bonus'))) {
+if ((isGetRequestParameterSet('bonusid')) && (isExtensionActive('bonus'))) {
// Display bonus mail by loading it's full data
$result_data = SQL_QUERY_ESC("SELECT
`id`, `subject`, `timestamp`, `cat_id`, `points`, `text`, `is_notify`, `data_type`, `time`, `url`
WHERE
`id`=%s
LIMIT 1",
- array(bigintval(getRequestElement('bonusid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestParameter('bonusid'))), __FILE__, __LINE__);
// Load data
$content = SQL_FETCHARRAY($result_data);
// Free result
SQL_FREERESULT($result_data);
-} elseif (isGetRequestElementSet(('mailid'))) {
+} elseif (isGetRequestParameterSet(('mailid'))) {
// Display regular member mail by loading its full data
$result_data = SQL_QUERY_ESC("SELECT
s.id, s.subject, p.text, s.timestamp_ordered AS `timestamp`, s.cat_id, pay.price AS points, p.sender, pay.time, p.data_type
WHERE
s.id=%s
LIMIT 1",
- array(bigintval(getRequestElement('mailid'))), __FILE__, __LINE__);
+ array(bigintval(getRequestParameter('mailid'))), __FILE__, __LINE__);
// Load data
$content = SQL_FETCHARRAY($result_data);
$content = array(); $points = false;
// Is the mode set (withdraw or payout)
-if ((!isGetRequestElementSet('mode')) || (getRequestElement('mode') == 'choose')) {
+if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choose')) {
// Let the user choose what he wants to do
$content['refid'] = getConfig(('wernis_refid'));
$content['wernis_userid'] = '0';
// Is there an id?
- if ((!empty($content['wernis_userid'])) && (!isGetRequestElementSet('mode'))) {
+ if ((!empty($content['wernis_userid'])) && (!isGetRequestParameterSet('mode'))) {
// Then use an other "mode"
- setGetRequestElement('mode', 'list');
+ setGetRequestParameter('mode', 'list');
// And load all rows!
$result = SQL_QUERY_ESC("SELECT `id`,`wernis_account`,`wernis_amount`,`wernis_timestamp`,`wernis_type` FROM `{?_MYSQL_PREFIX?}_user_wernis` WHERE `userid`=%s ORDER BY `wernis_timestamp` DESC",
} // END - if
// Mode chooser! ;-)
- setGetRequestElement('mode', 'choose');
+ setGetRequestParameter('mode', 'choose');
}
-} elseif ((getRequestElement('mode') == 'payout') && (getConfig('wernis_payout_active') == 'Y')) {
+} elseif ((getRequestParameter('mode') == 'payout') && (getConfig('wernis_payout_active') == 'Y')) {
// Get total points and check if the user can request a payout
$points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
// Get WDS66 username
$content['wernis_userid'] = getUserData('wernis_userid');
-} elseif ((getRequestElement('mode') == 'withdraw') && (getConfig('wernis_withdraw_active') == 'Y')) {
+} elseif ((getRequestParameter('mode') == 'withdraw') && (getConfig('wernis_withdraw_active') == 'Y')) {
// Get total points for just displaying them
$points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
$content['wernis_userid'] = getUserData('wernis_userid');
} else {
// Invalid mode!
- loadTemplate('admin_settings_saved', false, getMaskedMessage('WERNIS_MEMBER_MODE_INVALID', getRequestElement('mode')));
+ loadTemplate('admin_settings_saved', false, getMaskedMessage('WERNIS_MEMBER_MODE_INVALID', getRequestParameter('mode')));
return;
}
// Is the formular sent?
-if ((isFormSent()) && (isGetRequestElementSet('mode'))) {
+if ((isFormSent()) && (isGetRequestParameterSet('mode'))) {
// Is the user id and password set?
- if (!isPostRequestElementSet(('wernis_userid'))) {
+ if (!isPostRequestParameterSet(('wernis_userid'))) {
// Nothing entered in WDS66 user id
loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_USERNAME'));
- } elseif (!isPostRequestElementSet(('wds66_password'))) {
+ } elseif (!isPostRequestParameterSet(('wds66_password'))) {
// Nothing entered in WDS66 password
loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_PASSWORD'));
- } elseif (!isPostRequestElementSet(('amount'))) {
+ } elseif (!isPostRequestParameterSet(('amount'))) {
// Nothing entered in amount
loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_AMOUNT'));
- } elseif (postRequestElement('wernis_userid') != bigintval(postRequestElement('wernis_userid'))) {
+ } elseif (postRequestParameter('wernis_userid') != bigintval(postRequestParameter('wernis_userid'))) {
// Only numbers in account id!
loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_INVALID_USERNAME'));
- } elseif (postRequestElement('amount') != bigintval(postRequestElement('amount'))) {
+ } elseif (postRequestParameter('amount') != bigintval(postRequestParameter('amount'))) {
// Only numbers in amount!
loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_INVALID_AMOUNT'));
} else {
// Check input data depending on the mode and execute the requested mode
- switch (getRequestElement('mode')) {
+ switch (getRequestParameter('mode')) {
case 'withdraw': // Widthdraws WDS66 -> This exchange
- if (postRequestElement('amount') < getConfig('wernis_min_withdraw')) {
+ if (postRequestParameter('amount') < getConfig('wernis_min_withdraw')) {
// Not enougth entered!
loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_WITHDRAW_AMOUNT_SMALLER_MIN'));
} else {
// All is fine here so do the withdraw
- $success = WERNIS_EXECUTE_WITHDRAW(postRequestElement('wernis_userid'), md5(postRequestElement('wds66_password')), postRequestElement('amount'));
+ $success = WERNIS_EXECUTE_WITHDRAW(postRequestParameter('wernis_userid'), md5(postRequestParameter('wds66_password')), postRequestParameter('amount'));
if ($success === true) {
// Add it to this amount
- addPointsDirectly('wernis_withdraw', getMemberId(), bigintval(postRequestElement('amount')));
+ addPointsDirectly('wernis_withdraw', getMemberId(), bigintval(postRequestParameter('amount')));
// Update the user data as well..
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `wernis_userid`=%s WHERE `userid`=%s LIMIT 1",
- array(bigintval(postRequestElement('wernis_userid')), getMemberId()), __FILE__, __LINE__);
+ array(bigintval(postRequestParameter('wernis_userid')), getMemberId()), __FILE__, __LINE__);
// All done!
loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_WITHDRAW_DONE'));
break;
case 'payout': // Payout this exchange -> WDS66
- if (postRequestElement('amount') < getConfig('wernis_min_payout')) {
+ if (postRequestParameter('amount') < getConfig('wernis_min_payout')) {
// Not enougth entered!
loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_PAYOUT_AMOUNT_SMALLER_MIN'));
- } elseif (postRequestElement('amount') > $points) {
+ } elseif (postRequestParameter('amount') > $points) {
// Not enougth points left!
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestElement('amount')), bigintval($points)));
+ loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestParameter('amount')), bigintval($points)));
} else {
// All is fine here so do the withdraw
- $success = WERNIS_EXECUTE_PAYOUT(postRequestElement('wernis_userid'), postRequestElement('amount'));
+ $success = WERNIS_EXECUTE_PAYOUT(postRequestParameter('wernis_userid'), postRequestParameter('amount'));
if ($success === true) {
// Sub points
- subtractPoints('wernis_payout', getMemberId(), postRequestElement('amount'));
+ subtractPoints('wernis_payout', getMemberId(), postRequestParameter('amount'));
// Update WDS66 id
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `wernis_userid`=%s WHERE `userid`=%s LIMIT 1",
- array(bigintval(postRequestElement('wernis_userid')), getMemberId()), __FILE__, __LINE__);
+ array(bigintval(postRequestParameter('wernis_userid')), getMemberId()), __FILE__, __LINE__);
// All done!
loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_PAYOUT_DONE'));
break;
default: // Invalid mode!
- logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestElement('mode')));
- loadTemplate('admin_settings_saved', false, getMaskedMessage('WERNIS_MEMBER_MODE_INVALID', getRequestElement('mode')));
+ logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestParameter('mode')));
+ loadTemplate('admin_settings_saved', false, getMaskedMessage('WERNIS_MEMBER_MODE_INVALID', getRequestParameter('mode')));
return;
}
}
} // END - if
// Prepare mode for template name
-$mode = sprintf("member_wernis_mode_%s", getRequestElement('mode'));
+$mode = sprintf("member_wernis_mode_%s", getRequestParameter('mode'));
// Load the template
loadTemplate($mode, false, $content);
} elseif (!isMember()) {
// Sorry, no guest access!
$URL = 'modules.php?module=index';
-} elseif (!isGetRequestElementSet('order')) {
+} elseif (!isGetRequestParameterSet('order')) {
// You cannot call this module directly!
$URL = 'modules.php?module=login&what=order';
}
// Update sending pool
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET `data_type`='%s' WHERE `id`=%s AND `sender`=%s AND `data_type`='TEMP' LIMIT 1",
- array($type, bigintval(getRequestElement('order')), getMemberId()), __FILE__, __LINE__);
+ array($type, bigintval(getRequestParameter('order')), getMemberId()), __FILE__, __LINE__);
// Finally is the entry valid?
if (SQL_AFFECTEDROWS() == 1) {
// @TODO Unused: 2,4
// Load mail again... 0 1 2 3 4 5 6 7
$result = SQL_QUERY_ESC("SELECT `subject`, `text`, `receivers`, `payment_id`, `timestamp`, `url`, `cat_id`, `target_send` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s AND `sender`=%s LIMIT 1",
- array(bigintval(getRequestElement('order')), getMemberId()), __FILE__, __LINE__);
+ array(bigintval(getRequestParameter('order')), getMemberId()), __FILE__, __LINE__);
$content = merge_array($content, SQL_FETCHARRAY($result));
SQL_FREERESULT($result);
if (empty($content['subject'])) $content['subject'] = getMessage('DEFAULT_SUBJECT_LINE');
// Check if form was submitted or not
if (isFormSent()) {
// Check passwords
- if (!isPostRequestElementSet('pass_old')) {
+ if (!isPostRequestParameterSet('pass_old')) {
// No current password entered
$message = getMessage('SPONSOR_NO_CURRENT_PASSWORD_ENTERED');
- } elseif (md5(postRequestElement('pass_old')) != getSession('sponsorpass')) {
+ } elseif (md5(postRequestParameter('pass_old')) != getSession('sponsorpass')) {
// Entered password didn't match password in DB
$message = getMessage('SPONSOR_CURRENT_PASSWORD_DIDNOT_MATCH_DB');
- } elseif ((isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2')) && (postRequestElement('pass1') != postRequestElement('pass2'))) {
+ } elseif ((isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2')) && (postRequestParameter('pass1') != postRequestParameter('pass2'))) {
// Both new passwords did not match
$message = getMessage('SPONSOR_BOTH_NEW_PASSWORDS_DIDNOT_MATCH');
- } elseif ((!isPostRequestElementSet('pass1')) && (isPostRequestElementSet('pass2'))) {
+ } elseif ((!isPostRequestParameterSet('pass1')) && (isPostRequestParameterSet('pass2'))) {
// No password one entered
$message = getMessage('SPONSOR_PASSWORD_ONE_EMPTY');
- } elseif ((isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass2'))) {
+ } elseif ((isPostRequestParameterSet('pass1')) && (!isPostRequestParameterSet('pass2'))) {
// No password two entered
$message = getMessage('SPONSOR_PASSWORD_TWO_EMPTY');
- } elseif ((isPostRequestElementSet('pass1')) && (strlen(postRequestElement('pass1')) < getConfig('pass_len'))) {
+ } elseif ((isPostRequestParameterSet('pass1')) && (strlen(postRequestParameter('pass1')) < getConfig('pass_len'))) {
// Too short password
$message = getMessage('SPONSOR_PASSWORD_TOO_SHORT');
} else {
$PASS_AND = ''; $PASS_DATA = '';
// Check if we want to change password or not
- if ((postRequestElement('pass1') == postRequestElement('pass2')) && (isPostRequestElementSet('pass1')) && (postRequestElement('pass1') != postRequestElement('pass_old'))) {
+ if ((postRequestParameter('pass1') == postRequestParameter('pass2')) && (isPostRequestParameterSet('pass1')) && (postRequestParameter('pass1') != postRequestParameter('pass_old'))) {
// Change current password
$PASS_AND = ", `password`='%s'";
- $PASS_DATA = md5(postRequestElement('pass1'));
+ $PASS_DATA = md5(postRequestParameter('pass1'));
}
// Unsecure data which we don't want here
// Remove all (maybe spoofed) unsafe data from array
foreach ($UNSAFE as $remove) {
- unsetPostRequestElement($remove);
+ unsetPostRequestParameter($remove);
}
// Set last change timestamp
- setPostRequestElement('last_change', 'UNIX_TIMESTAMP()');
+ setPostRequestParameter('last_change', 'UNIX_TIMESTAMP()');
// Save data
$message = saveSponsorData(postRequestArray(), $content);
// Check if form was submitted or not
if (isFormSent()) {
// Check passwords
- if (!isPostRequestElementSet('password')) {
+ if (!isPostRequestParameterSet('password')) {
// No current password entered
$message = SPONSOR_NO_CURRENT_PASSWORD_ENTERED;
- } elseif (md5(postRequestElement('password')) != getSession('sponsorpass')) {
+ } elseif (md5(postRequestParameter('password')) != getSession('sponsorpass')) {
// Entered password didn't match password in DB
$message = SPONSOR_CURRENT_PASSWORD_DIDNOT_MATCH_DB;
} else {
// Remove all (maybe spoofed) unsafe data from array
foreach ($UNSAFE as $remove) {
- unsetPostRequestElement($remove);
+ unsetPostRequestParameter($remove);
} // END - if
// Set last change timestamp
- setPostRequestElement('last_change', 'UNIX_TIMESTAMP()');
+ setPostRequestParameter('last_change', 'UNIX_TIMESTAMP()');
// Save data
$message = saveSponsorData(postRequestArray(), $content);
$OUT = '';
while ($content = SQL_FETCHARRAY($result)) {
$OUT .= ' <option value="' . $content['value'] . '"';
- if (postRequestElement('max_mails') == $content['value']) $OUT .= ' selected="selected"';
+ if (postRequestParameter('max_mails') == $content['value']) $OUT .= ' selected="selected"';
$OUT .= '>' . $content['value'] . ' {--PER_DAY--}';
if (!empty($content['comment'])) $OUT .= '(' . $content['comment'] . ')';
$OUT .= '</option>';
if ($mode == 'admin') {
// Action value for admin area
- if (isGetRequestElementSet('action')) {
+ if (isGetRequestParameterSet('action')) {
// Use from request!
- return getRequestElement('action');
+ return getRequestParameter('action');
} elseif (isActionSet()) {
// Get it directly from URL
return getAction();
// And sent it away
sendEmail($userid, getMessage('SUBJECT_DIRECT_PAYMENT'), $message);
- if (!isGetRequestElementSet('mid')) loadTemplate('admin_settings_saved', false, getMessage('ADMIN_POINTS_ADDED'));
+ if (!isGetRequestParameterSet('mid')) loadTemplate('admin_settings_saved', false, getMessage('ADMIN_POINTS_ADDED'));
}
// Maybe there's another ref?
}
// Generates an option list from various parameters
-function generateOptionList ($table, $id, $name, $default='', $special='', $where='') {
+function generateOptionList ($table, $id, $name, $default='', $special='', $where='', $disabled=array()) {
$ret = '';
if ($table == '/ARRAY/') {
// Selection from array
// Both are arrays
foreach ($id as $idx => $value) {
$ret .= '<option value="' . $value . '"';
- if ($default == $value) $ret .= ' selected="selected"';
+ if ($default == $value) {
+ // Selected by default
+ $ret .= ' selected="selected"';
+ } elseif (isset($disabled[$value])) {
+ // Disabled!
+ $ret .= ' disabled="disabled"';
+ }
$ret .= '>' . $name[$idx] . '</option>';
} // END - foreach
} else {
while (list($value, $title, $add) = SQL_FETCHROW($result)) {
if (empty($special)) $add = '';
$ret .= '<option value="' . $value . '"';
- if ($default == $value) $ret .= ' selected="selected"';
+ if ($default == $value) {
+ // Selected by default
+ $ret .= ' selected="selected"';
+ } elseif (isset($disabled[$value])) {
+ // Disabled!
+ $ret .= ' disabled="disabled"';
+ }
if (!empty($add)) $add = ' ('.$add.')';
$ret .= '>' . $title . $add . '</option>';
} // END - while
// Gets the matching what name from module
function getWhatFromModule ($modCheck) {
// Is the request element set?
- if (isGetRequestElementSet('what')) {
+ if (isGetRequestParameterSet('what')) {
// Then return this!
- return getRequestElement('what');
+ return getRequestParameter('what');
} // END - if
// Default is empty
}
// Wrapper for elements in $_GET
-function getRequestElement ($element) {
+function getRequestParameter ($element) {
// By default no element is there
$value = null;
if (isset($GLOBALS['cache_request']['request_get'][$element])) {
// Then use the cache
$value = $GLOBALS['cache_request']['request_get'][$element];
- } elseif (isGetRequestElementSet($element)) {
+ } elseif (isGetRequestParameterSet($element)) {
// Then get it directly
$value = SQL_ESCAPE($GLOBALS['raw_request']['get'][$element]);
}
// Checks if an element in $_GET exists
-function isGetRequestElementSet ($element, $subElement = '') {
+function isGetRequestParameterSet ($element, $subElement = '') {
if (empty($subElement)) {
return ((isset($GLOBALS['raw_request']['get'][$element])) && (!empty($GLOBALS['raw_request']['get'][$element])));
} else {
}
// Removes an element from $_GET
-function unsetGetRequestElement ($element) {
+function unsetGetRequestParameter ($element) {
unset($GLOBALS['raw_request']['get'][$element]);
}
}
// Setter for element in $_GET
-function setGetRequestElement ($element, $value) {
+function setGetRequestParameter ($element, $value) {
// Escape both
$element = SQL_ESCAPE($element);
$value = SQL_ESCAPE($value);
}
// Wrapper for elements in $_POST
-function postRequestElement ($element, $subElement=null) {
+function postRequestParameter ($element, $subElement=null) {
// By default no element is there
$value = null;
if (isset($GLOBALS['cache_request']['request_post'][$element][$subElement])) {
// Then use it
$value = $GLOBALS['cache_request']['request_post'][$element][$subElement];
- } elseif (isPostRequestElementSet($element)) {
+ } elseif (isPostRequestParameterSet($element)) {
// Then use it
$value = $GLOBALS['raw_request']['post'][$element];
// Is $subElement set?
- if ((!is_null($subElement)) && (isPostRequestElementSet($element, $subElement))) {
+ if ((!is_null($subElement)) && (isPostRequestParameterSet($element, $subElement))) {
// Then use this
$value = SQL_ESCAPE($value[$subElement]);
} elseif (!is_array($value)) {
}
// Checks if an element in $_POST exists
-function isPostRequestElementSet ($element, $subElement=null) {
+function isPostRequestParameterSet ($element, $subElement=null) {
if (is_null($subElement)) {
return ((isset($GLOBALS['raw_request']['post'][$element])) && (isset($GLOBALS['raw_request']['post'][$element])));
} else {
}
// Removes an element from $_POST
-function unsetPostRequestElement ($element) {
+function unsetPostRequestParameter ($element) {
unset($GLOBALS['raw_request']['post'][$element]);
}
}
// Setter for element in $_POST
-function setPostRequestElement ($element, $value) {
+function setPostRequestParameter ($element, $value) {
// Is $element or $value an array?
if (is_array($element)) {
// Set array
// Checks wether a form was sent. If so, the $_POST['ok'] element must be set
function isFormSent () {
// Simply wrap it!
- return isPostRequestElementSet('ok');
+ return isPostRequestParameterSet('ok');
}
// Setter for content type
if ((isInstallationPhase())) {
// Default theme first
$newTheme = 'default';
- if (isGetRequestElementSet('theme')) $newTheme = getRequestElement('theme');
- if (isPostRequestElementSet('theme')) $newTheme = secureString(postRequestElement('theme'));
+ if (isGetRequestParameterSet('theme')) $newTheme = getRequestParameter('theme');
+ if (isPostRequestParameterSet('theme')) $newTheme = secureString(postRequestParameter('theme'));
$OUT .= '?theme=' . $newTheme . '&installing=1';
} else {
// Add SVN revision to bypass caching problems
// Determine wether we are installing
if (!isset($GLOBALS['mxchange_installing'])) {
// Check URL (css.php/js.php need this)
- $GLOBALS['mxchange_installing'] = isGetRequestElementSet('installing');
+ $GLOBALS['mxchange_installing'] = isGetRequestParameterSet('installing');
} // END - if
// Return result
// Wrapper for $_POST['sel']
function countPostSelection ($element = 'sel') {
// Is it set?
- if (isPostRequestElementSet($element)) {
+ if (isPostRequestParameterSet($element)) {
// Return counted elements
- return countSelection(postRequestElement($element));
+ return countSelection(postRequestParameter($element));
} else {
// Return zero if not found
return 0;
setContentType('text/html');
// Reload page to page=welcome when it is not specified
-if (!isGetRequestElementSet('page')) {
+if (!isGetRequestParameterSet('page')) {
redirectToUrl('install.php?page=welcome');
} // END - if
setUsername('{--USERNAME_INSTALLER--}');
// Already installed?
-if ((isInstalled()) && (getRequestElement('page' != 'finished'))) {
+if ((isInstalled()) && (getRequestParameter('page' != 'finished'))) {
// Add fatal message
addFatalMessage(__FILE__, __LINE__, getMessage('ALREADY_INSTALLED'));
} // END - if
require('inc/config-global.php');
// Is 'js' is provied?
-if (isGetRequestElementSet('js')) {
+if (isGetRequestParameterSet('js')) {
// Set header
setContentType('text/javascript');
// Prepare include file for looking
$inc = sprintf("inc/js/js-%s.php",
- getRequestElement('js')
+ getRequestParameter('js')
);
// Is that file readable?
$url_mid = '0';
// Secure all data
-if (isGetRequestElementSet('userid')) $url_userid = bigintval(getRequestElement('userid'));
-if (isGetRequestElementSet('mailid')) $url_mid = bigintval(getRequestElement('mailid'));
-if (isGetRequestElementSet('bonusid')) $url_bid = bigintval(getRequestElement('bonusid'));
+if (isGetRequestParameterSet('userid')) $url_userid = bigintval(getRequestParameter('userid'));
+if (isGetRequestParameterSet('mailid')) $url_mid = bigintval(getRequestParameter('mailid'));
+if (isGetRequestParameterSet('bonusid')) $url_bid = bigintval(getRequestParameter('bonusid'));
// 01 1 12 2 2 21 1 22 10
if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == '0')) {
$mode = '';
// Secure all data
-if (isGetRequestElementSet('userid')) $url_userid = bigintval(getRequestElement('userid'));
-if (isGetRequestElementSet('mailid')) $url_mid = bigintval(getRequestElement('mailid'));
-if (isGetRequestElementSet('bonusid')) $url_bid = bigintval(getRequestElement('bonusid'));
-if (isGetRequestElementSet('code')) $code = bigintval(getRequestElement('code'));
-if (isGetRequestElementSet('mode')) $mode = getRequestElement('mode');
+if (isGetRequestParameterSet('userid')) $url_userid = bigintval(getRequestParameter('userid'));
+if (isGetRequestParameterSet('mailid')) $url_mid = bigintval(getRequestParameter('mailid'));
+if (isGetRequestParameterSet('bonusid')) $url_bid = bigintval(getRequestParameter('bonusid'));
+if (isGetRequestParameterSet('code')) $code = bigintval(getRequestParameter('code'));
+if (isGetRequestParameterSet('mode')) $mode = getRequestParameter('mode');
// 01 1 12 2 2 21 1 22 10
if (($url_userid) > 0 && (($url_mid > 0) || ($url_bid > 0)) && (getTotalFatalErrors() == '0')) {
insertUserStatsRecord($url_userid, $type, $stats_data);
// Right code entered?
- if (bigintval(postRequestElement('gfx_check')) == $img_code) {
+ if (bigintval(postRequestParameter('gfx_check')) == $img_code) {
// Add points over referal system is the default
$locked = false;
$template = 'mailid_points_done';
setContentType('text/html');
// Fix missing module to 'index'
-if (!isGetRequestElementSet('module')) {
+if (!isGetRequestParameterSet('module')) {
// Set element
- setGetRequestElement('module', 'index');
+ setGetRequestParameter('module', 'index');
// ... and module
setModule('index');
// Include header
loadIncludeOnce('inc/header.php');
-if ((getRequestElement('userid') > 0) && (getRequestElement('d') > 0) && (isGetRequestElementSet('t'))) {
+if ((getRequestParameter('userid') > 0) && (getRequestParameter('d') > 0) && (isGetRequestParameterSet('t'))) {
// Set row name
$t = '';
- switch (getRequestElement('t')) {
+ switch (getRequestParameter('t')) {
case 'bonusid': // Bonus mail
$t = 'bonus_id';
break;
break;
default: // Invalid type
- logDebugMessage(__FILE__, __LINE__, sprintf("Invalid type %s detected.", getRequestElement('t')));
+ logDebugMessage(__FILE__, __LINE__, sprintf("Invalid type %s detected.", getRequestParameter('t')));
break;
} // END - switch
d.`status`='CONFIRMED' AND d.userid=%s AND b.%s=%s
LIMIT 1",
array(
- bigintval(getRequestElement('userid')),
+ bigintval(getRequestParameter('userid')),
$t,
- bigintval(getRequestElement('d'))
+ bigintval(getRequestParameter('d'))
), __FILE__, __LINE__);
// Entry found?
// Prepare constants for the pre-template
$content['gender'] = translateGender($content['gender']);
$content['points'] = translateComma($content['points']);
- $content['mailid'] = bigintval(getRequestElement('d'));
- $content['rows'] = addBonusRanks(bigintval(getRequestElement('d')), $t, bigintval(getRequestElement('userid')));
+ $content['mailid'] = bigintval(getRequestParameter('d'));
+ $content['rows'] = addBonusRanks(bigintval(getRequestParameter('d')), $t, bigintval(getRequestParameter('userid')));
// Get some prepared content
$content = merge_array($content, $GLOBALS['ranking_content']);
$URL = 'modules.php?module=index';
// Is there a hash?
-if (isGetRequestElementSet('hash')) {
+if (isGetRequestParameterSet('hash')) {
// We have an refid here. So we simply add it
- $URL = 'modules.php?module=index&what=sponsor_login&hash=' . getRequestElement('hash');
+ $URL = 'modules.php?module=index&what=sponsor_login&hash=' . getRequestParameter('hash');
} // END - if
// Load the URL
setContentType('text/html');
// Is a frame active?
-if (isGetRequestElementSet('frame')) {
+if (isGetRequestParameterSet('frame')) {
// Then we need to set header_sent to 0
$GLOBALS['header_sent'] = '0';
} // END - if
// Should we display login window or redirect to main page?
if ((getConfig('surfbar_guest_login_form') == 'Y') && (isExtensionActive('user'))) {
// Is the form sent?
- if ((isFormSent()) && (isPostRequestElementSet('id')) && (isPostRequestElementSet('password'))) {
+ if ((isFormSent()) && (isPostRequestParameterSet('id')) && (isPostRequestParameterSet('password'))) {
// Do the login procedure
- $URL = doUserLogin(postRequestElement('id'), postRequestElement('password'), basename(__FILE__), basename(__FILE__) . '?code=');
+ $URL = doUserLogin(postRequestParameter('id'), postRequestParameter('password'), basename(__FILE__), basename(__FILE__) . '?code=');
// And redirect to the URL
redirectToUrl($URL);
loadIncludeOnce('inc/header.php');
// Is there a 'code' provided?
- if (isGetRequestElementSet('code')) {
+ if (isGetRequestParameterSet('code')) {
// Then generate an error message
- loadTemplate('admin_settings_saved', false, getMessageFromErrorCode(getRequestElement('code')));
+ loadTemplate('admin_settings_saved', false, getMessageFromErrorCode(getRequestParameter('code')));
} // END - if
// Display login form
SURFBAR_HANDLE_SELF_MAINTENANCE();
// Is there a check value?
-if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestElementSet('frame')) && (in_array(getRequestElement('frame'), array('stop', 'stop2', 'stats', 'textlinks'))))) {
+if ((SURFBAR_CHECK_RELOAD_FULL()) || ((isGetRequestParameterSet('frame')) && (in_array(getRequestParameter('frame'), array('stop', 'stop2', 'stats', 'textlinks'))))) {
// Reload-lock is full, surfbar stopped so...
// Load header
loadIncludeOnce('inc/header.php');
// Load template
- if (((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'stop2')) || (!isGetRequestElementSet('frame'))) {
+ if (((isGetRequestParameterSet('frame')) && (getRequestParameter('frame') == 'stop2')) || (!isGetRequestParameterSet('frame'))) {
// Load template for "start" page
loadTemplate('surfbar_frame_start');
loadTemplate('surfbar_start_banner');
// This makes the footer appear again
- unsetGetRequestElement('frame');
- } elseif ((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'stats')) {
+ unsetGetRequestParameter('frame');
+ } elseif ((isGetRequestParameterSet('frame')) && (getRequestParameter('frame') == 'stats')) {
// Get total points amount
$points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
// Load template for "stats" page
loadTemplate('surfbar_frame_stats', false, $content);
- } elseif ((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'textlinks')) {
+ } elseif ((isGetRequestParameterSet('frame')) && (getRequestParameter('frame') == 'textlinks')) {
// Prepare content
$content = array(
'online' => SURFBAR_DETERMINE_TOTAL_ONLINE(),
// Load template for stopped surfbar
loadTemplate('surfbar_stopped', false, $content);
}
-} elseif ((isGetRequestElementSet('check')) && (isGetRequestElementSet('id')) && (isGetRequestElementSet('salt'))) {
+} elseif ((isGetRequestParameterSet('check')) && (isGetRequestParameterSet('id')) && (isGetRequestParameterSet('salt'))) {
// Dummy next id get
- SURFBAR_DETERMINE_NEXT_ID(getRequestElement('id'));
+ SURFBAR_DETERMINE_NEXT_ID(getRequestParameter('id'));
// Check reload lock and validation code
- if ((!SURFBAR_CHECK_RELOAD_LOCK(getRequestElement('id'))) && (SURFBAR_CHECK_VALIDATION_CODE(getRequestElement('id'), getRequestElement('check'), getRequestElement('salt')))) {
+ if ((!SURFBAR_CHECK_RELOAD_LOCK(getRequestParameter('id'))) && (SURFBAR_CHECK_VALIDATION_CODE(getRequestParameter('id'), getRequestParameter('check'), getRequestParameter('salt')))) {
// Lock the URL (id) down
- SURFBAR_LOCKDOWN_ID(getRequestElement('id'));
+ SURFBAR_LOCKDOWN_ID(getRequestParameter('id'));
// Code is valid so pay points here
SURFBAR_PAY_POINTS();
$isFrameset = true;
// Frame "top" set?
- if ((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'top')) {
+ if ((isGetRequestParameterSet('frame')) && (getRequestParameter('frame') == 'top')) {
// Determine next id
$nextId = SURFBAR_DETERMINE_NEXT_ID();
// Load new URL
SURFBAR_RELOAD_TO_STOP_PAGE('stop');
}
- } elseif ((isGetRequestElementSet('frame')) && (getRequestElement('frame') == 'start')) {
+ } elseif ((isGetRequestParameterSet('frame')) && (getRequestParameter('frame') == 'start')) {
// Starter frame found so let the footer display
- unsetGetRequestElement('frame');
+ unsetGetRequestParameter('frame');
}
// Load header
</div>
</td>
</tr>
+ <tr>
+ <td align="right" width="250">{--ADMIN_NETWORK_TYPE_SELECT--}:</td>
+ <td>
+ <select name="network_type_id" class="admin_select" size="1">
+ $content[type_options]
+ </select>
+ </td>
+ </tr>
<tr>
<td align="right" width="250">{--ADMIN_NETWORK_PARAMS_KEY--}:</td>
<td>
- <select name="network_param_key" class="admin_select" size="1">
- <option value="id">{--ADMIN_NETWORK_PARAMS_ID--}</option>
- <option value="password">{--ADMIN_NETWORK_PARAMS_PASSWORD--}</option>
- <option value="reload">{--ADMIN_NETWORK_PARAMS_RELOAD--}</option>
- <option value="remain">{--ADMIN_NETWORK_PARAMS_REMAIN--}</option>
- <option value="payment">{--ADMIN_NETWORK_PARAMS_REWARD--}</option>
- <option value="erotic">{--ADMIN_NETWORK_PARAMS_EROTIC--}</option>
+ <select name="request_param_key" class="admin_select" size="1">
+ $content[key_options]
</select>
</td>
</tr>
<tr>
<td class="bottom" align="right" width="250">{--ADMIN_NETWORK_PARAMS_VALUE--}:</td>
<td class="bottom">
- <input type="text" name="network_param_value" class="admin_normal" size="10" maxlength="10" />
+ <input type="text" name="request_param_value" class="admin_normal" size="10" maxlength="10" />
</td>
</tr>
<tr>
--- /dev/null
+<div align="center">
+<form accept-charset="utf-8" action="{%url=modules.php?module=admin&what=list_network_params&network=$content[network_id]&do=handlerequestparams%}" method="post">
+<table border="0" cellspacing="0" cellpadding="0" class="admin_table dashed">
+ <tr>
+ <td colspan="4" align="center" class="admin_title bottom">
+ <div>
+ <strong>{--ADMIN_NETWORK_PARAMS_LIST_TITLE--}</strong>
+ </div>
+ <div class="tiny">
+ (<a href="$content[network_reflink]" title="$content[network_title]" target="_blank">$content[network_title]</a>)
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td align="center" class="header_column bottom right" height="25"><strong>{--ID_SELECT--}</strong></td>
+ <td align="center" class="header_column bottom right"><strong>{--ADMIN_NETWORK_TYPES_HANDLE--}</strong></td>
+ <td align="center" class="header_column bottom right"><strong>{--ADMIN_NETWORK_PARAMS_KEY--}</strong></td>
+ <td align="center" class="header_column bottom"><strong>{--ADMIN_NETWORK_PARAMS_VALUE--}</strong></td>
+ </tr>
+ $content[rows]
+ <tr>
+ <td colspan="4" class="admin_footer">
+ <input type="reset" class="admin_reset" value="{--UNDO_SELECTIONS--}" />
+ <input type="submit" name="edit" class="admin_submit" value="{--ADMIN_NETWORK_PARAMS_EDIT--}" />
+ <input type="submit" name="del" class="admin_delete" value="{--ADMIN_NETWORK_PARAMS_DELETE--}" />
+ </td>
+ </tr>
+</table>
+</form>
+
+<div class="admin_note">
+ {--ADMIN_NETWORK_PARAMS_LIST_NOTE--}
+</div>
+</div>
--- /dev/null
+<tr>
+ <td class="switch_sw$content[sw] bottom right" align="center">
+ <input type="checkbox" title="{--ID_SELECT--} $content[network_param_id]" class="admin_normal" name="sel[$content[network_param_id]]" value="1" />
+ </td>
+ <td class="switch_sw$content[sw] bottom right" align="center">
+ $content[network_type_handle]
+ </td>
+ <td class="switch_sw$content[sw] bottom right" align="center">
+ $content[request_param_key]
+ </td>
+ <td class="switch_sw$content[sw] bottom" align="center">
+ $content[request_param_value]
+ </td>
+</tr>
--- /dev/null
+<div align="center" style="margin-top:10px;margin-bottom:10px">
+
+<div style="width:550px" class="admin_table dashed">
+ <div class="admin_title bottom">
+ {--ADMIN_NETWORK_REQUEST_PARAM_ADDED_TITLE--}
+ </div>
+ <div class="admin_message">
+ Der API-Abfrageparameter $content[request_param_key]/$content[request_param_value] wurde soeben hinzugefügt.
+ Sie sollten nun als nächstes die <a href="{%url=modules.php?module=admin&what=list_network_code_types&network=$content[network_id]%}">Rückgabewerte hinzufügen</a>.
+ </div>
+</div>
+
+</div>
// Load the required file(s)
require('inc/config-global.php');
-if (((isGetRequestElementSet('user')) || (isGetRequestElementSet('reseller'))) && (isGetRequestElementSet('banner'))) {
+if (((isGetRequestParameterSet('user')) || (isGetRequestParameterSet('reseller'))) && (isGetRequestParameterSet('banner'))) {
// For later things... ;-)
$result = SQL_QUERY_ESC("SELECT `url` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `id`=%s LIMIT 1",
- array(bigintval(getRequestElement('banner'))), __FILE__, __LINE__);
+ array(bigintval(getRequestParameter('banner'))), __FILE__, __LINE__);
// Do we have the banner?
if (SQL_NUMROWS($result) == 1) {
// Update counter
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refbanner` SET `counter`=`counter`+1 WHERE `id`=%s LIMIT 1",
- array(bigintval(getRequestElement('banner'))), __FILE__, __LINE__);
+ array(bigintval(getRequestParameter('banner'))), __FILE__, __LINE__);
// Set header and ...
setContentType('image/' . substr($data['url'], -3, 3));
redirectToUrl($data['url'], false);
} else {
// @TODO No banner found, output some default banner
- logDebugMessage(__FILE__, __LINE__, 'Banner ' . bigintval(getRequestElement('banner')) . ' not dound.');
+ logDebugMessage(__FILE__, __LINE__, 'Banner ' . bigintval(getRequestParameter('banner')) . ' not dound.');
}
// Free memory