96 lines
3.5 KiB
PHP
96 lines
3.5 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) {
|
|
|
|
$f61=mysql_result($result,$i,"runhrstoday");
|
|
$f62=mysql_result($result,$i,"prevtons");
|
|
$f63=mysql_result($result,$i,"prevtime");
|
|
$f64=mysql_result($result,$i,"canetot");
|
|
$f65=mysql_result($result,$i,"avgtcd");
|
|
$f81=mysql_result($result,$i,"losstime");
|
|
$f1=mysql_result($result,$i,"tonshr");
|
|
$f2=mysql_result($result,$i,"wtonshr");
|
|
?>
|
|
|
|
<table class="tftable1">
|
|
|
|
<!-- ****************************************** ROW START ******************************************** -->
|
|
|
|
<tr>
|
|
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0">Today's Tons In:</font></td>
|
|
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php include("tonsin.php");?></b></font></td>
|
|
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Tons</font></td>
|
|
|
|
<td colspan=""><font color="#e0e0e0">Total Tons Ground:</font></td>
|
|
<td align="right"><font color="00FF00"><b><?php include("../data/totground.php");?></b></font></td>
|
|
<td><font color="#e0e0e0">Tons</font></td>
|
|
|
|
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0">Run Hours:</font></td>
|
|
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php echo $f61; ?></b></font></td>
|
|
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Hours</font></td>
|
|
</tr>
|
|
|
|
<!-- ****************************************** ROW END ******************************************** -->
|
|
|
|
<!-- ****************************************** ROW START ******************************************** -->
|
|
|
|
<tr>
|
|
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Tons Ground:</font></td>
|
|
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php echo $f64; ?></b></font></td>
|
|
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Tons</font></td>
|
|
|
|
<td colspan=""><font color="#e0e0e0">Prev Tons Ground:</font></td>
|
|
<td align="right"><font color="00FF00"><b><?php echo $f62; ?></b></font></td>
|
|
<td><font color="#e0e0e0">Tons</font></td>
|
|
|
|
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0">Prev Run Hours:</font></td>
|
|
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php echo $f63; ?></b></font></td>
|
|
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Hours</font></td>
|
|
|
|
</tr>
|
|
|
|
<!-- ****************************************** ROW END ******************************************** -->
|
|
|
|
<!-- ****************************************** ROW START ******************************************** -->
|
|
|
|
<tr>
|
|
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Average Tons/Day:</font></td>
|
|
<td bgcolor="#2E2E2E" align="right"><font color="00FF00"><b><?php echo $f65; ?></b></font></td>
|
|
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Tons</font></td>
|
|
|
|
<td colspan=""><font color="#e0e0e0">Total Tons/Hr:</font></td>
|
|
<td colspan="2" align="center"><font size="6" color="00FFFF"><b><?php echo ($f1 + $f2); ?></b></font></td>
|
|
|
|
<td bgcolor="#2E2E2E" colspan=""><font color="#e0e0e0">Today's Loss Time:</font></td>
|
|
<td bgcolor="#2E2E2E" align="right" id="lsp"><font color="00FF00"><b><?php echo $f81; ?></b></font></td>
|
|
<td bgcolor="#2E2E2E"><font color="#e0e0e0">Hours</font></td>
|
|
</tr>
|
|
|
|
<!-- ****************************************** ROW END ******************************************** -->
|
|
|
|
</table>
|
|
|
|
|
|
<!-- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ END OF PAGE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -->
|
|
|
|
<?php
|
|
$i++;
|
|
}
|
|
?>
|