From bc72f913ef9ef26f4103d3deddb4d8be5337a1e5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 25 Nov 2009 23:25:54 +0000 Subject: [PATCH] Adding of network type handlers finished (listing is still work-in-progress) --- .gitattributes | 1 + doubler.php | 4 +- inc/extensions/ext-network.php | 2 +- inc/functions.php | 2 +- inc/install-inc.php | 8 +-- inc/language/network_de.php | 13 ++-- inc/libs/network_functions.php | 61 ++++++++++++++++++- inc/libs/user_functions.php | 10 +-- inc/modules/admin.php | 12 ++-- inc/modules/admin/what-admins_edit.php | 6 +- inc/modules/admin/what-config_beg.php | 6 +- inc/modules/admin/what-config_bonus.php | 16 ++--- inc/modules/admin/what-config_doubler.php | 10 +-- inc/modules/admin/what-config_mediadata.php | 4 +- inc/modules/admin/what-config_other.php | 10 +-- inc/modules/admin/what-config_payouts.php | 2 +- inc/modules/admin/what-config_points.php | 4 +- inc/modules/admin/what-config_primera.php | 2 +- inc/modules/admin/what-config_register2.php | 4 +- inc/modules/admin/what-config_rewrite.php | 2 +- inc/modules/admin/what-config_sponsor.php | 4 +- inc/modules/admin/what-config_surfbar.php | 6 +- inc/modules/admin/what-config_wernis.php | 4 +- inc/modules/admin/what-edit_sponsor.php | 2 +- inc/modules/admin/what-email_archiv.php | 4 +- inc/modules/admin/what-email_details.php | 6 +- inc/modules/admin/what-list_doubler.php | 4 +- inc/modules/admin/what-list_network_types.php | 2 +- inc/modules/admin/what-list_notifications.php | 4 +- inc/modules/admin/what-list_sponsor_pay.php | 2 +- inc/modules/admin/what-list_task.php | 2 +- inc/modules/admin/what-list_user.php | 10 +-- inc/modules/admin/what-refbanner.php | 14 ++--- inc/modules/admin/what-send_bonus.php | 2 +- inc/modules/admin/what-send_newsletter.php | 2 +- inc/modules/admin/what-unlock_emails.php | 2 +- inc/modules/admin/what-usage.php | 2 +- inc/modules/frametester.php | 2 +- inc/modules/guest/what-register.php | 38 ++++++------ inc/modules/guest/what-sponsor_reg.php | 6 +- inc/modules/guest/what-stats.php | 2 +- inc/modules/member/what-mydata.php | 2 +- inc/modules/member/what-order.php | 8 +-- inc/modules/member/what-payout.php | 4 +- inc/modules/member/what-primera.php | 4 +- inc/modules/member/what-surfbar_book.php | 2 +- inc/modules/member/what-wernis.php | 4 +- inc/modules/sponsor/account.php | 2 +- inc/modules/sponsor/settings.php | 2 +- inc/request-functions.php | 4 +- modules.php | 2 +- .../de/html/admin/admin_add_network_type.tpl | 4 +- .../html/admin/admin_network_type_added.tpl | 13 ++++ 53 files changed, 211 insertions(+), 139 deletions(-) create mode 100644 templates/de/html/admin/admin_network_type_added.tpl diff --git a/.gitattributes b/.gitattributes index 92b973fc9e..0e1c2fdb81 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1173,6 +1173,7 @@ templates/de/html/admin/admin_mods_stats2.tpl -text templates/de/html/admin/admin_mods_stats2_row.tpl -text templates/de/html/admin/admin_mods_stats_row.tpl -text templates/de/html/admin/admin_network_added.tpl -text +templates/de/html/admin/admin_network_type_added.tpl -text templates/de/html/admin/admin_newsletter.tpl -text templates/de/html/admin/admin_newsletter_nohtml.tpl -text templates/de/html/admin/admin_next_link.tpl -text diff --git a/doubler.php b/doubler.php index 590af15e0a..34668ed670 100644 --- a/doubler.php +++ b/doubler.php @@ -63,7 +63,7 @@ $content = array( // Begin with doubler script... if (isFormSent()) { // Secure points (so only integer/double values are allowed - setRequestPostElement('points', bigintval(postRequestElement('points'))); + setPostRequestElement('points', bigintval(postRequestElement('points'))); // Begin with doubling process if ((isPostRequestElementSet('userid')) && (isPostRequestElementSet('pass')) && (isPostRequestElementSet('points'))) { @@ -83,7 +83,7 @@ if (isFormSent()) { } // END - if // Remove any dots and unwanted chars from the points - setRequestPostElement('points', bigintval(round(convertCommaToDot(postRequestElement('points'))))); + setPostRequestElement('points', bigintval(round(convertCommaToDot(postRequestElement('points'))))); // Probe for enough points $probe_points = ((postRequestElement('points') >= getConfig('doubler_min')) && (postRequestElement('points') <= getConfig('doubler_max'))); diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index c03a1ce049..690c5324a7 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -74,7 +74,7 @@ PRIMARY KEY (`network_id`) `network_type_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `network_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `network_type_handle` VARCHAR(255) NOT NULL DEFAULT '', -`network_type_request_url` VARCHAR(255) NOT NULL DEFAULT '', +`network_type_api_url` VARCHAR(255) NOT NULL DEFAULT '', `network_type_click_url` VARCHAR(255) NOT NULL DEFAULT '', `network_type_banner_url` VARCHAR(255) NOT NULL DEFAULT '', UNIQUE `provider_type` (`network_id`,`network_type_handle`), diff --git a/inc/functions.php b/inc/functions.php index eb36b77d60..f54d18693d 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -295,7 +295,7 @@ function loadTemplate ($template, $return = false, $content = array()) { // Do we have to compile the code? $ret = ''; - if ((strpos($GLOBALS['tpl_content'], '$') !== false) || (strpos($GLOBALS['tpl_content'], '{--') !== false) || (strpos($GLOBALS['tpl_content'], '{!') !== false) || (strpos($GLOBALS['tpl_content'], '{?') !== false)) { + if ((strpos($GLOBALS['tpl_content'], '$') !== false) || (strpos($GLOBALS['tpl_content'], '{--') !== false) || (strpos($GLOBALS['tpl_content'], '{!') !== false) || (strpos($GLOBALS['tpl_content'], '{?') !== false) || (strpos($GLOBALS['tpl_content'], '{%') !== false)) { // Normal HTML output? if (getOutputMode() == '0') { // Add surrounding HTML comments to help finding bugs faster diff --git a/inc/install-inc.php b/inc/install-inc.php index 01c7ca8e08..09f399cece 100644 --- a/inc/install-inc.php +++ b/inc/install-inc.php @@ -58,25 +58,25 @@ if ((isGetRequestElementSet('page') && (getRequestElement('page') == 5))) { if (isPostRequestElementSet('smtp_user') && (!isPostRequestElementSet('smtp_host'))) { // Hostname not set addToInstallContent('
' . getMessage('INSTALL_SMTP_HOSTNAME_EMPTY') . '
'); - setRequestGetElement('page', 3); + setGetRequestElement('page', 3); } // END - if if ((!isPostRequestElementSet('smtp_pass1')) && (isPostRequestElementSet('smtp_pass2'))) { // Password is empty addToInstallContent('
' . getMessage('INSTALL_SMTP_PASS1_EMPTY') . '
'); - setRequestGetElement('page', 3); + setGetRequestElement('page', 3); } // END - if if ((isPostRequestElementSet('smtp_pass1')) && (!isPostRequestElementSet('smtp_pass2'))) { // Password repeat is empty addToInstallContent('
' . getMessage('INSTALL_SMTP_PASS2_EMPTY') . '
'); - setRequestGetElement('page', 3); + setGetRequestElement('page', 3); } // END - if if (postRequestElement('smtp_pass1') != postRequestElement('smtp_pass1')) { // Passwords are not matching addToInstallContent('
' . getMessage('INSTALL_SMTP_PASS_MISMATCH') . '
'); - setRequestGetElement('page', 3); + setGetRequestElement('page', 3); } // END - if } // END - if diff --git a/inc/language/network_de.php b/inc/language/network_de.php index c8001e8598..23d04a3f4d 100644 --- a/inc/language/network_de.php +++ b/inc/language/network_de.php @@ -51,6 +51,10 @@ addMessages(array( 'ADMIN_NETWORK_NOTHING_CHANGED' => "Es wurden keine Änderungen an den allgemeinen Daten ausgeführt.", 'ADMIN_NETWORK_NOTHING_REMOVED' => "Es wurden keine allgemeinen Daten gelöscht.", 'ADMIN_NETWORK_TYPES_404' => "Es wurden keine Werbearten zum Werbenetzwerk %s gefunden.", + 'ADMIN_NETWORK_ALREADY_ADDED' => "Ein Werbenetzwerk mit dem Kurznamen %s existiert bereits.", + 'ADMIN_NETWORK_TYPE_HANDLE_ALREADY_ADDED' => "Ein Werbeart-Handler %s existiert bereits.", + 'ADMIN_NETWORK_DATA_NOT_ADDED' => "Das Werbenetzwerk mit dem Kurznamen %s wurde nicht hinzugefügt.", + 'ADMIN_NETWORK_TYPE_NOT_ADDED' => "Der Werbeart-Handler %s wurde nicht hinzugefügt.", // - Form titles 'ADMIN_NETWORK_ADD_TITLE' => "Neues Werbenetzwerk hinzufügen - Allgemeine Daten", 'ADMIN_NETWORK_EDIT_TITLE' => "Werbenetzwerk editieren - Allgemeine Daten", @@ -62,6 +66,8 @@ addMessages(array( 'ADMIN_NETWORK_LIST_PARAMS_LINK_TITLE' => "Weiter zu den Abfrageparametern", 'ADMIN_NETWORK_LIST_CODE_TYPES_LINK_TITLE' => "Weiter zu den Rückgabewerten", 'ADMIN_NETWORK_LIST_CODES_LINK_TITLE' => "Weiter zu den Fehlercodes", + 'ADMIN_NETWORK_ADDED_TITLE' => "Allgemeine Werbenetzwerkdaten hinzugefügt.", + 'ADMIN_NETWORK_TYPE_ADDED_TITLE' => "Werbeart-Handler hinzugefügt.", // - Buttons 'ADMIN_NETWORK_ADD' => "Allgemeine Daten anlegen", 'ADMIN_NETWORK_EDIT' => "Editieren", @@ -109,15 +115,12 @@ addMessages(array( 'ADMIN_NETWORK_REQUEST_TYPE_GET' => "GET (meistens richtig)", 'ADMIN_NETWORK_REQUEST_TYPE_POST' => "POST (mehr Datenschutz)", 'ADMIN_NETWORK_CHARSET' => "Zeichensatz", - 'ADMIN_NETWORK_ALREADY_ADDED' => "Ein Werbenetzwerk mit dem Kurznamen %s existiert bereits.", - 'ADMIN_NETWORK_DATA_NOT_ADDED' => "Das Werbenetzwerk mit dem Kurznamen %s wurde nicht hinzugefügt.", - 'ADMIN_NETWORK_ADDED_TITLE' => "Allgemeine Daten hinzugefügt.", 'ADMIN_NETWORK_SEPERATOR' => "Trennzeichen", 'ADMIN_NETWORK_DATA_SEPERATOR2' => "Daten", 'ADMIN_NETWORK_ROW_SEPERATOR2' => "Zeilen", // - Advertise type - 'ADMIN_NETWORK_TYPE_HANDLE' => "Werbeart-Typ", - 'ADMIN_NETWORK_TYPE_REQUEST_URL' => "Basisabfrage-URL der Werbeart", + 'ADMIN_NETWORK_TYPE_HANDLE' => "Werbeart-Handler", + 'ADMIN_NETWORK_TYPE_API_URL' => "API-URL der Werbeart", 'ADMIN_NETWORK_TYPE_CLICK_URL' => "Klick-URL der Werbeart", 'ADMIN_NETWORK_TYPE_BANNER_URL' => "Banner-URL der Werbeart", )); diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index e173bad283..7b982e3ab7 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -98,6 +98,22 @@ function isNetworkNameValid ($name) { return $isValid; } +// Checks wether the given network type is already used (valid) +function isNetworkTypeHandleValid ($type, $networkId) { + // Query for it + $result = SQL_QUERY_ESC("SELECT `network_type_id` FROM `{?_MYSQL_PREFIX?}_network_types` WHERE `network_id`=%s AND `network_type_handle`='%s' LIMIT 1", + array($networkId, $type), __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 @@ -200,7 +216,7 @@ function doAdminNetworkProcessAddnetworkForm () { if (isNetworkNameValid(postRequestElement('network_short_name'))) { // Already there loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_ALREADY_ADDED', postRequestElement('network_short_name'))); - return; + return false; } // END - if // Remove the 'ok' part @@ -216,7 +232,7 @@ function doAdminNetworkProcessAddnetworkForm () { )", __FUNCTION__, __LINE__); // Add the id for output only - setRequestPostElement('network_id', SQL_INSERTID()); + setPostRequestElement('network_id', SQL_INSERTID()); // Output message if (SQL_AFFECTEDROWS() == 1) { @@ -250,7 +266,10 @@ function doAdminNetworkProcessHandlenetworkForm () { $networkData['network_request_type'] = generateOptionList( '/ARRAY/', array('GET','POST'), - array(getMessage('ADMIN_NETWORK_REQUEST_TYPE_GET'), getMessage('ADMIN_NETWORK_REQUEST_TYPE_POST')), + array( + getMessage('ADMIN_NETWORK_REQUEST_TYPE_GET'), + getMessage('ADMIN_NETWORK_REQUEST_TYPE_POST') + ), $networkData['network_request_type'] ); @@ -366,5 +385,41 @@ function doAdminNetworkProcessRemovenetworkForm () { } // END - if } +// Add a network type if not yet found +function doAdminNetworkProcessAddnetworktypeForm () { + // Is the network type handle already used with given network? + if (isNetworkTypeHandleValid(postRequestElement('network_type_handle'), getRequestElement('network'))) { + // Already added + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_TYPE_HANDLE_ALREADY_ADDED', postRequestElement('network_type_handle'))); + + // ... so abort here + return false; + } // END - if + + // Remove the 'ok' part + unsetPostRequestElement('ok'); + + // Add id + setPostRequestElement('network_id', getRequestElement('network')); + + // Add the whole request to database + SQL_QUERY("INSERT INTO + `{?_MYSQL_PREFIX?}_network_types` +( + `" . implode('`,`', array_keys(postRequestArray())) . "` +) VALUES ( + '" . implode("','", array_values(postRequestArray())) . "' +)", __FUNCTION__, __LINE__); + + // Output message + if (SQL_AFFECTEDROWS() == 1) { + // Successfully added + loadTemplate('admin_network_type_added', false, postRequestArray()); + } else { + // Not added + loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_NETWORK_TYPE_NOT_ADDED', postRequestElement('network_type_handle'))); + } +} + // [EOF] ?> diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index 8a0ede3f29..1c4bc867cc 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { // Add links for selecting some users function alpha ($sortby, $colspan, $return=false) { - if (!isGetRequestElementSet('offset')) setRequestGetElement('offset', 0); + if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', 0); $add = '&page='.getRequestElement('page').'&offset='.getRequestElement('offset'); if (isGetRequestElementSet('mode')) $add .= '&mode='.getRequestElement('mode'); @@ -83,8 +83,8 @@ function alpha ($sortby, $colspan, $return=false) { // Add links for sorting function addSortLinks ($letter, $sortby, $colspan, $return=false) { $OUT = ''; - if (!isGetRequestElementSet('offset')) setRequestGetElement('offset', 0); - if (!isGetRequestElementSet('page')) setRequestGetElement('page' , 0); + if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', 0); + if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 0); // Add page and offset $add = '&page=' . getRequestElement('page') . '&offset=' . getRequestElement('offset'); @@ -150,8 +150,8 @@ function addPageNavigation ($PAGES, $offset, $show_form, $colspan,$return=false) if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) { $OUT .= '-'; } else { - if (!isGetRequestElementSet('letter')) setRequestGetElement('letter', getMessage('_ALL2')); - if (!isGetRequestElementSet('sortby')) setRequestGetElement('sortby', 'userid'); + if (!isGetRequestElementSet('letter')) setGetRequestElement('letter', getMessage('_ALL2')); + if (!isGetRequestElementSet('sortby')) setGetRequestElement('sortby', 'userid'); // Base link $OUT .= '{--ADMIN_RESET_PASS--}]'; destroyAdminSession(); break; @@ -364,13 +364,13 @@ if (!isAdminRegistered()) { break; case '404': // Administrator login not found - setRequestPostElement('ok', $ret); + setPostRequestElement('ok', $ret); loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_404', getSession('admin_login'))); destroyAdminSession(); break; case 'pass': // Wrong password - setRequestPostElement('ok', $ret); + setPostRequestElement('ok', $ret); loadTemplate('admin_settings_saved', false, getMessage('WRONG_PASS')); destroyAdminSession(); break; diff --git a/inc/modules/admin/what-admins_edit.php b/inc/modules/admin/what-admins_edit.php index 4a638719c9..d87edee344 100644 --- a/inc/modules/admin/what-admins_edit.php +++ b/inc/modules/admin/what-admins_edit.php @@ -45,7 +45,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addMenuDescription('admin', __FILE__); // Set selection data to empty array when it is empty -if (!isPostRequestElementSet('sel')) setRequestPostElement('sel', array()); +if (!isPostRequestElementSet('sel')) setPostRequestElement('sel', array()); // Check if direct admin account was selected if (isGetRequestElementSet('admin')) { @@ -53,8 +53,8 @@ if (isGetRequestElementSet('admin')) { $adminId = bigintval(getRequestElement('admin')); // Set required fields - setRequestPostElement('edit', 1); - setRequestPostElement('sel', array($adminId => 1)); + setPostRequestElement('edit', 1); + setPostRequestElement('sel', array($adminId => 1)); } // END - if if ((isPostRequestElementSet('edit')) && (countPostSelection() > 0)) { diff --git a/inc/modules/admin/what-config_beg.php b/inc/modules/admin/what-config_beg.php index 3ea6ae21ff..91e66e9d30 100644 --- a/inc/modules/admin/what-config_beg.php +++ b/inc/modules/admin/what-config_beg.php @@ -46,9 +46,9 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Translate german decimal commas to computer decimal dots - setRequestPostElement('beg_points' , convertCommaToDot(postRequestElement('beg_points') )); - setRequestPostElement('beg_points_max' , convertCommaToDot(postRequestElement('beg_points_max') )); - setRequestPostElement('beg_notify_bonus', convertCommaToDot(postRequestElement('beg_notify_bonus'))); + 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'))); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index e8eb499890..7d7b6dca70 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -46,24 +46,24 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Replace german decimal commas to computer decimal dots - setRequestPostElement('login_bonus', convertCommaToDot(postRequestElement('login_bonus'))); - setRequestPostElement('turbo_bonus', convertCommaToDot(postRequestElement('turbo_bonus'))); - setRequestPostElement('bonus_ref', convertCommaToDot(postRequestElement('bonus_ref'))); - setRequestPostElement('bonus_order', convertCommaToDot(postRequestElement('bonus_order'))); - setRequestPostElement('bonus_notify_points', convertCommaToDot(postRequestElement('bonus_notify_points'))); + 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'))); // Generate string for saving ranks - setRequestPostElement('turbo_rates', ''); + setPostRequestElement('turbo_rates', ''); $RATES = array(); foreach (postRequestElement('rate') as $rate) { $rate = trim(convertCommaToDot($rate)); if (!empty($rate)) $RATES[] = $rate; } - setRequestPostElement('turbo_rates', trim(implode(';', $RATES))); + setPostRequestElement('turbo_rates', trim(implode(';', $RATES))); unsetPostRequestElement('rate'); // Automatically calculate bonus points for ranks 2 and 3 when not set - if (!isPostRequestElementSet('turbo_rates')) setRequestPostElement('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).''); + if (!isPostRequestElementSet('turbo_rates')) setPostRequestElement('turbo_rates', ''.round(getConfig('turbo_bonus') / 2).';'.round(getConfig('turbo_bonus') / 4).''); // Save data adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-config_doubler.php b/inc/modules/admin/what-config_doubler.php index 856b3a8038..a05621cc0a 100644 --- a/inc/modules/admin/what-config_doubler.php +++ b/inc/modules/admin/what-config_doubler.php @@ -46,11 +46,11 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Replace commata with decimal dot - setRequestPostElement('doubler_charge', (convertCommaToDot(postRequestElement('doubler_charge')) / 100)); - setRequestPostElement('doubler_ref' , (convertCommaToDot(postRequestElement('doubler_ref')) / 100)); - setRequestPostElement('doubler_min' , convertCommaToDot(postRequestElement('doubler_min'))); - setRequestPostElement('doubler_max' , convertCommaToDot(postRequestElement('doubler_max'))); - setRequestPostElement('doubler_left' , convertCommaToDot(postRequestElement('doubler_left'))); + 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'))); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-config_mediadata.php b/inc/modules/admin/what-config_mediadata.php index a5587ebf90..c077aa4faa 100644 --- a/inc/modules/admin/what-config_mediadata.php +++ b/inc/modules/admin/what-config_mediadata.php @@ -57,11 +57,11 @@ if (isFormSent()) { unsetPostRequestElement('year'); // Remember timestamp - setRequestPostElement('mt_start', $STAMP); + setPostRequestElement('mt_start', $STAMP); } // Convert some data - setRequestPostElement('mt_stage', bigintval(postRequestElement('mt_stage'))); + setPostRequestElement('mt_stage', bigintval(postRequestElement('mt_stage'))); if (postRequestElement('mt_stage') <= countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true)) { // Not enougth! unsetPostRequestElement('ok'); diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index 55496f34db..67ee4e01de 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -53,11 +53,11 @@ if (!isExtensionActive('other')) { // Stop saving data if one input field is !isset if (isFormSent()) { // Calculate stamps and set calculated stamps - setRequestPostElement('online_timeout' , createTimestampFromSelections('ip_timeout' , postRequestArray())); - setRequestPostElement('url_tlock' , createTimestampFromSelections('url_tlock' , postRequestArray())); - setRequestPostElement('profile_lock' , createTimestampFromSelections('profile_lock' , postRequestArray())); - setRequestPostElement('profile_update' , createTimestampFromSelections('profile_update' , postRequestArray())); - setRequestPostElement('resend_profile_update', createTimestampFromSelections('resend_profile_update', postRequestArray())); + 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())); // Online-Timeout shall be > 0 or your database will crow and crow and crow... if (!isPostRequestElementSet('online_timeout')) { unsetPostRequestElement('ok'); } diff --git a/inc/modules/admin/what-config_payouts.php b/inc/modules/admin/what-config_payouts.php index b75664a701..3ffb231efd 100644 --- a/inc/modules/admin/what-config_payouts.php +++ b/inc/modules/admin/what-config_payouts.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // Add description as navigation point addMenuDescription('admin', __FILE__); -if (isPostRequestElementSet('rate')) setRequestPostElement('rate', convertCommaToDot(postRequestElement('rate'))); +if (isPostRequestElementSet('rate')) setPostRequestElement('rate', convertCommaToDot(postRequestElement('rate'))); if ((isPostRequestElementSet('add')) && (isPostRequestElementSet('title')) && (postRequestElement('rate') > 0)) { // Add new payout type diff --git a/inc/modules/admin/what-config_points.php b/inc/modules/admin/what-config_points.php index 35f312eaf9..c763bb1edc 100644 --- a/inc/modules/admin/what-config_points.php +++ b/inc/modules/admin/what-config_points.php @@ -67,7 +67,7 @@ if (isGetRequestElementSet('sub')) { } } else { // Display overview - setRequestGetElement('sub', 'overview'); + setGetRequestElement('sub', 'overview'); } if (isFormSent()) { @@ -90,7 +90,7 @@ if (isFormSent()) { $id = bigintval($id); // Revert german commata - setRequestPostElement('percents', array($id => convertCommaToDot(postRequestElement('percents', $id)))); + setPostRequestElement('percents', array($id => convertCommaToDot(postRequestElement('percents', $id)))); // Update entry SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refdepths` SET `level`='%s', `percents`='%s' WHERE `id`=%s LIMIT 1", diff --git a/inc/modules/admin/what-config_primera.php b/inc/modules/admin/what-config_primera.php index 3e783861d8..7517618d23 100644 --- a/inc/modules/admin/what-config_primera.php +++ b/inc/modules/admin/what-config_primera.php @@ -51,7 +51,7 @@ if (isFormSent()) { // Is the password set? if (isPostRequestElementSet(('pass'))) { // Then hash and remove it - setRequestPostElement('primera_api_md5', md5(postRequestElement('pass'))); + setPostRequestElement('primera_api_md5', md5(postRequestElement('pass'))); unsetPostRequestElement('pass'); } // END - if diff --git a/inc/modules/admin/what-config_register2.php b/inc/modules/admin/what-config_register2.php index 70133170cf..523bb777eb 100644 --- a/inc/modules/admin/what-config_register2.php +++ b/inc/modules/admin/what-config_register2.php @@ -41,8 +41,8 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Calculate timestamp from selections... - setRequestPostElement('ip_timeout', createTimestampFromSelections('ip_timeout', postRequestArray())); - setRequestPostElement('least_cats', round(postRequestElement('least_cats'))); + setPostRequestElement('ip_timeout', createTimestampFromSelections('ip_timeout', postRequestArray())); + setPostRequestElement('least_cats', round(postRequestElement('least_cats'))); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-config_rewrite.php b/inc/modules/admin/what-config_rewrite.php index 3e002f7446..d2cf11cd91 100644 --- a/inc/modules/admin/what-config_rewrite.php +++ b/inc/modules/admin/what-config_rewrite.php @@ -56,7 +56,7 @@ if (isFormSent()) { } // Implode array to string and remove posted mod array - setRequestPostElement('rewrite_skip', implode(':', $MODs)); + setPostRequestElement('rewrite_skip', implode(':', $MODs)); unsetPostRequestElement('mod'); // Save settings diff --git a/inc/modules/admin/what-config_sponsor.php b/inc/modules/admin/what-config_sponsor.php index 34d51ee418..ba30ff1007 100644 --- a/inc/modules/admin/what-config_sponsor.php +++ b/inc/modules/admin/what-config_sponsor.php @@ -46,8 +46,8 @@ addMenuDescription('admin', __FILE__); if (isFormSent()) { // Allow only direct points (non-floating) - setRequestPostElement('sponsor_min_points', bigintval(postRequestElement('sponsor_min_points'))); - setRequestPostElement('sponsor_ref_points', bigintval(postRequestElement('sponsor_ref_points'))); + setPostRequestElement('sponsor_min_points', bigintval(postRequestElement('sponsor_min_points'))); + setPostRequestElement('sponsor_ref_points', bigintval(postRequestElement('sponsor_ref_points'))); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-config_surfbar.php b/inc/modules/admin/what-config_surfbar.php index b38fed5a2c..3b34e9b656 100644 --- a/inc/modules/admin/what-config_surfbar.php +++ b/inc/modules/admin/what-config_surfbar.php @@ -47,9 +47,9 @@ addMenuDescription('admin', __FILE__); // Was the form submitted? if (isFormSent()) { // Replace german decimal comma with computer decimal dot - if (isPostRequestElementSet(('surfbar_static_reward'))) setRequestPostElement('surfbar_static_reward' , convertCommaToDot(postRequestElement('surfbar_static_reward'))); - if (isPostRequestElementSet(('surfbar_static_costs'))) setRequestPostElement('surfbar_static_costs' , convertCommaToDot(postRequestElement('surfbar_static_costs'))); - if (isPostRequestElementSet(('surfbar_dynamic_percent'))) setRequestPostElement('surfbar_dynamic_percent', convertCommaToDot(postRequestElement('surfbar_dynamic_percent'))); + 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'))); // Save settings adminSaveSettingsFromPostData(); diff --git a/inc/modules/admin/what-config_wernis.php b/inc/modules/admin/what-config_wernis.php index f7f0d0aa4a..8ba62a9cd4 100644 --- a/inc/modules/admin/what-config_wernis.php +++ b/inc/modules/admin/what-config_wernis.php @@ -52,11 +52,11 @@ if (isFormSent()) { if (WERNIS_TEST_API()) { // Revert german commata foreach (array('payout_factor', 'withdraw_factor', 'payout_fee_percent', 'withdraw_fee_percent') as $revert) { - setRequestPostElement('wernis_' . $revert, postRequestElement('wernis_' . $revert)); + setPostRequestElement('wernis_' . $revert, postRequestElement('wernis_' . $revert)); } // END - if // Hash the password and remove clear-text - setRequestPostElement('wernis_pass_md5', md5(postRequestElement('wernis_pass'))); + setPostRequestElement('wernis_pass_md5', md5(postRequestElement('wernis_pass'))); unsetPostRequestElement('wernis_pass'); // Save settings diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php index c45ffdef0e..d3895cd5c7 100644 --- a/inc/modules/admin/what-edit_sponsor.php +++ b/inc/modules/admin/what-edit_sponsor.php @@ -151,7 +151,7 @@ LIMIT 1", postRequestElement('gender' , translateGender(postRequestElement('gender'))); postRequestElement('warning_interval', createFancyTime(postRequestElement('warning_interval'))); - if ($PASS === false) setRequestPostElement('pass1', getMessage('SPONSOR_PASS_UNCHANGED')); + if ($PASS === false) setPostRequestElement('pass1', getMessage('SPONSOR_PASS_UNCHANGED')); // Load email template and send the mail away $message = loadEmailTemplate('admin_sponsor_edit', postRequestArray(), false); diff --git a/inc/modules/admin/what-email_archiv.php b/inc/modules/admin/what-email_archiv.php index 5e75ebb3c6..045ec1f2ae 100644 --- a/inc/modules/admin/what-email_archiv.php +++ b/inc/modules/admin/what-email_archiv.php @@ -61,8 +61,8 @@ ORDER BY $result_maximum = SQL_QUERY($sql, __FILE__, __LINE__); // Set offset an current page to default values -if (!isGetRequestElementSet('page')) setRequestGetElement('page' , 1); -if (!isGetRequestElementSet('offset')) setRequestGetElement('offset', getConfig('mails_page')); +if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 1); +if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', getConfig('mails_page')); // Add limitation to SQL string $sql .= " LIMIT ".(getRequestElement('offset') * getRequestElement('page') - getRequestElement('offset')) . ', ' . getRequestElement('offset'); diff --git a/inc/modules/admin/what-email_details.php b/inc/modules/admin/what-email_details.php index 8a1a30c8c9..33d0af9168 100644 --- a/inc/modules/admin/what-email_details.php +++ b/inc/modules/admin/what-email_details.php @@ -98,15 +98,15 @@ ORDER BY timestamp DESC"; $result_normal = SQL_QUERY($sql, __FILE__, __LINE__); // Set offset an current page to default values -if (!isGetRequestElementSet('page')) setRequestGetElement('page', 1); +if (!isGetRequestElementSet('page')) setGetRequestElement('page', 1); if (!isGetRequestElementSet('offset')) { if (isConfigEntrySet('mails_page')) { // Set config entry - setRequestGetElement('offset', getConfig('mails_page')); + setGetRequestElement('offset', getConfig('mails_page')); } else { // Set default one - setRequestGetElement('offset', 10); + setGetRequestElement('offset', 10); } } // END - if diff --git a/inc/modules/admin/what-list_doubler.php b/inc/modules/admin/what-list_doubler.php index b70e3aca81..b979debaa5 100644 --- a/inc/modules/admin/what-list_doubler.php +++ b/inc/modules/admin/what-list_doubler.php @@ -46,10 +46,10 @@ addMenuDescription('admin', __FILE__); if (!isGetRequestElementSet('mode')) { // Chosse the overview page as default - setRequestGetElement('mode', 'overview'); + setGetRequestElement('mode', 'overview'); } else { // Set table title automatically - if (!isGetRequestElementSet('select')) setRequestGetElement('select', 'all'); + if (!isGetRequestElementSet('select')) setGetRequestElement('select', 'all'); // Prepare header $content['list_' . strtolower(getRequestElement('mode'))] = getMessage('ADMIN_DOUBLER_LIST_' . strtoupper(getRequestElement('mode')) . '_' . strtoupper(getRequestElement('select')).''); diff --git a/inc/modules/admin/what-list_network_types.php b/inc/modules/admin/what-list_network_types.php index 4917d692a3..2a584e54b7 100644 --- a/inc/modules/admin/what-list_network_types.php +++ b/inc/modules/admin/what-list_network_types.php @@ -60,7 +60,7 @@ if (isGetRequestElementSet('network')) { // Load all advert types for given network $result = SQL_QUERY_ESC("SELECT - `network_type_id`, `network_type_handle`, `network_type_request_url`, `network_type_click_url`, `network_type_banner_url` + `network_type_id`, `network_type_handle`, `network_type_api_url`, `network_type_click_url`, `network_type_banner_url` FROM `{?_MYSQL_PREFIX?}_network_types` WHERE diff --git a/inc/modules/admin/what-list_notifications.php b/inc/modules/admin/what-list_notifications.php index 2c6d17113b..220213e517 100644 --- a/inc/modules/admin/what-list_notifications.php +++ b/inc/modules/admin/what-list_notifications.php @@ -49,8 +49,8 @@ $SQL2 = ''; $result_max = false; // Set offset an current page to default values -if (!isGetRequestElementSet('page')) setRequestGetElement('page' , 1); -if (!isGetRequestElementSet('offset')) setRequestGetElement('offset', getConfig('mails_page')); +if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 1); +if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', getConfig('mails_page')); if (isExtensionActive('bonus')) { // Bonus mails sent by you diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index b6cd58aa7a..09607f03fe 100644 --- a/inc/modules/admin/what-list_sponsor_pay.php +++ b/inc/modules/admin/what-list_sponsor_pay.php @@ -51,7 +51,7 @@ if (isPostRequestElementSet('add')) { if (!isPostRequestElementSet('pay_name')) unsetPostRequestElement('add'); if ((round(postRequestElement('pay_rate')) == '0') || (!isPostRequestElementSet('pay_rate'))) unsetPostRequestElement('add'); - setRequestPostElement('pay_min_count', bigintval(postRequestElement('pay_min_count'))); + setPostRequestElement('pay_min_count', bigintval(postRequestElement('pay_min_count'))); if ((postRequestElement('pay_min_count') == '0') || (!isPostRequestElementSet('pay_min_count'))) unsetPostRequestElement('add'); if (!isPostRequestElementSet('pay_currency')) unsetPostRequestElement('add'); diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index 1d085886b8..c14cecc846 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -50,7 +50,7 @@ if (!isExtensionActive('task')) { } // END - if $whereStatement = ''; -if (!isGetRequestElementSet('type')) setRequestGetElement('type', 'your'); +if (!isGetRequestElementSet('type')) setGetRequestElement('type', 'your'); switch (getRequestElement('type')) { case 'your': // List only your own open (new) tasks diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index 5c3c32052c..3d497c18d3 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -85,9 +85,9 @@ if (isExtensionActive('country')) { } // Init unset data -if (!isGetRequestElementSet('letter')) { setRequestGetElement('letter', getMessage('_ALL2')); } -if (!isGetRequestElementSet('sortby')) { setRequestGetElement('sortby', 'userid'); } -if (!isGetRequestElementSet('page')) { setRequestGetElement('page' , 1); } +if (!isGetRequestElementSet('letter')) { setGetRequestElement('letter', getMessage('_ALL2')); } +if (!isGetRequestElementSet('sortby')) { setGetRequestElement('sortby', 'userid'); } +if (!isGetRequestElementSet('page')) { setGetRequestElement('page' , 1); } // Set base URL $base = '[ postRequestElement('text')), $content['userid']); diff --git a/inc/modules/admin/what-unlock_emails.php b/inc/modules/admin/what-unlock_emails.php index d4b0986a4d..6a9ef73d15 100644 --- a/inc/modules/admin/what-unlock_emails.php +++ b/inc/modules/admin/what-unlock_emails.php @@ -148,7 +148,7 @@ LIMIT 1", sendEmail($content['sender'], getMessage('MEMBER_ORDER_REJECTED'), $message_user); // If you do not enter an URL to redirect to, your URL will be set! - if ((!isPostRequestElementSet('redirect')) || (postRequestElement('redirect') == 'http://')) setRequestPostElement('redirect', getConfig('URL')); + if ((!isPostRequestElementSet('redirect')) || (postRequestElement('redirect') == 'http://')) setPostRequestElement('redirect', getConfig('URL')); // Redirect URL SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_pool` SET url='%s', `data_type`='NEW' WHERE `id`=%s LIMIT 1", diff --git a/inc/modules/admin/what-usage.php b/inc/modules/admin/what-usage.php index 95bcbdf183..b64e5ec7f6 100644 --- a/inc/modules/admin/what-usage.php +++ b/inc/modules/admin/what-usage.php @@ -54,7 +54,7 @@ if (isGetRequestElementSet('image')) { getConfig('usage_base') ); } else { - if (strpos(getRequestElement('image'), "\\") > 0) setRequestGetElement('image', substr(getRequestElement('image'), 0, strpos(getRequestElement('image'), "\\"))); + if (strpos(getRequestElement('image'), "\\") > 0) setGetRequestElement('image', substr(getRequestElement('image'), 0, strpos(getRequestElement('image'), "\\"))); $FQFN = sprintf("%s%s/%s_usage_%s.png", getConfig('PATH'), getConfig('usage_base'), diff --git a/inc/modules/frametester.php b/inc/modules/frametester.php index 61ffa739d2..1bff771c2f 100644 --- a/inc/modules/frametester.php +++ b/inc/modules/frametester.php @@ -56,7 +56,7 @@ if (isGetRequestElementSet('order')) { list($sub, $url) = SQL_FETCHROW($result); // This fixes a white page - setRequestPostElement('url', $url); + setPostRequestElement('url', $url); // Mode is member $mode = 'member'; diff --git a/inc/modules/guest/what-register.php b/inc/modules/guest/what-register.php index e740c70dda..30f65f14cb 100644 --- a/inc/modules/guest/what-register.php +++ b/inc/modules/guest/what-register.php @@ -59,16 +59,16 @@ $cats = '0'; $ipTimedOut = false; // Default refid is zero -setRequestPostElement('refid', 0); +setPostRequestElement('refid', 0); if (determineReferalId() > 0) { // Test if the refid is valid if (!fetchUserData(determineReferalId())) { // Not found so we set your refid! - setRequestPostElement('refid', getConfig('def_refid')); + setPostRequestElement('refid', getConfig('def_refid')); setSession('refid', getConfig('def_refid')); } else { // Use the refid here - setRequestPostElement('refid', determineReferalId()); + setPostRequestElement('refid', determineReferalId()); } } // END - if @@ -77,24 +77,24 @@ if (isFormSent()) { // // Did he agree to our Terms Of Usage? if (postRequestElement('agree') != 'Y') { - setRequestPostElement('agree', '!'); + setPostRequestElement('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')))) { - setRequestPostElement('email', '!'); + setPostRequestElement('email', '!'); $isOkay = false; } // END - if // And what about surname and family's name? if (!isPostRequestElementSet('surname')) { - setRequestPostElement('surname', '!'); + setPostRequestElement('surname', '!'); $isOkay = false; } // END - if if (!isPostRequestElementSet('family')) { - setRequestPostElement('family', '!'); + setPostRequestElement('family', '!'); $isOkay = false; } // END - if @@ -110,11 +110,11 @@ if (isFormSent()) { // 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'))) { - setRequestPostElement('pass1', '!'); - setRequestPostElement('pass2', '!'); + setPostRequestElement('pass1', '!'); + setPostRequestElement('pass2', '!'); } else { - if (!isPostRequestElementSet('pass1')) { setRequestPostElement('pass1', '!'); } else { setRequestPostElement('pass1', ''); } - if (!isPostRequestElementSet('pass2')) { setRequestPostElement('pass2', '!'); } else { setRequestPostElement('pass2', ''); } + if (!isPostRequestElementSet('pass1')) { setPostRequestElement('pass1', '!'); } else { setPostRequestElement('pass1', ''); } + if (!isPostRequestElementSet('pass2')) { setPostRequestElement('pass2', '!'); } else { setPostRequestElement('pass2', ''); } } $isOkay = false; } // END - if @@ -141,7 +141,7 @@ if (isFormSent()) { if ((postRequestElement('email') != '!') && (getConfig('check_double_email') == 'Y')) { // Does the email address already exists in our database? if ((!isAdmin()) && (isEmailTaken(postRequestElement('email')))) { - setRequestPostElement('email', '?'); + setPostRequestElement('email', '?'); $isOkay = false; } // END - if } // END - if @@ -174,8 +174,8 @@ LIMIT 1", //* DEBUG: */ print intval(isFormSent()).'/'.intval($isOkay).'/'.intval(isAdmin()).'
'; if ((isFormSent()) && (($isOkay === true) || (isAdmin()))) { // Prepapre month and day of birth - if (strlen(postRequestElement('day')) == 1) setRequestPostElement('day' , 0 . postRequestElement('day')); - if (strlen(postRequestElement('month')) == 1) setRequestPostElement('month', 0 . postRequestElement('month')); + if (strlen(postRequestElement('day')) == 1) setPostRequestElement('day' , 0 . postRequestElement('day')); + if (strlen(postRequestElement('month')) == 1) setPostRequestElement('month', 0 . postRequestElement('month')); // Get total ... // ... confirmed, ... @@ -309,7 +309,7 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF $gender = translateGender(postRequestElement('gender')); // ... rewrite a zero referal id to the main title - if (postRequestElement('refid') == '0') setRequestPostElement('refid', getConfig('MAIN_TITLE')); + if (postRequestElement('refid') == '0') setPostRequestElement('refid', getConfig('MAIN_TITLE')); // Is ZIP code set? if (isPostRequestElementSet('zip')) { @@ -378,20 +378,20 @@ VALUES ('%s','%s','%s','%s','%s',%s,'%s','%s',%s, %s,%s,'%s',%s, %s,'%s','UNCONF if (postRequestElement('email') == '!') { registerOutputFailedMessage('ENTER_EMAIL'); - setRequestPostElement('email', ''); + setPostRequestElement('email', ''); } elseif (postRequestElement('email') == '?') { registerOutputFailedMessage('EMAIL_ALREADY_DB'); - setRequestPostElement('email', ''); + setPostRequestElement('email', ''); } if (postRequestElement('surname') == '!') { registerOutputFailedMessage('ENTER_SURNAME'); - setRequestPostElement('surname', ''); + setPostRequestElement('surname', ''); } // END - if if (postRequestElement('family') == '!') { registerOutputFailedMessage('ENTER_FAMILY'); - setRequestPostElement('family', ''); + setPostRequestElement('family', ''); } // END - if if ((postRequestElement('pass1') == '!') && (postRequestElement('pass2') == '!')) { diff --git a/inc/modules/guest/what-sponsor_reg.php b/inc/modules/guest/what-sponsor_reg.php index 715dc6c2c9..bd0e3820dd 100644 --- a/inc/modules/guest/what-sponsor_reg.php +++ b/inc/modules/guest/what-sponsor_reg.php @@ -114,7 +114,7 @@ if (isFormSent()) { } elseif (bigintval(postRequestElement('zip')) != postRequestElement('zip')) { // ZIP is invalid $FORM_ERRORS[] = getMessage('SPONSOR_ZIP_IS_INVALID'); - setRequestPostElement('zip', ''); + setPostRequestElement('zip', ''); } // 4. City @@ -136,7 +136,7 @@ if (isFormSent()) { } elseif (!isUrlValid(postRequestElement('url'))) { // Homepage URL is invalid $FORM_ERRORS[] = getMessage('SPONSOR_URL_IS_INVALID'); - setRequestPostElement('url', ''); + setPostRequestElement('url', ''); } // 7. Light validation of email address @@ -146,7 +146,7 @@ if (isFormSent()) { } elseif (isSponsorRegisteredWithEmail(postRequestElement('email'))) { // Email already found in database! $FORM_ERRORS[] = getMessage('SPONSOR_EMAIL_IS_ALREADY_REGISTERED'); - setRequestPostElement('email', ''); + setPostRequestElement('email', ''); } // 8. Pay type selected? diff --git a/inc/modules/guest/what-stats.php b/inc/modules/guest/what-stats.php index ff73dc5c3c..c57629a7f2 100644 --- a/inc/modules/guest/what-stats.php +++ b/inc/modules/guest/what-stats.php @@ -45,7 +45,7 @@ if (!defined('__SECURITY')) { addMenuDescription('guest', __FILE__); // Derterminate which stats we want and set mode and title for the link below stats block -if (!isGetRequestElementSet('mode')) setRequestGetElement('mode', strtolower(getConfig('guest_stats'))); +if (!isGetRequestElementSet('mode')) setGetRequestElement('mode', strtolower(getConfig('guest_stats'))); // Set config temporarily setConfigEntry('guest_stats', strtoupper(getRequestElement('mode'))); diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index e88a8f8553..61de7486e9 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -226,7 +226,7 @@ LIMIT 1", } else { $mode .= ';email'; } - setRequestPostElement('old_email', $content['email']); + setPostRequestElement('old_email', $content['email']); } // END - if // Update member's profile diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index e4cd406947..d067869ada 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -147,7 +147,7 @@ LIMIT 1", // Shall I test the subject line against URLs? if (getConfig('allow_url_in_subject') == 'Y') { // Check the subject line for issues - setRequestPostElement('subject', str_replace("\\", '[nl]', substr(postRequestElement('subject'), 0, 200))); + setPostRequestElement('subject', str_replace("\\", '[nl]', substr(postRequestElement('subject'), 0, 200))); if ((strpos(strtolower(postRequestElement('subject')), 'http://') > -1) || (strpos(strtolower(postRequestElement('subject')), "www") > -1)) { // URL in subject found $URL = 'modules.php?module=login&what=order&code=' . getCode('SUBJ_URL'); @@ -189,13 +189,13 @@ LIMIT 1", // HTML or regular text mail? if (postRequestElement('html') == 'Y') { // Chek for valid HTML tags - setRequestPostElement('text', checkHtmlTags(postRequestElement('text'))); + setPostRequestElement('text', checkHtmlTags(postRequestElement('text'))); // Maybe invalid tags found? if (!isPostRequestElementSet('text')) $URL = 'modules.php?module=login&what=order&code=' . getCode('INVALID_TAGS')."&id=".$id; } else { // Remove any HTML code - setRequestPostElement('text', str_replace('<', '{OPEN_HTML}', str_replace('>', '{CLOSE_HTML}', postRequestElement('text')))); + setPostRequestElement('text', str_replace('<', '{OPEN_HTML}', str_replace('>', '{CLOSE_HTML}', postRequestElement('text')))); } } } elseif (!isAdmin()) { @@ -287,7 +287,7 @@ LIMIT 1", $USED = $content['target_send'] * getPaymentPoints(bigintval(postRequestElement('type'))); // Fix empty zip code - if (!isPostRequestElementSet('zip')) setRequestPostElement('zip', 0); + if (!isPostRequestElementSet('zip')) setPostRequestElement('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)) { diff --git a/inc/modules/member/what-payout.php b/inc/modules/member/what-payout.php index 4849108093..9d495c37d8 100644 --- a/inc/modules/member/what-payout.php +++ b/inc/modules/member/what-payout.php @@ -172,8 +172,8 @@ ORDER BY // Ok, he can get be paid if ((isFormSent()) && ($points <= $PAY_MAX) && ($points >= $content['min_points'])) { // Remember points in array - setRequestPostElement('payout_points', translateComma($points)); - setRequestPostElement('type' , $content['type']); + setPostRequestElement('payout_points', translateComma($points)); + setPostRequestElement('type' , $content['type']); // Subtract points from member's account subtractPoints('payout', getMemberId(), $points); diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index 358cbbef65..f87b0b5ba6 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -72,7 +72,7 @@ if (!isGetRequestElementSet('mode')) { // Is there an id? if ((!empty($content['primera_nickname'])) && (!isGetRequestElementSet('mode'))) { // Then use an other "mode" - setRequestGetElement('mode', 'list'); + setGetRequestElement('mode', 'list'); // And load all rows! $result = SQL_QUERY_ESC("SELECT `id`,`primera_account`,`primera_amount`,`primera_timestamp`,`primera_type` FROM `{?_MYSQL_PREFIX?}_user_primera` WHERE `userid`=%s ORDER BY `primera_timestamp` DESC", @@ -100,7 +100,7 @@ if (!isGetRequestElementSet('mode')) { SQL_FREERESULT($result); } else { // Mode pay - setRequestGetElement('mode', 'pay'); + setGetRequestElement('mode', 'pay'); } } // END - if diff --git a/inc/modules/member/what-surfbar_book.php b/inc/modules/member/what-surfbar_book.php index f7fda21c00..50553b5d6e 100644 --- a/inc/modules/member/what-surfbar_book.php +++ b/inc/modules/member/what-surfbar_book.php @@ -60,7 +60,7 @@ if (!SURFBAR_IF_USER_BOOK_MORE_URLS()) { // Is limitation "no" and "limit" is > 0? if ((postRequestElement('limited') != 'Y') && ((isPostRequestElementSet(('limit'))) && (postRequestElement('limit') > 0)) || (!isPostRequestElementSet(('limit')))) { // Set it to unlimited - setRequestPostElement('limit', 0); + setPostRequestElement('limit', 0); } // END - if // Register the new URL diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index 4cc84984c0..5959b8cb40 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -71,7 +71,7 @@ if ((!isGetRequestElementSet('mode')) || (getRequestElement('mode') == 'choose') // Is there an id? if ((!empty($content['wernis_userid'])) && (!isGetRequestElementSet('mode'))) { // Then use an other "mode" - setRequestGetElement('mode', 'list'); + setGetRequestElement('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", @@ -115,7 +115,7 @@ if ((!isGetRequestElementSet('mode')) || (getRequestElement('mode') == 'choose') } // END - if // Mode chooser! ;-) - setRequestGetElement('mode', 'choose'); + setGetRequestElement('mode', 'choose'); } } elseif ((getRequestElement('mode') == 'payout') && (getConfig('wernis_payout_active') == 'Y')) { // Get total points and check if the user can request a payout diff --git a/inc/modules/sponsor/account.php b/inc/modules/sponsor/account.php index 4e55d6b717..de9bd7f3ca 100644 --- a/inc/modules/sponsor/account.php +++ b/inc/modules/sponsor/account.php @@ -103,7 +103,7 @@ if (SQL_NUMROWS($result) == 1) { } // Set last change timestamp - setRequestPostElement('last_change', 'UNIX_TIMESTAMP()'); + setPostRequestElement('last_change', 'UNIX_TIMESTAMP()'); // Save data $message = saveSponsorData(postRequestArray(), $content); diff --git a/inc/modules/sponsor/settings.php b/inc/modules/sponsor/settings.php index 1620435b82..238d8e6bb7 100644 --- a/inc/modules/sponsor/settings.php +++ b/inc/modules/sponsor/settings.php @@ -91,7 +91,7 @@ if (SQL_NUMROWS($result) == 1) { } // END - if // Set last change timestamp - setRequestPostElement('last_change', 'UNIX_TIMESTAMP()'); + setPostRequestElement('last_change', 'UNIX_TIMESTAMP()'); // Save data $message = saveSponsorData(postRequestArray(), $content); diff --git a/inc/request-functions.php b/inc/request-functions.php index ed1a0a78c2..c417c560c1 100644 --- a/inc/request-functions.php +++ b/inc/request-functions.php @@ -105,7 +105,7 @@ function countRequestGet () { } // Setter for element in $_GET -function setRequestGetElement ($element, $value) { +function setGetRequestElement ($element, $value) { // Escape both $element = SQL_ESCAPE($element); $value = SQL_ESCAPE($value); @@ -189,7 +189,7 @@ function countRequestPost () { } // Setter for element in $_POST -function setRequestPostElement ($element, $value) { +function setPostRequestElement ($element, $value) { // Is $element or $value an array? if (is_array($element)) { // Set array diff --git a/modules.php b/modules.php index 57c3bed639..f6abef2d6d 100644 --- a/modules.php +++ b/modules.php @@ -58,7 +58,7 @@ setContentType('text/html'); // Fix missing module to 'index' if (!isGetRequestElementSet('module')) { // Set element - setRequestGetElement('module', 'index'); + setGetRequestElement('module', 'index'); // ... and module setModule('index'); diff --git a/templates/de/html/admin/admin_add_network_type.tpl b/templates/de/html/admin/admin_add_network_type.tpl index ec946ffabf..217a572e93 100644 --- a/templates/de/html/admin/admin_add_network_type.tpl +++ b/templates/de/html/admin/admin_add_network_type.tpl @@ -29,9 +29,9 @@ - {--ADMIN_NETWORK_TYPE_REQUEST_URL--}: + {--ADMIN_NETWORK_TYPE_API_URL--}: - + diff --git a/templates/de/html/admin/admin_network_type_added.tpl b/templates/de/html/admin/admin_network_type_added.tpl new file mode 100644 index 0000000000..81084ddd1b --- /dev/null +++ b/templates/de/html/admin/admin_network_type_added.tpl @@ -0,0 +1,13 @@ +
+ + + +
-- 2.30.2