Changes between Version 10 and Version 11 of WF/Downloaddearquivos
- Timestamp:
- 12/06/07 14:44:51 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WF/Downloaddearquivos
v10 v11 144 144 No arquivo de template (registrar.tpl): 145 145 146 {wf_download_link getParams="id_arquivo=1&action=download"} 146 {{{ 147 {wf_download_link getParams="id_arquivo=1&action=download"} 148 }}} 147 149 148 150 No arquivo de controle da atividade (class.registrar.controller.php): … … 160 162 161 163 //Obter o conteúdo o arquivo através dos parâmetros passados 162 $param = $this->request ->id_arquivo163 $query = "select *from tb_arquivos where tb_arquivos_id = ?";164 $ this->DAO->query($query, array($param));164 $param = $this->request[id_arquivo]; 165 $query = "select nome,conteudo from tb_arquivos where tb_arquivos_id = ?"; 166 $result = $this->DAO->query($query, array($param)); 165 167 166 $this->sendfile( "arquivo.txt", "Conteudo do arquivo");168 $this->sendfile($result->fields[nome], $result->fields[conteudo]); 167 169 } 168 170 }}}