22if ( !defined(
"ALLOWED")) { die (_(
"Non autorisé")); }
28 $dossier_number=
$http->request(
"d",
"number");
29 }
catch (Exception
$e){
30 echo
span(_(
"Dossier invalide"),
" class=\"error\" ");
35 if ( defined (
'PG_PATH') )
36 putenv(
"PATH=".PG_PATH);
41 echo _(
"Erreur : paramètre manquant ");
49 $cmd=escapeshellcmd (PG_DUMP);
50 if ( defined (
"noalyss_user"))
52 putenv(
"PGPASSWORD=".noalyss_password);
53 putenv(
"PGUSER=".noalyss_user);
54 putenv(
"PGHOST=".noalyss_psql_host);
55 putenv(
"PGPORT=".noalyss_psql_port);
56 }
else if (defined (
"phpcompta_user"))
58 putenv(
"PGPASSWORD=".phpcompta_password);
59 putenv(
"PGUSER=".phpcompta_user);
60 putenv(
"PGHOST=".phpcompta_psql_host);
61 putenv(
"PGPORT=".phpcompta_psql_port);
63 die (
'Aucune connection');
70 $name =
$repo->get_value(
"select dos_name from ac_dossier where dos_id=$1",
71 array($dossier_number));
73 $database=
domaine.
"dossier".$dossier_number;
74 $filename= str_replace(array(
'/',
'\\' ,
'<',
'>',
'"',
'[',
']',
':',
'*',
' ',
'{',
'}',
'&'),
'_',
$name);
75 $filename= str_replace(
"__",
"_", $filename);
76 $filename=str_replace(PHP_EOL,
'',$filename);
77 $filename.=
"-".date(
'Ymd');
78 $args=
" -Fc -Z9 --no-owner -h ".getenv(
"PGHOST").
" -p ".getenv(
"PGPORT").
" ".$database;
79 header(
'Content-type: application/octet');
80 header(
'Content-Disposition:attachment;filename="'.$filename.
'.bin"',FALSE);
89 $name =
$repo->get_value(
"select mod_name from modeledef where mod_id=$1",
90 array($dossier_number));
91 $database=
domaine.
"mod".$dossier_number;
92 $filename= str_replace(array(
'/',
'\\' ,
'<',
'>',
'"',
'[',
']',
':',
'*',
' ',
'{',
'}',
'&'),
'_',
$name);
93 $filename= str_replace(
"__",
"_", $filename);
94 $filename=str_replace(PHP_EOL,
'',$filename);
95 $filename.=
"-".date(
'Ymd');
96 $args=
" -Fc -Z9 --no-owner -h ".getenv(
"PGHOST").
" -p ".getenv(
"PGPORT").
" ".$database;
97 header(
'Content-type: bin/x-application');
98 header(
'Content-Disposition: attachment;filename="'.$filename.
'.bin"',FALSE);
span($p_string, $p_extra='')
if(isset($_REQUEST['gDossier']) && $http->request("gDossier","number", 0) !=0) $repo
if(!defined("ALLOWED")) $http
contains the class for connecting to Noalyss
for($e=0; $e< count($afiche); $e++) exit