Commits

Your PHP Pro  committed 46bdd19

Correction to MaxPlays/MaxWins.

  • Participants
  • Parent commits 5f5f86d

Comments (0)

Files changed (1)

 	if (CONSTANT("phpScratchAndWin_CheckMaxPlays_IPAddress")==TRUE) {
 		$Query = "SELECT Count(*) as Count FROM Tickets WHERE Ticket_IPAddress = INET_ATON('" . $_SERVER["REMOTE_ADDR"] . "') AND Ticket_DrawDate>DATE_SUB(NOW(), INTERVAL " . CONSTANT("phpScratchAndWin_MaxPlaysPerTimePeriod") . " HOUR);";
 		$PlaysPerIPAddress = CCGetDBValue($Query, $DBConnection);
-		if ($PlaysPerIPAddress > CONSTANT("phpScratchAndWin_MaxPlays")) {
+		if ($PlaysPerIPAddress >= CONSTANT("phpScratchAndWin_MaxPlays")) {
 			if (CONSTANT("phpScratchAndWin_Debug")=="1") {
 				print "<!-- Number of Plays Per IP Address ( $PlaysPerIPAddress ) Exceeded -->\n";
 				print "<!-- Query: " . $Query . " -->\n";
 	if (CONSTANT("phpScratchAndWin_CheckMaxPlays_EmailAddress")==TRUE) {
 		$Query = "SELECT Count(*) as Count FROM Tickets WHERE Ticket_Email_Address='" . $Email_Address . "' AND Ticket_DrawDate>DATE_SUB(NOW(), INTERVAL " . CONSTANT("phpScratchAndWin_MaxPlaysPerTimePeriod") . " HOUR);";
 		$PlaysPerEmailAddress= CCGetDBValue($Query, $DBConnection);
-		if ($PlaysPerEmailAddress>CONSTANT("phpScratchAndWin_MaxPlays")) {
+		if ($PlaysPerEmailAddress >= CONSTANT("phpScratchAndWin_MaxPlays")) {
 			if (CONSTANT("phpScratchAndWin_Debug")=="1") {
 				print "<!-- Number of Plays Per Email Address ( $PlaysPerEmailAddress ) Exceeded -->\n";
 				print "<!-- Query: " . $Query . " -->\n";
 	if (CONSTANT("phpScratchAndWin_MaxWins_IPAddress")==TRUE) {
 		$Query = "SELECT Count(*) as Count FROM Tickets WHERE Ticket_IPAddress = INET_ATON('" . $_SERVER["REMOTE_ADDR"] . "') AND Ticket_Winner='Yes';";
 		$WinsPerIPAddress = CCGetDBValue($Query, $DBConnection);
-		if ($WinsPerIPAddress>CONSTANT("phpScratchAndWin_MaxWins")) {
+		if ($WinsPerIPAddress >= CONSTANT("phpScratchAndWin_MaxWins")) {
 			if (CONSTANT("phpScratchAndWin_Debug")=="1") {
 				print "<!-- Number of Plays Per IP Address ( $WinsPerIPAddress ) Exceeded -->\n";
 				print "<!-- Query: " . $Query . " -->\n";
 	if (CONSTANT("phpScratchAndWin_MaxWins_EmailAddress")==TRUE) {
 		$Query = "SELECT Count(*) as Count FROM Tickets WHERE Ticket_Email_Address='" . $Email_Address . "' AND Ticket_Winner='Yes';";
 		$WinsPerEmailAddress = CCGetDBValue($Query, $DBConnection);
-		if ($WinsPerEmailAddress>CONSTANT("phpScratchAndWin_MaxWins")) {
+		if ($WinsPerEmailAddress >= CONSTANT("phpScratchAndWin_MaxWins")) {
 			if (CONSTANT("phpScratchAndWin_Debug")=="1") {
 				print "<!-- Number of Plays Per Email Address ( $WinsPerEmailAddress ) Exceeded -->\n";
 				print "<!-- Query: " . $Query . " -->\n";