X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-primera.php;h=8a483cb07fc8c4ddd7a76389406b02f94dbf79a3;hp=a683c4777e1cce86eebd276b0c75b7f2ae399a53;hb=c3b4eaf29946349ff058691db2dcb615a5379bb2;hpb=cf3765c38cf0a76f396aca291f71858936e92956 diff --git a/inc/modules/member/what-primera.php b/inc/modules/member/what-primera.php index a683c4777e..8a483cb07f 100644 --- a/inc/modules/member/what-primera.php +++ b/inc/modules/member/what-primera.php @@ -14,11 +14,9 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -46,7 +44,7 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -addMenuDescription('member', __FILE__); +addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('primera')) && (!isAdmin())) { // Extension 'primera' is not activated @@ -67,9 +65,6 @@ $points = false; // Is the mode set (payout only) if (!isGetRequestParameterSet('mode')) { - // Get referal id - $content['refid'] = getConfig(('primera_refid')); - // Is there an id? if ((!empty($content['primera_nickname'])) && (!isGetRequestParameterSet('mode'))) { // Then use an other "mode" @@ -99,21 +94,21 @@ if (!isGetRequestParameterSet('mode')) { if (getRequestParameter('mode') == 'pay') { // Get total points and check if the user can request a payout - $points = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points'); + $points = getTotalPoints(getMemberId()); // No dots here... $points = explode('.', $points); $points = bigintval($points[0]); // Remove the registration fee - $points = $points - getConfig('points_register'); + $points = $points - getPointsRegister(); // Is this enougth for a payout? if ($points < getConfig('primera_min_payout')) { // No, then abort here loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_MIN_PAYOUT_PAYOUT--}'); return; - } + } // END - if // Add points to content array $content['points'] = $points; @@ -129,13 +124,13 @@ if ((isFormSent()) && (isGetRequestParameterSet('mode'))) { switch (getRequestParameter('mode')) { case 'pay': // Payout this exchange -> Primus // Is the user id and password set? - if (!isPostRequestParameterSet(('primera_nickname'))) { + if (!isPostRequestParameterSet('primera_nickname')) { // Nothing entered in Primus nickname loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_EMPTY_USERNAME--}'); - } elseif (!isPostRequestParameterSet(('primera_password'))) { + } elseif (!isPostRequestParameterSet('primera_password')) { // Nothing entered in Primera password loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_EMPTY_PASSWORD--}'); - } elseif (!isPostRequestParameterSet(('amount'))) { + } elseif (!isPostRequestParameterSet('amount')) { // Nothing entered in amount loadTemplate('admin_settings_saved', false, '{--MEMBER_PRIMERA_EMPTY_AMOUNT--}'); } elseif (postRequestParameter('amount') != bigintval(postRequestParameter('amount'))) {