Check(); echo JS_BUD_SCRIPT; require_once('class_dossier.php'); $gDossier=dossier::id(); $c_comment=""; $c_class=""; $condition=""; $cn=new Database($gDossier); extract ($_GET); if ( isset($_GET['search']) ) { $condition=""; if ( isset($p_comment) && strlen(trim($p_comment)) != 0 ) { $condition=" where (upper(pcm_lib) like upper('%$p_comment%') or ". " pcm_val::text like '$p_comment%') ". " and (pcm_val::text like '7%' or pcm_val::text like '6%') "; } else { $condition="where pcm_val::text like '7%' or pcm_val::text like '6%' "; } } // Control to update in the calling doc. if ( isset($_GET['p_ctl'])) { $p_ctl=$_GET['p_ctl']; } echo '
'; echo dossier::hidden(); if ( isset($p_ctl) ) { if ($p_ctl != 'not') echo ''; } echo ''; echo ''; echo ''; echo ''; if ( ! isset ($p_comment) ) $p_comment=""; echo ''; echo '
Libellé ou poste comptable contient
'; echo HtmlInput::submit('search','Cherche'); echo '
'; // if request search if ( isset($_GET['search'])){ $Res=$cn->exec_sql("select pcm_val,pcm_lib from tmp_pcmn $condition order by pcm_val::text"); $MaxLine=Database::num_row($Res); if ( $MaxLine==0) { html_page_stop(); return; } echo ''; $l_id=""; for ( $i=0; $i < $MaxLine; $i++) { $l_line=Database::fetch_array($Res,$i); echo ""; // if p_ctl is set we need to be able to return the value if (isset($p_ctl) && $p_ctl != 'not' ){ echo ''; } echo ''; echo ''; echo ""; } echo '
'; $slabel=FormatString($l_line['pcm_lib']); echo ''; echo ''; echo $l_line['pcm_val']; echo ''; echo $l_line['pcm_lib']; echo '
'; } echo ''; html_page_stop(); ?>