<?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->required();

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

$submit_btn = new button();
$submit_btn->value("ADD");
$submit_btn->onclick("add_silo()");

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

$ajax = new js_ajax();
$ajax->function_name("add_silo");
$ajax->submit_btn_id("submit");
$ajax->insert("silos");
$ajax->on_success("SILO ADDED");

?>