Some visual change on Hero T4

Some visual change on Hero T4
This commit is contained in:
novgorodschi catalin
2026-08-12 11:21:04 +03:00
parent 633aa05090
commit 37e29e397b
3 changed files with 410 additions and 85 deletions
+139 -28
View File
@@ -72,29 +72,137 @@ $t4PlaceInfo = function ($wref) use ($database, $generator) {
}; };
?> ?>
<style type="text/css">
/* ---------------------------------------------------------------------------
Acelasi limbaj vizual ca 37_auction.tpl si 37_items.tpl: badge-uri, text
secundar palid, butoane verzi si latimi stranse ca sa incapa in zona de
continut (~505px) fara scroll orizontal.
Toate clasele au prefixul "t4adv" ca sa nu atinga nimic altceva.
Fara CSS grid si fara "gap": jocul e deschis si din browsere vechi.
--------------------------------------------------------------------------- */
table.t4adv tr.t4cols th {
background: #e8e8ea;
color: #444;
font-size: 11px;
font-weight: bold;
text-align: center;
padding: 3px 5px;
border-bottom: 1px solid #d0d0d4;
}
table.t4adv td { padding: 5px 4px; vertical-align: middle; font-size: 11px; }
/* Latimile, intr-un singur loc: 76+58+74+90 = 298px ficsi, restul ramane
coloanei cu locul (care contine si coordonatele). */
table.t4adv th.c-place { width: auto; }
table.t4adv th.c-dur { width: 76px; }
table.t4adv th.c-dan { width: 58px; }
table.t4adv th.c-exp { width: 74px; }
table.t4adv th.c-act { width: 90px; }
/* Locul: numele pe primul rand, coordonatele dedesubt, palide */
table.t4adv td.t4place { text-align: left; }
table.t4adv .t4placeName { display: block; }
table.t4adv .t4coord {
display: block;
margin-top: 2px;
font-size: 10px;
color: #9b978f;
}
table.t4adv .t4coord a { color: #7d7a73; text-decoration: none; }
table.t4adv .t4coord a:hover { text-decoration: underline; }
/* Durata / expirarea, centrate si cu cifre de latime fixa (ceasul nu tresare) */
table.t4adv td.t4dur,
table.t4adv td.t4exp { text-align: center; font-variant-numeric: tabular-nums; }
table.t4adv td.t4exp { color: #8a877f; }
/* Dificultatea */
table.t4adv td.t4dan { text-align: center; }
table.t4adv .t4danIco { width: 16px; height: 16px; vertical-align: middle; }
/* Actiunea */
table.t4adv td.t4act { text-align: center; }
table.t4adv .t4form { margin: 0; }
table.t4adv .t4btn {
display: inline-block;
padding: 4px 12px;
font-size: 11px;
font-weight: bold;
color: #3f5f22;
cursor: pointer;
white-space: nowrap;
background: #e4f0d0;
background: linear-gradient(#fbfdf6, #dcebc6);
border: 1px solid #a3bf7c;
border-radius: 4px;
}
table.t4adv .t4btn:hover {
background: #d6e8bd;
background: linear-gradient(#ffffff, #cfe4b0);
border-color: #8bab61;
}
table.t4adv .t4btn:active {
background: linear-gradient(#d5e6b8, #e9f3da);
border-color: #8bab61;
}
table.t4adv .t4none { color: #a5a19a; }
table.t4adv td.t4empty { color: #a5a19a; text-align: center; }
/* --- Bara "aventura in desfasurare" --- */
.t4advRunning {
margin: 0 0 10px 0;
padding: 7px 10px;
background: #f3f7ec;
border: 1px solid #c3d9a4;
border-radius: 4px;
font-size: 11px;
color: #4a6b2a;
}
.t4advRunning b { color: #3f6b1c; }
.t4advRunning .t4advClock {
font-weight: bold;
font-variant-numeric: tabular-nums;
}
</style>
<?php if ($t4Msg !== '') { ?> <?php if ($t4Msg !== '') { ?>
<p class="message" style="font-weight:bold;"><?php echo $t4Msg; ?></p> <p class="message" style="font-weight:bold;"><?php echo $t4Msg; ?></p>
<?php } ?> <?php } ?>
<?php if ($t4Running) { ?> <?php if ($t4Running) { ?>
<table id="distribution" cellpadding="1" cellspacing="1"> <?php
<thead> /**
<tr><th><?php echo HERO_ADV_RUNNING; ?> * Aventura in desfasurare: era un tabel cu un singur cap de tabel, ceea ce
<span id="timer<?php echo ++$session->timer; ?>"><?php echo $generator->getTimeFormat(max(0, $t4Running['endtime'] - $t4Now)); ?></span> * arata ca un al doilea tabel gol. Acum e o bara de stare, in acelasi ton
</th></tr> * verde ca butoanele - se citeste dintr-o privire ca eroul e plecat.
</thead> * Id-ul "timer<N>" ramane neschimbat, deci ceasul din JS-ul jocului merge
</table> * exact ca inainte.
*/
?>
<div class="t4advRunning">
<b><?php echo HERO_ADV_RUNNING; ?></b>
<span class="t4advClock" id="timer<?php echo ++$session->timer; ?>"><?php echo $generator->getTimeFormat(max(0, $t4Running['endtime'] - $t4Now)); ?></span>
</div>
<?php } ?> <?php } ?>
<table id="distribution" cellpadding="1" cellspacing="1" style="margin-top:10px;"> <table id="distribution" class="t4adv" cellpadding="1" cellspacing="1">
<thead> <thead>
<tr><th colspan="5"><?php echo HERO_ADV_LIST; ?></th></tr> <tr><th colspan="5"><?php echo HERO_ADV_LIST; ?></th></tr>
<tr> <?php // capul de coloane era <td><b>, deci nu se stila ca antet ?>
<td><b><?php echo defined('HERO_ADV_PLACE') ? HERO_ADV_PLACE : 'Place'; ?></b></td> <tr class="t4cols">
<td><b><?php echo HERO_ADV_DURATION; ?></b></td> <th class="c-place"><?php echo defined('HERO_ADV_PLACE') ? HERO_ADV_PLACE : 'Place'; ?></th>
<td><b><?php echo defined('HERO_ADV_DANGER') ? HERO_ADV_DANGER : 'Danger'; ?></b></td> <th class="c-dur"><?php echo HERO_ADV_DURATION; ?></th>
<td><b><?php echo HERO_ADV_EXPIRES; ?></b></td> <th class="c-dan"><?php echo defined('HERO_ADV_DANGER') ? HERO_ADV_DANGER : 'Danger'; ?></th>
<td></td> <th class="c-exp"><?php echo HERO_ADV_EXPIRES; ?></th>
<th class="c-act">&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -105,37 +213,40 @@ $t4PlaceInfo = function ($wref) use ($database, $generator) {
$t4Hard = ((int) $t4Offer['difficulty'] === 1); $t4Hard = ((int) $t4Offer['difficulty'] === 1);
?> ?>
<tr> <tr>
<td> <td class="t4place">
<?php echo $t4Place ? $t4Place['name'] : '&mdash;'; ?> <span class="t4placeName"><?php echo $t4Place ? $t4Place['name'] : '&mdash;'; ?></span>
<?php if ($t4Place) { ?> <?php if ($t4Place) { ?>
<a href="karte.php?d=<?php echo $t4Place['wref']; ?>&amp;c=<?php echo $t4Place['check']; ?>"><b>(<?php echo $t4Place['x']; ?>|<?php echo $t4Place['y']; ?>)</b></a> <span class="t4coord">
<a href="karte.php?d=<?php echo $t4Place['wref']; ?>&amp;c=<?php echo $t4Place['check']; ?>">(<?php echo $t4Place['x']; ?>|<?php echo $t4Place['y']; ?>)</a>
</span>
<?php } ?> <?php } ?>
</td> </td>
<td><?php echo $generator->getTimeFormat((int) $t4Offer['duration']); ?></td> <td class="t4dur"><?php echo $generator->getTimeFormat((int) $t4Offer['duration']); ?></td>
<td style="text-align:center;"> <td class="t4dan">
<img src="img/hero/<?php echo $t4Hard ? 'dangerGreat.gif' : 'danger.gif'; ?>" <img class="t4danIco" src="img/hero/<?php echo $t4Hard ? 'dangerGreat.gif' : 'danger.gif'; ?>"
alt="<?php echo $t4Hard ? HERO_ADV_DIFF_HARD : HERO_ADV_DIFF_NORMAL; ?>" alt="<?php echo $t4Hard ? HERO_ADV_DIFF_HARD : HERO_ADV_DIFF_NORMAL; ?>"
title="<?php echo $t4Hard ? HERO_ADV_DIFF_HARD : HERO_ADV_DIFF_NORMAL; ?>" title="<?php echo $t4Hard ? HERO_ADV_DIFF_HARD : HERO_ADV_DIFF_NORMAL; ?>">
style="width:16px;height:16px;vertical-align:middle;">
</td> </td>
<td><span id="timer<?php echo ++$session->timer; ?>"><?php echo $generator->getTimeFormat(max(0, $t4Offer['expire'] - $t4Now)); ?></span></td> <td class="t4exp"><span id="timer<?php echo ++$session->timer; ?>"><?php echo $generator->getTimeFormat(max(0, $t4Offer['expire'] - $t4Now)); ?></span></td>
<td style="width:150px;"> <td class="t4act">
<?php if (!$t4Running) { ?> <?php if (!$t4Running) { ?>
<form action="" method="POST" style="margin:0;display:inline;"> <form action="" method="POST" class="t4form">
<input type="hidden" name="t4action" value="startadv"> <input type="hidden" name="t4action" value="startadv">
<input type="hidden" name="advid" value="<?php echo (int) $t4Offer['id']; ?>"> <input type="hidden" name="advid" value="<?php echo (int) $t4Offer['id']; ?>">
<button type="submit" style="background:none;border:0;padding:0;cursor:pointer;font-size:inherit;font-family:inherit;color:#3a6f1e;font-weight:bold;">&#9658; <?php echo HERO_ADV_GO; ?></button> <button type="submit" class="t4btn"><?php echo HERO_ADV_GO; ?></button>
</form> </form>
<?php } else { ?>-<?php } ?> <?php } else { ?>
<span class="t4none">&mdash;</span>
<?php } ?>
</td> </td>
</tr> </tr>
<?php } ?> <?php } ?>
<?php } else { ?> <?php } else { ?>
<tr><td colspan="5"><?php echo HERO_ADV_NONE; ?></td></tr> <tr><td colspan="5" class="t4empty"><?php echo HERO_ADV_NONE; ?></td></tr>
<?php } ?> <?php } ?>
</tbody> </tbody>
</table> </table>
+113 -15
View File
@@ -192,6 +192,18 @@ foreach ($t4HeroItems->getInventory($session->uid) as $t4Row) {
Latimile sunt stranse la minimul in care incape headerul, ca tabelul sa nu Latimile sunt stranse la minimul in care incape headerul, ca tabelul sa nu
mai depaseasca zona de continut (~505px) si sa nu mai apara scroll mai depaseasca zona de continut (~505px) si sa nu mai apara scroll
orizontal. Total: 78+96+66+46+66+74 = 426px + padding. */ orizontal. Total: 78+96+66+46+66+74 = 426px + padding. */
/* Capul de COLOANE, la fel ca in 37_items.tpl si 37_adventures.tpl: gri
deschis, text mic, ca sa nu concureze cu titlul tabelului de deasupra. */
.t4auc-tbl tr.t4cols th {
background: #e8e8ea;
color: #444;
font-size: 11px;
font-weight: bold;
text-align: center;
padding: 3px 5px;
border-bottom: 1px solid #d0d0d4;
}
.t4auc-tbl th { text-align: center; } .t4auc-tbl th { text-align: center; }
/* fara white-space:nowrap pe th: "Se incheie in" se rupe pe doua randuri /* fara white-space:nowrap pe th: "Se incheie in" se rupe pe doua randuri
@@ -215,6 +227,55 @@ foreach ($t4HeroItems->getInventory($session->uid) as $t4Row) {
word-wrap: break-word; word-wrap: break-word;
} }
/* --- "My bids" / "My sales": aceleasi tonuri ca restul paginii --- */
.t4auc-mini td { padding: 6px; font-size: 11px; vertical-align: middle; }
/* Coloana obiectului: iconita sus, numele dedesubt cu scris pal - exact ca in
tabelul de licitatii deschise, ca cele doua liste sa se citeasca la fel. */
.t4auc-mini .t4auc-col-item { width: 86px; text-align: center; }
/* Eticheta pe RANDUL EI, valoarea dedesubt.
Inainte erau inline: in coloana ingusta eticheta se rupea, iar cifra
ingrosata urca peste ea. Ca bloc, fiecare are randul propriu. */
.t4auc-mini .t4auc-lbl {
display: block;
margin-bottom: 3px;
color: #8a877f;
font-size: 10px;
line-height: 14px;
white-space: nowrap;
}
/* NU folosi ".t4auc-num" aici: numele e deja luat de campurile din Casa de
schimb (input cu chenar), iar valorile ar fi aratat ca niste casute
editabile. */
.t4auc-mini .t4auc-value { display: block; font-weight: bold; line-height: 15px; color: #3f3d39; }
.t4auc-mini .t4auc-val { text-align: right; width: 92px; }
.t4auc-mini .t4auc-time { text-align: center; width: 74px; font-variant-numeric: tabular-nums; color: #8a877f; }
/* --- "Sell an item" --- */
.t4auc-sell td { padding: 6px; font-size: 11px; vertical-align: middle; }
.t4auc-sell .t4auc-lbl {
display: block;
margin-bottom: 3px;
color: #8a877f;
font-size: 10px;
}
.t4auc-sell select,
.t4auc-sell input[type="text"] {
padding: 2px 4px;
border: 1px solid #b9b6b0;
border-radius: 3px;
font-size: 11px;
font-family: inherit;
}
.t4auc-sell select { max-width: 100%; }
.t4auc-sell .t4auc-qty { width: 48px; text-align: center; }
.t4auc-sell .t4auc-prc { width: 62px; text-align: right; }
/* Tier: numarul sus, abilitatea dedesubt cu scris mai pal */ /* Tier: numarul sus, abilitatea dedesubt cu scris mai pal */
.t4auc-tier { .t4auc-tier {
display: inline-block; display: inline-block;
@@ -416,7 +477,7 @@ $t4LblPrice = defined('HERO_AUC_PRICE_SHORT') ? HERO_AUC_PRICE_SHORT : HERO_AUC_
<table id="distribution" class="t4auc-tbl" cellpadding="1" cellspacing="1"> <table id="distribution" class="t4auc-tbl" cellpadding="1" cellspacing="1">
<thead> <thead>
<tr><th colspan="6"><?php echo HERO_AUC_OPEN; ?></th></tr> <tr><th colspan="6"><?php echo HERO_AUC_OPEN; ?></th></tr>
<tr> <tr class="t4cols">
<th class="t4auc-col-item"><?php echo HERO_AUC_ITEM; ?></th> <th class="t4auc-col-item"><?php echo HERO_AUC_ITEM; ?></th>
<th class="t4auc-col-tier"><?php echo $t4LblTier; ?></th> <th class="t4auc-col-tier"><?php echo $t4LblTier; ?></th>
<th class="t4auc-col-qty"><?php echo HERO_QUANTITY; ?></th> <th class="t4auc-col-qty"><?php echo HERO_QUANTITY; ?></th>
@@ -475,17 +536,28 @@ $t4LblPrice = defined('HERO_AUC_PRICE_SHORT') ? HERO_AUC_PRICE_SHORT : HERO_AUC_
</table> </table>
<?php if (count($t4MyBids)) { ?> <?php if (count($t4MyBids)) { ?>
<table id="distribution" cellpadding="1" cellspacing="1" style="margin-top:10px;"> <table id="distribution" class="t4auc-mini" cellpadding="1" cellspacing="1" style="margin-top:10px;">
<thead> <thead>
<tr><th colspan="4"><?php echo HERO_AUC_MY_BIDS; ?></th></tr> <tr><th colspan="4"><?php echo HERO_AUC_MY_BIDS; ?></th></tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach ($t4MyBids as $t4A) { ?> <?php foreach ($t4MyBids as $t4A) { ?>
<tr> <tr>
<td title="<?php echo htmlspecialchars(heroItemBonusText((int) $t4A['itemid'])); ?>"><?php echo $t4A['name']; ?> (<?php echo (int) $t4A['quantity']; ?>x)</td> <td class="t4auc-col-item" title="<?php echo htmlspecialchars(heroItemBonusText((int) $t4A['itemid'])); ?>">
<td style="text-align:right;"><?php echo HERO_AUC_PRICE; ?>: <?php echo number_format((int) $t4A['silver_current']); ?></td> <span class="heroT4Item item<?php echo (int) $t4A['itemid']; ?>"></span>
<td style="text-align:right;"><?php echo HERO_AUC_YOUR_MAX; ?>: <?php echo number_format((int) $t4A['bid_max']); ?></td> <span class="t4auc-itemname">
<td><span id="timer<?php echo ++$session->timer; ?>"><?php echo $generator->getTimeFormat(max(0, $t4A['time_end'] - $t4Now)); ?></span></td> <?php echo $t4A['name']; ?> (<?php echo (int) $t4A['quantity']; ?>x)
</span>
</td>
<td class="t4auc-val">
<span class="t4auc-lbl"><?php echo $t4LblPrice; ?></span>
<span class="t4auc-value"><?php echo number_format((int) $t4A['silver_current']); ?></span>
</td>
<td class="t4auc-val">
<span class="t4auc-lbl"><?php echo HERO_AUC_YOUR_MAX; ?></span>
<span class="t4auc-value"><?php echo number_format((int) $t4A['bid_max']); ?></span>
</td>
<td class="t4auc-time"><span id="timer<?php echo ++$session->timer; ?>"><?php echo $generator->getTimeFormat(max(0, $t4A['time_end'] - $t4Now)); ?></span></td>
</tr> </tr>
<?php } ?> <?php } ?>
</tbody> </tbody>
@@ -493,16 +565,24 @@ $t4LblPrice = defined('HERO_AUC_PRICE_SHORT') ? HERO_AUC_PRICE_SHORT : HERO_AUC_
<?php } ?> <?php } ?>
<?php if (count($t4MySales)) { ?> <?php if (count($t4MySales)) { ?>
<table id="distribution" cellpadding="1" cellspacing="1" style="margin-top:10px;"> <table id="distribution" class="t4auc-mini" cellpadding="1" cellspacing="1" style="margin-top:10px;">
<thead> <thead>
<tr><th colspan="3"><?php echo HERO_AUC_MY_SALES; ?></th></tr> <tr><th colspan="3"><?php echo HERO_AUC_MY_SALES; ?></th></tr>
</thead> </thead>
<tbody> <tbody>
<?php foreach ($t4MySales as $t4A) { ?> <?php foreach ($t4MySales as $t4A) { ?>
<tr> <tr>
<td title="<?php echo htmlspecialchars(heroItemBonusText((int) $t4A['itemid'])); ?>"><?php echo $t4A['name']; ?> (<?php echo (int) $t4A['quantity']; ?>x)</td> <td class="t4auc-col-item" title="<?php echo htmlspecialchars(heroItemBonusText((int) $t4A['itemid'])); ?>">
<td style="text-align:right;"><?php echo HERO_AUC_PRICE; ?>: <?php echo number_format((int) $t4A['silver_current']); ?></td> <span class="heroT4Item item<?php echo (int) $t4A['itemid']; ?>"></span>
<td><span id="timer<?php echo ++$session->timer; ?>"><?php echo $generator->getTimeFormat(max(0, $t4A['time_end'] - $t4Now)); ?></span></td> <span class="t4auc-itemname">
<?php echo $t4A['name']; ?> (<?php echo (int) $t4A['quantity']; ?>x)
</span>
</td>
<td class="t4auc-val">
<span class="t4auc-lbl"><?php echo $t4LblPrice; ?></span>
<span class="t4auc-value"><?php echo number_format((int) $t4A['silver_current']); ?></span>
</td>
<td class="t4auc-time"><span id="timer<?php echo ++$session->timer; ?>"><?php echo $generator->getTimeFormat(max(0, $t4A['time_end'] - $t4Now)); ?></span></td>
</tr> </tr>
<?php } ?> <?php } ?>
</tbody> </tbody>
@@ -510,15 +590,24 @@ $t4LblPrice = defined('HERO_AUC_PRICE_SHORT') ? HERO_AUC_PRICE_SHORT : HERO_AUC_
<?php } ?> <?php } ?>
<?php if (count($t4Sellable)) { ?> <?php if (count($t4Sellable)) { ?>
<table id="distribution" cellpadding="1" cellspacing="1" style="margin-top:10px;"> <table id="distribution" class="t4auc-sell" cellpadding="1" cellspacing="1" style="margin-top:10px;">
<thead> <thead>
<tr><th colspan="5"><?php echo HERO_AUC_SELL; ?></th></tr> <tr><th colspan="5"><?php echo HERO_AUC_SELL; ?></th></tr>
</thead> </thead>
<tbody> <tbody>
<tr> <tr>
<?php
/**
* <form> sta intre <tr> si <td>, ceea ce nu e HTML valid - browserele
* il "ridica" in afara tabelului, dar campurile raman asociate si
* formularul functioneaza. Structura e cea originala; a fost pastrata
* intentionat, ca sa nu se schimbe alinierea pe coloane.
*/
?>
<form action="" method="POST" style="margin:0;"> <form action="" method="POST" style="margin:0;">
<input type="hidden" name="t4action" value="sell"> <input type="hidden" name="t4action" value="sell">
<td> <td>
<span class="t4auc-lbl"><?php echo HERO_AUC_ITEM; ?></span>
<select name="rowid"> <select name="rowid">
<?php foreach ($t4Sellable as $t4Row) { ?> <?php foreach ($t4Sellable as $t4Row) { ?>
<option value="<?php echo (int) $t4Row['id']; ?>" title="<?php echo htmlspecialchars(heroItemBonusText((int) $t4Row['itemid'])); ?>"> <option value="<?php echo (int) $t4Row['id']; ?>" title="<?php echo htmlspecialchars(heroItemBonusText((int) $t4Row['itemid'])); ?>">
@@ -527,16 +616,25 @@ $t4LblPrice = defined('HERO_AUC_PRICE_SHORT') ? HERO_AUC_PRICE_SHORT : HERO_AUC_
<?php } ?> <?php } ?>
</select> </select>
</td> </td>
<td><?php echo HERO_QUANTITY; ?>: <input type="text" name="qty" value="1" size="3" style="text-align:center;"></td> <td>
<td><?php echo HERO_AUC_START_PRICE; ?>: <input type="text" name="price" value="10" size="5" style="text-align:right;"></td> <span class="t4auc-lbl"><?php echo HERO_QUANTITY; ?></span>
<td><?php echo HERO_AUC_DURATION; ?>: <input type="text" name="qty" value="1" class="t4auc-qty">
</td>
<td>
<span class="t4auc-lbl"><?php echo HERO_AUC_START_PRICE; ?></span>
<input type="text" name="price" value="10" class="t4auc-prc">
</td>
<td>
<span class="t4auc-lbl"><?php echo HERO_AUC_DURATION; ?></span>
<select name="duration"> <select name="duration">
<option value="14400">4h</option> <option value="14400">4h</option>
<option value="28800">8h</option> <option value="28800">8h</option>
<option value="86400">24h</option> <option value="86400">24h</option>
</select> </select>
</td> </td>
<td style="text-align:center;"><input type="submit" value="<?php echo HERO_AUC_LIST; ?>"></td> <td style="text-align:center;">
<button type="submit" class="t4auc-btn"><?php echo HERO_AUC_LIST; ?></button>
</td>
</form> </form>
</tr> </tr>
</tbody> </tbody>
+158 -42
View File
@@ -83,56 +83,172 @@ $t4Equipped = $t4HeroItems->getEquipped($session->uid);
<p class="message" style="font-weight:bold;"><?php echo $t4Msg; ?></p> <p class="message" style="font-weight:bold;"><?php echo $t4Msg; ?></p>
<?php } ?> <?php } ?>
<style> <style type="text/css">
/* ---------------------------------------------------------------------------
Acelasi limbaj vizual ca pagina de licitatii (37_auction.tpl): badge de tier,
bonus palid dedesubt, butoane verzi si latimi stranse. Toate clasele au
prefixul "t4items" / "t4it-" ca sa nu atinga nimic altceva din interfata.
Fara CSS grid si fara "gap": jocul e deschis si din browsere vechi.
--------------------------------------------------------------------------- */
/* Cap de tabel pentru coloane: fara el nu se intelegea ce e fiecare valoare. */ /* Cap de tabel pentru coloane: fara el nu se intelegea ce e fiecare valoare. */
table.t4items tr.t4cols th{background:#e8e8ea;color:#444;font-size:11px; table.t4items tr.t4cols th {
font-weight:bold;text-align:center;padding:3px 5px;border-bottom:1px solid #d0d0d4} background: #e8e8ea;
color: #444;
font-size: 11px;
font-weight: bold;
text-align: center;
padding: 3px 5px;
border-bottom: 1px solid #d0d0d4;
}
table.t4items td { padding: 5px 4px; vertical-align: middle; }
/* Latimile, intr-un singur loc. Stranse ca sa incapa in zona de continut
(~505px) fara scroll orizontal: 78+40+150+96 = 364px fixi, restul ramane
coloanei cu numele. Inainte, 110+46+230+170 = 556px depaseau singuri
latimea paginii, iar numele se rupeau pe trei randuri. */
table.t4items th.c-type { width: 78px; }
table.t4items th.c-img { width: 40px; }
table.t4items th.c-name { width: auto; }
table.t4items th.c-tier { width: 150px; }
table.t4items th.c-act { width: 96px; }
/* Slotul (Coif, Arma, ...) */
table.t4items td.t4slot { text-align: left; font-size: 11px; }
/* Imaginea are coloana proprie, centrata. */ /* Imaginea are coloana proprie, centrata. */
table.t4items td.t4img{text-align:center;vertical-align:middle;width:46px} table.t4items td.t4img { text-align: center; vertical-align: middle; }
table.t4items td.t4tier{text-align:center;white-space:normal}
/* Bonusul, discret, langa tier. */ /* Numele obiectului */
table.t4items .t4bonus{display:block;color:#777;font-size:10px;line-height:1.3;font-weight:normal} table.t4items td.t4name { text-align: left; font-size: 11px; }
/* Tier + bonus, ca in tabelul de licitatii */
table.t4items td.t4tier { text-align: center; white-space: normal; }
table.t4items .t4badge {
display: inline-block;
min-width: 30px;
padding: 1px 6px;
font-size: 11px;
font-weight: bold;
color: #5c5850;
background: #eceae5;
border: 1px solid #cfccc5;
border-radius: 3px;
}
/* consumabilele n-au tier, arata cantitatea - alt accent, ca sa se distinga */
table.t4items .t4badge.t4qty { color: #3f5f22; background: #e4f0d0; border-color: #a3bf7c; }
/* Bonusul, discret, sub badge. */
table.t4items .t4bonus {
display: block;
margin-top: 3px;
color: #9b978f;
font-size: 10px;
line-height: 1.35;
font-weight: normal;
}
/* Slot gol */
table.t4items td.t4empty { color: #a5a19a; font-style: normal; }
/* --- Actiuni --- */
table.t4items td.t4act { text-align: center; }
table.t4items .t4form { margin: 0; text-align: center; }
table.t4items .t4btn {
display: inline-block;
padding: 4px 12px;
font-size: 11px;
font-weight: bold;
color: #3f5f22;
cursor: pointer;
white-space: nowrap;
background: #e4f0d0;
background: linear-gradient(#fbfdf6, #dcebc6);
border: 1px solid #a3bf7c;
border-radius: 4px;
}
table.t4items .t4btn:hover {
background: #d6e8bd;
background: linear-gradient(#ffffff, #cfe4b0);
border-color: #8bab61;
}
table.t4items .t4btn:active {
background: linear-gradient(#d5e6b8, #e9f3da);
border-color: #8bab61;
}
/* butonul de dezechipare: neutru, nu verde - e o actiune "de retragere" */
table.t4items .t4btn.t4btn-off {
color: #6b6862;
background: linear-gradient(#fdfdfc, #e8e6e1);
border-color: #c3c0b9;
}
table.t4items .t4btn.t4btn-off:hover {
background: linear-gradient(#ffffff, #dedbd4);
border-color: #aeaba4;
}
/* casuta de cantitate stivuita peste buton, ca la licitatii */
table.t4items .t4qtynum {
display: block;
width: 52px;
margin: 0 auto 4px auto;
padding: 2px 4px;
text-align: right;
border: 1px solid #b9b6b0;
border-radius: 3px;
font-size: 11px;
}
table.t4items .t4none { color: #a5a19a; }
</style> </style>
<table id="distribution" class="t4items" cellpadding="1" cellspacing="1"> <table id="distribution" class="t4items" cellpadding="1" cellspacing="1">
<thead> <thead>
<tr><th colspan="5"><?php echo HERO_ITEMS_EQUIPPED; ?></th></tr> <tr><th colspan="5"><?php echo HERO_ITEMS_EQUIPPED; ?></th></tr>
<tr class="t4cols"> <tr class="t4cols">
<th style="width:110px;"><?php echo HERO_COL_TYPE; ?></th> <th class="c-type"><?php echo HERO_COL_TYPE; ?></th>
<th style="width:46px;"><?php echo HERO_COL_IMAGE; ?></th> <th class="c-img"><?php echo HERO_COL_IMAGE; ?></th>
<th><?php echo HERO_COL_NAME; ?></th> <th class="c-name"><?php echo HERO_COL_NAME; ?></th>
<th style="width:230px;"><?php echo HERO_COL_TIER; ?></th> <th class="c-tier"><?php echo HERO_COL_TIER; ?></th>
<th style="width:110px;"><?php echo HERO_COL_ACTION; ?></th> <th class="c-act"><?php echo HERO_COL_ACTION; ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<?php for ($t4Slot = 1; $t4Slot <= 6; $t4Slot++) { ?> <?php for ($t4Slot = 1; $t4Slot <= 6; $t4Slot++) { ?>
<tr> <tr>
<td style="width:110px;"><b><?php echo constant('HERO_SLOT_' . $t4Slot); ?></b></td> <td class="t4slot"><b><?php echo constant('HERO_SLOT_' . $t4Slot); ?></b></td>
<?php if (isset($t4Equipped[$t4Slot])) { <?php if (isset($t4Equipped[$t4Slot])) {
$t4Row = $t4Equipped[$t4Slot]; $t4Row = $t4Equipped[$t4Slot];
$t4Bonus = heroItemBonusText((int) $t4Row['itemid']); $t4Bonus = heroItemBonusText((int) $t4Row['itemid']);
?> ?>
<td class="t4img"><span class="heroT4Item item<?php echo (int) $t4Row['itemid']; ?>"></span></td> <td class="t4img"><span class="heroT4Item item<?php echo (int) $t4Row['itemid']; ?>"></span></td>
<td><?php echo $t4Row['name']; ?></td> <td class="t4name"><?php echo $t4Row['name']; ?></td>
<td class="t4tier"> <td class="t4tier">
T<?php echo (int) $t4Row['def']['tier']; ?> <span class="t4badge"><?php echo HERO_COL_TIER; ?> <?php echo (int) $t4Row['def']['tier']; ?></span>
<?php if ($t4Bonus !== '') { ?> <?php if ($t4Bonus !== '') { ?>
<span class="t4bonus">(<?php echo htmlspecialchars($t4Bonus, ENT_QUOTES, 'UTF-8'); ?>)</span> <span class="t4bonus"><?php echo htmlspecialchars($t4Bonus, ENT_QUOTES, 'UTF-8'); ?></span>
<?php } ?> <?php } ?>
</td> </td>
<td style="width:110px;text-align:center;"> <td class="t4act">
<?php if ($t4AwayReason === '') { ?> <?php if ($t4AwayReason === '') { ?>
<form action="" method="POST" style="margin:0;"> <form action="" method="POST" class="t4form">
<input type="hidden" name="t4action" value="unequip"> <input type="hidden" name="t4action" value="unequip">
<input type="hidden" name="rowid" value="<?php echo (int) $t4Row['id']; ?>"> <input type="hidden" name="rowid" value="<?php echo (int) $t4Row['id']; ?>">
<input type="submit" value="<?php echo HERO_UNEQUIP; ?>"> <button type="submit" class="t4btn t4btn-off"><?php echo HERO_UNEQUIP; ?></button>
</form> </form>
<?php } else { ?> <?php } else { ?>
<span style="color:#999;">&mdash;</span> <span class="t4none">&mdash;</span>
<?php } ?> <?php } ?>
</td> </td>
<?php } else { ?> <?php } else { ?>
<td colspan="4" style="color:#888;">-</td> <td colspan="4" class="t4empty">&mdash;</td>
<?php } ?> <?php } ?>
</tr> </tr>
<?php } ?> <?php } ?>
@@ -143,11 +259,11 @@ table.t4items .t4bonus{display:block;color:#777;font-size:10px;line-height:1.3;f
<thead> <thead>
<tr><th colspan="5"><?php echo HERO_ITEMS_BAG; ?></th></tr> <tr><th colspan="5"><?php echo HERO_ITEMS_BAG; ?></th></tr>
<tr class="t4cols"> <tr class="t4cols">
<th style="width:110px;"><?php echo HERO_COL_TYPE; ?></th> <th class="c-type"><?php echo HERO_COL_TYPE; ?></th>
<th style="width:46px;"><?php echo HERO_COL_IMAGE; ?></th> <th class="c-img"><?php echo HERO_COL_IMAGE; ?></th>
<th><?php echo HERO_COL_NAME; ?></th> <th class="c-name"><?php echo HERO_COL_NAME; ?></th>
<th style="width:230px;"><?php echo HERO_COL_TIER; ?></th> <th class="c-tier"><?php echo HERO_COL_TIER; ?></th>
<th style="width:170px;"><?php echo HERO_COL_ACTION; ?></th> <th class="c-act"><?php echo HERO_COL_ACTION; ?></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -162,39 +278,39 @@ table.t4items .t4bonus{display:block;color:#777;font-size:10px;line-height:1.3;f
?> ?>
<?php $t4Bonus = heroItemBonusText((int) $t4Row['itemid']); ?> <?php $t4Bonus = heroItemBonusText((int) $t4Row['itemid']); ?>
<tr> <tr>
<td style="width:110px;"><b><?php echo constant('HERO_SLOT_' . (int) $t4Row['def']['slot']); ?></b></td> <td class="t4slot"><b><?php echo constant('HERO_SLOT_' . (int) $t4Row['def']['slot']); ?></b></td>
<td class="t4img"><span class="heroT4Item item<?php echo (int) $t4Row['itemid']; ?>"></span></td> <td class="t4img"><span class="heroT4Item item<?php echo (int) $t4Row['itemid']; ?>"></span></td>
<td><?php echo $t4Row['name']; ?></td> <td class="t4name"><?php echo $t4Row['name']; ?></td>
<td class="t4tier"> <td class="t4tier">
<?php <?php if ($t4IsBag) { ?>
// consumabilele n-au tier: afisam cate bucati sunt <?php // consumabilele n-au tier: afisam cate bucati sunt ?>
echo $t4IsBag <span class="t4badge t4qty"><?php echo (int) $t4Row['quantity']; ?>x</span>
? (int) $t4Row['quantity'] . 'x' <?php } else { ?>
: 'T' . (int) $t4Row['def']['tier']; <span class="t4badge"><?php echo HERO_COL_TIER; ?> <?php echo (int) $t4Row['def']['tier']; ?></span>
?> <?php } ?>
<?php if ($t4Bonus !== '') { ?> <?php if ($t4Bonus !== '') { ?>
<span class="t4bonus">(<?php echo htmlspecialchars($t4Bonus, ENT_QUOTES, 'UTF-8'); ?>)</span> <span class="t4bonus"><?php echo htmlspecialchars($t4Bonus, ENT_QUOTES, 'UTF-8'); ?></span>
<?php } ?> <?php } ?>
</td> </td>
<td style="width:170px;text-align:center;"> <td class="t4act">
<form action="" method="POST" style="margin:0;"> <form action="" method="POST" class="t4form">
<input type="hidden" name="rowid" value="<?php echo (int) $t4Row['id']; ?>"> <input type="hidden" name="rowid" value="<?php echo (int) $t4Row['id']; ?>">
<?php if ($t4IsBag) { ?> <?php if ($t4IsBag) { ?>
<input type="hidden" name="t4action" value="useitem"> <input type="hidden" name="t4action" value="useitem">
<input type="text" name="qty" value="1" size="3" style="text-align:center;"> <input type="text" name="qty" value="1" class="t4qtynum">
<input type="submit" value="<?php echo HERO_USE_ITEM; ?>"> <button type="submit" class="t4btn"><?php echo HERO_USE_ITEM; ?></button>
<?php } elseif ($t4AwayReason === '') { ?> <?php } elseif ($t4AwayReason === '') { ?>
<input type="hidden" name="t4action" value="equip"> <input type="hidden" name="t4action" value="equip">
<input type="submit" value="<?php echo HERO_EQUIP; ?>"> <button type="submit" class="t4btn"><?php echo HERO_EQUIP; ?></button>
<?php } else { ?> <?php } else { ?>
<span style="color:#999;">&mdash;</span> <span class="t4none">&mdash;</span>
<?php } ?> <?php } ?>
</form> </form>
</td> </td>
</tr> </tr>
<?php } ?> <?php } ?>
<?php if (!$t4HasUnequipped) { ?> <?php if (!$t4HasUnequipped) { ?>
<tr><td colspan="5"><?php echo HERO_ITEMS_EMPTY; ?></td></tr> <tr><td colspan="5" class="t4empty"><?php echo HERO_ITEMS_EMPTY; ?></td></tr>
<?php } ?> <?php } ?>
</tbody> </tbody>
</table> </table>