X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fearning_functions.php;h=507db350bb7500fa082c44d997cfc85975572d13;hp=809fda2563c617ad79a660d61af1799b6e33f0d5;hb=2df9f7a53f8b1dd5164f87824a324ccb3b6634cb;hpb=2379934be6a196a54f4155bb8e24c49b20736969 diff --git a/inc/libs/earning_functions.php b/inc/libs/earning_functions.php index 809fda2563..507db350bb 100644 --- a/inc/libs/earning_functions.php +++ b/inc/libs/earning_functions.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -46,18 +46,18 @@ function translateEarningGroup ($earningGroup) { } // Translates the "earning name" into human-readable -function translateEarningName ($earningName) { - return sprintf("{--EARNING_NAME_%s--}", $earningName); +function translateEarningProvider ($earningProvider) { + return sprintf("{--EARNING_PROVIDER_%s--}", $earningProvider); } /* * Generates a table (with templates) to display data for extra earnings (to * the member) by given "earning name". * - * @param $earningName Name of the earning + * @param $earningProvider Name of the earning * @return $output Generated HTML output */ -function generateMemberEarningDataTable ($earningName) { +function generateMemberEarningDataTable ($earningProvider) { // Init array for filter $filterData = array( // Minimum points to get @@ -72,7 +72,7 @@ function generateMemberEarningDataTable ($earningName) { // "earning group" 'earning_group' => 'INVALID', // "earning name" again - 'earning_name' => $earningName + 'earning_provider' => $earningProvider ); // Run the filter chain to get the data @@ -116,7 +116,7 @@ function doMemberEarning ($earningId, $dailyAmount, $isActive = 'Y') { // Insert member earning entry function insertMemberEarning ($earningId, $dailyAmount, $isActive = 'Y') { // Insert the record - SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_earning` (`earning_id`,`earning_userid`,`earning_daily_amount`,`earning_active`) VALUES(%s,%s,%s,'%s')", + SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_earning` (`earning_id`, `earning_userid`, `earning_daily_amount`, `earning_active`) VALUES(%s,%s,%s,'%s')", array( bigintval($earningId), getMemberId(), @@ -153,7 +153,7 @@ function updateMemberEarning ($earningId, $dailyAmount, $isActive = 'Y') { // Does the user cancel the earning? if ($isActive == 'N') { // Then update cancellation timestamp as well - $moreSql = ', `earning_cancelled`=NOW()'; + $moreSql = ',`earning_canceled`=NOW()'; } // END - if // Update database record @@ -173,7 +173,7 @@ LIMIT 1", array( getMemberId() ), __FUNCTION__, __LINE__); - // Determine wether something has changed + // Determine whether something has changed $status = (!SQL_HASZEROAFFECTED()); // Has the record changed?