Some additional fixes

Some additional fixes
This commit is contained in:
novgorodschi catalin
2026-09-01 07:56:14 +03:00
parent 054fde6e66
commit 71e73dde95
13 changed files with 169 additions and 28 deletions
+7 -3
View File
@@ -57,6 +57,8 @@ if ($winner) {
|--------------------------------------------------------------------------
*/
// BUG REPARAT: access<8/10 nu excludea conturile banate (access=0); access>0
// adaugat mai jos ca un cont banat sa nu poata fi declarat castigator de server.
$q = "SELECT
u.id AS userid,
u.username,
@@ -65,7 +67,7 @@ if ($winner) {
(SELECT COUNT(v.wref) FROM " . TB_PREFIX . "vdata v WHERE v.owner = u.id AND v.type != 99) AS totalvillages,
(SELECT a.tag FROM " . TB_PREFIX . "alidata a WHERE a.id = u.alliance) AS allitag
FROM " . TB_PREFIX . "users u
WHERE u.access < " . (INCLUDE_ADMIN ? "10" : "8") . " AND u.tribe IN (1,2,3,6,7,8,9)
WHERE u.access > 0 AND u.access < " . (INCLUDE_ADMIN ? "10" : "8") . " AND u.tribe IN (1,2,3,6,7,8,9)
ORDER BY totalpop DESC, totalvillages DESC, u.username ASC";
$result = (mysqli_query($database->dblink,$q));
@@ -86,6 +88,7 @@ if ($winner) {
|--------------------------------------------------------------------------
*/
// BUG REPARAT: vezi comentariul de la Top Population de mai sus.
$q = "SELECT
u.id AS userid,
u.username,
@@ -93,7 +96,7 @@ if ($winner) {
(SELECT COUNT(v.wref) FROM " . TB_PREFIX . "vdata v WHERE v.owner = u.id AND v.type != 99) AS totalvillages,
(SELECT SUM(v.pop) FROM " . TB_PREFIX . "vdata v WHERE v.owner = u.id) AS pop
FROM " . TB_PREFIX . "users u
WHERE u.apall >= 0 AND u.access < " . (INCLUDE_ADMIN ? "10" : "8") . " AND u.tribe IN (1,2,3,6,7,8,9)
WHERE u.apall >= 0 AND u.access > 0 AND u.access < " . (INCLUDE_ADMIN ? "10" : "8") . " AND u.tribe IN (1,2,3,6,7,8,9)
ORDER BY u.apall DESC, pop DESC, u.username ASC";
$result = mysqli_query($database->dblink,$q);
@@ -113,6 +116,7 @@ if ($winner) {
|--------------------------------------------------------------------------
*/
// BUG REPARAT: vezi comentariul de la Top Population de mai sus.
$q = "SELECT
u.id AS userid,
u.username,
@@ -120,7 +124,7 @@ if ($winner) {
(SELECT COUNT(v.wref) FROM " . TB_PREFIX . "vdata v WHERE v.owner = u.id AND v.type != 99) AS totalvillages,
(SELECT SUM(v.pop) FROM " . TB_PREFIX . "vdata v WHERE v.owner = u.id) AS pop
FROM " . TB_PREFIX . "users u
WHERE u.dpall >= 0 AND u.access < " . (INCLUDE_ADMIN ? "10" : "8") . " AND u.tribe IN (1,2,3,6,7,8,9)
WHERE u.dpall >= 0 AND u.access > 0 AND u.access < " . (INCLUDE_ADMIN ? "10" : "8") . " AND u.tribe IN (1,2,3,6,7,8,9)
ORDER BY u.dpall DESC, pop DESC, u.username ASC";
$result = mysqli_query($database->dblink,$q);