From 0dde752c411d7fd60e2360e056c6945502e5fe53 Mon Sep 17 00:00:00 2001
From: isaack <drericlaufer@gmx.de>
Date: Thu, 7 Nov 2019 15:07:54 +0100
Subject: [PATCH] Bug #24

Bug #24 beseitigt
---
 js/sort.js                    | 2 +-
 lib/class/verdienen.class.php | 5 ++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/js/sort.js b/js/sort.js
index 8ca44c0..65d9959 100644
--- a/js/sort.js
+++ b/js/sort.js
@@ -20,7 +20,7 @@ function Parameter(){
 	var anzahl = GetURLParameter('anzahl');
 	var sort = GetURLParameter('sort');
 	if(!sort){ sort = 0;} 
-	if(!anzahl){ anzahl = 0;}
+	if(!anzahl){ anzahl = 1;}
 	$('#sort').val(sort);
 	$('#anzahl').val(anzahl);
 }
diff --git a/lib/class/verdienen.class.php b/lib/class/verdienen.class.php
index 174d126..617b5a2 100644
--- a/lib/class/verdienen.class.php
+++ b/lib/class/verdienen.class.php
@@ -114,7 +114,6 @@ class Verdienen{
 							<label class='input-group-text'>Anzahl angezeigte Banner</label>
 						</div>
 						<select class='custom-select' onchange='loggen();' id='anzahl'>
-							<option value='0'>Zufall</option>
 							<option value='1'>5</option>
 							<option value='2'>10</option>
 							<option value='3'>15</option>
@@ -152,7 +151,7 @@ class Verdienen{
 				return $this->get['anzahl']*5;
 			}
 		}else{
-			return rand(1,$this->maxBanner);
+			return 5;
 		}
 		
 	}
@@ -180,7 +179,7 @@ class Verdienen{
 		AND t3.werbeart=t1.werbeart LEFT JOIN ' . PREFIX . RELOAD . ' t2 ON (t1.tan = t2.tan AND (t2.uid = ' . $this->session['uid'] . ' OR t2.ip = "' . $this->ip . '") AND t2.bis >= ' . time() . ' AND t2.bis != 0)
 		WHERE (t3.kid IS NULL OR LOCATE(t3.sponsor, t1.ziel) = 0) 
 		AND t2.tan IS NULL AND t1.werbeart = "'. $this->art .'" AND t1.menge > 0 AND t1.status = 1 AND t1.verdienst > 0 AND t1.sponsor != ' . $this->session['uid'] . ' 
-		LIMIT ' . $this->AnzahlBanner() .' '. $this->SortBanner());
+		'. $this->SortBanner() .' LIMIT ' . $this->AnzahlBanner());
 	}
 	
 	private function PaidMailAusgabe(){
-- 
GitLab