function getMonthlySalesItem()
{
    $id = $_POST['id'];
    $m = $_POST['month'];
    $y = $_POST['year'];
    if (_isEmployee($id)) {
        $obj = array();
        $obj["items"] = _getMonthlySalesItem($m, $y);
    }
    echo json_encode($obj);
}
function registerEmployee()
{
    $employee_id = _getIDFromUsername($_POST['employee_username']);
    $work_dept = $_POST['work_dept'];
    $salary = $_POST['salary'];
    $manager_id = $_POST['id'];
    if (_isEmployee($manager_id) && $employee_id != -1) {
        _registerEmployee($employee_id, $work_dept, $salary, $manager_id);
    }
    echo $employee_id;
}
function fillOrder()
{
    $id = $_POST['id'];
    $oid = $_POST['order_id'];
    $iid = $_POST['item_id'];
    $wid = $_POST['warehouse_id'];
    $quant = $_POST['quantity'];
    if (_isEmployee($id)) {
        echo _fillOrder($oid, $iid, $wid, $quant);
    }
}