X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-wernis.php;h=4729c81f1de3cd656f1efcb93709c5032ab9a716;hb=37926c3fc93e4e2e000226375893a2f7f6bf3180;hp=a4bb4d0271a1ed3179c73c3ca13330c74025d47f;hpb=cb20090aa0558f1b74f0e9f925f29819e8bb3a45;p=mailer.git diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index a4bb4d0271..4729c81f1d 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -56,7 +56,7 @@ if ((!isExtensionActive('wernis')) && (!isAdmin())) { // 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 @@ -75,7 +75,7 @@ if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choo 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 @@ -84,10 +84,9 @@ if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choo // 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, ); @@ -106,13 +105,13 @@ if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choo // Is the payout mode active? if (getConfig('wernis_payout_active') == 'Y') { // Add link - $content['payout_link'] = "
{--MEMBER_WERNIS_MODE_PAYOUT--}
"; + $content['payout_link'] = '
{--MEMBER_WERNIS_MODE_PAYOUT--}
'; } // END - if // Is the withdraw mode active? if (getConfig('wernis_withdraw_active') == 'Y') { // Add link - $content['withdraw_link'] = "
{--MEMBER_WERNIS_MODE_WITHDRAW--}
"; + $content['withdraw_link'] = '
{--MEMBER_WERNIS_MODE_WITHDRAW--}
'; } // END - if // Mode chooser! ;-) @@ -172,26 +171,26 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { // 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')); @@ -204,7 +203,7 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { 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 @@ -219,7 +218,7 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { 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))); @@ -235,7 +234,7 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { 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