'; $texte=new IText(); echo ''._('Recherche').':'; echo $texte->input('label'); 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=new Database(dossier::id()); $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=".$_REQUEST['c2']." and ". " upper (po_name) like upper('%".Database::escape_string($_REQUEST['label'])."%') order by po_name"; $res=$cn->exec_sql($sql); $array=Database::fetch_all($res); if (empty($array) == true) { echo "Désolé aucun poste trouvé"; return; } $button=new IButton(); $button->name="Choix"; $button->label="Choix"; echo ''; foreach ($array as $line) { $button->javascript=sprintf("set_inparent('%s','%s');window.close();", $_REQUEST['c1'], $line['po_name']); echo ''. ''. ''; } echo '
'. $button->input(). ''. $line['po_name']. ''. $line['po_description']. '
'; }