// Check if the admin has entered the data
if ((getConfig('wernis_api_id') == '') || (getConfig('wernis_api_md5') == '')) {
// Something important is missing...
- loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_API_DATA_MISSING'));
+ loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_API_DATA_MISSING--}');
return;
} // END - if
setGetRequestParameter('mode', 'list');
// And load all rows!
- $result = SQL_QUERY_ESC("SELECT `id`,`wernis_account`,`wernis_amount`,`wernis_timestamp`,`wernis_type` FROM `{?_MYSQL_PREFIX?}_user_wernis` WHERE `userid`=%s ORDER BY `wernis_timestamp` DESC",
+ $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",
array(getMemberId()), __FILE__, __LINE__);
// Load all rows
// Prepare data for output
$rowContent = array(
'wernis_timestamp' => generateDateTime($data['wernis_timestamp'], 2),
- 'points' => translateComma($data['wernis_amount']),
- 'wernis_account' => bigintval($data['wernis_account']),
- 'status' => WERNIS_TRANSFER_STATUS($data['wernis_type']),
- 'raw_type' => strtolower($data['wernis_type']),
+ 'wernis_amount' => $data['wernis_amount'],
+ 'wernis_account' => $data['wernis_account'],
+ 'wernis_type' => $data['wernis_type'],
'sw' => $SW,
);
// Is the payout mode active?
if (getConfig('wernis_payout_active') == 'Y') {
// Add link
- $content['payout_link'] = "<a class=\"menu_blur\" style=\"height: 40px\" href=\"{%url=modules.php?module=login&what=wernis&mode=payout%}\"><div style=\"padding-top: 10px\">{--MEMBER_WERNIS_MODE_PAYOUT--}</div></a>";
+ $content['payout_link'] = '<a class="menu_blur" style="height: 40px" href="{%url=modules.php?module=login&what=wernis&mode=payout%}"><div style="padding-top: 10px">{--MEMBER_WERNIS_MODE_PAYOUT--}</div></a>';
} // END - if
// Is the withdraw mode active?
if (getConfig('wernis_withdraw_active') == 'Y') {
// Add link
- $content['withdraw_link'] = "<a class=\"menu_blur\" style=\"height: 40px\" href=\"{%url=modules.php?module=login&what=wernis&mode=withdraw%}\"><div style=\"padding-top: 10px\">{--MEMBER_WERNIS_MODE_WITHDRAW--}</div></a>";
+ $content['withdraw_link'] = '<a class="menu_blur" style="height: 40px" href="{%url=modules.php?module=login&what=wernis&mode=withdraw%}"><div style="padding-top: 10px">{--MEMBER_WERNIS_MODE_WITHDRAW--}</div></a>';
} // END - if
// Mode chooser! ;-)
// Is the user id and password set?
if (!isPostRequestParameterSet(('wernis_userid'))) {
// Nothing entered in WDS66 user id
- loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_EMPTY_USERNAME'));
+ loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_EMPTY_USERNAME--}');
} elseif (!isPostRequestParameterSet(('wds66_password'))) {
// Nothing entered in WDS66 password
- loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_EMPTY_PASSWORD'));
+ loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_EMPTY_PASSWORD--}');
} elseif (!isPostRequestParameterSet(('amount'))) {
// Nothing entered in amount
- loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_EMPTY_AMOUNT'));
+ loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_EMPTY_AMOUNT--}');
} elseif (postRequestParameter('wernis_userid') != bigintval(postRequestParameter('wernis_userid'))) {
// Only numbers in account id!
- loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_INVALID_USERNAME'));
+ loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_INVALID_USERNAME');
} elseif (postRequestParameter('amount') != bigintval(postRequestParameter('amount'))) {
// Only numbers in amount!
- loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_INVALID_AMOUNT'));
+ loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_INVALID_AMOUNT--}');
} else {
// Check input data depending on the mode and execute the requested mode
switch (getRequestParameter('mode')) {
case 'withdraw': // Widthdraws WDS66 -> This exchange
if (postRequestParameter('amount') < getConfig('wernis_min_withdraw')) {
// Not enougth entered!
- loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_WITHDRAW_AMOUNT_SMALLER_MIN'));
+ loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_WITHDRAW_AMOUNT_SMALLER_MIN--}');
} else {
// All is fine here so do the withdraw
$success = WERNIS_EXECUTE_WITHDRAW(postRequestParameter('wernis_userid'), md5(postRequestParameter('wds66_password')), postRequestParameter('amount'));
array(bigintval(postRequestParameter('wernis_userid')), getMemberId()), __FILE__, __LINE__);
// All done!
- loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_WITHDRAW_DONE'));
+ loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_WITHDRAW_DONE--}');
return;
} elseif ((GET_WERNIS_ERROR_CODE() == 'user_failed') || (GET_WERNIS_ERROR_CODE() == 'own_failed') || (GET_WERNIS_ERROR_CODE() == 'amount_failed')) {
// Wrong login data
case 'payout': // Payout this exchange -> WDS66
if (postRequestParameter('amount') < getConfig('wernis_min_payout')) {
// Not enougth entered!
- loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_PAYOUT_AMOUNT_SMALLER_MIN'));
+ loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_PAYOUT_AMOUNT_SMALLER_MIN--}');
} elseif (postRequestParameter('amount') > $points) {
// Not enougth points left!
loadTemplate('admin_settings_saved', false, sprintf(getMessage('MEMBER_WERNIS_PAYOUT_POINTS_DEPLETED'), bigintval(postRequestParameter('amount')), bigintval($points)));
array(bigintval(postRequestParameter('wernis_userid')), getMemberId()), __FILE__, __LINE__);
// All done!
- loadTemplate('admin_settings_saved', false, getMessage('MEMBER_WERNIS_PAYOUT_DONE'));
+ loadTemplate('admin_settings_saved', false, '{--MEMBER_WERNIS_PAYOUT_DONE--}');
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