<?php
include $_SERVER['DOCUMENT_ROOT'] . "/WebBuilder/WebApp.class.php";
$db = new DBMain();

// var_dump($_FILES);
try {
    $target_dir = "../signatures/";
    $target_file = $target_dir . "{$_POST['employee_id']}-{$_POST['booking_id']}-" . basename($_FILES["file"]["name"]);
    move_uploaded_file($_FILES["file"]["tmp_name"], $target_file);
    echo "OK";
} catch (Exception $e) {
    echo $e->getMessage();
}
