mirror of
https://github.com/Shadowss/TravianZ.git
synced 2026-09-03 08:57:17 +00:00
Fix some things
Fix some things
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
<style>
|
<style>
|
||||||
.dbg-wrap{max-width:100%;margin:12px;font-family:Tahoma,Verdana,Arial,sans-serif;color:#222}
|
.dbg-wrap{max-width:100%;margin:12px;font-family:Tahoma,Verdana,Arial,sans-serif;color:#222}
|
||||||
.dbg-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
|
.dbg-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}
|
||||||
.dbg-head h2{margin:0;font-size:16px}
|
.dbg-head h2{margin:0;font-size:16px;color:#ffffff}
|
||||||
.dbg-state{font-weight:700;padding:3px 10px;border-radius:14px;color:#fff;font-size:11px}
|
.dbg-state{font-weight:700;padding:3px 10px;border-radius:14px;color:#fff;font-size:11px}
|
||||||
.dbg-on{background:#16a34a}.dbg-off{background:#dc2626}
|
.dbg-on{background:#16a34a}.dbg-off{background:#dc2626}
|
||||||
.dbg-card{background:#fff;border:1px solid #bbb;border-radius:6px;padding:12px;margin-bottom:12px}
|
.dbg-card{background:#fff;border:1px solid #bbb;border-radius:6px;padding:12px;margin-bottom:12px}
|
||||||
|
|||||||
+16
-3
@@ -13,6 +13,19 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
include('menu.tpl');
|
include('menu.tpl');
|
||||||
|
|
||||||
|
function short($n) {
|
||||||
|
$n = (int)$n;
|
||||||
|
if ($n >= 1000000) {
|
||||||
|
return round($n/1000000,1).'M';
|
||||||
|
}
|
||||||
|
if ($n >= 100000) {
|
||||||
|
return floor($n/1000).'k';
|
||||||
|
}
|
||||||
|
// sub 100k lași normal, cu punct ca la Travian RO
|
||||||
|
return $n;
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<table id="troops" cellpadding="1" cellspacing="1">
|
<table id="troops" cellpadding="1" cellspacing="1">
|
||||||
@@ -139,7 +152,7 @@ foreach ($varray as $vil) {
|
|||||||
|
|
||||||
$cl = ($val != 0) ? '' : 'none';
|
$cl = ($val != 0) ? '' : 'none';
|
||||||
|
|
||||||
echo '<td class="'.$cl.'">'.$val.'</td>';
|
echo '<td class="'.$cl.'" title="'.$val.'">'.short($val).'</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// hero
|
// hero
|
||||||
@@ -167,13 +180,13 @@ for ($i = $unit_start; $i <= $unit_end; $i++) {
|
|||||||
|
|
||||||
$cl = ($val != 0) ? '' : 'none';
|
$cl = ($val != 0) ? '' : 'none';
|
||||||
|
|
||||||
echo '<td class="'.$cl.'">'.$val.'</td>';
|
echo '<td class="'.$cl.'" title="'.$val.'">'.short($val).'</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$heroTotal = $unit_total['hero'];
|
$heroTotal = $unit_total['hero'];
|
||||||
$cl = ($heroTotal != 0) ? '' : 'none';
|
$cl = ($heroTotal != 0) ? '' : 'none';
|
||||||
|
|
||||||
echo '<td class="'.$cl.'">'.$heroTotal.'</td>';
|
echo '<td class="'.$cl.'" title="'.$heroVal.'">'.short($heroVal).'</td>';
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB |
Reference in New Issue
Block a user