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
94f76e6c
Commit
94f76e6c
authored
Mar 11, 2020
by
Phạm Văn Đoan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.dcv.vn/doanpv/vmusicchart-cms
into dev
parents
51e48eaa
2a14e835
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
76 deletions
+45
-76
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
+40
-61
No files found.
application/controllers/backend/CmsTrack.php
View file @
94f76e6c
...
...
@@ -130,7 +130,7 @@ class CmsTrack extends CI_Controller
$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'
);
redirect
(
base_url
()
.
'backend/cmsTrack/
showTrack/'
.
$track_id
);
}
}
...
...
application/models/Track_model.php
View file @
94f76e6c
...
...
@@ -67,15 +67,13 @@ class Track_model extends CI_Model
public
function
getById
(
$id
)
{
$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.id AS id_track_artist'
);
$this
->
db
->
from
(
$this
->
_table
);
$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
->
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
();
return
$query
->
result_array
();
}
...
...
application/views/backend/cms_track/edit_track_view.php
View file @
94f76e6c
...
...
@@ -40,16 +40,8 @@ $input_artist = array(
<div
class=
"widget-main"
>
<?php
$attributes
=
array
(
'class'
=>
'form-horizontal'
,
'id'
=>
'myform'
);
if
(
!
$track_user
[
0
][
'id'
])
{
$user_singer
=
0
;
}
else
{
$user_singer
=
$track_user
[
0
][
'id'
];
}
if
(
!
$track_artists
)
{
$user_artist
=
0
;
}
else
{
$user_artist
=
$track_artists
[
0
][
'id'
];
}
isset
(
$track_user
[
0
][
'id'
])
?
$user_singer
=
$track_user
[
0
][
'id'
]
:
$user_singer
=
0
;;
isset
(
$track_artists
[
0
][
'id'
])
?
$user_artist
=
$track_artists
[
0
][
'id'
]
:
$user_artist
=
0
;
echo
form_open_multipart
(
base_url
(
'backend/cmsTrack/editTrack/'
.
$contest
[
0
][
'id'
]
.
'/'
.
$user_singer
.
'/'
.
$user_artist
),
$attributes
);
?>
<div
class=
"form-group"
>
...
...
@@ -124,7 +116,7 @@ $input_artist = array(
<div
class=
"form-group"
>
<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?')"
>
<button
type=
"button"
class=
"btn btn-sm btn-default"
>
<i
class=
"ace-icon fa fa-arrow-left"
></i>
Quay lại
...
...
application/views/backend/cms_track/show_track_view.php
View file @
94f76e6c
<?php
if
(
$this
->
session
->
flashdata
(
'success'
))
:
?>
<div
class=
"row"
>
<div
class=
"alert alert-block alert-success"
style=
"margin-bottom: 5px"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
>
<i
class=
"ace-icon fa fa-times"
></i>
</button>
<i
class=
"ace-icon fa fa-check green"
></i>
<?php
echo
$this
->
session
->
flashdata
(
'success'
);
?>
</div>
<?php
if
(
$this
->
session
->
flashdata
(
'success'
))
:
?>
<div
class=
"row"
>
<div
class=
"alert alert-block alert-success"
style=
"margin-bottom: 5px"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
>
<i
class=
"ace-icon fa fa-times"
></i>
</button>
<i
class=
"ace-icon fa fa-check green"
></i>
<?php
echo
$this
->
session
->
flashdata
(
'success'
);
?>
</div>
</div>
<?php
endif
;
?>
<?php
if
(
$this
->
session
->
flashdata
(
'error'
))
:
?>
<div
class=
"row"
>
<div
class=
"alert alert-block alert-danger"
style=
"margin-bottom: 5px"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
>
<i
class=
"ace-icon fa fa-times"
></i>
</button>
<div
class=
"row"
>
<div
class=
"alert alert-block alert-danger"
style=
"margin-bottom: 5px"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"alert"
>
<i
class=
"ace-icon fa fa-times"
></i>
<?php
echo
$this
->
session
->
flashdata
(
'error'
);
?>
</div>
</button>
<i
class=
"ace-icon fa fa-times"
></i>
<?php
echo
$this
->
session
->
flashdata
(
'error'
);
?>
</div>
</div>
<?php
endif
;
?>
<?php
if
(
isset
(
$track
[
0
]))
:
?>
<div
class=
"row"
>
...
...
@@ -34,7 +34,8 @@
<div
class=
"profile-info-name"
>
Ảnh
</div>
<div
class=
"profile-info-value"
>
<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>
</div>
</div>
...
...
@@ -42,67 +43,44 @@
<div
class=
"profile-info-row"
>
<div
class=
"profile-info-name"
>
Tên Bài hát
</div>
<div
class=
"profile-info-value"
>
<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> -->
<span>
<?php
echo
$track
[
0
][
'title'
];
?>
</span>
</div>
</div>
<div
class=
"profile-info-row"
>
<div
class=
"profile-info-name"
>
Nhạc sĩ
</div>
<div
class=
"profile-info-name"
>
Sáng tác
</div>
<div
class=
"profile-info-value"
>
<
!-- <span>
<?php
echo
$user
[
0
][
'gender'
]
?>
</span> --
>
<
span>
<?php
echo
$track
[
0
][
'artist'
];
?>
</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-name"
>
Số người biểu diễn
</div>
<div
class=
"profile-info-value"
>
<span>
<?php
echo
$user
[
0
][
'address'
]
?>
</span>
<span>
<?php
echo
count
(
$track
);
?>
</span>
</div>
</div>
<div
class=
"profile-info-row"
>
<div class="profile-info-name">
Email
</div>
<div
class=
"profile-info-name"
>
Biểu diễn
</div>
<div
class=
"profile-info-value"
>
<span>
<?php
echo
$user
[
0
][
'email'
]
?>
</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>
<?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">Mobile</div>
<div class="profile-info-value">
<span>
<?php
echo
$user
[
0
][
'mobile'
]
?>
</span>
</div>
</div>
<div class="profile-info-row">
<div class="profile-info-name">Mã dự thưởng</div>
<div class="profile-info-value">
<span>
<?php
echo
$user
[
0
][
'reward_code'
]
?>
</span>
</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>
<?php
else
:
?>
<p>
Không tìm thấy thông tin Người chơi!
</p>
<?php
endif
;
?>
<p>
Không tìm thấy thông tin Người chơi!
</p>
<?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