X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fwernis_functions.php;h=5c76e50c24936abad4c286f5fbb3351f94f9cdf2;hb=5d9f65a4efafdeda1f03cf03fc95421bc600b9dc;hp=ba46ef374fcaab059f03b4188a1a1956b5ca22c4;hpb=d016e24dd4686f613a17733b96bc28fac936a4ac;p=mailer.git diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index ba46ef374f..5c76e50c24 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -10,7 +10,12 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Alle Ihrer gesammelten Punkte * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $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 - 2008 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -89,7 +94,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { } // END - if // Add more request data - $requestData['api_id'] = bigintval(getConfig('wernis_api_id')); + $requestData['api_id'] = getConfig(('wernis_api_id')); $requestData['api_key'] = getConfig('wernis_api_md5'); // Construct the request string @@ -208,7 +213,7 @@ function WERNIS_TEST_API () { function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) { // Is the sponsor extension installed? if (getConfig('wernis_withdraw_active') != "Y") { - if (!EXT_IS_ACTIVE("sponsor")) { + if (!EXT_IS_ACTIVE('sponsor')) { // No, abort here return false; } elseif (!IS_SPONSOR()) { @@ -221,7 +226,7 @@ function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) { $result = false; // Prepare the purpose - $eval = "\$purpose = \"".COMPILE_CODE(sprintf(WERNIS_API_PURPOSE_WITHDRAW, $GLOBALS['userid']))."\";"; + $eval = "\$purpose = \"".COMPILE_CODE(sprintf(WERNIS_API_PURPOSE_WITHDRAW, getUserId()))."\";"; eval($eval); // Prepare the request data @@ -262,7 +267,7 @@ function WERNIS_EXECUTE_PAYOUT ($wdsId, $amount) { $result = false; // Prepare the purpose - $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('WERNIS_API_PURPOSE_PAYOUT'), $GLOBALS['userid']))."\";"; + $eval = "\$purpose = \"".COMPILE_CODE(sprintf(getMessage('WERNIS_API_PURPOSE_PAYOUT'), getUserId()))."\";"; eval($eval); // Prepare the request data @@ -321,8 +326,8 @@ function WERNIS_TRANSFER_STATUS ($status) { // Log the transfer function WERNIS_LOG_TRANSFER ($wdsId, $amount, $type = 'FAILED', $message = "", $status = "") { // Register this wernis movement - SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_wernis` (`userid`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type`, `wernis_api_message`, `wernis_api_status`) VALUES (%d, %d, %d, UNIX_TIMESTAMP(), '%s', '%s', '%s')", - array($GLOBALS['userid'], bigintval($wdsId), bigintval($amount), $type, $message, $status), __FILE__, __LINE__); + SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_user_wernis` (`userid`,`wernis_account`,`wernis_amount`,`wernis_timestamp`,`wernis_type`,`wernis_api_message`,`wernis_api_status`) VALUES (%d, %d, %d, UNIX_TIMESTAMP(), '%s', '%s', '%s')", + array(getUserId(), bigintval($wdsId), bigintval($amount), $type, $message, $status), __FUNCTION__, __LINE__); } // Take fees and factor @@ -331,7 +336,7 @@ function WERNIS_TAKE_FEE ($points, $mode) { //* DEBUG: */ echo "mode={$mode},points={$points}
\n"; if (!in_array($mode, array('payout', 'withdraw'))) { // Log error and abort - DEBUG_LOG(__FUNCTION__, __LINE__, "uid={$GLOBALS['userid']},mode={$mode},points={$points}"); + DEBUG_LOG(__FUNCTION__, __LINE__, "uid={getUserId()},mode={$mode},points={$points}"); return false; } // END - if @@ -345,7 +350,7 @@ function WERNIS_TAKE_FEE ($points, $mode) { } // Divide/multiply the factor - if ($mode == "payout") { + if ($mode == 'payout') { // Divide for payout $points = $points / getConfig('wernis_payout_factor'); } else {