Новая функция подсчёта массы вещей: выделение пороговых значений.

This commit is contained in:
Igor Barkov [iwork] 2018-12-12 14:40:49 +02:00
parent e510ca6346
commit 0810022ed3

View File

@ -2741,7 +2741,9 @@ function getItemsMassaInfo()
{
$i_row = db::c()->query('SELECT SUM(`massa`) AS `massa`, SUM(`gmeshok`) AS `massa_bonus` FROM `inventory` WHERE `setsale` = 0 AND `owner` = ?i',$_SESSION['uid'])->fetch_assoc();
$u_row = db::c()->query('SELECT `sila` FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
return $i_row['massa'] . "/" . ($u_row['sila'] * 4 + $i_row['massa_bonus']);
if ($i_row['massa'] > $u_row['sila'] * 4 + $i_row['massa_bonus'])
return "<span style='color:maroon;'>" . $i_row['massa'] . "</span>/" . ($u_row['sila'] * 4 + $i_row['massa_bonus']);
else return $i_row['massa'] . "/" . ($u_row['sila'] * 4 + $i_row['massa_bonus']);
}
function addlog($id, $log)