Exemple #1
0
 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);
 }
Exemple #2
0
 function document_delete($id)
 {
     $knowledge = new Knowledge_file($id);
     $knowledge->delete();
     set_notify('success', lang('delete_data_complete'));
     redirect($_SERVER['HTTP_REFERER']);
 }