Commit 892abd2a by Phạm Văn Đoan

cập nhật upload

parent e4afa009
......@@ -46,9 +46,9 @@ class CmsTrack extends CI_Controller
$this->load->view('backend/ajax/cms_track/list_track_view', $data);
}
public function editTrack($contest_id, $id_user = '', $id_artist = '')
public function editTrack($track_id, $id_user = '', $id_artist = '')
{
$this->_data['contest'] = $contest = $this->track_model->getById($contest_id, $id_user, $id_artist);
$this->_data['contest'] = $contest = $this->track_model->getById($track_id, $id_user, $id_artist);
$track_user = '';
$this->_data['track_artists'] = $track_artists = '';
if ($id_user != 0) {
......@@ -112,6 +112,7 @@ class CmsTrack extends CI_Controller
$upload_path = 'uploads/tracks/arts';
$upload_full_path = '/home/aseanvn/public_html/vmusicchart.dcv.vn/' . $upload_path;
$config['upload_path'] = $upload_full_path;
$config['file_name'] = md5($track_id.time());
$config['allowed_types'] = 'gif|jpg|png';
$config['max_size'] = 20480;
$config['max_width'] = 1024;
......@@ -124,9 +125,9 @@ class CmsTrack extends CI_Controller
$db_art_path = $upload_path . '/' . $upload_data['file_name'];
}
$this->track_model->update_track_artists($contest_id, $id_artists, $id_artist, $active_artist);
$this->track_model->update_track_user($contest_id, $id_singer, $id_user, $active_singer);
$this->track_model->update($contest_id, $title, $db_art_path);
$this->track_model->update_track_artists($track_id, $id_artists, $id_artist, $active_artist);
$this->track_model->update_track_user($track_id, $id_singer, $id_user, $active_singer);
$this->track_model->update($track_id, $title, $db_art_path);
$this->session->set_flashdata('success', 'Cập nhật bài hát thành công');
redirect(base_url().'backend/cmsTrack/listTrack');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment