progressinfo shows overview on tile level
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
996354edc6
commit
10f7af253c
2 changed files with 27 additions and 5 deletions
|
@ -73,8 +73,7 @@
|
|||
for ($j = $lon; $j < $lon + 10; $j++)
|
||||
{
|
||||
$name = $we . clipNumber($j, 3) . $sn . clipNumber($i, 2);
|
||||
//echo '<a href="progressinfo.php?tile=' . $name . '" target="progressinfo"><rect x="' . $x . '" y="' . $y . '" width="45" height="45" style="fill: ' . $tiles[$name] . '; opacity: 0.5;"/></a>';
|
||||
echo '<rect x="' . $x . '" y="' . $y . '" width="45" height="45" style="fill: ' . $tiles[$name] . '; opacity: 0.5;"/>';
|
||||
echo '<a href="progressinfo.php?tile=' . $tile . '&minor=' . $name . '" target="progressinfo"><rect x="' . $x . '" y="' . $y . '" width="45" height="45" style="fill: ' . $tiles[$name] . '; opacity: 0.5;"/></a>';
|
||||
$x += 45;
|
||||
}
|
||||
$y -= 45;
|
||||
|
@ -91,12 +90,31 @@
|
|||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
$ret = $result->fetch_all(MYSQLI_ASSOC);
|
||||
echo '<table id="statustable" border="1"><tr><td>Tile Name</td><td>' . $tile . '</td></tr>';
|
||||
echo '<div id="tablecontainer"><table border="1"><tr><td>Tile Name</td><td>' . $tile . '</td></tr>';
|
||||
foreach ($ret as $row)
|
||||
{
|
||||
echo '<tr style="background-color: ' . $row["color"] . '"><td>' . $row["status"] . '</td><td>' . $row["sCount"] . '</td></tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
if (isset($_GET["minor"]))
|
||||
{
|
||||
$sql = 'SELECT * FROM information_schema.tables WHERE table_name = "tile" AND table_schema = "' . $SQL_DATABASE . '"';
|
||||
$ret = $con->query($sql)->fetch_all(MYSQLI_ASSOC);
|
||||
if (!empty($ret))
|
||||
{
|
||||
$stmt = $con->prepare("SELECT status.name AS status, COUNT(*) AS sCount, status.color AS color FROM tile JOIN status ON tile.status_id = status.id WHERE tile.parent_id = (SELECT id FROM secondLevel WHERE name = ?) GROUP BY status.id ORDER BY priority");
|
||||
$stmt->bind_param("s", $_GET["minor"]);
|
||||
$stmt->execute();
|
||||
$result = $stmt->get_result();
|
||||
$ret = $result->fetch_all(MYSQLI_ASSOC);
|
||||
echo '</table>';
|
||||
echo '<table border="1"><tr><td>Tile Name</td><td>' . $_GET["minor"] . '</td></tr>';
|
||||
foreach ($ret as $row)
|
||||
{
|
||||
echo '<tr style="background-color: ' . $row["color"] . '"><td>' . $row["status"] . '</td><td>' . $row["sCount"] . '</td></tr>';
|
||||
}
|
||||
}
|
||||
}
|
||||
echo '</table></div>';
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
|
|
|
@ -10,12 +10,16 @@
|
|||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
#statustable
|
||||
#tablecontainer
|
||||
{
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 457px;
|
||||
}
|
||||
table
|
||||
{
|
||||
margin-bottom: 7px;
|
||||
}
|
||||
svg
|
||||
{
|
||||
padding-right: 7px;
|
||||
|
|
Loading…
Reference in a new issue