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

$batch_no_label = new label();
$batch_no_label->for("batch_no_label");
$batch_no_label->value("BATCH NO");

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

$silo_label = new label();
$silo_label->for("silo_id_label");
$silo_label->value("SILO");

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

$amount_label = new label();
$amount_label->for("amount_label");
$amount_label->value("AMOUNT");

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

$status = new input();
$status->class("inputs");
$status->type("hidden");
$status->name("status");
$status->id("status");
$status->value(0);

$submit_btn = new button();
$submit_btn->id("submit");
$submit_btn->value("SUBMIT");
$submit_btn->onclick("submit_batch()");

$batch_ajax = new js_ajax();
$batch_ajax->function_name("submit_batch");
$batch_ajax->submit_btn_id("submit");
$batch_ajax->insert("batch_data");
$batch_ajax->on_success("BATCH ADDED SUCCESSFULLY");

?>

<div class="form_down">
    <h1>ADD BATCH</h1>
    <?php
    $batch_no_label->add();
    $batch_no->add();
    $silo_label->add();
    $silo->add();
    $amount_label->add();
    $amount->add();
    $status->add();
    $submit_btn->add();
    ?>
</div>