<!DOCTYPE html>
<!--
********************************************************************************

    filename:     currentburnlist.php
    description:  list current burn database table
    inputs:       none
    outputs:      none
    actions:      none
    redirections: none

********************************************************************************
-->
<html>
    <head>
        <style>
            table {
                border-collapse: collapse;
            }

            table, td, th {
                border: 1px solid black;
            }
        </style>
        <?php include 'head.html' ?>
        <script src = "navigation.js"></script>
    </head>
<body>
    <?php include 'navigationmanageburns.html' ?>
    <h3>CURRENT BURN</h3>
    <div id="content">
        <?php
            include 'functions.php';
            $conn = connectToDB();
            $sql = "SELECT burnId, mode, burnState, cookState, foodState, numberProbes, startDateTime, endDateTime, foodId, food, doneness, comments, blowerSpeed, ventPosition, pitId, pitManufacturer, pitModel, blowerP, blowerI, blowerD, ventP, ventI, ventD FROM currentburn WHERE currentBurnId=1";
            $result = mysqli_query($conn, $sql);            
            $row = mysqli_fetch_assoc($result);
            $burnId = $row[burnId];
            $mode = $row[mode];
            $burnState = $row[burnState];
            $cookState = $row[cookState];
            $foodState = $row[foodState];
            $numberProbes = $row[numberProbes];
            $startDateTime = $row[startDateTime];
            $endDateTime = $row[endDateTime];
            $foodId = $row[foodId];
            $food = $row[food];
            $doneness = $row[doneness];
            $comments= $row[comments];
            $blowerSpeed = $row[blowerSpeed];
            $ventPosition = $row[ventPosition];
            $pitId = $row[pitId];
            $pitManufacturer = $row[pitManufacturer];
            $pitModel = $row[pitModel];
            $blowerP = $row[blowerP];
            $blowerI = $row[blowerI];
            $blowerD = $row[blowerD];
            $ventP = $row[ventP];
            $ventI = $row[ventI];
            $ventD = $row[ventD];

            echo "<table>";
                echo"<tr>";
                    echo "<th>PARAMETER</th>";
                    echo "<th>VALUE</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Burn ID</th>";
                    echo "<th>$burnId</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Mode</th>";
                    echo "<th>$mode</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Burn State</th>";
                    echo "<th>$burnState</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Cook State</th>";
                    echo "<th>$cookState</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Food State</th>";
                    echo "<th>$foodState</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Number Probes</th>";
                    echo "<th>$numberProbes</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Start Date Time</th>";
                    echo "<th>$startDateTime</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>End Date Time</th>";
                    echo "<th>$endDateTime</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Food ID</th>";
                    echo "<th>$foodId</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Food</th>";
                    echo "<th>$food</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Doneness</th>";
                    echo "<th>$doneness</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Comments</th>";
                    echo "<th>$comments</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Blower Speed</th>";
                    echo "<th>$blowerSpeed</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Vent Position</th>";
                    echo "<th>$ventPosition</th>";                
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Pit ID</th>";
                    echo "<th>$pitId</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Manufacturer</th>";
                    echo "<th>$pitManufacturer</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Model</th>";
                    echo "<th>$pitModel</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Blower P</th>";
                    echo "<th>$blowerP</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Blower I</th>";
                    echo "<th>$blowerI</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Blower D</th>";
                    echo "<th>$blowerD</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Vent P</th>";
                    echo "<th>$ventP</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>Vent I</th>";
                    echo "<th>$ventI</th>";
                echo "</tr>";
                echo"<tr>";
                    echo "<th>VentD</th>";
                    echo "<th>$ventD</th>";
                echo "</tr>";
            echo "</table>";
            mysqli_close($conn);
        ?>
    </div>
    </body>
</html>