Commit 2375833a by Phạm Văn Đoan

thêm icon cho bài hát tương ứng với nguồn nhạc

parent a418033c
......@@ -778,6 +778,30 @@ class MyHelper
return $default_image;
}
/**
* Hàm trả về ảnh icon của nguồn nhạc
*
* @param $id_zing
* @param $id_nct
* @param $id_keeng
*
* @return string
*/
public static function getSourceIcon($id_zing, $id_nct, $id_keeng)
{
$html = '';
if (!empty($id_zing)) {
$html .= "<span title='Nguồn Zing MP3'><img src='" . base_url('images/favicon/zing_favicon_16x.png') . "'></span>";
}
if (!empty($id_nct)) {
$html .= "<span title='Nguồn NCT'><img src='" . base_url('images/favicon/nct_favicon_16x.png') . "'></span>";
}
if (!empty($id_keeng)) {
$html .= "<span title='Nguồn Keeng'><img src='" . base_url('images/favicon/keeng_favicon_16x.png') . "'></span>";
}
return $html;
}
}
/* End */
\ No newline at end of file
......@@ -19,7 +19,11 @@
<img style="max-width: 50px" src="<?php echo MyHelper::getArtByTrack($data['art']) ?>">
</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']; ?>
<br>
<?php echo MyHelper::getSourceIcon($data['id_zing'], $data['id_nct'], $data['id_keeng']) ?>
</td>
<td style="text-align: left"><?php echo $data['singer_list']; ?></td>
<td style="text-align: left"><?php echo $data['composer_list']; ?></td>
<td style="text-align: center">
......
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