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
// 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'))) {
} // 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')));
`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`),
// 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
if (isPostRequestElementSet('smtp_user') && (!isPostRequestElementSet('smtp_host'))) {
// Hostname not set
addToInstallContent('<div class="para">' . getMessage('INSTALL_SMTP_HOSTNAME_EMPTY') . '</div>');
- setRequestGetElement('page', 3);
+ setGetRequestElement('page', 3);
} // END - if
if ((!isPostRequestElementSet('smtp_pass1')) && (isPostRequestElementSet('smtp_pass2'))) {
// Password is empty
addToInstallContent('<div class="para">' . getMessage('INSTALL_SMTP_PASS1_EMPTY') . '</div>');
- setRequestGetElement('page', 3);
+ setGetRequestElement('page', 3);
} // END - if
if ((isPostRequestElementSet('smtp_pass1')) && (!isPostRequestElementSet('smtp_pass2'))) {
// Password repeat is empty
addToInstallContent('<div class="para">' . getMessage('INSTALL_SMTP_PASS2_EMPTY') . '</div>');
- setRequestGetElement('page', 3);
+ setGetRequestElement('page', 3);
} // END - if
if (postRequestElement('smtp_pass1') != postRequestElement('smtp_pass1')) {
// Passwords are not matching
addToInstallContent('<div class="para">' . getMessage('INSTALL_SMTP_PASS_MISMATCH') . '</div>');
- setRequestGetElement('page', 3);
+ setGetRequestElement('page', 3);
} // END - if
} // END - if
'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 <span class=\"data\">%s</span> gefunden.",
+ 'ADMIN_NETWORK_ALREADY_ADDED' => "Ein Werbenetzwerk mit dem Kurznamen <span class=\"data\">%s</span> existiert bereits.",
+ 'ADMIN_NETWORK_TYPE_HANDLE_ALREADY_ADDED' => "Ein Werbeart-Handler <span class=\"data\">%s</span> existiert bereits.",
+ 'ADMIN_NETWORK_DATA_NOT_ADDED' => "Das Werbenetzwerk mit dem Kurznamen <span class=\"data\">%s</span> wurde nicht hinzugefügt.",
+ 'ADMIN_NETWORK_TYPE_NOT_ADDED' => "Der Werbeart-Handler <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_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",
'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 <span class=\"data\">%s</span> existiert bereits.",
- 'ADMIN_NETWORK_DATA_NOT_ADDED' => "Das Werbenetzwerk mit dem Kurznamen <span class=\"data\">%s</span> 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",
));
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
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
)", __FUNCTION__, __LINE__);
// Add the id for output only
- setRequestPostElement('network_id', SQL_INSERTID());
+ setPostRequestElement('network_id', SQL_INSERTID());
// Output message
if (SQL_AFFECTEDROWS() == 1) {
$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']
);
} // 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]
?>
// 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');
// 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');
if (($page == getRequestElement('page')) || ((!isGetRequestElementSet('page')) && ($page == 1))) {
$OUT .= '<strong>-';
} 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 .= '<a href="{%url=modules.php?module=admin&what=' . getWhat();
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')))) {
- setRequestPostElement('ok', '***');
+ setPostRequestElement('ok', '***');
} // END - if
if ((isFormSent()) && (postRequestElement('ok') != '***')) {
// Check if the admin has submitted data or not
if ((isFormSent()) && ((!isPostRequestElementSet('login')) || (!isPostRequestElementSet('pass')) || (strlen(postRequestElement('pass')) < 4))) {
- setRequestPostElement('ok', '***');
+ setPostRequestElement('ok', '***');
} // END - if
if ((isFormSent()) && (postRequestElement('ok') != '***')) {
break;
case '404': // Administrator login not found
- setRequestPostElement('ok', $ret);
+ setPostRequestElement('ok', $ret);
$ret = getMaskedMessage('ADMIN_404', postRequestElement('login'));
destroyAdminSession();
break;
case 'pass': // Wrong password
- setRequestPostElement('ok', $ret);
+ setPostRequestElement('ok', $ret);
$ret = '{--WRONG_PASS--} [<a href="{%url=modules.php?module=admin&reset_pass=1%}">{--ADMIN_RESET_PASS--}</a>]';
destroyAdminSession();
break;
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;
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')) {
$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)) {
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();
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();
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();
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');
// 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'); }
// 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
}
} else {
// Display overview
- setRequestGetElement('sub', 'overview');
+ setGetRequestElement('sub', 'overview');
}
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",
// 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
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();
}
// Implode array to string and remove posted mod array
- setRequestPostElement('rewrite_skip', implode(':', $MODs));
+ setPostRequestElement('rewrite_skip', implode(':', $MODs));
unsetPostRequestElement('mod');
// Save settings
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();
// 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();
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
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);
$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');
$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
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')).'');
// 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
$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
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');
} // 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
}
// 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 = '[<a href="{%url=modules.php?module=admin';
// Activate the extension please!
$PAGES = round(SQL_NUMROWS($result_master) / getConfig('user_limit') + 0.5);
- if (!isGetRequestElementSet('page')) setRequestGetElement('page' , 1);
- if (!isGetRequestElementSet('offset')) setRequestGetElement('offset', getConfig('user_limit'));
+ if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 1);
+ if (!isGetRequestElementSet('offset')) setGetRequestElement('offset', getConfig('user_limit'));
// Add limitation to SQL string and run him again
$sql .= " LIMIT ".(getRequestElement('offset') * getRequestElement('page') - getRequestElement('offset')).", ".getRequestElement('offset');
if (isFormSent()) {
// Fix older calls from add-new-banner-form
- if (!isGetRequestElementSet('mode')) setRequestGetElement('mode', 'add');
+ if (!isGetRequestElementSet('mode')) setGetRequestElement('mode', 'add');
$sql = '';
switch (getRequestElement('mode')) {
case 'add':
// 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'),
- $id
- ), __FILE__, __LINE__);
+ array(
+ postRequestElement('url', $id),
+ postRequestElement('alternate', $id),
+ postRequestElement('visible'),
+ $id
+ ), __FILE__, __LINE__);
}
break;
}
} // END - if
// Set empty mode to "select"
-if (!isGetRequestElementSet('mode')) setRequestGetElement('mode', "select");
+if (!isGetRequestElementSet('mode')) setGetRequestElement('mode', "select");
if (isFormSent()) {
// Deliver bonus mail
}
// Compile message
- setRequestPostElement('text', compileCode(postRequestElement('text')));
+ setPostRequestElement('text', compileCode(postRequestElement('text')));
// Load template
$message = loadEmailTemplate($template, array('text' => postRequestElement('text')), $content['userid']);
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",
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'),
list($sub, $url) = SQL_FETCHROW($result);
// This fixes a white page
- setRequestPostElement('url', $url);
+ setPostRequestElement('url', $url);
// Mode is member
$mode = 'member';
$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
//
// 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
// 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
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
//* 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) 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, ...
$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')) {
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') == '!')) {
} elseif (bigintval(postRequestElement('zip')) != postRequestElement('zip')) {
// ZIP is invalid
$FORM_ERRORS[] = getMessage('SPONSOR_ZIP_IS_INVALID');
- setRequestPostElement('zip', '');
+ setPostRequestElement('zip', '');
}
// 4. City
} 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
} 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?
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')));
} else {
$mode .= ';email';
}
- setRequestPostElement('old_email', $content['email']);
+ setPostRequestElement('old_email', $content['email']);
} // END - if
// Update member's profile
// 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');
// 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()) {
$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)) {
// 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);
// 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",
SQL_FREERESULT($result);
} else {
// Mode pay
- setRequestGetElement('mode', 'pay');
+ setGetRequestElement('mode', 'pay');
}
} // END - if
// 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
// 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",
} // 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
}
// Set last change timestamp
- setRequestPostElement('last_change', 'UNIX_TIMESTAMP()');
+ setPostRequestElement('last_change', 'UNIX_TIMESTAMP()');
// Save data
$message = saveSponsorData(postRequestArray(), $content);
} // END - if
// Set last change timestamp
- setRequestPostElement('last_change', 'UNIX_TIMESTAMP()');
+ setPostRequestElement('last_change', 'UNIX_TIMESTAMP()');
// Save data
$message = saveSponsorData(postRequestArray(), $content);
}
// Setter for element in $_GET
-function setRequestGetElement ($element, $value) {
+function setGetRequestElement ($element, $value) {
// Escape both
$element = SQL_ESCAPE($element);
$value = SQL_ESCAPE($value);
}
// 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
// Fix missing module to 'index'
if (!isGetRequestElementSet('module')) {
// Set element
- setRequestGetElement('module', 'index');
+ setGetRequestElement('module', 'index');
// ... and module
setModule('index');
</td>
</tr>
<tr>
- <td align="right" width="250">{--ADMIN_NETWORK_TYPE_REQUEST_URL--}:</td>
+ <td align="right" width="250">{--ADMIN_NETWORK_TYPE_API_URL--}:</td>
<td>
- <input type="text" name="network_type_request_url" class="admin_normal" size="30" maxlength="255" />
+ <input type="text" name="network_type_api_url" class="admin_normal" size="30" maxlength="255" />
</td>
</tr>
<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_TYPE_ADDED_TITLE--}
+ </div>
+ <div class="admin_message">
+ Der Werbeart-Handler $content[network_type_handle] wurde soeben hinzugefügt.
+ Sie sollten nun als nächstes die <a href="{%url=modules.php?module=admin&what=list_network_params&network=$content[network_id]%}">Abfrageparameter hinzufügen</a>.
+ </div>
+</div>
+
+</div>