Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vmusicchart-cms
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Phạm Văn Đoan
vmusicchart-cms
Commits
2a14e835
Commit
2a14e835
authored
Mar 11, 2020
by
Trần Văn Minh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chi tiết bài hát
parent
a3efce17
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
62 deletions
+31
-62
CmsTrack.php
application/controllers/backend/CmsTrack.php
+1
-1
Track_model.php
application/models/Track_model.php
+1
-3
edit_track_view.php
application/views/backend/cms_track/edit_track_view.php
+3
-11
show_track_view.php
application/views/backend/cms_track/show_track_view.php
+26
-47
No files found.
application/controllers/backend/CmsTrack.php
View file @
2a14e835
...
@@ -130,7 +130,7 @@ class CmsTrack extends CI_Controller
...
@@ -130,7 +130,7 @@ class CmsTrack extends CI_Controller
$this
->
track_model
->
update
(
$track_id
,
$title
,
$db_art_path
);
$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'
);
$this
->
session
->
set_flashdata
(
'success'
,
'Cập nhật bài hát thành công'
);
redirect
(
base_url
()
.
'backend/cmsTrack/
listTrack'
);
redirect
(
base_url
()
.
'backend/cmsTrack/
showTrack/'
.
$track_id
);
}
}
}
}
...
...
application/models/Track_model.php
View file @
2a14e835
...
@@ -67,15 +67,13 @@ class Track_model extends CI_Model
...
@@ -67,15 +67,13 @@ class Track_model extends CI_Model
public
function
getById
(
$id
)
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.id AS id_singer,
track_artists.name AS artist,
track_artists.name AS artist,
track_artists.id AS id_track_artist'
);
track_artists.id AS id_track_artist'
);
$this
->
db
->
from
(
$this
->
_table
);
$this
->
db
->
from
(
$this
->
_table
);
$this
->
db
->
join
(
'track_user'
,
'track_user.track_id = tracks.id'
,
'left'
);
$this
->
db
->
join
(
'track_user'
,
'track_user.track_id = tracks.id'
,
'left'
);
$this
->
db
->
join
(
'track_artists'
,
'track_artists.track_id = tracks.id'
,
'left'
);
$this
->
db
->
join
(
'track_artists'
,
'track_artists.track_id = tracks.id'
,
'left'
);
$this
->
db
->
where
(
$this
->
_table
.
'.id'
,
$id
);
$this
->
db
->
where
(
$this
->
_table
.
'.id'
,
$id
);
// $this->db->where('track_artists.id', $track_artist);
// $this->db->where('track_user.id', $track_user);/
$query
=
$this
->
db
->
get
();
$query
=
$this
->
db
->
get
();
return
$query
->
result_array
();
return
$query
->
result_array
();
}
}
...
...
application/views/backend/cms_track/edit_track_view.php
View file @
2a14e835
...
@@ -40,16 +40,8 @@ $input_artist = array(
...
@@ -40,16 +40,8 @@ $input_artist = array(
<div
class=
"widget-main"
>
<div
class=
"widget-main"
>
<?php
<?php
$attributes
=
array
(
'class'
=>
'form-horizontal'
,
'id'
=>
'myform'
);
$attributes
=
array
(
'class'
=>
'form-horizontal'
,
'id'
=>
'myform'
);
if
(
!
$track_user
[
0
][
'id'
])
{
isset
(
$track_user
[
0
][
'id'
])
?
$user_singer
=
$track_user
[
0
][
'id'
]
:
$user_singer
=
0
;;
$user_singer
=
0
;
isset
(
$track_artists
[
0
][
'id'
])
?
$user_artist
=
$track_artists
[
0
][
'id'
]
:
$user_artist
=
0
;
}
else
{
$user_singer
=
$track_user
[
0
][
'id'
];
}
if
(
!
$track_artists
)
{
$user_artist
=
0
;
}
else
{
$user_artist
=
$track_artists
[
0
][
'id'
];
}
echo
form_open_multipart
(
base_url
(
'backend/cmsTrack/editTrack/'
.
$contest
[
0
][
'id'
]
.
'/'
.
$user_singer
.
'/'
.
$user_artist
),
$attributes
);
echo
form_open_multipart
(
base_url
(
'backend/cmsTrack/editTrack/'
.
$contest
[
0
][
'id'
]
.
'/'
.
$user_singer
.
'/'
.
$user_artist
),
$attributes
);
?>
?>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
@@ -124,7 +116,7 @@ $input_artist = array(
...
@@ -124,7 +116,7 @@ $input_artist = array(
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<div
class=
"col-lg-3"
>
<div
class=
"col-lg-3"
>
<a
href=
"
<?php
echo
base_url
(
)
.
'backend/cmsTrack/listTrack'
?>
"
<a
href=
"
<?php
echo
base_url
(
'backend/cmsTrack/showTrack/'
.
$contest
[
0
][
'id'
]);
?>
"
onclick=
"return confirm('Bạn có chắc chắn muốn quay lại Danh sách không?')"
>
onclick=
"return confirm('Bạn có chắc chắn muốn quay lại Danh sách không?')"
>
<button
type=
"button"
class=
"btn btn-sm btn-default"
>
<button
type=
"button"
class=
"btn btn-sm btn-default"
>
<i
class=
"ace-icon fa fa-arrow-left"
></i>
Quay lại
<i
class=
"ace-icon fa fa-arrow-left"
></i>
Quay lại
...
...
application/views/backend/cms_track/show_track_view.php
View file @
2a14e835
<?php
if
(
$this
->
session
->
flashdata
(
'success'
))
:
?>
<?php
if
(
$this
->
session
->
flashdata
(
'success'
))
:
?>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"alert alert-block alert-success"
style=
"margin-bottom: 5px"
>
<div
class=
"alert alert-block alert-success"
style=
"margin-bottom: 5px"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
>
<i
class=
"ace-icon fa fa-times"
></i>
<i
class=
"ace-icon fa fa-times"
></i>
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
<i
class=
"ace-icon fa fa-check green"
></i>
<i
class=
"ace-icon fa fa-check green"
></i>
<?php
echo
$this
->
session
->
flashdata
(
'success'
);
?>
<?php
echo
$this
->
session
->
flashdata
(
'success'
);
?>
</div>
</div>
</div>
</div>
<?php
endif
;
?>
<?php
endif
;
?>
<?php
if
(
$this
->
session
->
flashdata
(
'error'
))
:
?>
<?php
if
(
$this
->
session
->
flashdata
(
'error'
))
:
?>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"alert alert-block alert-danger"
style=
"margin-bottom: 5px"
>
<div
class=
"alert alert-block alert-danger"
style=
"margin-bottom: 5px"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
>
<i
class=
"ace-icon fa fa-times"
></i>
<i
class=
"ace-icon fa fa-times"
></i>
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
<i
class=
"ace-icon fa fa-times"
></i>
<i
class=
"ace-icon fa fa-times"
></i>
<?php
echo
$this
->
session
->
flashdata
(
'error'
);
?>
<?php
echo
$this
->
session
->
flashdata
(
'error'
);
?>
</div>
</div>
</div>
</div>
<?php
endif
;
?>
<?php
endif
;
?>
<?php
if
(
isset
(
$track
[
0
]))
:
?>
<?php
if
(
isset
(
$track
[
0
]))
:
?>
<div
class=
"row"
>
<div
class=
"row"
>
...
@@ -34,7 +34,8 @@
...
@@ -34,7 +34,8 @@
<div
class=
"profile-info-name"
>
Ảnh
</div>
<div
class=
"profile-info-name"
>
Ảnh
</div>
<div
class=
"profile-info-value"
>
<div
class=
"profile-info-value"
>
<span>
<span>
<img
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$track
[
0
][
'art'
])
?>
"
style=
"width: 100px; height: 100px"
>
<img
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$track
[
0
][
'art'
])
?>
"
style=
"max-width: 200px; max-height: 200px"
>
</span>
</span>
</div>
</div>
</div>
</div>
...
@@ -42,67 +43,44 @@
...
@@ -42,67 +43,44 @@
<div
class=
"profile-info-row"
>
<div
class=
"profile-info-row"
>
<div
class=
"profile-info-name"
>
Tên Bài hát
</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
$track
[
0
][
'title'
]
?>
</span>
<span>
<?php
echo
$track
[
0
][
'title'
];
?>
</span>
</div>
</div>
<div
class=
"profile-info-row"
>
<div
class=
"profile-info-name"
>
Ca sĩ
</div>
<div
class=
"profile-info-value"
>
<!-- <span>
<?php
echo
MyHelper
::
reFormatDate
(
$track
[
0
][
'birthday'
],
'd/m/Y'
)
?>
</span> -->
</div>
</div>
<div
class=
"profile-info-row"
>
<div
class=
"profile-info-name"
>
Nhạc sĩ
</div>
<div
class=
"profile-info-value"
>
<!-- <span>
<?php
echo
$user
[
0
][
'gender'
]
?>
</span> -->
</div>
</div>
<div
class=
"profile-info-row"
>
<div
class=
"profile-info-name"
>
Mô tả
</div>
<div
class=
"profile-info-value"
>
<span>
<?php
echo
$track
[
0
][
'description'
]
?>
</span>
</div>
</div>
<!--
<div class="profile-info-row">
<div class="profile-info-name">Địa chỉ</div>
<div class="profile-info-value">
<span>
<?php
echo
$user
[
0
][
'address'
]
?>
</span>
</div>
</div>
</div>
</div>
<div
class=
"profile-info-row"
>
<div
class=
"profile-info-row"
>
<div class="profile-info-name">
Email
</div>
<div
class=
"profile-info-name"
>
Sáng tác
</div>
<div
class=
"profile-info-value"
>
<div
class=
"profile-info-value"
>
<span>
<?php
echo
$
user
[
0
][
'email'
]
?>
</span>
<span>
<?php
echo
$
track
[
0
][
'artist'
];
?>
</span>
</div>
</div>
</div>
</div>
<div
class=
"profile-info-row"
>
<div
class=
"profile-info-row"
>
<div class="profile-info-name">
Mobile
</div>
<div
class=
"profile-info-name"
>
Số người biểu diễn
</div>
<div
class=
"profile-info-value"
>
<div
class=
"profile-info-value"
>
<span>
<?php
echo
$user
[
0
][
'mobile'
]
?>
</span>
<span>
<?php
echo
count
(
$track
);
?>
</span>
</div>
</div>
</div>
</div>
<div
class=
"profile-info-row"
>
<div
class=
"profile-info-row"
>
<div class="profile-info-name">
Mã dự thưởng
</div>
<div
class=
"profile-info-name"
>
Biểu diễn
</div>
<div
class=
"profile-info-value"
>
<div
class=
"profile-info-value"
>
<span>
<?php
echo
$user
[
0
][
'reward_code'
]
?>
</span>
<?php
if
(
count
(
$track
)
>
0
)
:
foreach
(
$track
as
$key
=>
$tracks
)
:
?>
<div
style=
"
<?php
if
(
count
(
$track
)
>
1
)
echo
'width: 50%; float:left; text-align: center;'
;
?>
<?php
if
(
count
(
$track
)
-
1
>
$key
)
echo
'border-right: solid #dddddd 2px;'
;
?>
"
>
<?php
echo
$tracks
[
'name_singer'
];
?>
<a
href=
"
<?php
echo
base_url
(
'backend/cmsTrack/editTrack/'
.
$track
[
0
][
'id'
]
.
'/'
.
$tracks
[
'id_singer'
]
.
'/'
.
$tracks
[
'id_track_artist'
]);
?>
"
>
<i
class=
"ace-icon fa fa-pencil-square-o bigger-150"
style=
"color: red;"
></i>
</a>
</div>
</div>
<?php
endforeach
;
?>
<?php
else
:
echo
'<span class="text-danger">Chưa có</span>'
;
?>
<?php
endif
?>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">Ngày tham gia</div>
<div class="profile-info-value">
<span>
<?php
echo
MyHelper
::
reFormatDate
(
$user
[
0
][
'created_at'
])
?>
</span>
</div>
</div>
</div> -->
</div>
</div>
</div>
</div>
<?php
else
:
?>
<?php
else
:
?>
<p>
Không tìm thấy thông tin Người chơi!
</p>
<p>
Không tìm thấy thông tin Người chơi!
</p>
<?php
endif
;
?>
<?php
endif
;
?>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment