New : return to the parent window the selected account
This commit is contained in:
parent
7f87609ead
commit
e4bb65c651
1 changed files with 37 additions and 20 deletions
|
|
@ -24,7 +24,8 @@ html_page_start($g_UserProperty['use_theme']);
|
|||
include_once ("postgres.php");
|
||||
/* Admin. Dossier */
|
||||
CheckUser();
|
||||
echo '<SCRIPT LANGUAGE="javascript" SRC="win_search_poste.js"></SCRIPT>';
|
||||
//echo '<SCRIPT LANGUAGE="javascript" SRC="win_search_poste.js"></SCRIPT>';
|
||||
echo JS_SEARCH_POSTE;
|
||||
|
||||
if ( ! isset ( $g_dossier ) ) {
|
||||
echo "You must choose a Dossier ";
|
||||
|
|
@ -32,10 +33,6 @@ if ( ! isset ( $g_dossier ) ) {
|
|||
exit -2;
|
||||
}
|
||||
|
||||
// $opt='<OPTION VALUE="<="> commence par';
|
||||
// $opt.='<OPTION VALUE=">"> >';
|
||||
// $opt.='<OPTION VALUE=">="> >=';
|
||||
|
||||
$c_comment="";
|
||||
$c_class="";
|
||||
|
||||
|
|
@ -64,8 +61,19 @@ if ( isset($_POST['search']) ) {
|
|||
|
||||
$condition=$c_comment.$c_class;
|
||||
}
|
||||
|
||||
if ( isset($_GET['p_ctl'])) {
|
||||
$p_ctl=$_GET['p_ctl'];
|
||||
}
|
||||
if ( isset($_POST['p_ctl'])) {
|
||||
$p_ctl=$_POST['p_ctl'];
|
||||
}
|
||||
|
||||
echo_debug("condition = $condition");
|
||||
echo '<FORM ACTION="poste_search.php" METHOD="POST">';
|
||||
if ( isset($p_ctl) ) {
|
||||
echo '<INPUT TYPE="hidden" name="p_ctl" value="'.$p_ctl.'">';
|
||||
}
|
||||
echo '<TABLE>';
|
||||
echo '<TR>';
|
||||
|
||||
|
|
@ -78,24 +86,32 @@ echo '<TD> <INPUT TYPE="text" name="p_class" VALUE="'.$p_class.'"></TD>';
|
|||
echo '<TD> Libellé </TD>';
|
||||
echo '<TD> contient </TD>';
|
||||
if ( ! isset ($p_comment) ) $p_comment="";
|
||||
echo '<TD> <INPUT TYPE="text" name="p_comment" VALUE="'.$p_comment.'"></TD>';
|
||||
echo '<TD> <INPUT TYPE="text" name="p_comment" VALUE="'.$p_comment.'"></TD></TR>';
|
||||
echo '</TABLE>';
|
||||
echo '<INPUT TYPE="submit" name="search" value="cherche">';
|
||||
echo '</FORM>';
|
||||
|
||||
$Res=ExecSql($cn,"select * from tmp_pcmn $condition order by pcm_val::text");
|
||||
|
||||
$MaxLine=pg_NumRows($Res);
|
||||
if ( $MaxLine==0) {
|
||||
html_page_stop();
|
||||
return;
|
||||
}
|
||||
echo '<TABLE ALIGN="center" BORDER="0">';
|
||||
$l_id="";
|
||||
|
||||
for ( $i=0; $i < $MaxLine; $i++) {
|
||||
$l_line=pg_fetch_array($Res,$i);
|
||||
echo "<TR>";
|
||||
// if request search
|
||||
if ( isset($_POST['search']) ) {
|
||||
$Res=ExecSql($cn,"select * from tmp_pcmn $condition order by pcm_val::text");
|
||||
|
||||
$MaxLine=pg_NumRows($Res);
|
||||
if ( $MaxLine==0) {
|
||||
html_page_stop();
|
||||
return;
|
||||
}
|
||||
echo '<TABLE BORDER="0">';
|
||||
$l_id="";
|
||||
|
||||
for ( $i=0; $i < $MaxLine; $i++) {
|
||||
$l_line=pg_fetch_array($Res,$i);
|
||||
echo "<TR>";
|
||||
// if p_ctl is set we need to be able to return the value
|
||||
if (isset($p_ctl)){
|
||||
echo '<TD>';
|
||||
echo '<input type="checkbox" onClick="SetItChild(\''.$p_ctl.'\',\''.$l_line['pcm_val'].'\')">';
|
||||
echo '</td>';
|
||||
}
|
||||
echo '<TD>';
|
||||
echo $l_line['pcm_val'];
|
||||
echo '</TD>';
|
||||
|
|
@ -105,9 +121,10 @@ for ( $i=0; $i < $MaxLine; $i++) {
|
|||
echo '</TD>';
|
||||
echo "</TR>";
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
echo '</TABLE>';
|
||||
}
|
||||
echo '<INPUT TYPE="BUTTON" Value="Close" onClick=\'GetIt()\'>';
|
||||
html_page_stop();
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue