mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-06-28 00:24:23 +00:00
Some fix
Some fix
This commit is contained in:
@@ -54,10 +54,7 @@ while($u = mysqli_fetch_assoc($users)){
|
||||
$vill = mysqli_fetch_assoc(mysqli_query($GLOBALS["link"], "SELECT wref FROM ".TB_PREFIX."vdata WHERE owner = $uid LIMIT 1"));
|
||||
$wid = (int)($vill['wref'] ?? 0);
|
||||
|
||||
mysqli_query($GLOBALS["link"],
|
||||
"INSERT INTO ".TB_PREFIX."gold_fin_log (uid, wid, action, gold, time, log)
|
||||
VALUES ($uid, $wid, 'Admin added Gold', $amount, $now, '$details')"
|
||||
) or die(mysqli_error($GLOBALS["link"]));
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."gold_fin_log (wid, uid, action, gold, time, details) VALUES ($wid, $uid, 'Admin added Gold', $amount, $now, '$details')");
|
||||
}
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=gold&g");
|
||||
|
||||
@@ -48,10 +48,7 @@ $adminName = $acc['username'];
|
||||
$details = mysqli_real_escape_string($GLOBALS["link"], 'Admin gift by '.$adminName);
|
||||
$now = time();
|
||||
|
||||
mysqli_query($GLOBALS["link"],
|
||||
"INSERT INTO ".TB_PREFIX."gold_fin_log (uid, wid, action, gold, time, log)
|
||||
VALUES ($id, $wid, '$action', $amount, $now, '$details')"
|
||||
) or die(mysqli_error($GLOBALS["link"]));
|
||||
mysqli_query($GLOBALS["link"], "INSERT INTO ".TB_PREFIX."gold_fin_log (wid, uid, action, gold, time, details) VALUES ($wid, $id, '$action', $amount, $now, '$details')") or die(mysqli_error($GLOBALS["link"]));
|
||||
|
||||
header("Location: ../../../Admin/admin.php?p=usergold&g");
|
||||
exit;
|
||||
|
||||
@@ -8068,9 +8068,14 @@ $q = "INSERT INTO ".TB_PREFIX."demolition VALUES (
|
||||
global $technology;
|
||||
|
||||
$getVillage = $this->getVillage($wref);
|
||||
|
||||
// FIX: dacă satul nu există, ieși imediat
|
||||
if (!$getVillage || !is_array($getVillage)) {
|
||||
return;
|
||||
}
|
||||
|
||||
//Exlude Support, Nature, Natars, TaskMaster and Multihunter
|
||||
if ($getVillage['owner'] > 5){
|
||||
if (($getVillage['owner'] ?? 0) > 5){
|
||||
$crop = $this->getCropProdstarv($wref, false);
|
||||
$unitArrays = $technology->getAllUnits($wref, false, 0, false);
|
||||
$villageUpkeep = $getVillage['pop'] + $technology->getUpkeep($unitArrays, 0, $wref);
|
||||
|
||||
Reference in New Issue
Block a user