diff --git a/include/bud_detail.inc.php b/include/bud_detail.inc.php new file mode 100644 index 000000000..173b19452 --- /dev/null +++ b/include/bud_detail.inc.php @@ -0,0 +1,71 @@ +'; + +$post_anc=""; + +$wHypo=new widget("select","","bh_id"); +$wHypo->value=make_array($cn,"select bh_id,bh_name from bud_hypothese"); +$wHypo->selected=(isset($_REQUEST['bh_id']))?$_REQUEST['bh_id']:""; +$wHypo->javascript='onChange="this.form.submit();"'; + +if ( isset($_REQUEST['bh_id']) ) { + /* if bh_id is set it means that the hypothese has been choosed */ + $wPost_Analytic=new widget("select","","po_id"); + $wPost_Analytic->value=make_array($cn,"select po_id,po_name from poste_analytique join ". + " bud_hypothese as a using (pa_id) ". + " where a.bh_id=".$_REQUEST['bh_id']); + if ( empty ($wPost_Analytic->value) ) + $post_anc=""; + else { + $wPost_Analytic->selected=(isset($_REQUEST['po_id']))?$_REQUEST['po_id']:""; + $post_anc=$wPost_Analytic->IOValue(); + } + echo widget::hidden('bh_id',$_REQUEST['bh_id']); + $wHypo->readonly=true; + } else { + /* if bh_id the first step is to select an hypothese */ + + } + +echo $wHypo->IOValue(); + + +echo $post_anc; +echo widget::submit_button('recherche','recherche'); +echo dossier::hidden(); +echo widget::hidden("p_action","detail"); +echo ''; + + +if ( ! isset($_REQUEST['bh_id']) || ! isset ($_REQUEST['po_id'])) { + exit(); +} + + +echo '