<?php

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

$client_name = new input();
$client_name->id("client_name");
$client_name->name("client_name");
$client_name->type("text");
$client_name->placeholder("Client Name");
$client_name->class();
$client_name->onkeyup("search_client()");

$company_id = new input();
$company_id->class("inputs");
$company_id->type("hidden");
$company_id->placeholder("company id");
$company_id->name("company_id");
$company_id->required();
$company_id->id("company_id");
$company_id->value($_SESSION['company_id']);

$client_email = new input();
$client_email->id("client_email");
$client_email->name("client_email");
$client_email->type("email");
$client_email->placeholder("Client Email");
$client_email->class();
$client_email->onkeyup("search_client()");

?>

<div class="row">
    <input type="submit" value="ADD" class="submit_btn" onclick="window.location.href='add_client.php'">
    <div class="form_down">
        <?php
        $client_name->add();
        $client_email->add();
        $company_id->add();
        ?>
    </div>
</div>

<?php

$ajax = new js_ajax();
$ajax->run_on_load();
$ajax->select("clients");
$ajax->function_name("search_client");
$ajax->redirect("edit_client.php");
$ajax->return_columns(["client_name","client_email","client_address"]);