Reformat the code with
- astyle --style=ansi Broke : the <<<<EOF .
This commit is contained in:
parent
6c1a597fdf
commit
0e5fcddfc1
246 changed files with 42452 additions and 36227 deletions
|
|
@ -27,8 +27,9 @@ require_once('class_dossier.php');
|
|||
$gDossier=dossier::id();
|
||||
|
||||
if ( !isset ($_GET['jrn'] ) ||
|
||||
!isset($_GET['jr_grpt_id'])) {
|
||||
echo_error("Missing parameters");
|
||||
!isset($_GET['jr_grpt_id']))
|
||||
{
|
||||
echo_error("Missing parameters");
|
||||
}
|
||||
|
||||
require_once('class_database.php');
|
||||
|
|
@ -46,37 +47,40 @@ $User->check_dossier($gDossier);
|
|||
|
||||
// retrieve the jrn
|
||||
$r=$cn->exec_sql("select jr_def_id from jrn where jr_grpt_id=$jr_grpt_id");
|
||||
if ( Database::num_row($r) == 0 ) {
|
||||
echo_error("Invalid operation id jr_grpt_id=$jr_grpt_id");
|
||||
exit;
|
||||
}
|
||||
if ( Database::num_row($r) == 0 )
|
||||
{
|
||||
echo_error("Invalid operation id jr_grpt_id=$jr_grpt_id");
|
||||
exit;
|
||||
}
|
||||
$a=Database::fetch_array($r,0);
|
||||
$jrn=$a['jr_def_id'];
|
||||
|
||||
if ($User->check_jrn($jrn) == 'X' ){
|
||||
/* Cannot Access */
|
||||
NoAccess();
|
||||
exit -1;
|
||||
}
|
||||
if ($User->check_jrn($jrn) == 'X' )
|
||||
{
|
||||
/* Cannot Access */
|
||||
NoAccess();
|
||||
exit -1;
|
||||
}
|
||||
|
||||
$cn->start();
|
||||
$ret=$cn->exec_sql("select jr_pj,jr_pj_name,jr_pj_type from jrn where jr_grpt_id=$jr_grpt_id");
|
||||
if ( Database::num_row ($ret) == 0 )
|
||||
return;
|
||||
return;
|
||||
$row=Database::fetch_array($ret,0);
|
||||
if ( $row['jr_pj']==null ) {
|
||||
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: '.'text/plain');
|
||||
header('Content-Disposition: attachment;filename=vide.txt',FALSE);
|
||||
header("Accept-Ranges: bytes");
|
||||
echo "******************";
|
||||
echo _("Fichier effacé");
|
||||
echo "******************";
|
||||
exit();
|
||||
if ( $row['jr_pj']==null )
|
||||
{
|
||||
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: '.'text/plain');
|
||||
header('Content-Disposition: attachment;filename=vide.txt',FALSE);
|
||||
header("Accept-Ranges: bytes");
|
||||
echo "******************";
|
||||
echo _("Fichier effacé");
|
||||
echo "******************";
|
||||
exit();
|
||||
}
|
||||
$tmp=tempnam($_ENV['TMP'],'document_');
|
||||
|
||||
|
|
@ -92,7 +96,7 @@ 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);
|
||||
echo fread($file,8192);
|
||||
|
||||
fclose($file);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue