//Création de l'entête de recherche $HTML_entete = ""; //Période de recherche (Début) $champ = "periode_debut"; if (!$periode_debut) { //Par défaut, début d'année en cours $periode_debut = date("Y") . "-01-01"; } $HTML_entete .= "<tr><td>Début de la période</td><td>" . calendrier($champ, $periode_debut) . "</td></tr>"; //Période de recherche (Début) $champ = "periode_fin"; if (!$periode_fin) { //Par défaut, début d'année en cours $periode_fin = date("Y") . "-12-31"; } $HTML_entete .= "<tr><td>Fin de la période</td><td>" . calendrier($champ, $periode_fin) . "</td></tr>"; //Raccourcis de Classification fta.suffixe_agrologic_fta $name_case = "all_classification"; if ($all_classification) { $checked = "checked"; $liste_suffixe_agrologic_fta = "<input type=checkbox name={$name_case} value=1 {$checked}/> Tous"; } else { $checked = ""; //Recherche des classifications existantes $req = "SELECT DISTINCT suffixe_agrologic_fta, suffixe_agrologic_fta " . "FROM fta, fta_etat " . "WHERE fta.id_fta_etat=fta_etat.id_fta_etat " . "AND abreviation_fta_etat='V' " . "AND suffixe_agrologic_fta IS NOT NULL " . "ORDER BY suffixe_agrologic_fta "; $requete = $req; $id_defaut = $suffixe_agrologic_fta; $nom_defaut = "suffixe_agrologic_fta"; $liste_suffixe_agrologic_fta = afficher_requete_en_liste_deroulante($requete, $id_defaut, $nom_defaut) . " - <input type=checkbox name={$name_case} value=1 {$checked}/> Tous"; } $HTML_entete .= "<tr><td>Liste des raccourcis de classification</td><td>{$liste_suffixe_agrologic_fta}</td></tr>";
/** * Créer un objet HTML de type calendrier * @param <type> $champ * @param <type> $table * @param <type> $value * @param <type> $editable */ function html_calendar($champ, $table, $value, $editable = false, $warning_update = false) { //Date d'échéance de la FTA //$champ="date_echeance_fta"; //$table="fta"; $bloc = ""; ${'NOM_' . $champ} = DatabaseOperation::getColumnInfoLabel($table, $champ); $html_image_modif = " <img src=../lib/images/exclamation.png alt=\"\" title=\"Information mise à jour\" width=\"20\" height=\"18\" border=\"0\" />"; $html_color_modif = "bgcolor=#B0FFFE"; //Versionning $image_modif = ""; $color_modif = ""; if ($warning_update) { $image_modif = $html_image_modif; $color_modif = $html_color_modif; } $bloc .= "<tr class=contenu><td width=\"40%\" {$color_modif}>{${'NOM_' . $champ}}:</td><td {$color_modif}>"; if ($editable) { $bloc .= calendrier($champ, $value); $bloc .= "<i> Effacer cette échéance pour supprimer toutes les autres échéances de processus</i>"; } else { $bloc .= "{$value}"; } $bloc .= "{$image_modif}</td></tr>"; return $bloc; }