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

// HTML FORM ELEMENTS
$name = new input();
$name->class("inputs");
$name->type("text");
$name->placeholder("NAME");
$name->name("name");
$name->id("name");
$name->value_from_db("drying_bins","name","record_id = {$_GET["record_id"]}");

$tons = new input();
$tons->class("inputs");
$tons->type("number");
$tons->placeholder("TONS");
$tons->name("tons");
$tons->id("tons");
$tons->value_from_db("drying_bins","tons","record_id = {$_GET["record_id"]}");

$submit_btn = new button();
$submit_btn->value("UPDATE");
$submit_btn->onclick("update_bin()");

?>
<div class="form_down">
    <h1>ADD DRYING BIN</h1>
    <?php
    $name->add();
    $tons->add();
    $submit_btn->add();
    ?>
</div>
<?php

$ajax = new js_ajax();
$ajax->function_name("update_bin");
$ajax->submit_btn_id("submit");
$ajax->update("drying_bins");
$ajax->on_success("DRYING BIN UPDATED SUCCESSFULLY");


?>