'; echo ''._('Recherche').':'; $texte=new IText('plabel'); $texte->value=HtmlInput::default_value('plabel',"", $_GET); echo $texte->input(); echo ''; echo dossier::hidden(); $hid=new IHidden(); echo $hid->input("c1",$_REQUEST['c1']); echo $hid->input("c2",$_REQUEST['c2']); echo $hid->input("go"); echo HtmlInput::submit("go",_("Recherche")); echo ''; //------------- FORM ---------------------------------- if ( isset($_REQUEST['go'])) { $cn=Dossier::connect(); $plan=new Anc_Plan($cn,$_REQUEST['c2']); $plan->pa_id=$_REQUEST['c2']; if ( $plan->exist()==false) exit(_("Ce plan n'existe pas")); $sql="select po_name , po_description from poste_analytique ". "where pa_id=$1 and ". " (po_name ~* $2 or po_description ~* $3) order by po_name"; $array=$cn->get_array($sql,array($_REQUEST['c2'],$_REQUEST['plabel'],$_REQUEST['plabel'])); if (empty($array) == true) { echo _("Aucun poste trouvé"); return; } $button=new IButton(); $button->name=_("Choix"); $button->label=_("Choix"); echo ''; foreach ($array as $line) { $button->javascript=sprintf("$('%s').value='%s';removeDiv('%s')", $_REQUEST['c1'], $line['po_name'],$ctl); echo ''. ''. ''; } echo '
'. $button->input(). ''. h($line['po_name']). ''. h($line['po_description']). '
'; }