function DeleteMainVacationRequest($ID)
{
    $result = 0;
    $record = RetrieveMainVacationRequestByID($ID);
    if ($record != NULL) {
        $employee = RetrieveEmployeeByID($record[MAIN_VACATION_EMP_ID]);
        if ($employee) {
            $employee[EMP_MAIN_VACATION_REQ_ID] = NULL;
            UpdateEmployee($employee);
        }
        $sql = "DELETE FROM mainVacationRequestTable WHERE mainVacationRequestID=" . $ID . ";";
        $result = performSQL($sql);
    }
    return $result;
}
    $Employee[EMP_DATEJOINED] = $_POST["dateJoin"];
    $Employee[EMP_LEAVE_ENTITLEMENT] = $_POST["annualLeave"];
    $Employee[EMP_COMPANY_ROLE] = $_POST["companyRole"];
    $Employee[EMP_ADMIN_PERM] = '0';
    if (isset($_POST['isAdmin'])) {
        if ($_POST["isAdmin"] == 'on') {
            $Employee[EMP_ADMIN_PERM] = '1';
        }
    }
    $Employee[EMP_MANAGER_PERM] = '0';
    if (isset($_POST['isManager'])) {
        if ($_POST["isManager"] == 'on') {
            $Employee[EMP_MANAGER_PERM] = '1';
        }
    }
    $result = UpdateEmployee($Employee);
    if ($result) {
        $url = "Location:adminEmployeeTable.php";
        header($url);
    }
}
function GenerateCompanyRoleSelect()
{
    $roles = RetrieveCompanyRoles();
    if ($roles != NULL) {
        echo '<select class="form-control" name="companyRole">';
        foreach ($roles as $role) {
            if ($role[COMP_ROLE_ID] == $Employee[EMP_COMPANY_ROLE]) {
                echo '<option  selected="selected" value="' . $role[COMP_ROLE_ID] . '">' . $role[COMP_ROLE_NAME] . '</option>';
            } else {
                echo '<option value="' . $role[COMP_ROLE_ID] . '">' . $role[COMP_ROLE_NAME] . '</option>';