X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-wernis.php;h=627ac41651dea3f0093dba0ad5018d1bec572062;hb=1904897a38323335e3c93a71e6fe8c6fb82bcac4;hp=a2d9e43ed464e888102deee4e8cc6fa335c60059;hpb=7f104f6fe558bb56b4205241435a2357c2feece1;p=mailer.git diff --git a/inc/modules/member/what-wernis.php b/inc/modules/member/what-wernis.php index a2d9e43ed4..627ac41651 100644 --- a/inc/modules/member/what-wernis.php +++ b/inc/modules/member/what-wernis.php @@ -38,14 +38,14 @@ if (!defined('__SECURITY')) { } elseif (!IS_MEMBER()) { // User is not logged in LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("wernis")) && (!IS_ADMIN())) { +} elseif (!EXT_IS_ACTIVE("wernis")) // Extension "wernis" is not activated ADD_FATAL(EXTENSION_PROBLEM_EXT_INACTIVE, "wernis"); return; } // Add description as navigation point -ADD_DESCR("member", basename(__FILE__)); +ADD_DESCR("member", __FILE__); // Check if the admin has entered the data if ((empty($_CONFIG['wernis_api_id'])) || (empty($_CONFIG['wernis_api_md5']))) { @@ -232,7 +232,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) { $success = WERNIS_EXECUTE_WITHDRAW($_POST['wds66_id'], md5($_POST['wds66_password']), $_POST['amount']); if ($success) { // Add it to this amount - $DEPTH = 0; + unset($DEPTH); ADD_POINTS_REFSYSTEM($GLOBALS['userid'], bigintval($_POST['amount']), false, 0, false, "direct"); // Update the user data as well.. @@ -265,7 +265,7 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) { OUTPUT_HTML("
"); } else { // All is fine here so do the withdraw - $success = WERNIS_EXECUTE_PAYOUT($_POST['wds66_id'], md5($_POST['wds66_password']), $_POST['amount']); + $success = WERNIS_EXECUTE_PAYOUT($_POST['wds66_id'], $_POST['amount']); if ($success) { // Sub points SUB_POINTS($GLOBALS['userid'], $_POST['amount']); @@ -290,11 +290,12 @@ if ((isset($_POST['ok'])) && (isset($_GET['mode']))) { break; default: // Invalid mode! + DEBUG_LOG(__FILE__, __LINE__, sprintf("Invalid mode %s detected.", $_GET['mode'])); LOAD_TEMPLATE("admin_settings_saved", false, sprintf(WERNIS_MEMBER_MODE_INVALID, SQL_ESCAPE($_GET['mode']))); return; } } -} +} // END - if // Prepare mode for template name $mode = sprintf("member_wernis_mode_%s", SQL_ESCAPE($_GET['mode']));