source: trunk/workflow/inc/report/downloads.php @ 5307

Revision 5307, 652 bytes checked in by pereira.jair, 12 years ago (diff)

Ticket #2416 - Inclusao da nova ferramenta de relatorios do workflow.

Line 
1<?
2session_start();
3include 'includes/classes/Download.class.php';
4
5$pathURL = $_GET['arquivo'];
6
7$baseDir = '/tmp/';
8$baseRef = 'true';
9
10$pathFile = str_replace($baseDir , '', $pathURL);
11
12$pathPartes = explode('/', $pathFile) ;
13
14$pathDirFinal = $pathPartes[0];
15
16
17$fileDown = '';
18for($i = 1; $i < (count($pathPartes)); $i++){
19   $fileDown = ($fileDown != '') ? $fileDown . '/' : $fileDown ;
20   $fileDown .= $pathPartes[$i];
21}
22 
23$down = new Download($baseDir, $baseRef );
24$down->doDownload($baseDir . $pathDirFinal);
25
26if($down->getSysError() != ''){
27    echo $down->getSysDebug(); 
28    echo $down->getSysError();
29}
30
31
32 ?>
Note: See TracBrowser for help on using the repository browser.