diff --git a/html/index.php b/html/index.php index 1e0153f45..9568ab846 100644 --- a/html/index.php +++ b/html/index.php @@ -57,7 +57,7 @@ BODY { -Version developpement 1.2.2 patch 5 +Version BETA 2.0

Il est conseillé de ne PAS utiliser Internet Explorer.

diff --git a/html/show_pj.php b/html/show_pj.php new file mode 100644 index 000000000..a005313e6 --- /dev/null +++ b/html/show_pj.php @@ -0,0 +1,77 @@ +Check(); +// retrieve the jrn +$r=ExecSql($cn,"select jr_def_id from jrn where jr_grpt_id=$jr_grpt_id"); +if ( pg_num_rows($r) == 0 ) { + echo_error("Invalid operation id jr_grpt_id=$jr_grpt_id"); + exit; + } +$a=pg_fetch_array($r,0); +$jrn=$a['jr_def_id']; + +if ($User->AccessJrn($cn,$jrn) == false ){ + /* Cannot Access */ + NoAccess(); + exit -1; + } + +StartSql($cn); +$ret=ExecSql($cn,"select jr_pj,jr_pj_name,jr_pj_type from jrn where jr_grpt_id=$jr_grpt_id"); +if ( pg_num_rows ($ret) == 0 ) + return; +$row=pg_fetch_array($ret,0); +$tmp=tempnam('/tmp/','document_'); +pg_lo_export($cn,$row['jr_pj'],$tmp); +ini_set('zlib.output_compression','Off'); +header("Pragma: public"); +header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); +header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); +header("Cache-Control: must-revalidate"); +header('Content-type: '.$row['jr_pj_type']); +header('Content-Disposition: attachment;filename="'.$row['jr_pj_name'].'"',FALSE); +header("Accept-Ranges: bytes"); +$file=fopen($tmp,'r'); +while ( !feof ($file) ) + echo fread($file,8192); + +fclose($file); + +unlink ($tmp); + +Commit($cn);