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

// HTML FORM ELEMENTS

$approved_by_label = new label();
$approved_by_label->for("approved_by");
$approved_by_label->value("APPROVED BY : ");

$approved_by = new input();
$approved_by->type("text");
$approved_by->name("approved_by");
$approved_by->id("approved_by");
$approved_by->class("inputs");
$approved_by->placeholder("DRAFT FOR APPROVAL");
$approved_by->addAttribute("style", "width: 40%;");
$approved_by->required();

$responsible_label = new label();
$responsible_label->for("responsible");
$responsible_label->value("RESPONSIBLE : ");

$responsible = new input();
$responsible->type("text");
$responsible->name("responsible");
$responsible->id("responsible");
$responsible->class("inputs");
$responsible->placeholder("RESPONSIBLE");
$responsible->required();

$date_label = new label();
$date_label->for("date");
$date_label->value("DATE : ");

$date = new input();
$date->type("date");
$date->name("date");
$date->id("date");
$date->class("inputs");
$date->required();

$grower = new input();
$grower->type("text");
$grower->name("grower");
$grower->id("grower");
$grower->class("inputs");
$grower->placeholder("GROWER");
$grower->required();

$frec_number = new input();
$frec_number->type("number");
$frec_number->name("frec_number");
$frec_number->id("frec_number");
$frec_number->class("inputs");
$frec_number->placeholder("FREC NUMBER");
$frec_number->required();

$weight = new input();
$weight->type("number");
$weight->name("weight");
$weight->id("weight");
$weight->class("inputs");
$weight->placeholder("WEIGHT");
$weight->required();

$delivered_kernals_label = new label();
$delivered_kernals_label->for("delivered_kernals");
$delivered_kernals_label->value("DELIVERED KERNALS M/C : ");

$delivered_kernal = new input();
$delivered_kernal->type("number");
$delivered_kernal->name("delivered_kernals");
$delivered_kernal->id("delivered_kernals");
$delivered_kernal->class("inputs");
$delivered_kernal->placeholder("1.");
$delivered_kernal->required();

$deliver_kernals = new input();
$deliver_kernals->type("number");
$deliver_kernals->name("delivered_kernals");
$deliver_kernals->id("delivered_kernals");
$deliver_kernals->class("inputs");
$deliver_kernals->placeholder("2.");
$deliver_kernals->required();

$deliver_kernal = new input();
$deliver_kernal->type("number");
$deliver_kernal->name("delivered_kernals");
$deliver_kernal->id("delivered_kernals");
$deliver_kernal->class("inputs");
$deliver_kernal->placeholder("3.");
$deliver_kernal->required();

$variety_cultivar_label = new label();
$variety_cultivar_label->for("variety_cultivar");
$variety_cultivar_label->value("VARIETY/CULTIVAR : ");

$variety_cultivar = new input();
$variety_cultivar->type("text");
$variety_cultivar->name("variety_cultivar");
$variety_cultivar->id("variety_cultivar");
$variety_cultivar->class("inputs");
$variety_cultivar->required();

$weight_of_wnis_label = new label();
$weight_of_wnis_label->for("weight_of_wnis");
$weight_of_wnis_label->value("WEIGHT OF WNS 1 :");

$weight_of_wnis_label_1 = new label();
$weight_of_wnis_label_1->for("weight_of_wnis");
$weight_of_wnis_label_1->value("WEIGHT OF WNS 2 :");

$weight_of_wnis = new input();
$weight_of_wnis->type("number");
$weight_of_wnis->name("weight_of_wnis");
$weight_of_wnis->id("weight_of_wnis");
$weight_of_wnis->class("inputs");
$weight_of_wnis->placeholder("WEIGHT OF WNS 1");
$weight_of_wnis->required();

$weight_of_wnis_2 = new input();
$weight_of_wnis_2->type("number");
$weight_of_wnis_2->name("weight_of_wnis");
$weight_of_wnis_2->id("weight_of_wnis");
$weight_of_wnis_2->class("inputs");
$weight_of_wnis_2->placeholder("WEIGHT OF WNS 2");
$weight_of_wnis_2->required();

$moisture_loss_label = new label();
$moisture_loss_label->for("moisture_loss");
$moisture_loss_label->value("MOISTURE LOSS (1 - 2) / 1");

$moisture_loss = new input();
$moisture_loss->type("number");
$moisture_loss->name("moisture_loss");
$moisture_loss->id("moisture_loss");
$moisture_loss->class("inputs");
$moisture_loss->placeholder("MOISTURE LOSS");
$moisture_loss->required();

$wnis_weight_label = new label();
$wnis_weight_label->for("wnis_weight");
$wnis_weight_label->value("WNIS WEIGHT (NIS)");

$wnis_weight = new input();
$wnis_weight->type("number");
$wnis_weight->name("wnis_weight");
$wnis_weight->id("wnis_weight");
$wnis_weight->class("inputs");
$wnis_weight->placeholder("WNIS WEIGHT");
$wnis_weight->required();

$wnis_sizing_label = new label();
$wnis_sizing_label->for("wnis_sizing");
$wnis_sizing_label->value("WNIS SIZING (NIS)");

$wnis_sizing = new input();
$wnis_sizing->type("number");
$wnis_sizing->name("wnis_sizing");
$wnis_sizing->id("wnis_sizing");
$wnis_sizing->class("inputs");
$wnis_sizing->placeholder("WNIS SIZING (NIS)");
$wnis_sizing->required();

$meter_1 = new input();
$meter_1->type("number");
$meter_1->name("meter");
$meter_1->id("meter");
$meter_1->class("inputs");
$meter_1->placeholder("<18mm");
$meter_1->required();

$meter_2 = new input();
$meter_2->type("number");
$meter_2->name("meter");
$meter_2->id("meter");
$meter_2->class("inputs");
$meter_2->placeholder("18 - 20mm");
$meter_2->required();

$meter_3 = new input();
$meter_3->type("number");
$meter_3->name("meter");
$meter_3->id("meter");
$meter_3->class("inputs");
$meter_3->placeholder("21 - 22mm");
$meter_3->required();

$meter_4 = new input();
$meter_4->type("number");
$meter_4->name("meter");
$meter_4->id("meter");
$meter_4->class("inputs");
$meter_4->placeholder("22mm +");
$meter_4->required();

$sample_drying_method_label = new label();
$sample_drying_method_label->for("sample_drying_method");
$sample_drying_method_label->value("SAMPLE DRYING METHOD : ");

$drying_oven_40_label = new label();
$drying_oven_40_label->for("drying_oven_40");
$drying_oven_40_label->value("40 Drying Oven");
$drying_oven_40_label->addAttribute("style", "margin-top: 2vw; margin-left: 1vw;");

$drying_oven_40 = new input();
$drying_oven_40->type("checkbox");
$drying_oven_40->name("drying_oven_40");
$drying_oven_40->id("drying_oven_40");
$drying_oven_40->class("inputs");
$drying_oven_40->value("40 Drying Oven");
$drying_oven_40->placeholder("40 deg Drying Oven");
$drying_oven_40->addAttribute("style", "width: 30%; height: 40%;");

$drying_room_label = new label();
$drying_room_label->for("Drying_room");
$drying_room_label->value("50 Drying Room");
$drying_room_label->addAttribute("style", "margin-top: 2vw; margin-left: 1vw;");

$drying_room = new input();
$drying_room->type("checkbox");
$drying_room->name("Drying_room");
$drying_room->id("Drying_room");
$drying_room->class("inputs");
$drying_room->value("50 deg Drying Room");
$drying_room->placeholder("50 deg Drying Room");
$drying_room->addAttribute("style", "width: 30%; height: 40%;");

$drying_oven_label = new label();
$drying_oven_label->for("drying_oven_60");
$drying_oven_label->value("60 Drying Oven");
$drying_oven_label->addAttribute("style", "margin-top: 2vw; margin-left: 1vw;");

$drying_oven = new input();
$drying_oven->type("checkbox");
$drying_oven->name("drying_oven_60");
$drying_oven->id("drying_oven_60");
$drying_oven->class("inputs");
$drying_oven->value("60 deg drying Oven");
$drying_oven->placeholder("60 deg  Drying Oven");
$drying_oven->addAttribute("style", "width: 30%; height: 40%;");

$dnis_inspection_label = new label();
$dnis_inspection_label->for("dnis_inspection");
$dnis_inspection_label->value("DNIS INSPECTION (NIS)");

$dnis_weight_label = new label();
$dnis_weight_label->for("dnis_weight");
$dnis_weight_label->value("DNIS WEIGHT (NIS)");

$dnis_sizing_label = new label();
$dnis_sizing_label->for("dnis_sizing");
$dnis_sizing_label->value("DNIS SIZING (NIS)");

$none = new input();
$none->type("number");
$none->name("none");
$none->id("none");
$none->class("inputs");
$none->placeholder("NONE");
$none->required();

$pale = new input();
$pale->type("number");
$pale->name("pale");
$pale->id("pale");
$pale->class("inputs");
$pale->placeholder("PALE");
$pale->required();

$dark = new input();
$dark->type("number");
$dark->name("dark");
$dark->id("dark");
$dark->class("inputs");
$dark->placeholder("DARK");
$dark->required();

$cracked = new input();
$cracked->type("number");
$cracked->name("cracked");
$cracked->id("cracked");
$cracked->class("inputs");
$cracked->placeholder("CRACKED");
$cracked->required();

$mechnical = new input();
$mechnical->type("number");
$mechnical->name("mechnical");
$mechnical->id("mechnical");
$mechnical->class("inputs");
$mechnical->placeholder("MECHNICAL");
$mechnical->required();

$holes_nut_b = new input();
$holes_nut_b->type("number");
$holes_nut_b->name("holes_nut_b");
$holes_nut_b->id("holes_nut_b");
$holes_nut_b->class("inputs");
$holes_nut_b->placeholder("HOLE/NUT B");
$holes_nut_b->required();

$half_nuts = new input();
$half_nuts->type("number");
$half_nuts->name("half_nuts");
$half_nuts->id("half_nuts");
$half_nuts->class("inputs");
$half_nuts->placeholder("HALF NUTS");
$half_nuts->required();

$other = new input();
$other->type("number");
$other->name("other");
$other->id("other");
$other->class("inputs");
$other->placeholder("OTHER");
$other->required();

$dnis_sizing_label = new label();
$dnis_sizing_label->for("dnis_sizing");
$dnis_sizing_label->value("DNIS SIZING (NIS)");

$dnis_1 = new input();
$dnis_1->type("number");
$dnis_1->name("dnis_1");
$dnis_1->id("dnis_1");
$dnis_1->class("inputs");
$dnis_1->placeholder("<18mm ");
$dnis_1->required();

$dnis_2 = new input();
$dnis_2->type("number");
$dnis_2->name("dnis_2");
$dnis_2->id("dnis_2");
$dnis_2->class("inputs");
$dnis_2->placeholder("18 - 20mm ");
$dnis_2->required();

$dnis_3 = new input();
$dnis_3->type("number");
$dnis_3->name("dnis_3");
$dnis_3->id("dnis_3");
$dnis_3->class("inputs");
$dnis_3->placeholder("21 - 22mm ");
$dnis_3->required();

$dnis_4 = new input();
$dnis_4->type("number");
$dnis_4->name("dnis_4");
$dnis_4->id("dnis_4");
$dnis_4->class("inputs");
$dnis_4->placeholder("22mm + ");
$dnis_4->required();

$total_mass_sample_wnis_1 = new input();
$total_mass_sample_wnis_1->type("number");
$total_mass_sample_wnis_1->name("total_mass_sample_wnis_1");
$total_mass_sample_wnis_1->id("total_mass_sample_wnis_1");
$total_mass_sample_wnis_1->class("inputs");
$total_mass_sample_wnis_1->placeholder("TOTAL MASS OF SAMPLE WNIS");
$total_mass_sample_wnis_1->required();

$total_mass_sample_wnis_2 = new input();
$total_mass_sample_wnis_2->type("number");
$total_mass_sample_wnis_2->name("total_mass_sample_wnis_1");
$total_mass_sample_wnis_2->id("total_mass_sample_wnis_1");
$total_mass_sample_wnis_2->class("inputs");
$total_mass_sample_wnis_2->placeholder("TOTAL MASS OF SAMPLE WNIS");
$total_mass_sample_wnis_2->required();

$total_mass_sample_dnis_1 = new input();
$total_mass_sample_dnis_1->type("number");
$total_mass_sample_dnis_1->name("total_mass_sample_dnis_1");
$total_mass_sample_dnis_1->id("total_mass_sample_dnis_1");
$total_mass_sample_dnis_1->class("inputs");
$total_mass_sample_dnis_1->placeholder("TOTAL MASS OF SAMPLE DNIS");
$total_mass_sample_dnis_1->required();

$total_mass_sample_dnis_2 = new input();
$total_mass_sample_dnis_2->type("number");
$total_mass_sample_dnis_2->name("total_mass_sample_dnis_2");
$total_mass_sample_dnis_2->id("total_mass_sample_dnis_2");
$total_mass_sample_dnis_2->class("inputs");
$total_mass_sample_dnis_2->placeholder("TOTAL MASS OF SAMPLE DNIS");
$total_mass_sample_dnis_2->required();

$mass_of_shell_1 = new input();
$mass_of_shell_1->type("number");
$mass_of_shell_1->name("mass_of_shell_1");
$mass_of_shell_1->id("mass_of_shell_1");
$mass_of_shell_1->class("inputs");
$mass_of_shell_1->placeholder("MASS OF SHELL");
$mass_of_shell_1->required();

$mass_of_shell_2 = new input();
$mass_of_shell_2->type("number");
$mass_of_shell_2->name("mass_of_shell_2");
$mass_of_shell_2->id("mass_of_shell_2");
$mass_of_shell_2->class("inputs");
$mass_of_shell_2->placeholder("MASS OF SHELL");
$mass_of_shell_2->required();

$user_type = new select();
$user_type->class("inputs");
$user_type->name("user_type");
$user_type->id("user_type");
$user_type->required();
$user_type->add_option("", "USER TYPE");
$user_type->add_option("ADMIN", "ADMIN");
$user_type->add_option("EMPLOYEE", "EMPLOYEE");

$date_rev_label = new label();
$date_rev_label->for("date_rev");
$date_rev_label->value("DATE REV : ");

$date_rev = new input();
$date_rev->type("date");
$date_rev->name("date_rev");
$date_rev->id("date_rev");
$date_rev->class("inputs");
$date_rev->required();

$analysis_rev_label = new label();
$analysis_rev_label->for("analysis_rev");
$analysis_rev_label->value("Analysis Reviewed & Verified on Nutlogger by : ");

$rev_accepted = new label();
$rev_accepted->for("rev_accepted");
$rev_accepted->value("Reviewed & accepted by : ");

$accepted_by = new input();
$accepted_by->type("text");
$accepted_by->name("accepted_by");
$accepted_by->id("accepted_by");
$accepted_by->class("inputs");
$accepted_by->placeholder("ACCEPTED BY");
$accepted_by->required();

$rev_by = new input();
$rev_by->type("text");
$rev_by->name("rev_by");
$rev_by->id("rev_by");
$rev_by->class("inputs");
$rev_by->placeholder("REVIEWED BY");
$rev_by->required();

$date_1 = new input();
$date_1->type("date");
$date_1->name("date_1");
$date_1->id("date_1");
$date_1->class("inputs");
$date_1->required();

$date_2 = new input();
$date_2->type("date");
$date_2->name("date_2");
$date_2->id("date_2");
$date_2->class("inputs");
$date_2->required();

$sample = new input();
$sample->type("text");
$sample->name("sample");
$sample->id("sample");
$sample->class("inputs");
$sample->placeholder("SAMPLE");
$sample->addAttribute("style", "width: 100px;");
$sample->required();

$style_0_label = new label();
$style_0_label->for("style_0");
$style_0_label->value("Style 0 : ");

$mass_between_0 = new label();
$mass_between_0->for("mass_between_0");
$mass_between_0->value(" >= 20 ");

$mass_0_grams = new input();
$mass_0_grams->type("number");
$mass_0_grams->name("mass_0_grams");
$mass_0_grams->id("mass_0_grams");
$mass_0_grams->class("inputs");
$mass_0_grams->required();

$style_1_label = new label();
$style_1_label->for("style_1");
$style_1_label->value("Style 1 : ");

$mass_between_1 = new label();
$mass_between_1->for("mass_between_1");
$mass_between_1->value(" 16 - 20 ");

$mass_1_grams = new input();
$mass_1_grams->type("number");
$mass_1_grams->name("mass_1_grams");
$mass_1_grams->id("mass_1_grams");
$mass_1_grams->class("inputs");
$mass_1_grams->required();

$style_1S_label = new label();
$style_1S_label->for("style_1S");
$style_1S_label->value("Style 1S : ");

$mass_between_1S = new label();
$mass_between_1S->for("mass_between_3");
$mass_between_1S->value(" 14 - 16 ");

$mass_1S_grams = new input();
$mass_1S_grams->type("number");
$mass_1S_grams->name("mass_1s_grams");
$mass_1S_grams->id("mass_1s_grams");
$mass_1S_grams->class("inputs");
$mass_1S_grams->required();

$style_2_label = new label();
$style_2_label->for("style_2");
$style_2_label->value("Style 2 : ");

$mass_between_2 = new label();
$mass_between_2->for("mass_between_3");
$mass_between_2->value(" 14 - 16 ");

$mass_2_grams = new input();
$mass_2_grams->type("number");
$mass_2_grams->name("mass_2_grams");
$mass_2_grams->id("mass_2_grams");
$mass_2_grams->class("inputs");
$mass_2_grams->required();

$style_4XL_label = new label();
$style_4XL_label->for("style_4XL");
$style_4XL_label->value("Style 4XL : ");

$mass_between_4XL = new label();
$mass_between_4XL->for("mass_between_4XL");
$mass_between_4XL->value(" >=15 ");

$mass_4XL_grams = new input();
$mass_4XL_grams->type("number");
$mass_4XL_grams->name("mass_4XL_grams");
$mass_4XL_grams->id("mass_4XL_grams");
$mass_4XL_grams->class("inputs");
$mass_4XL_grams->required();

$style_4L_label = new label();
$style_4L_label->for("style_4L");
$style_4L_label->value("Style 4L : ");

$mass_between_4L = new label();
$mass_between_4L->for("mass_between_4L");
$mass_between_4L->value(" 13 - 15 ");

$mass_4L_grams = new input();
$mass_4L_grams->type("number");
$mass_4L_grams->name("mass_4L_grams");
$mass_4L_grams->id("mass_4L_grams");
$mass_4L_grams->class("inputs");
$mass_4L_grams->required();

$style_4_label = new label();
$style_4_label->for("style_4");
$style_4_label->value("Style 4 : ");

$mass_between_4 = new label();
$mass_between_4->for("mass_between_4");
$mass_between_4->value(" 10 - 13 ");

$mass_4_grams = new input();
$mass_4_grams->type("number");
$mass_4_grams->name("mass_4_grams");
$mass_4_grams->id("mass_4_grams");
$mass_4_grams->class("inputs");
$mass_4_grams->required();

$style_5 = new label();
$style_5->for("style_5");
$style_5->value("Style 5 : ");

$mass_between_5 = new label();
$mass_between_5->for("mass_between_5");
$mass_between_5->value(" 8 - 10 ");

$mass_5_grams = new input();
$mass_5_grams->type("number");
$mass_5_grams->name("mass_5_grams");
$mass_5_grams->id("mass_5_grams");
$mass_5_grams->class("inputs");
$mass_5_grams->required();

$style_5L = new label();
$style_5L->for("style_5L");
$style_5L->value("Style 5L (CMG) : ");

$mass_between_5L = new label();
$mass_between_5L->for("mass_between_5L");
$mass_between_5L->value(" 8 - 13 ");

$mass_5L_grams = new input();
$mass_5L_grams->type("number");
$mass_5L_grams->name("mass_5L_grams");
$mass_5L_grams->id("mass_5L_grams");
$mass_5L_grams->class("inputs");
$mass_5L_grams->required();

$style_6 = new label();
$style_6->for("style_6");
$style_6->value("Style 6 : ");

$mass_between_6 = new label();
$mass_between_6->for("mass_between_6");
$mass_between_6->value(" 6 - 8 ");

$mass_6_grams = new input();
$mass_6_grams->type("number");
$mass_6_grams->name("mass_6_grams");
$mass_6_grams->id("mass_6_grams");
$mass_6_grams->class("inputs");
$mass_6_grams->required();

$style_7 = new label();
$style_7->for("style_7");
$style_7->value("Style 7 : ");

$mass_between_7 = new label();
$mass_between_7->for("mass_between_7");
$mass_between_7->value(" 3 - 6 ");

$mass_7_grams = new input();
$mass_7_grams->type("number");
$mass_7_grams->name("mass_7_grams");
$mass_7_grams->id("mass_7_grams");
$mass_7_grams->class("inputs");
$mass_7_grams->required();

$style_5D_label = new label();
$style_5D_label->for("style_5D");
$style_5D_label->value("Style 5D : ");

$mass_between_5D = new label();
$mass_between_5D->for("mass_between_7");
$mass_between_5D->value(" 8 - 13 ");

$mass_5D_grams = new input();
$mass_5D_grams->type("number");
$mass_5D_grams->name("mass_5D_grams");
$mass_5D_grams->id("mass_5D_grams");
$mass_5D_grams->class("inputs");
$mass_5D_grams->required();

$style_6D_label = new label();
$style_6D_label->for("style_6D");
$style_6D_label->value("Style 6D : ");

$mass_between_6D = new label();
$mass_between_6D->for("mass_between_7");
$mass_between_6D->value(" 6 - 8 ");

$mass_6D_grams = new input();
$mass_6D_grams->type("number");
$mass_6D_grams->name("mass_6D_grams");
$mass_6D_grams->id("mass_6D_grams");
$mass_6D_grams->class("inputs");
$mass_6D_grams->required();

$style_7D_label = new label();
$style_7D_label->for("style_7D");
$style_7D_label->value("Style 7D : ");

$mass_between_7D = new label();
$mass_between_7D->for("mass_between_7");
$mass_between_7D->value(" 3 - 6 ");

$mass_7D_grams = new input();
$mass_7D_grams->type("number");
$mass_7D_grams->name("mass_7D_grams");
$mass_7D_grams->id("mass_7D_grams");
$mass_7D_grams->class("inputs");
$mass_7D_grams->required();

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

?>
<div class="form_down">

    <br>
    <div style="border: 2px solid black; width: 95%; border-radius: 2vw;">
        <!-- <img src="icons/LN_logo.webp" alt="logo" class="logo"> -->
        <div>
            <div>
                OPERATION PLANING AND CONTROL (GFNC_8.1 REC 4.1) <br>
            </div>
            <div style="display: flex;">
                <div style="align-items: baseline; width: 100%;">
                    <?php
                    $date_rev_label->add();
                    $date_rev->add();
                    ?>
                </div>
                <div style=" width: 100%;">
                    <?php
                    $approved_by_label->add();
                    $approved_by->add();
                    ?>
                </div>
                <br>
            </div>
        </div>
        <div style="border-top: 1px solid black; width: 100%;">
            <h1 style="font-size: 2vw;">PRE-CRACK SAMPLE RECORD</h1>
        </div>
    </div>
    <br>

    <span style="font-weight: bold;"><u>SCOPE</u></span> The action or process for: The collection of data regarding
    delivered raw materials for process planning.
    <br><br>
    <div style="border: 1px solid black; width: 95%; border-radius: 2vw;">
        <div style="width: 100%;">
            <h1 style="font-size: 1.5vw;">1. PRE-CRACK SAMPLE DETAILS</h1>
        </div>
        <div style="display: flex; border-top: 2px solid black; border-bottom: 2px solid black;">
            <div style="width: 50%;">
                <?php
                $responsible_label->add();
                $responsible->add();
                ?>
            </div>
            <div style="width: 50%;">
                <?php
                $date_label->add();
                $date->add();
                ?>
            </div>
        </div>

        <div style="display: flex;">
            <div style="width: 30%;">
                <?php
                $grower->add();
                ?>
            </div>
            <div style="width: 30%;">
                <?php
                $frec_number->add();
                ?>
            </div>
            <div style="width: 30%;">
                <?php
                $weight->add();
                ?>
            </div>
        </div>
    </div>

    <br>

    <div style="display:flex; width: 95%; justify-content: space-between;">
        <div style="border: 2px solid black; width: 48%; border-radius: 2vw; display: flex; flex-direction: column;">
            <div style=" border-bottom: 2px solid black;">
                <?php
                $delivered_kernals_label->add();
                ?>
            </div>
            <div style="border-bottom: 2px solid black;">
                <?php
                $delivered_kernal->add();
                ?>
            </div>
            <div style=" border-bottom: 2px solid black;">
                <?php
                $deliver_kernals->add();
                ?>
            </div>
            <div>
                <?php
                $deliver_kernal->add();
                ?>
            </div>
        </div>

        <div style="border: 2px solid black; width: 48%; border-radius: 2vw; display: flex; flex-direction: column;">
            <div style="border-bottom: 2px solid black;">
                <div>

                </div>
                <div>

                </div>
                <?php
                $variety_cultivar_label->add();
                ?>
            </div>
            <div
                style="display: flex; border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                <div style="display: flex;align-items: center; width: 20%; justify-content: space-between;">
                    <label for="">Integ</label>
                    <input type="checkbox" name="integ" id="integ" style="width: 3vw;height: 3vw;">
                </div>
                <div>
                    <?php
                    $variety_cultivar->add();
                    ?>
                </div>
            </div>
            <div
                style="display: flex;border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                <div style="display: flex;align-items: center; width: 20%; justify-content: space-between;">
                    <label for="">Beau</label>
                    <input type="checkbox" name="beau" id="beau" style="width: 3vw;height: 3vw;">
                </div>
                <div>
                    <?php
                    $variety_cultivar->add();
                    ?>
                </div>
            </div>
            <div style="display: flex; align-items: baseline; justify-content: space-around;">
                <div style="display: flex;align-items: center; width: 20%; justify-content: space-between;">
                    <label for="">Hybrid</label>
                    <input type="checkbox" name="hybrid" id="hybrid" style="width: 3vw;height: 3vw;">
                </div>
                <div>
                    <?php
                    $variety_cultivar->add();
                    ?>
                </div>
            </div>
        </div>
    </div>

    <br>

    <div style="border: 2px solid black; width: 95%; border-radius: 2vw;">
        <div style="width: 100%; display: flex; align-items: center; flex-direction: column;">
            <h1 style="font-size: 1.5vw;text-align: center;">2. <u>3kg RETENTION SAMPLE <br>(Place into drying bin with
                    a tag, remove to lab and sample store once cracking commences)</u></h1>
        </div>
        <div
            style="display: flex; flex-direction: row; align-items: center; width: 100%; justify-content: space-around;">
            <div style="width: 20%;">
                <?php
                $weight_of_wnis->add();
                ?>
            </div>
            <div style="width: 20%;">
                <?php
                $weight_of_wnis_2->add();
                ?>
            </div>
            <div style="width: 20%;">
                <?php
                $moisture_loss_label->add();
                ?>
            </div>
            <div style="width: 20%;">
                <?php
                $moisture_loss->add();
                ?>
            </div>
        </div>
        <div style="text-align: left; width: 100%; border-top: 2px solid black;">
            <h1 style="font-size: 1.5vw;text-align: center;">Keep this sample as a retention sample should the grower
                query actual vs pre crack results. Send to cracking after 3 months.</h1>
        </div>
    </div>

    <br>

    <div style="border: 2px solid black; width: 95%; border-radius: 2vw;">
        <div style="display: flex; flex-direction: row; align-items: center; border-bottom: 2px solid black;">
            <div style="width: 20%; display: flex; border-right: 2px solid black; justify-content: center;">
                <h1 style="font-size: 1.5vw;text-align: center;">3.<u><?php $wnis_weight_label->add(); ?></u></h1>
            </div>
            <div style="width: 25%; display: flex; justify-content: center;">
                <h1 style="font-size: 1.5vw;text-align: center;"><u><?php $wnis_sizing_label->add(); ?></u></h1>
            </div>
        </div>

        <div style="display: flex; flex-direction: row; align-items: center; width: 100%;">
            <div style="width: 20%;border-right: 2px solid black;">
                <?php
                $wnis_weight->add();
                ?>
            </div>
            <div style="width: 20%;">
                <?php
                $meter_1->add();
                ?>
            </div>
            <div style="width: 20%;">
                <?php
                $meter_2->add();
                ?>
            </div>
            <div style="width: 20%;">
                <?php
                $meter_3->add();
                ?>
            </div>
            <div style="width: 20%;">
                <?php
                $meter_4->add();
                ?>
            </div>
        </div>
    </div>

    <br>

    <div style="display: flex; flex-direction: row; width: 95%; border: 2px solid black; border-radius: 2vw; ">
        <div
            style="border-right: 2px solid black;display: flex; align-items: center; width: 30%;justify-content: center;">
            <h1 style="font-size: 1.5vw;text-align: center;">
                4. <u><?php $sample_drying_method_label->add(); ?></u>
            </h1>
        </div>
        <div style="display: flex;width: 25%;">
            <?php
            $drying_oven_40_label->add();
            $drying_oven_40->add();
            ?>
        </div>
        <div style="display: flex;width: 25%;">
            <?php
            $drying_room_label->add();
            $drying_room->add();
            ?>
        </div>
        <div style="display: flex;width: 25%;">
            <?php
            $drying_oven_label->add();
            $drying_oven->add();
            ?>
        </div>
    </div>

    <br>

    <div style="display: flex; flex-direction: column; width: 95%; border: 2px solid black; border-radius: 2vw; ">
        <div
            style="display: flex; flex-direction: row; width: 100%;justify-content: space-around; border-bottom: 2px solid black;">
            <div>
                <h1 style="font-size: 1.5vw;text-align: center;">5. <u><?php $dnis_inspection_label->add(); ?></u></h1>
            </div>
            <div>
                <div>
                    <h1 style="font-size: 1.5vw;text-align: center;"><u><?php $dnis_weight_label->add(); ?></u></h1>
                </div>
                <div>
                    <?php

                    ?>
                </div>
            </div>
        </div>

        <div style="display: flex; flex-direction: row; width: 100%;justify-content: space-around;">
            <div>
                <?php
                $none->add();
                ?>
            </div>
            <div>
                <?php
                $pale->add();
                ?>
            </div>
            <div>
                <?php
                $dark->add();
                ?>
            </div>
            <div>
                <?php
                $cracked->add();
                ?>
            </div>
        </div>

        <div style="display: flex; flex-direction: row; width: 100%;justify-content: space-around;">
            <div>
                <?php
                $mechnical->add();
                ?>
            </div>
            <div>
                <?php
                $holes_nut_b->add();
                ?>
            </div>
            <div>
                <?php
                $half_nuts->add();
                ?>
            </div>
            <div>
                <?php
                $other->add();
                ?>
            </div>
        </div>
    </div>

    <br>

    <div style="display: flex; flex-direction: column; width: 95%; border: 2px solid black; border-radius: 2vw; ">
        <div style="border-bottom: 2px solid black;">
            <h1 style="font-size: 1.5vw;text-align: center;">5. <u><?php $dnis_sizing_label->add(); ?></u></h1>
        </div>
        <div style="display: flex; flex-direction: row; width: 100%; justify-content: space-around;">
            <div>
                <?php
                $dnis_1->add();
                ?>
            </div>
            <div>
                <?php
                $dnis_2->add();
                ?>
            </div>
            <div>
                <?php
                $dnis_3->add();
                ?>
            </div>
            <div>
                <?php
                $dnis_4->add();
                ?>
            </div>
        </div>
    </div>

    <br>

    <br>

    <div
        style="border: 4px solid black; width: 99.3%; border-bottom: none; border-top-left-radius: 2vw;border-top-right-radius: 2vw;">
        <h1 style="font-size: 1.5vw;text-align: center;">6. <u>PRE-CRACK TEST (6KG/4 ton/HOPPER DELIVERY
                representative sample)</u></h1>
    </div>
    <div style="display: flex; flex-direction: row; width: 100%;">
        <div
            style="display: flex; flex-direction: column; width: 50%; border: 4px solid black; border-bottom-left-radius: 2vw; align-items: center; ">
            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>TOTAL MASS OF WNIS</div>
                <div><?php $sample->add(); ?></div>
                <div>KERNEL M/C (1.5%)</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black; width: 100%;align-items: center;justify-content: space-between;">
                <div>TOTAL MASS OF SAMPLE DNIS</div>
                <div><?php $sample->add(); ?></div>
                <div>UNSOUND ANALYSIS</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>MASS OF SHELL</div>
                <div><?php $sample->add(); ?></div>
                <div>FUNGUS</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>NIS MOISTURE LOSS (A - B / A X 100)</div>
                <div><?php $sample->add(); ?></div>
                <div>IMMATURE</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>MASS OF SOUND KERNAL</div>
                <div><?php $sample->add(); ?></div>
                <div>SHELL MARKS/971</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>+ DARKS</div>
                <div><?php $sample->add(); ?></div>
                <div>PIT CENTER</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>MASS OF UNSOUND KERNAL</div>
                <div><?php $sample->add(); ?></div>
                <div>EARLY STINKBUG</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>TOTAL MASS OF KERNEL (C + DARKS + D)</div>
                <div><?php $sample->add(); ?></div>
                <div>LATE STINKBUG</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row;border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>USK RECOVERY % (D / E)</div>
                <div><?php $sample->add(); ?></div>
                <div>NUT BORER</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row;width: 100%;align-items: center;justify-content: space-between;">
                <div>NIS USK RECOVERY % (D / B X 100)</div>
                <div><?php $sample->add(); ?></div>
                <div>GERMINATION</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row;border-top: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>SOUND KERNEL RECOVERY % (C + DARK / B)</div>
                <div><?php $sample->add(); ?></div>
                <div>TOTAL</div>
                <div><?php $sample->add(); ?></div>
            </div>
        </div>

        <div
            style="display: flex; flex-direction: column; width: 50%; border: 4px solid black; border-bottom-right-radius: 2vw; align-items: center; ">
            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>TOTAL MASS OF WNIS</div>
                <div><?php $sample->add(); ?></div>
                <div>KERNEL M/C (1.5%)</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black; width: 100%;align-items: center;justify-content: space-between;">
                <div>TOTAL MASS OF SAMPLE DNIS</div>
                <div><?php $sample->add(); ?></div>
                <div>UNSOUND ANALYSIS</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>MASS OF SHELL</div>
                <div><?php $sample->add(); ?></div>
                <div>FUNGUS</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>NIS MOISTURE LOSS (A - B / A X 100)</div>
                <div><?php $sample->add(); ?></div>
                <div>IMMATURE</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>MASS OF SOUND KERNAL</div>
                <div><?php $sample->add(); ?></div>
                <div>SHELL MARKS/971</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>+ DARKS</div>
                <div><?php $sample->add(); ?></div>
                <div>PIT CENTER</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>MASS OF UNSOUND KERNAL</div>
                <div><?php $sample->add(); ?></div>
                <div>EARLY STINKBUG</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row; border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>TOTAL MASS OF KERNEL (C + DARKS + D)</div>
                <div><?php $sample->add(); ?></div>
                <div>LATE STINKBUG</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row;border-bottom: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>USK RECOVERY % (D / E)</div>
                <div><?php $sample->add(); ?></div>
                <div>NUT BORER</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row;width: 100%;align-items: center;justify-content: space-between;">
                <div>NIS USK RECOVERY % (D / B X 100)</div>
                <div><?php $sample->add(); ?></div>
                <div>GERMINATION</div>
                <div><?php $sample->add(); ?></div>
            </div>

            <div
                style="display: flex; flex-direction: row;border-top: 2px solid black;width: 100%;align-items: center;justify-content: space-between;">
                <div>SOUND KERNEL RECOVERY % (C + DARK / B)</div>
                <div><?php $sample->add(); ?></div>
                <div>TOTAL</div>
                <div><?php $sample->add(); ?></div>
            </div>
        </div>
    </div>

    <br><br>

    <div style="display: flex; flex-direction: column; width: 95%; border: 2px solid black; border-radius: 2vw; ">
        <div style="border-bottom: 2px solid black;">
            <h1 style="font-size: 1.5vw;text-align: center;">7. <u>STYLE BREAKDOWN OF SOUND KERNEL MASS</u></h1>
        </div>
        <div style="display: flex; flex-direction: row;">
            <div style="display: flex; flex-direction: column; width: 50%; justify-content: space-around;">
                <div
                    style="display: flex; border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_0_label->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_0->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_0_grams->add();
                        ?>
                    </div>
                </div>

                <div
                    style="display: flex; border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_1_label->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_1->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_1_grams->add();
                        ?>
                    </div>
                </div>

                <div
                    style="display: flex; border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_1S_label->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_1S->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_1S_grams->add();
                        ?>
                    </div>
                </div>

                <div
                    style="display: flex; border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_2_label->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_2->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_2_grams->add();
                        ?>
                    </div>
                </div>

                <div
                    style="display: flex; border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_4XL_label->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_4XL->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_4XL_grams->add();
                        ?>
                    </div>
                </div>

                <div
                    style="display: flex; border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_4L_label->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_4L->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_4L_grams->add();
                        ?>
                    </div>
                </div>

                <div style="display: flex; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_4_label->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_4->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_4_grams->add();
                        ?>
                    </div>
                </div>
            </div>
            <div
                style="display: flex; flex-direction: column; width: 50%; justify-content: space-around; border-left: 2px solid black;">
                <div
                    style="display: flex; border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_5->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_5->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_5_grams->add();
                        ?>
                    </div>
                </div>

                <div
                    style="display: flex; border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_5L->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_5L->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_5L_grams->add();
                        ?>
                    </div>
                </div>

                <div
                    style="display: flex; border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_6->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_6->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_6_grams->add();
                        ?>
                    </div>
                </div>

                <div
                    style="display: flex; border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_7->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_7->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_7_grams->add();
                        ?>
                    </div>
                </div>

                <div
                    style="display: flex; border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_5D_label->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_5D->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_5D_grams->add();
                        ?>
                    </div>
                </div>

                <div
                    style="display: flex; border-bottom: 2px solid black; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_6D_label->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_6D->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_6D_grams->add();
                        ?>
                    </div>
                </div>

                <div style="display: flex; align-items: baseline; justify-content: space-around;">
                    <div>
                        <?php
                        $style_7D_label->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_between_7D->add();
                        ?>
                    </div>
                    <div>
                        <?php
                        $mass_7D_grams->add();
                        ?>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <br>

    <div>
        <div>
            <?php
            $analysis_rev_label->add();
            $rev_by->add();
            $date_1->add();
            ?>
        </div>
        <div>
            <?php
            $rev_accepted->add();
            $accepted_by->add();
            $date_2->add();
            ?>
        </div>
    </div>

    <?php
    $submit_btn->add();
    ?>

</div>

<?php
// $html->html_form_ajax("add_user", "INSERT", "users", '', false);
$ajax = new js_ajax();
$ajax->function_name("check_batch");
$ajax->submit_btn_id("submit");
$ajax->insert("users");
$ajax->on_success("SUBMITED");

?>