| Server IP : 93.86.61.54 / Your IP : 216.73.216.60 Web Server : Apache/2.4.62 (Ubuntu) System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64 User : www-data ( 33) PHP Version : 8.4.22 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/projects/tablersdb/ |
Upload File : |
<!DOCTYPE html>
<html>
<head>
<style>
.center {
margin-left: auto;
margin-right: auto;
}
</style>
<body>
<?php
ini_set('display_errors', '1');
include 'db_connection.php';
$conn = OpenCon();
$sqls = "select * from `tablesmark`;";
$res = $conn->query($sqls);
if (!$res) {
die('Invalid query: ' . mysql_error());
}
//echo("ispis 22");
$table_number = array();
$table_indicator = array();
$j = 0;
while($row = $res->fetch_assoc()) {
$table_number[$j] = $row["id_table"];
$table_indicator[$j] = $row["table_indicator"];
$j++;
}
// $str_currentData = "<div class = \"myDiv"\">";
$str_currentData = "<table class = \"center\" border=\"2\" width=\"400\" style=\"border-collapse: collapse; font-family: Verdana; font-size: 24px; font-weight: bold; color: blue\">";
// $str_currentData .= "<tr>";
// $str_currentData .= "<th>Broj stola</th>";
// $str_currentData .= "<th>Indikator poziva</th>";
// $str_currentData .= "<th>Poziv</th>";
// $str_currentData .= "</tr>";
for($i=0;$i<count($table_number);$i++){
$str_currentData .= "<tr align=\"center\">";
$str_currentData .= "<td>";
if($table_indicator[$i] == "1"){
switch ($i) {
case 0:
$str_currentData .= "<img src=\"images/red_circle1.gif\" width=\"60\"/>"; break;
case 1:
$str_currentData .= "<img src=\"images/red_circle2.gif\" width=\"60\"/>"; break;
case 2:
$str_currentData .= "<img src=\"images/red_circle3.gif\" width=\"60\"/>"; break;
case 3:
$str_currentData .= "<img src=\"images/red_circle4.gif\" width=\"60\"/>"; break;
case 4:
$str_currentData .= "<img src=\"images/red_circle5.gif\" width=\"60\"/>"; break;
case 5:
$str_currentData .= "<img src=\"images/red_circle6.gif\" width=\"60\"/>"; break;
case 6:
$str_currentData .= "<img src=\"images/red_circle7.gif\" width=\"60\"/>"; break;
case 7:
$str_currentData .= "<img src=\"images/red_circle8.gif\" width=\"60\"/>"; break;
case 8:
$str_currentData .= "<img src=\"images/red_circle9.gif\" width=\"60\"/>"; break;
case 9:
$str_currentData .= "<img src=\"images/red_circle10.gif\" width=\"60\"/>"; break;
}
}
else{
$str_currentData .= "<img src=\"images/greencircle.png\" width=\"60\"/>";
}
$str_currentData .= "</td>";
$str_currentData .= "<td>";
$str_currentData .= "<a href=\"receive.php?sdata=".($i+1).";0\"><img src = \"images/ponisti_1.gif\"></a>";
$str_currentData .= "</td>";
$str_currentData .= "</tr>";
}
$str_currentData .= "</table>";
// $str_currentData .= "</div>";
echo($str_currentData);
CloseCon($conn);
?>
</body>
</html>