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

$client_name = new input();
$client_name->class("inputs");
$client_name->type("text");
$client_name->id("client_name");
$client_name->name("client_name");
$client_name->placeholder("CLIENT NAME");
$client_name->required();

$email = new input();
$email->class("inputs");
$email->type("email");
$email->id("email");
$email->name("email");
$email->placeholder("EMAIL");
$email->required();

$contact_person = new input();
$contact_person->class("inputs");
$contact_person->type("text");
$contact_person->id("contact_person");
$contact_person->name("contact_person");
$contact_person->placeholder("CONTACT PERSON");
$contact_person->required();

$location = new input();
$location->class("inputs");
$location->type("text");
$location->id("location");
$location->name("location");
$location->placeholder("LOCATION");
$location->required();

$company_name = new input();
$company_name->class("inputs");
$company_name->type("text");
$company_name->id("company_name");
$company_name->name("company_name");
$company_name->placeholder("COMPANY NAME");
$company_name->required();

$contact_number = new input();
$contact_number->class("inputs");
$contact_number->type("text");
$contact_number->id("contact_number");
$contact_number->name("contact_number");
$contact_number->placeholder("CONTACT NUMBER");
$contact_number->required();

$vat_number = new input();
$vat_number->class("inputs");
$vat_number->type("text");
$vat_number->id("vat_number");
$vat_number->name("vat_number");
$vat_number->placeholder("VAT NUMBER");
$vat_number->required();

$company_registration_number = new input();
$company_registration_number->class("inputs");
$company_registration_number->type("text");
$company_registration_number->id("company_registration_number");
$company_registration_number->name("company_registration_number");
$company_registration_number->placeholder("COMPANY REGI NO");
$company_registration_number->required();

$status = new select();
$status->class("inputs");
$status->id("status");
$status->name("status");
$status->add_option("ACTIVE", "ACTIVE");
$status->add_option("INACTIVE", "INACTIVE");

$status_lable = new label();
$status_lable->for("status");
$status_lable->value("STATUS");

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

?>

<div class="form_down">
    <h1>ADD CLIENT</h1>
    <?php
    $client_name->add();
    $company_name->add();
    $company_registration_number->add();
    $email->add();
    $contact_person->add();
    $location->add();
    $contact_number->add();
    $vat_number->add();
    $status_lable->add();
    $status->add();
    $submit_btn->add();
    ?>
</div>

<?php

$ajax = new js_ajax();
$ajax->function_name("add_client");
$ajax->submit_btn_id("submit");
$ajax->insert("clients");
$ajax->on_success("CLIENT ADDED SUCCESSFULLY");

?>