$selection */ // Filtre listing standard if ($_SESSION["niveau"] !== "2") { // Filtre MONO if (stripos($selection, "where ") !== false) { $selection .= " AND "; } else { $selection .= " WHERE "; } $selection .= " (emplacement.om_collectivite = '".$_SESSION["collectivite"]."') "; } /** * Options du LISTING */ $options = array(); // ADVS $champs = array(); $champs['id'] = array( 'colonne' => 'contrat', 'table' => 'contrat', 'type' => 'text', 'libelle' => __('id'), 'taille' => 8, 'max' => '', ); $champs['emplacement'] = array( 'colonne' => array('nature', 'emplacement','famille'), 'table' => 'emplacement', 'type' => 'text', 'libelle' => __('emplacement'), 'help' => __("identifiant de l'emplacement (ex : 12) ou famille (ex : DUPONT) ou nature de l'emplacement (ex : concession)"), 'taille' => 8, 'max' => '', ); $champs['datedemande'] = array( 'colonne' => 'datedemande', 'table' => 'contrat', 'type' => 'date', 'libelle' => __('datedemande'), 'lib1'=> __("début"), 'lib2' => __("fin"), 'taille' => 8, 'where' => 'intervaldate' ); $champs['datevente'] = array( 'colonne' => 'datevente', 'table' => 'contrat', 'type' => 'date', 'libelle' => __('date de vente'), 'lib1'=> __("début"), 'lib2' => __("fin"), 'taille' => 8, 'where' => 'intervaldate' ); $champs['dateterme'] = array( 'colonne' => 'dateterme', 'table' => 'contrat', 'type' => 'date', 'libelle' => __('date de terme'), 'lib1'=> __("début"), 'lib2' => __("fin"), 'taille' => 8, 'where' => 'intervaldate' ); $champs['origine'] = array( 'colonne' => 'origine', 'table' => 'contrat', 'type' => 'select', 'libelle' => __('origine'), 'taille' => 8, ); $champs['terme'] = array( 'colonne' => 'terme', 'table' => 'contrat', 'type' => 'select', 'libelle' => __('terme'), 'taille' => 8, ); $champs['duree'] = array( 'colonne' => 'duree', 'table' => 'contrat', 'type' => 'text', 'libelle' => __('durée'), 'taille' => 8, 'max' => '', ); $args = array(); $args[0] = array('', 'true', 'false'); $args[1] = array(_('Tous'), _('Oui'), _('Non')); $champs['valide'] = array( 'colonne' => 'valide', 'table' => 'contrat', 'type' => 'select', 'libelle' => __('valide'), 'subtype' => 'manualselect', 'args' => $args, ); $options[] = array( 'type' => 'search', 'display' => true, 'advanced' => $champs, 'export' => array('csv',), 'default_form' => 'advanced', 'absolute_object' => 'contrat' );