Revision 5514,
654 bytes
checked in by acoutinho, 13 years ago
(diff) |
Ticket #2434 - Implementacao anexos, acls e delegacao de participantes
|
Rev | Line | |
---|
[5514] | 1 | <?php |
---|
| 2 | $data = $_GET; |
---|
| 3 | //TODO implementar suporte a download de varios arquivos! |
---|
| 4 | if( isset($data) ) |
---|
| 5 | { |
---|
| 6 | require_once "api/controller.php"; |
---|
| 7 | |
---|
| 8 | foreach($data as $concept => $value){ |
---|
| 9 | |
---|
| 10 | $arquive = Controller::find( array( 'concept' => $concept ) , false ,array( 'filter' => array('=', 'id' , $data[$concept]) )); |
---|
| 11 | |
---|
| 12 | foreach($arquive as $key => $arq){ |
---|
| 13 | header("Content-type: ".$arq['type']); |
---|
| 14 | header("Expires: 0"); |
---|
| 15 | header("Content-length: ".$arq['size']); |
---|
| 16 | header("Content-Disposition: attachment; filename=".$arq['name']); |
---|
| 17 | header("Content-Description: Downlaod de anexos:"); |
---|
| 18 | echo base64_decode($arq['source']); |
---|
| 19 | } |
---|
| 20 | } |
---|
| 21 | }else return"false"; |
---|
Note: See
TracBrowser
for help on using the repository browser.