X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Fjackpot_functions.php;h=6bf2816c4c92dc2cdd68d70c93d5caddf2cf6b05;hp=55cbbb96bc970281b84f3d58663ba1aa23602fbd;hb=ec9f020e34a9f2029a2ea0969564dda015beca8a;hpb=263a089d8a499e0e26d0af9e7aa7639f88b8ca60 diff --git a/inc/libs/jackpot_functions.php b/inc/libs/jackpot_functions.php index 55cbbb96bc..6bf2816c4c 100644 --- a/inc/libs/jackpot_functions.php +++ b/inc/libs/jackpot_functions.php @@ -14,10 +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 - 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 * @@ -45,25 +44,25 @@ if (!defined('__SECURITY')) { // Getter for jackpot points function getJackpotPoints () { // Default is zero - $jackpot = '0.00000'; + $data['points'] = '0.00000'; // Read them $result = SQL_QUERY("SELECT `points` FROM `{?_MYSQL_PREFIX?}_jackpot` WHERE `ok`='ok' LIMIT 1", __FUNCTION__, __LINE__); // Do we have an entry? - if (SQL_NUMROWS($result) == '0') { + if (SQL_HASZERONUMS($result)) { // No, so create line SQL_QUERY("INSERT INTO `{?_MYSQL_PREFIX?}_jackpot` (`ok`, `points`) VALUES ('ok','0.00000')", __FUNCTION__, __LINE__); } else { // Read the line - list($jackpot) = SQL_FETCHROW($result); + $data = SQL_FETCHARRAY($result); } // Free result SQL_FREERESULT($result); // Return them - return $jackpot; + return $data['points']; } // Adds points to the jackpot @@ -79,7 +78,7 @@ function addPointsToJackpot ($points) { // Subtracts points from the jackpot function subtractPointsFromJackpot ($points) { // First failed - $ret = '-1'; + $ret = -1; // Get jackpot points for dummy $jackpot = getJackpotPoints();