Commit a3efce17 by Trần Văn Minh

Cập nhât xem chi tiết thông tin bài hát

parent d0c642e6
...@@ -133,5 +133,16 @@ class CmsTrack extends CI_Controller ...@@ -133,5 +133,16 @@ class CmsTrack extends CI_Controller
redirect(base_url().'backend/cmsTrack/listTrack'); redirect(base_url().'backend/cmsTrack/listTrack');
} }
} }
public function showTrack($track_id)
{
$this->_data['track']= $this->track_model->getById($track_id);
//
$this->_data['functionName'] = 'Thông tin Bài Hát';
$this->_data['action'] = 'showTrack';
$this->_data['titlePage'] = 'Thông tin Bài Hát';
$this->_data['loadPage'] = 'backend/cms_track/show_track_view';
$this->load->view('backend/admin_template_view', $this->_data);
}
} }
\ No newline at end of file
...@@ -64,7 +64,7 @@ class Track_model extends CI_Model ...@@ -64,7 +64,7 @@ class Track_model extends CI_Model
} }
} }
public function getById($id, $track_user, $track_artist) public function getById($id)
{ {
$this->db->select($this->_table . '.*, track_user.name AS name_singer, $this->db->select($this->_table . '.*, track_user.name AS name_singer,
track_user.user_id AS id_singer, track_user.user_id AS id_singer,
......
...@@ -19,8 +19,8 @@ ...@@ -19,8 +19,8 @@
<td style="text-align: center">#<?php echo $data['id']; ?></td> <td style="text-align: center">#<?php echo $data['id']; ?></td>
<td style="text-align: left"><?php echo $data['title']; ?></td> <td style="text-align: left"><?php echo $data['title']; ?></td>
<td style="text-align: center"> <td style="text-align: center">
<a href="<?php echo base_url().'backend/cmsTrack/editTrack/'.$data['id']; ?>" title="Xem chi tiết"> <a href="<?php echo base_url().'backend/cmsTrack/showTrack/'.$data['id']; ?>" title="Xem chi tiết">
<i class="ace-icon fa fa-pencil bigger-130"></i> <i class="ace-icon fa fa-eye bigger-130"></i>
</a> </a>
</td> </td>
</tr> </tr>
......
...@@ -20,54 +20,53 @@ ...@@ -20,54 +20,53 @@
</div> </div>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if(isset($user[0])): ?> <?php if(isset($track[0])): ?>
<div class="row"> <div class="row">
<div class="profile-user-info profile-user-info-striped"> <div class="profile-user-info profile-user-info-striped">
<div class="profile-info-row"> <div class="profile-info-row">
<div class="profile-info-name"> ID </div> <div class="profile-info-name"> ID </div>
<div class="profile-info-value"> <div class="profile-info-value">
<span>#<?php echo $user[0]['id']?></span> <span>#<?php echo $track[0]['id']?></span>
</div> </div>
</div> </div>
<div class="profile-info-row"> <div class="profile-info-row">
<div class="profile-info-name">Ảnh đại diện</div> <div class="profile-info-name">Ảnh</div>
<div class="profile-info-value"> <div class="profile-info-value">
<span> <span>
<?php ($user[0]['avatar'] != '') ? $avatar_path = $user[0]['avatar'] : $avatar_path = 'upload/avatar/user.jpg' ?> <img src="<?php echo MyHelper::getArtByTrack($track[0]['art']) ?>" style="width: 100px; height: 100px">
<img src="<?php echo base_url($avatar_path);?>" style="width: 100px; height: 100px">
</span> </span>
</div> </div>
</div> </div>
<div class="profile-info-row"> <div class="profile-info-row">
<div class="profile-info-name">Tên người chơi</div> <div class="profile-info-name">Tên Bài hát</div>
<div class="profile-info-value"> <div class="profile-info-value">
<span><?php echo $user[0]['fullname']?></span> <span><?php echo $track[0]['title']?></span>
</div> </div>
</div> </div>
<div class="profile-info-row"> <div class="profile-info-row">
<div class="profile-info-name">Tên tài khoản</div> <div class="profile-info-name">Ca sĩ</div>
<div class="profile-info-value"> <div class="profile-info-value">
<span><?php echo $user[0]['username']?></span> <!-- <span><?php echo MyHelper::reFormatDate($track[0]['birthday'], 'd/m/Y') ?></span> -->
</div> </div>
</div> </div>
<div class="profile-info-row"> <div class="profile-info-row">
<div class="profile-info-name">Ngày sinh</div> <div class="profile-info-name">Nhạc sĩ</div>
<div class="profile-info-value"> <div class="profile-info-value">
<span><?php echo MyHelper::reFormatDate($user[0]['birthday'], 'd/m/Y') ?></span> <!-- <span><?php echo $user[0]['gender']?></span> -->
</div> </div>
</div> </div>
<div class="profile-info-row"> <div class="profile-info-row">
<div class="profile-info-name">Giới tính</div> <div class="profile-info-name">Mô tả</div>
<div class="profile-info-value"> <div class="profile-info-value">
<span><?php echo $user[0]['gender']?></span> <span><?php echo $track[0]['description']?></span>
</div> </div>
</div> </div>
<!--
<div class="profile-info-row"> <div class="profile-info-row">
<div class="profile-info-name">Địa chỉ</div> <div class="profile-info-name">Địa chỉ</div>
<div class="profile-info-value"> <div class="profile-info-value">
...@@ -101,7 +100,7 @@ ...@@ -101,7 +100,7 @@
<div class="profile-info-value"> <div class="profile-info-value">
<span><?php echo MyHelper::reFormatDate($user[0]['created_at']) ?></span> <span><?php echo MyHelper::reFormatDate($user[0]['created_at']) ?></span>
</div> </div>
</div> </div> -->
</div> </div>
</div> </div>
<?php else: ?> <?php else: ?>
......
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