diff --git a/wheeparam/application/controllers/Board.php b/wheeparam/application/controllers/Board.php index 343649e..5046ad5 100644 --- a/wheeparam/application/controllers/Board.php +++ b/wheeparam/application/controllers/Board.php @@ -171,7 +171,7 @@ class Board extends WB_Controller { $post = $this->boardlib->get_post($brd_key, $post_idx, TRUE); - $this->point_process('brd_point_download', "POST_ATTACH_DOWNLOAD", "첨부파일 다운로드", $post_idx, ($post['reg_user'] == $this->member->info('idx')) ); + $this->boardlib->point_process('brd_point_download', "POST_ATTACH_DOWNLOAD", "첨부파일 다운로드", $post_idx, ($post['reg_user'] == $this->member->info('idx')) ); $this->db->where('att_idx', $att['att_idx'])->set('att_downloads', 'att_downloads + 1', FALSE)->update('attach'); diff --git a/wheeparam/application/controllers/admin/Board.php b/wheeparam/application/controllers/admin/Board.php index 69f1b0a..667aa96 100644 --- a/wheeparam/application/controllers/admin/Board.php +++ b/wheeparam/application/controllers/admin/Board.php @@ -218,7 +218,7 @@ class Board extends WB_Controller $this->data['list'] = $this->boardlib->post_list($this->data['board'], $this->param); $paging['page'] = $this->param['page']; - $paging['page_rows'] = 20; + $paging['page_rows'] = $this->data['board']['brd_page_rows']; $paging['total_rows'] = $this->data['list']['total_count']; $this->load->library('paging', $paging); $this->data['pagination'] = $this->paging->create(); diff --git a/wheeparam/application/controllers/admin/Download.php b/wheeparam/application/controllers/admin/Download.php new file mode 100644 index 0000000..abca1dc --- /dev/null +++ b/wheeparam/application/controllers/admin/Download.php @@ -0,0 +1,25 @@ +db->where('att_idx', $att_idx)->get('attach')->row_array()) + { + alert('잘못된 접근입니다.'); + exit; + } + + $this->db->where('att_idx', $att['att_idx'])->set('att_downloads', 'att_downloads + 1', FALSE)->update('attach'); + + $this->load->helper('download'); + $data = file_get_contents(FCPATH.$att['att_filepath']); + $name = urlencode($att['att_origin']); + force_download($name, $data); + } +} \ No newline at end of file diff --git a/wheeparam/views/themes/admin/board/posts.php b/wheeparam/views/themes/admin/board/posts.php index 03cb6c8..3278954 100644 --- a/wheeparam/views/themes/admin/board/posts.php +++ b/wheeparam/views/themes/admin/board/posts.php @@ -82,6 +82,7 @@ +