* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
// Check if the admin has entered the data
if ((getConfig('wernis_api_id') == '') || (getConfig('wernis_api_md5') == '')) {
// Something important is missing...
// Check if the admin has entered the data
if ((getConfig('wernis_api_id') == '') || (getConfig('wernis_api_md5') == '')) {
// Something important is missing...
// Let the user choose what he wants to do
$content['refid'] = getConfig(('wernis_refid'));
$content['wernis_userid'] = '0';
// Let the user choose what he wants to do
$content['refid'] = getConfig(('wernis_refid'));
$content['wernis_userid'] = '0';
// 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",
// 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",
- $content['payout_link'] = '<em>{--WERNIS_MEMBER_PAYOUT_DISABLED--}</em>';
- $content['withdraw_link'] = '<em>{--WERNIS_MEMBER_WITHDRAW_DISABLED--}</em>';
+ $content['payout_link'] = '<em>{--MEMBER_WERNIS_PAYOUT_DISABLED--}</em>';
+ $content['withdraw_link'] = '<em>{--MEMBER_WERNIS_WITHDRAW_DISABLED--}</em>';
// Get total points and check if the user can request a payout
$points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
// Get total points and check if the user can request a payout
$points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
if ($points < getConfig('wernis_min_payout')) {
// No, then abort here
loadTemplate('admin_settings_saved', false, sprintf(
if ($points < getConfig('wernis_min_payout')) {
// No, then abort here
loadTemplate('admin_settings_saved', false, sprintf(
- // Init WDS66 userid
- $content['wernis_userid'] = '';
-
- // Are there some entries?
- if (fetchUserData(getMemberId())) {
- // Fetch id
- $content['wernis_userid'] = getUserData('wernis_userid');
- } // END - if
-} elseif ((getRequestElement('mode') == 'withdraw') && (getConfig('wernis_withdraw_active') == 'Y')) {
+ // Get WDS66 username
+ $content['wernis_userid'] = getUserData('wernis_userid');
+} elseif ((getRequestParameter('mode') == 'withdraw') && (getConfig('wernis_withdraw_active') == 'Y')) {
// Get total points for just displaying them
$points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
// Prepare data for the template
$content['points'] = translateComma($points);
// Get total points for just displaying them
$points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');
// Prepare data for the template
$content['points'] = translateComma($points);
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), getRequestElement('mode')));
+ loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_WERNIS_MODE_INVALID', getRequestParameter('mode')));
- loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_USERNAME'));
- } elseif (!isPostRequestElementSet(('wds66_password'))) {
+ loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_EMPTY_USERNAME'));
+ } elseif (!isPostRequestParameterSet(('wds66_password'))) {
- loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_PASSWORD'));
- } elseif (!isPostRequestElementSet(('amount'))) {
+ loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_EMPTY_PASSWORD'));
+ } elseif (!isPostRequestParameterSet(('amount'))) {
- loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_EMPTY_AMOUNT'));
- } elseif (postRequestElement('wernis_userid') != bigintval(postRequestElement('wernis_userid'))) {
+ loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_EMPTY_AMOUNT'));
+ } elseif (postRequestParameter('wernis_userid') != bigintval(postRequestParameter('wernis_userid'))) {
- loadTemplate('admin_settings_saved', false, getMessage('WERNIS_MEMBER_INVALID_USERNAME'));
- } elseif (postRequestElement('amount') != bigintval(postRequestElement('amount'))) {
+ loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_INVALID_USERNAME'));
+ } elseif (postRequestParameter('amount') != bigintval(postRequestParameter('amount'))) {
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), translateComma(getConfig('wernis_min_withdraw'))));
+ loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_WITHDRAW_AMOUNT_SMALLER_MIN'));
- $success = WERNIS_EXECUTE_WITHDRAW(postRequestElement('wernis_userid'), md5(postRequestElement('wds66_password')), postRequestElement('amount'));
+ $success = WERNIS_EXECUTE_WITHDRAW(postRequestParameter('wernis_userid'), md5(postRequestParameter('wds66_password')), postRequestParameter('amount'));
// Update the user data as well..
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `wernis_userid`=%s WHERE `userid`=%s LIMIT 1",
// Update the user data as well..
SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `wernis_userid`=%s WHERE `userid`=%s LIMIT 1",
- array(bigintval(postRequestElement('wernis_userid')), getMemberId()), __FILE__, __LINE__);
+ array(bigintval(postRequestParameter('wernis_userid')), getMemberId()), __FILE__, __LINE__);
return;
} elseif ((GET_WERNIS_ERROR_CODE() == 'user_failed') || (GET_WERNIS_ERROR_CODE() == 'own_failed') || (GET_WERNIS_ERROR_CODE() == 'amount_failed')) {
// Wrong login data
loadTemplate('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE());
} else {
// Something went wrong
return;
} elseif ((GET_WERNIS_ERROR_CODE() == 'user_failed') || (GET_WERNIS_ERROR_CODE() == 'own_failed') || (GET_WERNIS_ERROR_CODE() == 'amount_failed')) {
// Wrong login data
loadTemplate('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE());
} else {
// Something went wrong
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE()));
+ loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_WERNIS_WITHDRAW_FAILED', GET_WERNIS_ERROR_MESSAGE()));
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), translateComma(getConfig('wernis_min_payout'))));
- } elseif (postRequestElement('amount') > $points) {
+ loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_PAYOUT_AMOUNT_SMALLER_MIN'));
+ } elseif (postRequestParameter('amount') > $points) {
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestElement('amount')), bigintval($points)));
+ loadTemplate('admin_settings_saved', false, sprintf(getMessage('MEMBER_WERNIS_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestParameter('amount')), bigintval($points)));
- array(bigintval(postRequestElement('wernis_userid')), getMemberId()), __FILE__, __LINE__);
+ array(bigintval(postRequestParameter('wernis_userid')), getMemberId()), __FILE__, __LINE__);
return;
} elseif ((GET_WERNIS_ERROR_CODE() == 'user_failed') || (GET_WERNIS_ERROR_CODE() == 'own_failed') || (GET_WERNIS_ERROR_CODE() == 'amount_failed') || (GET_WERNIS_ERROR_CODE() == 'api_amount_failed')) {
// Wrong login data
loadTemplate('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE());
} else {
// Something went wrong
return;
} elseif ((GET_WERNIS_ERROR_CODE() == 'user_failed') || (GET_WERNIS_ERROR_CODE() == 'own_failed') || (GET_WERNIS_ERROR_CODE() == 'amount_failed') || (GET_WERNIS_ERROR_CODE() == 'api_amount_failed')) {
// Wrong login data
loadTemplate('admin_settings_saved', false, GET_WERNIS_ERROR_MESSAGE());
} else {
// Something went wrong
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE()));
+ loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_WERNIS_WITHDRAW_FAILED', GET_WERNIS_ERROR_MESSAGE()));
- logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestElement('mode')));
- loadTemplate('admin_settings_saved', false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), getRequestElement('mode')));
+ logDebugMessage(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", getRequestParameter('mode')));
+ loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_WERNIS_MODE_INVALID', getRequestParameter('mode')));