00001 <?
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00025 include_once ("ac_common.php");
00026 include_once ("postgres.php");
00027
00028 $rep=DbConnect();
00029 include_once ("class_user.php");
00030 $User=new cl_user($rep);
00031 $User->Check();
00032
00033 html_page_start($User->theme,"onLoad='window.focus();'");
00034
00035 if ( ! isset ( $_SESSION['g_dossier'] ) ) {
00036 echo "You must choose a Dossier ";
00037 phpinfo();
00038 exit -2;
00039 }
00040 ?>
00041 <script>
00042 function GetIt(ctl,tva_id) {
00043 self.opener.SetValue(ctl,tva_id)
00044 window.close();
00045 }
00046 </script>
00047 <?
00048
00049 $condition="";
00050 $cn=DbConnect($_SESSION['g_dossier']);
00051 $Res=ExecSql($cn,"select * from tva_rate order by tva_rate desc");
00052 $Max=pg_NumRows($Res);
00053 echo "<TABLE BORDER=\"1\">";
00054 for ($i=0;$i<$Max;$i++) {
00055 $row=pg_fetch_array($Res,$i);
00056 $set=sprintf( '<INPUT TYPE="BUTTON" Value="select" onClick="GetIt(\'%s\',\'%s\');">',
00057 $_GET['ctl'],$row['tva_id']);
00058 printf("<tr><TD BGCOLOR=\LIGHTGREEN\" >%s %d</TD><TD>%s</TD><TD>%s</TD></TR>",
00059 $set,
00060 $row['tva_id'],
00061 $row['tva_label'],
00062 $row['tva_comment']);
00063 }
00064 echo '</TABLE>';
00065 ?>
00066 <input type='button' Value="fermer" onClick='window.close();'>
00067 <?
00068 html_page_stop();
00069 ?>