Files
2026-02-17 09:29:34 -06:00

370 lines
13 KiB
PHP

<script type="text/javascript" src="slider.js"></script>
<?php
$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";
$query2 = "SELECT mainspd FROM milling WHERE mainspd = 0 ORDER BY id DESC LIMIT 1";
$result=mysql_query($query);
$result2=mysql_query($query2);
$num=mysql_numrows($result);
mysql_close();
?>
<?php
$i=0;
while ($i < $num) {
$f2=mysql_result($result,$i,"mainspd");
$f3=mysql_result($result,$i,"mill1spd");
$f4=mysql_result($result,$i,"tonshr");
$f5=mysql_result($result,$i,"mccoutput");
$f7=mysql_result($result,$i,"mill1wsp");
$f8=mysql_result($result,$i,"canetot");
$f9=mysql_result($result,$i,"15minavg");
$f10=mysql_result($result,$i,"knife1pres");
$f11=mysql_result($result,$i,"knife2pres");
$f12=mysql_result($result,$i,"knife3pres");
$f13=mysql_result($result,$i,"mill1lvl");
$f14=mysql_result($result,$i,"mill2lvl");
$f15=mysql_result($result,$i,"mill3lvl");
$f16=mysql_result($result,$i,"mill4lvl");
$f17=mysql_result($result,$i,"mill5lvl");
$f18=mysql_result($result,$i,"mill6lvl");
$f19=mysql_result($result,$i,"mill1pres");
$f20=mysql_result($result,$i,"mill2pres");
$f21=mysql_result($result,$i,"mill3pres");
$f22=mysql_result($result,$i,"mill4pres");
$f23=mysql_result($result,$i,"mill5pres");
$f24=mysql_result($result,$i,"mill6pres");
$f25=mysql_result($result,$i,"mill2spd");
$f26=mysql_result($result,$i,"mill3spd");
$f27=mysql_result($result,$i,"mill4spd");
$f28=mysql_result($result,$i,"mill5spd");
$f29=mysql_result($result,$i,"mill6spd");
$f30=mysql_result($result,$i,"knife1spd");
$f31=mysql_result($result,$i,"knife2spd");
$f32=mysql_result($result,$i,"knife3spd");
$f33=mysql_result($result,$i,"mccratio");
$f34=mysql_result($result,$i,"weightwsp");
$f35=mysql_result($result,$i,"levelswitch");
$f36=mysql_result($result,$i,"m1elift");
$f37=mysql_result($result,$i,"m1wlift");
$f38=mysql_result($result,$i,"exhaustpr");
$f39=mysql_result($result,$i,"avgtcd");
$f40=mysql_result($result,$i,"runhrstoday");
$f41=mysql_result($result,$i,"prevtons");
$f42=mysql_result($result,$i,"prevtime");
$f43=mysql_result($result,$i,"netablwt");
$f44=mysql_result($result,$i,"knife1op");
$f45=mysql_result($result,$i,"knife2op");
$f46=mysql_result($result,$i,"knife3op");
$f47=mysql_result($result,$i,"kc1");
$f48=mysql_result($result,$i,"kc2");
$f49=mysql_result($result,$i,"kc3");
$f50=mysql_result($result,$i,"imbflow");
$f51=mysql_result($result,$i,"imbsp");
$f52=mysql_result($result,$i,"juicetankbit");
$f53=mysql_result($result,$i,"lbsperhr");
$f54=mysql_result($result,$i,"mill1automan");
$f55=mysql_result($result,$i,"imbprvday");
$f56=mysql_result($result,$i,"juicelvl");
?>
<table>
<tr>
<td id="h-menu">MILLING</td>
</tr>
</table>
</div width="100%" align="center">
<br>
<table width="100%" align="center">
<tr>
<td width="50%" align="right" valign="top" align="center">
<div id="grindingrate">
<div id="title" width="115" height="35">Grinding Info</div>
<div id="value" width="115" height="35"><b><?php echo $f4; ?></b> Tons/Hr</div>
<div id="value" width="115" height="35"><b><?php echo $f9; ?></b> Tons/15min</div>
<div id="value" width="115" height="35"><b><?php echo $f8; ?></b> Tons</div>
<div id="value" width="115" height="35"><b><?php echo $f39; ?></b> AVG TDC</div>
<div id="value" width="115" height="35"><b><?php echo $f40; ?></b> Run Hours</div>
<hr style="noshade" color="black" size="1">
<div id="value" width="150" height="35"><b>Previous Day</b></div>
<div id="value" width="115" height="35"><b><?php echo $f41; ?></b> Tons Ground</div>
<div id="value" width="115" height="35"><b><?php echo $f42; ?></b> Run Hours</div>
<div id="value" width="115" height="35"><b><?php echo $f53; ?></b> PPH/Ton</div>
<div id="value" width="115" height="35"><b><?php echo $f55; ?></b> IMB Tons</div>
<hr style="noshade" color="black" size="1">
<div id="value" width="150" height="35"><b>Imibition</b></div>
<div id="value" width="115" height="35">Flow <b><?php echo $f50; ?></b> GPM</div>
<div id="value" width="115" height="35">SP <b><?php echo $f51; ?></b> GPM</div>
</div>
</td>
<td width="50%" align="left" valign="top" align="center">
<div id="maincarrier">
<div id="title" width="115" height="35">Main Carrier</div>
<div id="value" width="115" height="35"><b><?php echo $f33; ?></b> Ratio</div>
<div id="value" width="115" height="35"><b><?php echo $f2; ?></b> FPM</div>
<div id="value" width="115" height="35"><b><?php echo $f5; ?></b> % Output</div>
<div id="value" width="115" height="35"><b><?php echo $f43; ?></b> Tons</div>
</div>
</td>
</tr>
</table>
<br>
<table width="100%" align="center">
<tr>
<td width="100%" align="center" valign="top" align="center">
<div id="mill4">
<div id="title" width="115" height="35">Exhaust Pressure</div>
<div id="value" width="115" height="35"><b><?php echo $f38; ?></b> PSI</div>
</div>
</td>
</tr>
</table>
<br>
<table width="800" align="center">
<tr align="center">
<td colspan="5" align="center">
<div id="mill1">
<div id="title" width="150" height="35">Mill 1</div>
<div id="value" width="150" height="35">Chute Level <b><?php echo $f13; ?></b> %</div>
<div id="value" width="150" height="35">Pressure <b><?php echo $f19; ?></b> PSI</div>
<div id="value" width="150" height="35">Speed <b><?php echo $f3; ?></b> RPM</div>
<?php
if ($f35 == 1)
echo "<div id=\"value\">Set Point <b> $f34 </b> Tons/Hr</div>";
if ($f35 == 0)
echo "<div id=\"value\">Set Point <b> $f7 </b> %</div>";
?>
<hr size="1" color="#000000">
<div id="value" width="150" height="35"><b>Top Roll Lift</b></div>
<div id="value" width="150" height="35">East <b><?php echo $f36; ?></b> in</div>
<div id="value" width="150" height="35">West <b><?php echo $f37; ?></b> in</div>
<?php
if ($f54 == 1)
echo "<div id=\"gateopenvalue\"><b>Auto</b></div>";
if ($f54 == 0)
echo "<div id=\"gateclosedvalue\"><b>Maunal</b></div>";
?>
</div>
</div>
</td>
</tr>
<br>
<tr>
<td align="center">
<div id="mill2">
<div id="title" width="115" height="35">Mill 2</div>
<div id="value" width="150" height="35">Chute Level <b><?php echo $f14; ?></b> %</div>
<div id="value" width="150" height="35">Pressure <b><?php echo $f20; ?></b> PSI</div>
<div id="value" width="150" height="35">Speed <b><?php echo $f25; ?></b> RPM</div>
</div>
</td>
<td align="center">
<div id="mill3">
<div id="title" width="115" height="35">Mill 3</div>
<div id="value" width="150" height="35">Chute Level <b><?php echo $f15; ?></b> %</div>
<div id="value" width="150" height="35">Pressure <b><?php echo $f21; ?></b> PSI</div>
<div id="value" width="150" height="35">Speed <b><?php echo $f26; ?></b> RPM</div>
</div>
</td>
<td align="center">
<div id="mill4">
<div id="title" width="115" height="35">Mill 4</div>
<div id="value" width="150" height="35">Chute Level <b><?php echo $f16; ?></b> %</div>
<div id="value" width="150" height="35">Pressure <b><?php echo $f22; ?></b> PSI</div>
<div id="value" width="150" height="35">Speed <b><?php echo $f27; ?></b> RPM</div>
</div>
</td>
<td align="center">
<div id="mill5">
<div id="title" width="115" height="35">Mill 5</div>
<div id="value" width="150" height="35">Chute Level <b><?php echo $f17; ?></b> %</div>
<div id="value" width="150" height="35">Pressure <b><?php echo $f23; ?></b> PSI</div>
<div id="value" width="150" height="35">Speed <b><?php echo $f28; ?></b> RPM</div>
</div>
</td>
<td align="center">
<div id="mill6">
<div id="title" width="115" height="35">Mill 6</div>
<div id="value" width="150" height="35">Chute Level <b><?php echo $f18; ?></b> %</div>
<div id="value" width="150" height="35">Pressure <b><?php echo $f24; ?></b> PSI</div>
<div id="value" width="150" height="35">Speed <b><?php echo $f29; ?></b> RPM</div>
</div>
</td>
</tr>
</table>
<br>
<br>
<table width="100%" align="center">
<tr>
<td width="100%" align="center" valign="top" align="center">
<div id="grindingrate">
<div id="title" width="115" height="35">Juice Tanks</div>
<div id="value" width="150" height="35">Level <b><?php echo $f56; ?></b> %</div>
<?php
if ($f52 == 1)
echo "<div id=\"gateopenvalue\"><b>Juice Tank One</b></div>";
if ($f52 == 0)
echo "<div id=\"gateclosedvalue\"><b>Juice Tank Two</b></div>";
?>
</div>
</td>
</tr>
</table>
<br>
<br>
<table width="600" align="center">
<tr>
<td align="right">
<div id="knife1">
<div id="title" width="150" height="35">Knife 1</div>
<div id="value" width="150" height="35">Pressure <b><?php echo $f10; ?></b> PSI</div>
<div id="value" width="150" height="35">Speed <b><?php echo $f30; ?></b> RPM</div>
<div id="value" width="150" height="35">Output <b><?php echo $f44; ?></b> %</div>
<?php
if ($f47 == 1)
echo "<div id=\"gateopenvalue\"><b>Control</b></div>";
if ($f47 == 0)
echo "<div id=\"gateclosedvalue\"><b>Knife</b></div>";
?>
</div>
</td>
<td align="center">
<div id="knife2">
<div id="title" width="150" height="35">Knife 2</div>
<div id="value" width="150" height="35">Pressure <b><?php echo $f11; ?></b> PSI</div>
<div id="value" width="150" height="35">Speed <b><?php echo $f31; ?></b> RPM</div>
<div id="value" width="150" height="35">Output <b><?php echo $f45; ?></b> %</div>
<?php
if ($f48 == 1)
echo "<div id=\"gateopenvalue\"><b>Control</b></div>";
if ($f48 == 0)
echo "<div id=\"gateclosedvalue\"><b>Knife</b></div>";
?>
</div>
</td>
<td align="left">
<div id="knife3">
<div id="title" width="150" height="35">Knife 3</div>
<div id="value" width="150" height="35">Pressure <b><?php echo $f12; ?></b> PSI</div>
<div id="value" width="150" height="35">Speed <b><?php echo $f32; ?></b> RPM</div>
<div id="value" width="150" height="35">Output <b><?php echo $f46; ?></b> %</div>
<?php
if ($f49 == 1)
echo "<div id=\"gateopenvalue\"><b>Control</b></div>";
if ($f49 == 0)
echo "<div id=\"gateclosedvalue\"><b>Knife</b></div>";
?>
</div>
</td>
</tr>
</table>
</div>
<?php
if($result2->num_rows>=1) {
$email='corey@lasuca.com';
$subject = "MCC SPEED HAS REACHED 0";
$message='MCC SPEED HAS REACHED 0';
if(mail($email, $subject, $message)) {
//mail successfully sent
} else {
//mail unsuccessful
}
}
?>
<!---
<DIV class=carpe_slider_group>
<DIV class=carpe_horizontal_slider_display_combo>
<DIV class=title <font face="Arial, Helvetica, sans-serif">CHUTE Chute LevelS</font></DIV>
<DIV class=carpe_slider_display_holder>
<input name="Input" class=carpe_slider_display id="display1" value="<?php echo $f13; ?>" />
</DIV>
<DIV class=carpe_horizontal_slider_track>
<DIV class=carpe_slider_slit></DIV>
<DIV class=carpe_slider id=slider1 display="display1" style="left:<?php echo $f13; ?>px"></DIV>
</DIV>
</DIV>
<br>
<br>
<DIV class=carpe_slider_group>
<DIV class=carpe_horizontal_slider_display_combo>
<DIV class=carpe_slider_display_holder>
<input name="Input" class=carpe_slider_display id="display1" value="<?php echo $f14; ?>" />
</DIV>
<DIV class=carpe_horizontal_slider_track>
<DIV class=carpe_slider_slit></DIV>
<DIV class=carpe_slider id=slider1 display="display1" style="left:<?php echo $f14; ?>px"></DIV>
</DIV>
</DIV>
<br>
<br>
<DIV class=carpe_slider_group>
<DIV class=carpe_horizontal_slider_display_combo>
<DIV class=carpe_slider_display_holder>
<input name="Input" class=carpe_slider_display id="display1" value="<?php echo $f15; ?>" />
</DIV>
<DIV class=carpe_horizontal_slider_track>
<DIV class=carpe_slider_slit></DIV>
<DIV class=carpe_slider id=slider1 display="display1" style="left:<?php echo $f15; ?>px"></DIV>
</DIV>
</DIV>
<br>
<br>
<DIV class=carpe_slider_group>
<DIV class=carpe_horizontal_slider_display_combo>
<DIV class=carpe_slider_display_holder>
<input name="Input" class=carpe_slider_display id="display1" value="<?php echo $f16; ?>" />
</DIV>
<DIV class=carpe_horizontal_slider_track>
<DIV class=carpe_slider_slit></DIV>
<DIV class=carpe_slider id=slider1 display="display1" style="left:<?php echo $f16; ?>px"></DIV>
</DIV>
</DIV>
<br>
<br>
<DIV class=carpe_slider_group>
<DIV class=carpe_horizontal_slider_display_combo>
<DIV class=carpe_slider_display_holder>
<input name="Input" class=carpe_slider_display id="display1" value="<?php echo $f17; ?>" />
</DIV>
<DIV class=carpe_horizontal_slider_track>
<DIV class=carpe_slider_slit></DIV>
<DIV class=carpe_slider id=slider1 display="display1" style="left:<?php echo $f17; ?>px"></DIV>
</DIV>
</DIV>
<br>
<br>
<DIV class=carpe_slider_group>
<DIV class=carpe_horizontal_slider_display_combo>
<DIV class=carpe_slider_display_holder>
<input name="Input" class=carpe_slider_display id="display1" value="<?php echo $f18; ?>" />
</DIV>
<DIV class=carpe_horizontal_slider_track>
<DIV class=carpe_slider_slit></DIV>
<DIV class=carpe_slider id=slider1 display="display1" style="left:<?php echo $f18; ?>px"></DIV>
</DIV>
</DIV>
<br>
<br>
--->
<?php
$i++;
}
?>