easy-osm2city-podman/managment/www/index.php
fly 0a8f428651 Initial commit of new map
Signed-off-by: fly <merspieler@airmail.cc>
2023-09-29 18:48:52 +00:00

54 lines
1.3 KiB
PHP

<?php
include("config.php");
// Returns numbers in string format as needed for file names
function clipNumber($number, $length)
{
$number = abs($number) . "";
while (strlen($number) < $length)
{
$number = "0" . $number;
}
return $number;
}
$con = new mysqli($SQL_SERVER, $SQL_USER, $SQL_PASSWORD, $SQL_DATABASE, $SQL_PORT);
if ($con->connect_error)
{
quit();
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Worldbuild Status</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
<link rel="stylesheet" href="leaflet.css"/>
</head>
<body>
<h2>Worldbuild Status</h2>
Colors:
<table border="0">
<?php
$sql = "SELECT id, name, color FROM status ORDER BY priority";
$ret = $con->query($sql)->fetch_all(MYSQLI_ASSOC);
if ($ret != False)
{
foreach($ret as $row)
{
echo '<tr style="background-color: ' . $row["color"] . '"><td>' . $row["name"] . '</td></tr>';
}
}
?>
</table>
Click on a tile to see it's detailed status.<br/>
<ul id="container">
<li>
<div id="map">[Map not available]</div>
</li>
<li>
<iframe id="progressinfo" name="progressinfo" style="border: 0px; height: 454px; width: 750px;" src="progressinfo.php"></iframe>
</li>
</ul>
<script src="leaflet.js"></script>
<script src="map.js"></script>
</body>
</html>