function download($id) { $knowledge = new Knowledge_file($id); $knowledge->counter(); $this->load->helper('download'); $data = file_get_contents("uploads/knowledge/" . basename($knowledge->file)); $name = basename($knowledge->file); force_download($name, $data); }
function document_delete($id) { $knowledge = new Knowledge_file($id); $knowledge->delete(); set_notify('success', lang('delete_data_complete')); redirect($_SERVER['HTTP_REFERER']); }