X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-wernis.php;h=07acfed252134a45c0b530f41966dd84cf28ca3b;hb=2bda7ccdfd87b065a61ff976b5f9e98e46f73591;hp=a0697cedce0b74d87759ef76a27ed0ce3df0626e;hpb=4c83f0cc7459cad9ec9c1c68963f5365155ee935;p=mailer.git diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index a0697cedce..07acfed252 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Auszahlungsanfragen * * -------------------------------------------------------------------- * - * * + * $Revision:: 856 $ * + * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: stelzi $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -39,7 +44,7 @@ if (!defined('__SECURITY')) { // User is not logged in LOAD_URL("modules.php?module=index"); } elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) { - addFatalMessage(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "wernis"); + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "wernis"); return; } @@ -59,7 +64,7 @@ $content = array(); $points = false; // Is the mode set (withdraw or payout) if ((!REQUEST_ISSET_GET(('mode'))) || (REQUEST_GET('mode') == "choose")) { // Let the user choose what he wants to do - $content['refid'] = bigintval(getConfig('wernis_refid')); + $content['refid'] = getConfig(('wernis_refid')); $content['wds66_id'] = 0; // Get WDS66 id @@ -191,7 +196,7 @@ if ((!REQUEST_ISSET_GET(('mode'))) || (REQUEST_GET('mode') == "choose")) { SQL_FREERESULT($result); } else { // Invalid mode! - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MODE_INVALID, REQUEST_GET(('mode')))); + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), REQUEST_GET(('mode')))); return; } @@ -200,26 +205,26 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) { // Is the user ID and password set? if (!REQUEST_ISSET_POST(('wds66_id'))) { // Nothing entered in WDS66 user ID - LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_USERNAME); + LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_EMPTY_USERNAME')); } elseif (!REQUEST_ISSET_POST(('wds66_password'))) { // Nothing entered in WDS66 password - LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_PASSWORD); + LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_EMPTY_PASSWORD')); } elseif (!REQUEST_ISSET_POST(('amount'))) { // Nothing entered in amount - LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_EMPTY_AMOUNT); + LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_EMPTY_AMOUNT')); } elseif (REQUEST_POST('wds66_id') != bigintval(REQUEST_POST('wds66_id'))) { // Only numbers in account ID! - LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_USERNAME); + LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_INVALID_USERNAME')); } elseif (REQUEST_POST('amount') != bigintval(REQUEST_POST('amount'))) { // Only numbers in amount! - LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_INVALID_AMOUNT); + LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_INVALID_AMOUNT')); } else { // Check input data depending on the mode and execute the requested mode switch (REQUEST_GET('mode')) { case "withdraw": // Widthdraws WDS66 -> This exchange if (REQUEST_POST('amount') < getConfig('wernis_min_withdraw')) { // Not enougth entered! - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_AMOUNT_SMALLER_MIN, bigintval(getConfig('wernis_min_withdraw')))); + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_withdraw')))); } else { // All is fine here so do the withdraw $success = WERNIS_EXECUTE_WITHDRAW(REQUEST_POST('wds66_id'), md5(REQUEST_POST('wds66_password')), REQUEST_POST('amount')); @@ -233,14 +238,14 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) { array(bigintval(REQUEST_POST('wds66_id')), $GLOBALS['userid']), __FILE__, __LINE__); // All done! - LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_WITHDRAW_DONE); + LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_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 LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE()); } else { // Something went wrong - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_WITHDRAW_FAILED, GET_WERNIS_ERROR_MESSAGE())); + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE())); } } break; @@ -248,10 +253,10 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) { case "payout": // Payout this exchange -> WDS66 if (REQUEST_POST('amount') < getConfig('wernis_min_payout')) { // Not enougth entered! - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_AMOUNT_SMALLER_MIN, bigintval(getConfig('wernis_min_payout')))); + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_AMOUNT_SMALLER_MIN'), getConfig(('wernis_min_payout')))); } elseif (REQUEST_POST('amount') > $points) { // Not enougth points left! - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED, bigintval(REQUEST_POST('amount')), bigintval($points))); + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_PAYOUT_POINTS_DEPLETED'), bigintval(REQUEST_POST('amount')), bigintval($points))); } else { // All is fine here so do the withdraw $success = WERNIS_EXECUTE_PAYOUT(REQUEST_POST('wds66_id'), REQUEST_POST('amount')); @@ -264,21 +269,21 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_GET(('mode')))) { array(bigintval(REQUEST_POST('wds66_id')), $GLOBALS['userid']), __FILE__, __LINE__); // All done! - LOAD_TEMPLATE("admin_settings_saved", false, WERNIS_MEMBER_PAYOUT_DONE); + LOAD_TEMPLATE("admin_settings_saved", false, getMessage('WERNIS_MEMBER_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 LOAD_TEMPLATE("admin_settings_saved", false, GET_WERNIS_ERROR_MESSAGE()); } else { // Something went wrong - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_WITHDRAW_FAILED, GET_WERNIS_ERROR_MESSAGE())); + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_WITHDRAW_FAILED'), GET_WERNIS_ERROR_MESSAGE())); } } break; default: // Invalid mode! DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", REQUEST_GET('mode'))); - LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MODE_INVALID, REQUEST_GET(('mode')))); + LOAD_TEMPLATE("admin_settings_saved", false, sprintf(getMessage('WERNIS_MEMBER_MODE_INVALID'), REQUEST_GET(('mode')))); return; } }