<?php include "../../root.class.php";
$html = new html();
$html->add_styles_page();

?>

<div class="form_down">
    <h1 class="title">NOTES</h1>

    <?php
    echo $html->select_html_from_db('clients', 'record_id', 'name', '1', 'client_id', 'client_id');
    echo $html->input_html_from_db('notes','date_time_changed',"record_id = {$_GET['record_id']}",'','date_time_changed','date_time_changed','inputs','','','text','readonly');
    echo $html->input_html_from_db('notes','heading',"record_id = {$_GET['record_id']}",'','heading','heading');
    echo $html->select_from_db_add_current_selected_column('notes','client_id',"record_id = {$_GET['record_id']}",'client_id');
    echo $html->complete_text_editor('notes','notes','notes',"record_id = {$_GET['record_id']}");
    echo $html->input_html('',$_GET['record_id'],'record_id','record_id','inputs','','','text','hidden');
    echo $html->input_html('', $_SESSION['user_id'], 'user_id', 'user_id', 'inputs', '', '', 'text', 'hidden');
    echo $html->input_html('', date('Y-m-d H:i', strtotime("+2 Hours")), 'date_time_changed', 'date_time_changed', 'inputs', '', '', 'text', 'hidden');
    echo $html->submit_btn('submit', 'SAVE', 'add_note()');
    ?>
</div>
<?php
    $html->html_form_ajax("add_note", "UPDATE", "notes", '', false,[],'',['notes']);
?>