"._("contrainte"); $om_validite = true; if(!isset($premier)) $premier=''; if(!isset($recherche1)) $recherche1=''; if(!isset($tricolsf)) $tricolsf=''; if(!isset($premiersf)) $premiersf=''; if(!isset($selection)) $selection=''; if(!isset($retourformulaire)) $retourformulaire=''; if (isset($idx) && $idx != ']' && trim($idx) != '') { $ent .= "-> ".$idx." "; } if (isset($idz) && trim($idz) != '') { $ent .= " ".strtoupper($idz)." "; } // FROM $table = DB_PREFIXE."contrainte"; // SELECT $champAffiche = array( 'contrainte.contrainte as "'._("contrainte").'"', 'contrainte.numero as "'._("numero").'"', 'contrainte.nature as "'._("nature").'"', 'contrainte.groupe as "'._("groupe").'"', 'contrainte.sousgroupe as "'._("sousgroupe").'"', 'contrainte.libelle as "'._("libelle").'"', 'contrainte.no_ordre as "'._("no_ordre").'"', "case contrainte.reference when 't' then 'Oui' else 'Non' end as \""._("reference")."\"", "case contrainte.service_consulte when 't' then 'Oui' else 'Non' end as \""._("service_consulte")."\"", 'to_char(contrainte.om_validite_debut ,\'DD/MM/YYYY\') as "'._("om_validite_debut").'"', 'to_char(contrainte.om_validite_fin ,\'DD/MM/YYYY\') as "'._("om_validite_fin").'"', ); // $champNonAffiche = array( 'contrainte.texte as "'._("texte").'"', ); // $champRecherche = array( 'contrainte.contrainte as "'._("contrainte").'"', 'contrainte.numero as "'._("numero").'"', 'contrainte.nature as "'._("nature").'"', 'contrainte.groupe as "'._("groupe").'"', 'contrainte.sousgroupe as "'._("sousgroupe").'"', 'contrainte.libelle as "'._("libelle").'"', 'contrainte.no_ordre as "'._("no_ordre").'"', ); $tri="ORDER BY contrainte.libelle ASC NULLS LAST"; $edition="contrainte"; /** * Gestion de la clause WHERE => $selection */ // Filtre listing standard $selection = " WHERE ((contrainte.om_validite_debut IS NULL AND (contrainte.om_validite_fin IS NULL OR contrainte.om_validite_fin > CURRENT_DATE)) OR (contrainte.om_validite_debut <= CURRENT_DATE AND (contrainte.om_validite_fin IS NULL OR contrainte.om_validite_fin > CURRENT_DATE)))"; $where_om_validite = " WHERE ((contrainte.om_validite_debut IS NULL AND (contrainte.om_validite_fin IS NULL OR contrainte.om_validite_fin > CURRENT_DATE)) OR (contrainte.om_validite_debut <= CURRENT_DATE AND (contrainte.om_validite_fin IS NULL OR contrainte.om_validite_fin > CURRENT_DATE)))"; // Gestion OMValidité - Suppression du filtre si paramètre if (isset($_GET["valide"]) and $_GET["valide"] == "false") { if (!isset($where_om_validite) or (isset($where_om_validite) and $where_om_validite == "")) { if (trim($selection) != "") { $selection = ""; } } else { $selection = trim(str_replace($where_om_validite, "", $selection)); } } /** * Gestion SOUSFORMULAIRE => $sousformulaire */ $sousformulaire = array( 'dossier_contrainte', ); ?>