<?php include "../../root.class.php";
$html = new html();
$html->add_styles_page();
$db = new db_safeguard();

$receiving_batch_no = new input();
$receiving_batch_no->type("hidden");
$receiving_batch_no->name("receiving_batch_no");
$receiving_batch_no->id("receiving_batch_no");
$receiving_batch_no->value($_GET['receiving_batch_no']);
$receiving_batch_no->style("width: 100%; margin: 1vw auto;");

$style_0 = new input();
$style_0->type("number");
$style_0->name("style_0");
$style_0->id("style_0");
$style_0->style("width: 100%; margin: 1vw auto;");

$style_1 = new input();
$style_1->type("number");
$style_1->name("style_1");
$style_1->id("style_1");
$style_1->style("width: 100%; margin: 1vw auto;");

$style_1s = new input();
$style_1s->type("number");
$style_1s->name("style_1s");
$style_1s->id("style_1s");
$style_1s->style("width: 100%; margin: 1vw auto;");

$style_4xl = new input();
$style_4xl->type("number");
$style_4xl->name("style_4xl");
$style_4xl->id("style_4xl");
$style_4xl->style("width: 100%; margin: 1vw auto;");

$style_4l = new input();
$style_4l->type("number");
$style_4l->name("style_4l");
$style_4l->id("style_4l");
$style_4l->style("width: 100%; margin: 1vw auto;");

$style_4 = new input();
$style_4->type("number");
$style_4->name("style_4");
$style_4->id("style_4");
$style_4->style("width: 100%; margin: 1vw auto;");

$style_5 = new input();
$style_5->type("number");
$style_5->name("style_5");
$style_5->id("style_5");
$style_5->style("width: 100%; margin: 1vw auto;");

$style_6 = new input();
$style_6->type("number");
$style_6->name("style_6");
$style_6->id("style_6");
$style_6->style("width: 100%; margin: 1vw auto;");

$style_7 = new input();
$style_7->type("number");
$style_7->name("style_7");
$style_7->id("style_7");
$style_7->style("width: 100%; margin: 1vw auto;");

$style_1c = new input();
$style_1c->type("number");
$style_1c->name("style_1c");
$style_1c->id("style_1c");
$style_1c->style("width: 100%; margin: 1vw auto;");

$style_1cs = new input();
$style_1cs->type("number");
$style_1cs->name("style_1cs");
$style_1cs->id("style_1cs");
$style_1cs->style("width: 100%; margin: 1vw auto;");

$style_4c = new input();
$style_4c->type("number");
$style_4c->name("style_4c");
$style_4c->id("style_4c");
$style_4c->style("width: 100%; margin: 1vw auto;");

$submit_btn = new button();
$submit_btn->class("submit_btn");
$submit_btn->value("SUBMIT");

?>
<form action="save_style.php" method="post">
    <div class="form_down">
        <br>
        <style>
            table,
            th,
            td {
                border: 2px solid black;
                border-collapse: collapse;
                padding: 5px;
            }
        </style>
        <?php
        $receiving_batch_no->add();
        ?>
        <table style="width: 90%">
            <h1>Pre Crack Analysis</h1><br>


            <tr>
                <th colspan="6" style="background-color: #004aad80;">STYLE BREAKDOWN OF SOUND KERNEL</th>
            </tr>
            <tr>
                <td>Style 0 (g)</td>
                <td>≥20mm</td>
                <td>
                    <?php
                    $style_0->add();
                    ?>
                </td>
                <td>Style 5 (g)</td>
                <td>8 - 10mm</td>
                <td>
                    <?php
                    $style_5->add();
                    ?>
                </td>
            </tr>
            <tr>
                <td>Style 1 (g)</td>
                <td>16 - 20mm</td>
                <td>
                    <?php
                    $style_1->add();
                    ?>
                </td>
                <td>Style 6 (g)</td>
                <td>6 - 8mm</td>
                <td>
                    <?php
                    $style_6->add();
                    ?>
                </td>
            </tr>
            <tr>
                <td>Style 1S (g)</td>
                <td>13 - 16mm</td>
                <td>
                    <?php
                    $style_1s->add();
                    ?>
                </td>
                <td>Style 7 (g)</td>
                <td>3 - 6mm</td>
                <td>
                    <?php
                    $style_7->add();
                    ?>
                </td>
            </tr>
            <tr>
                <td>Style 4XL (g)</td>
                <td>≥16mm</td>
                <td>
                    <?php
                    $style_4xl->add();
                    ?>
                </td>
                <td>Style 1C (g)</td>
                <td>≥16mm</td>
                <td>
                    <?php
                    $style_1c->add();
                    ?>
                </td>
            </tr>
            <tr>
                <td>Style 4L (g)</td>
                <td>13 - 16mm</td>
                <td>
                    <?php
                    $style_4l->add();
                    ?>
                </td>
                <td>Style 1CS (g)</td>
                <td>13 - 16mm</td>
                <td>
                    <?php
                    $style_1cs->add();
                    ?>
                </td>
            </tr>
            <tr>
                <td>Style 4 (g)</td>
                <td>10 - 13mm</td>
                <td>
                    <?php
                    $style_4->add();
                    ?>
                </td>
                <td>Style 4C (g)</td>
                <td>10 - 13mm</td>
                <td>
                    <?php
                    $style_4c->add();
                    ?>
                </td>
            </tr>
        </table>
        <br>
        <?php
        $submit_btn->add();
        ?>
    </div>
</form>


<?php


$ajax = new js_ajax();
$ajax->function_name("dnis");
$ajax->insert("style_breakdown");
$ajax->on_success("DATA CAPTURED SUCCESSFULLY");
$ajax->redirect("../pre-crack/nut_analysis.php");