Files
controls-web/overviews/data/OLD/tanklevelsbarouterlabel.php
2026-02-17 09:29:34 -06:00

80 lines
3.9 KiB
PHP

<?php
error_reporting(E_ERROR);
$username="corey";
$password="41945549";
$database="controls";
mysql_connect('127.0.0.1',$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "(SELECT * FROM milling ORDER BY id DESC LIMIT 1)";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
?>
<?php
$i=0;
while ($i < $num) {
$f66=mysql_result($result,$i,"juicetankbit");
$f67=mysql_result($result,$i,"juicelvl");
$f110=mysql_result($result,$i,"dmbeltrunning");
$f111=mysql_result($result,$i,"tdbeltscale");
$f112=mysql_result($result,$i,"tdbeltscaleonoff");
$f113=mysql_result($result,$i,"syrupoverflow");
$f114=mysql_result($result,$i,"molbreclvl");
$f115=mysql_result($result,$i,"syruprcvrlvl");
$f116=mysql_result($result,$i,"amollvl");
$f117=mysql_result($result,$i,"amoloverflow");
$f118=mysql_result($result,$i,"bmoloverflow");
?>
<table class="tftable2">
<tr>
<td width="1000%" align="center" colspan="6" border="0"><font color="#00BFFF"><i>TANK LEVELS</i></font></td>
</tr>
</table>
<table class="tftable1">
<tr>
<?php
if ($f66 == 0)
echo "<td colspan=\"2\" align=\"center\"><font color=\"#e0e0e0\">One Juice Tank</font></td>";
if ($f66 == 1)
echo "<td colspan=\"2\" align=\"center\"><font color=\"#e0e0e0\">Two Juice Tanks</font></td>";
?>
<td colspan="2" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0" >Syrup RCVR</font></td>
<td colspan="2" align="center"><font color="#e0e0e0">Syrup Overflow</font></td>
<td colspan="2" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">Total Syrup</font></td>
<td colspan="2" align="center"><font color="#e0e0e0">A RCVR</font></td>
<td colspan="2" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">A Overflow</font></td>
<td colspan="2" align="center"><font color="#e0e0e0">B RCVR</font></td>
<td colspan="2" bgcolor="#2E2E2E" align="center"><font color="#e0e0e0">B Overflow</font></td>
</tr>
<tr>
<td align="right"><font color="00FF00"><b><?php echo $f67; ?>%</b></font></td>
<td align="left"><progress id="progresstanks" data-label="<?php echo $f67; ?>%" max="100" value="<?php echo $f67; ?>"></progress></td>
<td bgcolor="#2E2E2E" align="left"><font color="#00FF00"><?php echo $f115; ?>%</font></td>
<td bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo $f115; ?>%" max="100" value="<?php echo $f115; ?>"></progress></td>
<td align="left"><font color="#00FF00"><?php echo $f113; ?>%</font></td>
<td align="left"><progress id="progresstanks" data-label="<?php echo $f113; ?>%" max="100" value="<?php echo $f113; ?>"></progress></td>
<td bgcolor="#2E2E2E" align="left"><font color="#00FF00"><?php echo round(($f113*.388)+($f115*.612),0); ?>%</font></td>
<td bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo round(($f113*.388)+($f115*.612),0); ?>%" max="100" value="<?php echo round(($f113*.388)+($f115*.612),0); ?>"></meter></td>
<td align="left"><font color="#00FF00"><?php echo $f116; ?>%</font></td>
<td align="left"><progress id="progresstanks" data-label="<?php echo $f116; ?>%" max="100" value="<?php echo $f116; ?>"></progress></td>
<td bgcolor="#2E2E2E" align="left"><font color="#00FF00"><?php echo $f117; ?>%</font></td>
<td bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo $f117; ?>%" max="100" value="<?php echo $f117; ?>"></progress></td>
<td align="left"><font color="#00FF00"><?php echo $f114; ?>%</font></td>
<td align="left"><progress id="progresstanks" data-label="<?php echo $f114; ?>%" max="100" value="<?php echo $f114; ?>"></progress></td>
<td bgcolor="#2E2E2E" align="left"><font color="#00FF00"><?php echo $f118; ?>%</font></td>
<td bgcolor="#2E2E2E" align="left"><progress id="progresstanks" data-label="<?php echo $f118; ?>%" max="100" value="<?php echo $f118; ?>"></progress></td>
</tr>
</table>
<?php
$i++;
}
?>