mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-07-26 14:36:06 +00:00
update
This commit is contained in:
@@ -2479,12 +2479,7 @@ class MYSQL_DB {
|
|||||||
$time += $queued[count($queued) - 1]['timestamp'] - $now;
|
$time += $queued[count($queued) - 1]['timestamp'] - $now;
|
||||||
$time2 += $queued[count($queued) - 1]['timestamp'] - $now;
|
$time2 += $queued[count($queued) - 1]['timestamp'] - $now;
|
||||||
}
|
}
|
||||||
if($queued[count($queued) - 1]['unit'] == $unit){
|
|
||||||
$time = $amt*$queued[count($queued) - 1]['eachtime'];
|
|
||||||
$q = "UPDATE " . TB_PREFIX . "training SET amt = amt + $amt, timestamp = timestamp + $time WHERE id = ".$queued[count($queued) - 1]['id']."";
|
|
||||||
}else{
|
|
||||||
$q = "INSERT INTO " . TB_PREFIX . "training values (0,$vid,$unit,$amt,$pop,$time,$each,$time2)";
|
$q = "INSERT INTO " . TB_PREFIX . "training values (0,$vid,$unit,$amt,$pop,$time,$each,$time2)";
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$q = "DELETE FROM " . TB_PREFIX . "training where id = $vid";
|
$q = "DELETE FROM " . TB_PREFIX . "training where id = $vid";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2482,12 +2482,7 @@ class MYSQLi_DB {
|
|||||||
$time += $queued[count($queued) - 1]['timestamp'] - $now;
|
$time += $queued[count($queued) - 1]['timestamp'] - $now;
|
||||||
$time2 += $queued[count($queued) - 1]['timestamp'] - $now;
|
$time2 += $queued[count($queued) - 1]['timestamp'] - $now;
|
||||||
}
|
}
|
||||||
if($queued[count($queued) - 1]['unit'] == $unit){
|
|
||||||
$time = $amt*$queued[count($queued) - 1]['eachtime'];
|
|
||||||
$q = "UPDATE " . TB_PREFIX . "training SET amt = amt + $amt, timestamp = timestamp + $time WHERE id = ".$queued[count($queued) - 1]['id']."";
|
|
||||||
}else{
|
|
||||||
$q = "INSERT INTO " . TB_PREFIX . "training values (0,$vid,$unit,$amt,$pop,$time,$each,$time2)";
|
$q = "INSERT INTO " . TB_PREFIX . "training values (0,$vid,$unit,$amt,$pop,$time,$each,$time2)";
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$q = "DELETE FROM " . TB_PREFIX . "training where id = $vid";
|
$q = "DELETE FROM " . TB_PREFIX . "training where id = $vid";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user