$year_end = GETPOST('year_end');
$search_employe = GETPOST('search_employe');
$search_valideur = GETPOST('search_valideur');
$search_statut = GETPOST('select_statut');
/*
 * Actions
 */
// None
/*
 * View
 */
$holiday = new Holiday($db);
$holidaystatic = new Holiday($db);
$fuser = new User($db);
// Update sold
$holiday->updateSold();
$max_year = 5;
$min_year = 10;
$filter = '';
llxHeader(array(), $langs->trans('CPTitreMenu'));
$order = $db->order($sortfield, $sortorder) . $db->plimit($conf->liste_limit + 1, $offset);
// WHERE
if (!empty($search_ref)) {
    $filter .= " AND cp.rowid LIKE '%" . $db->escape($search_ref) . "%'\n";
}
// DATE START
if ($year_start > 0) {
    if ($month_start > 0) {
        $filter .= " AND (cp.date_debut BETWEEN '" . $db->idate(dol_get_first_day($year_start, $month_start, 1)) . "' AND '" . $db->idate(dol_get_last_day($year_start, $month_start, 1)) . "')";
        //$filter.= " AND date_format(cp.date_debut, '%Y-%m') = '$year_start-$month_start'";
    } else {