<?php include "../../root.class.php";
$html = new html();
$html->add_styles_page();
$html->check_user_type("ADMIN");

?>

<div class="form_down">
    <h1>ADD USER</h1>
    <?php echo $html->input_html_from_db("users", "record_id", "record_id = {$_GET['record_id']}", "record_id", 'record_id', 'record_id'); ?>
    <?php echo $html->input_html_from_db("users", "username", "record_id = {$_GET['record_id']}", "USERNAME", 'username', 'username'); ?>
    <?php echo $html->input_html("", "", "user_password", "user_password");
    echo $html->select_html_from_db('user_types', 'name', 'name', '', 'user_type', 'user_type');
    echo $html->select_from_db_add_current_selected_column('users', 'user_type', "record_id = {$_GET['record_id']}", 'user_type');
    echo $html->submit_btn("submit", 'SAVE', 'edit_user()');
    ?>

</div>

<?php
$html->html_form_ajax("edit_user", "UPDATE", "users", '', false);
?>