Browse Source

버그수정

master
장선근 5 years ago
parent
commit
e132b09af1
  1. 2
      wheeparam/application/controllers/Board.php
  2. 2
      wheeparam/application/controllers/admin/Board.php
  3. 25
      wheeparam/application/controllers/admin/Download.php
  4. 1
      wheeparam/views/themes/admin/board/posts.php

2
wheeparam/application/controllers/Board.php

@ -171,7 +171,7 @@ class Board extends WB_Controller {
$post = $this->boardlib->get_post($brd_key, $post_idx, TRUE); $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'); $this->db->where('att_idx', $att['att_idx'])->set('att_downloads', 'att_downloads + 1', FALSE)->update('attach');

2
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); $this->data['list'] = $this->boardlib->post_list($this->data['board'], $this->param);
$paging['page'] = $this->param['page']; $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']; $paging['total_rows'] = $this->data['list']['total_count'];
$this->load->library('paging', $paging); $this->load->library('paging', $paging);
$this->data['pagination'] = $this->paging->create(); $this->data['pagination'] = $this->paging->create();

25
wheeparam/application/controllers/admin/Download.php

@ -0,0 +1,25 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Download extends WB_Controller
{
function attach($att_idx="") {
if(empty($att_idx))
{
alert('잘못된 접근입니다.');
}
if(! $att = $this->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);
}
}

1
wheeparam/views/themes/admin/board/posts.php

@ -82,6 +82,7 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="text-center MT10"><?=$pagination?></div>
<div class="ax-button-group ax-button-group-bottom"> <div class="ax-button-group ax-button-group-bottom">
<div class="left"> <div class="left">
<button type="button" class="btn btn-danger" data-button="btn-remove-posts"><i class="fal fa-trash"></i> 선택 삭제</button> <button type="button" class="btn btn-danger" data-button="btn-remove-posts"><i class="fal fa-trash"></i> 선택 삭제</button>

Loading…
Cancel
Save