return false;
    }
    if (isset($_POST['empl_id'])) {
        $empl_id = update_employee($_POST['empl_id'], $_POST['empl_name'], $_POST['pre_address'], $_POST['per_address'], $_POST['date_of_birth'], $_POST['age'], $_POST['mobile_phone'], $_POST['email'], $_POST['grade'], $_POST['department'], $_POST['designation'], $_POST['gross_salary'], $_POST['date_of_join']);
        meta_forward($_SERVER['PHP_SELF'], "Updated=yes&selected_id={$empl_id}");
    } else {
        $empl_id = add_employee($_POST['empl_name'], $_POST['pre_address'], $_POST['per_address'], $_POST['date_of_birth'], $_POST['age'], $_POST['mobile_phone'], $_POST['email'], $_POST['grade'], $_POST['department'], $_POST['designation'], $_POST['gross_salary'], $_POST['date_of_join']);
        meta_forward($_SERVER['PHP_SELF'], "Added=yes&selected_id={$empl_id}");
    }
}
start_form();
if (db_has_employees()) {
    start_table(TABLESTYLE_NOBORDER);
    start_row();
    hrm_year_list(_("Year:"), 'year', null);
    hrm_months_list(_("Month:"), 'month', null);
    employee_list_cells(_("Select an Employee: "), 'selected_id', null, _('New Employee'), true, check_value('show_inactive'));
    $new_item = get_post('selected_id') == '';
    end_row();
    end_table();
    if (get_post('_show_inactive_update')) {
        $Ajax->activate('selected_id');
        set_focus('selected_id');
    }
} else {
    hidden('selected_id', get_post('selected_id'));
}
//$_POST['leave_days'] = $_POST['monthly_loan'] = 0;
div_start('details');
if (isset($selected_id) && $selected_id != '') {
    $_POST['empl_id'] = $_POST['selected_id'];
}
if (isset($_GET['year'])) {
    $_POST['year'] = $_GET['year'];
}
$month = get_post('month', '');
$year = get_post('year', '');
if (list_updated('month')) {
    $month = get_post('month');
    $Ajax->activate('details');
}
start_form();
if (db_has_payslip()) {
    start_table(TABLESTYLE_NOBORDER);
    start_row();
    hrm_year_list(_("Year:"), 'year', null);
    hrm_months_list(_("Month:"), 'month', null, true);
    end_row();
    end_table();
    if (get_post('_show_inactive_update')) {
        $Ajax->activate('month');
        $Ajax->activate('details');
        set_focus('month');
    }
    div_start('details');
    $sal_list = array();
    $sal_list = get_current_month_payslip($_POST['year'], $_POST['month']);
    start_table(TABLESTYLE, "width=90%");
    $th = array(_("Month"), _("Employee Name"), _("Gross Pay"), _("Basic"), _("D A"), _("HRA"), _("Conveyance Allowance"), _("Edu & Other Allowance"), _("LOP Amount"), _("PF "), _("Total Deduction"), _("Net Salary"));
    table_header($th);
    global $hrm_months_list;
    foreach ($sal_list as $single_sal) {