explorer: show in red wallets with low connections

This commit is contained in:
Tanguy Pruvot 2015-11-11 23:37:22 +01:00
parent 8aad0a0f0e
commit db13d84785

View file

@ -6,21 +6,23 @@ echo "<div class='main-left-title'>Block Explorer</div>";
echo "<div class='main-left-inner'>"; echo "<div class='main-left-inner'>";
showTableSorter('maintable', '{headers: {0: {sorter: false}, 9: {sorter: false}}}'); showTableSorter('maintable', '{headers: {0: {sorter: false}, 9: {sorter: false}}}');
echo "<thead>";
echo "<tr>"; echo <<<end
echo "<th width=30></th>"; <thead>
echo "<th>Name</th>"; <tr>
echo "<th>Symbol</th>"; <th width="30"></th>
echo "<th>Algo</th>"; <th>Name</th>
echo "<th>Version</th>"; <th>Symbol</th>
echo "<th>Height</th>"; <th>Algo</th>
echo "<th>Difficulty</th>"; <th>Version</th>
echo "<th>Connections</th>"; <th>Height</th>
echo "<th>Network Hash</th>"; <th>Difficulty</th>
echo "<th></th>"; <th>Connections</th>
echo "</tr>"; <th>Network Hash</th>
echo "</thead><tbody>"; <th></th>
</tr>
</thead><tbody>
end;
$list = getdbolist('db_coins', "enable and visible order by name"); $list = getdbolist('db_coins', "enable and visible order by name");
foreach($list as $coin) foreach($list as $coin)
@ -45,8 +47,8 @@ foreach($list as $coin)
$difficulty = Itoa2($coin->difficulty, 3); $difficulty = Itoa2($coin->difficulty, 3);
$nethash = $coin->network_hash? strtoupper(Itoa2($coin->network_hash)).'H/s': ''; $nethash = $coin->network_hash? strtoupper(Itoa2($coin->network_hash)).'H/s': '';
echo "<tr class='ssrow'>"; echo '<tr class="ssrow">';
echo "<td><img src='$coin->image' width=18></td>"; echo '<td><img src="'.$coin->image.'" width="18"></td>';
echo "<td><b><a href='/explorer?id=$coin->id'>$coin->name</a></b></td>"; echo "<td><b><a href='/explorer?id=$coin->id'>$coin->name</a></b></td>";
echo "<td><b>$coin->symbol</b></td>"; echo "<td><b>$coin->symbol</b></td>";
@ -56,7 +58,8 @@ foreach($list as $coin)
echo "<td>$coin->block_height</td>"; echo "<td>$coin->block_height</td>";
echo "<td>$difficulty</td>"; echo "<td>$difficulty</td>";
echo "<td>$coin->connections</td>"; $cnx_class = (intval($coin->connections) > 3) ? '' : 'low';
echo '<td class="'.$cnx_class.'">'.$coin->connections.'</td>';
echo "<td>$nethash</td>"; echo "<td>$nethash</td>";
echo "<td>"; echo "<td>";
@ -68,13 +71,19 @@ foreach($list as $coin)
echo "</tr>"; echo "</tr>";
} }
echo "</tbody>"; echo <<<end
echo "</table>"; </tbody>
</table>
echo "<br></div></div>"; <style type="text/css">
td.low { color: red; font-weight: bold; }
</style>
echo '<br><br><br><br><br><br><br><br><br><br>'; <br></div></div>
echo '<br><br><br><br><br><br><br><br><br><br>';
echo '<br><br><br><br><br><br><br><br><br><br>';
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br>
end;