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
0a33c82e
Commit
0a33c82e
authored
Mar 12, 2020
by
Trần Văn Minh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
view thêm ca sĩ vào bài hát
parent
d4b1a742
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
7 deletions
+108
-7
CmsTrack.php
application/controllers/backend/CmsTrack.php
+9
-5
add_singer_view.php
application/views/backend/cms_track/add_singer_view.php
+97
-0
edit_track_view.php
application/views/backend/cms_track/edit_track_view.php
+1
-1
show_track_view.php
application/views/backend/cms_track/show_track_view.php
+1
-1
No files found.
application/controllers/backend/CmsTrack.php
View file @
0a33c82e
...
@@ -50,7 +50,7 @@ class CmsTrack extends CI_Controller
...
@@ -50,7 +50,7 @@ class CmsTrack extends CI_Controller
public
function
editTrack
(
$track_id
,
$id_user
=
''
,
$id_artist
=
''
)
public
function
editTrack
(
$track_id
,
$id_user
=
''
,
$id_artist
=
''
)
{
{
$this
->
_data
[
'contest'
]
=
$contest
=
$this
->
track_model
->
getById
(
$track_id
,
$id_user
,
$id_artist
);
$this
->
_data
[
'contest'
]
=
$contest
=
$this
->
track_model
->
getById
(
$track_id
);
$track_user
=
''
;
$track_user
=
''
;
$this
->
_data
[
'track_artists'
]
=
$track_artists
=
''
;
$this
->
_data
[
'track_artists'
]
=
$track_artists
=
''
;
if
(
$id_user
!=
0
)
{
if
(
$id_user
!=
0
)
{
...
@@ -90,9 +90,6 @@ class CmsTrack extends CI_Controller
...
@@ -90,9 +90,6 @@ class CmsTrack extends CI_Controller
$this
->
_data
[
'singer'
]
=
$this
->
input
->
post
(
'singer'
);
$this
->
_data
[
'singer'
]
=
$this
->
input
->
post
(
'singer'
);
$this
->
_data
[
'artist'
]
=
$this
->
input
->
post
(
'artist'
);
$this
->
_data
[
'artist'
]
=
$this
->
input
->
post
(
'artist'
);
$this
->
_data
[
'update_artist'
]
=
$this
->
input
->
post
(
'update_artist'
);
$this
->
_data
[
'update_artist'
]
=
$this
->
input
->
post
(
'update_artist'
);
//
// error_log('abv: '.$this->input->post('src_option'));
die
(
'abv: '
.
$this
->
input
->
post
(
'src_option'
));
$this
->
_data
[
'functionName'
]
=
'Cập nhật thông tin'
;
$this
->
_data
[
'functionName'
]
=
'Cập nhật thông tin'
;
$this
->
_data
[
'action'
]
=
'editTrack'
;
$this
->
_data
[
'action'
]
=
'editTrack'
;
$this
->
_data
[
'titlePage'
]
=
'Cập nhật thông tin'
;
$this
->
_data
[
'titlePage'
]
=
'Cập nhật thông tin'
;
...
@@ -246,7 +243,14 @@ class CmsTrack extends CI_Controller
...
@@ -246,7 +243,14 @@ class CmsTrack extends CI_Controller
public
function
addSinger
(
$track_id
)
public
function
addSinger
(
$track_id
)
{
{
# code...
$this
->
_data
[
'track'
]
=
$contest
=
$this
->
track_model
->
getById
(
$track_id
);
$this
->
_data
[
'list_user'
]
=
$list_user
=
$this
->
track_model
->
getListUsers
();
$this
->
_data
[
'functionName'
]
=
'Thêm Người thể hiện vào bài hát'
;
$this
->
_data
[
'action'
]
=
'addSinger'
;
$this
->
_data
[
'titlePage'
]
=
'Thêm Người thể hiện vào bài hát'
;
$this
->
_data
[
'loadPage'
]
=
'backend/cms_track/add_singer_view'
;
$this
->
load
->
view
(
'backend/admin_template_view'
,
$this
->
_data
);
}
}
public
function
showTrack
(
$track_id
)
public
function
showTrack
(
$track_id
)
...
...
application/views/backend/cms_track/add_singer_view.php
0 → 100644
View file @
0a33c82e
<?php
?>
<div
class=
"row"
>
<div
class=
"widget-box"
>
<div
class=
"widget-header"
>
<p
class=
"widget-title"
>
Cập nhật thông tin bài hát
</p>
</div>
<div
class=
"widget-body"
>
<div
class=
"widget-main"
>
<?php
$attributes
=
array
(
'class'
=>
'form-horizontal'
,
'id'
=>
'myform'
);
echo
form_open_multipart
(
base_url
(
'backend/cmsTrack/editTrack/'
.
$track
[
0
][
'id'
]),
$attributes
);
?>
<div
class=
"form-group"
>
<label
class=
"col-lg-3"
></label>
<div
class=
"col-lg-3"
>
<input
type=
"hidden"
name=
"id"
value=
"
<?php
echo
$track
[
0
][
'id'
];
?>
"
/>
<?php
if
(
validation_errors
()){
echo
form_error
(
'id'
,
'<div class="error">'
,
'</div>'
);}
?>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-lg-3"
>
Tên bài hát (*)
</label>
<div
class=
"col-lg-3"
>
<p>
<?php
echo
$track
[
0
][
'title'
];
?>
</p>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-lg-3"
>
Thêm Tên Ca sĩ
</label>
<div
class=
"col-lg-3"
>
<select
id=
'form-field-select-3'
name=
"update_singer"
style=
'width: 200px;'
class=
"chosen-select form-control"
data-placeholder=
"Choose a State..."
>
<option
value=
"-1"
>
Chọn ca sĩ
</option>
<?php
foreach
(
$list_user
as
$singer
)
:
?>
<option
value=
"
<?php
echo
$singer
[
'id'
];
?>
"
>
<?php
echo
$singer
[
'full_name'
];
?>
</option>
<?php
endforeach
;
?>
</select>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"col-lg-3"
>
<a
href=
"
<?php
echo
base_url
(
'backend/cmsTrack/showTrack/'
.
$track
[
0
][
'id'
]);
?>
"
onclick=
"return confirm('Bạn có chắc chắn muốn quay lại trang chi tiết không?')"
>
<button
type=
"button"
class=
"btn btn-sm btn-default"
>
<i
class=
"ace-icon fa fa-arrow-left"
></i>
Quay lại
</button>
</a>
</div>
<div
class=
"col-lg-4"
>
<button
class=
"btn btn-sm btn-primary"
type=
"submit"
name=
"btnSave"
>
<i
class=
"ace-icon fa fa-check bigger-110"
></i>
Lưu lại
</button>
<button
class=
"btn btn-sm"
type=
"reset"
>
<i
class=
"ace-icon fa fa-undo bigger-110"
></i>
Xóa form
</button>
</div>
</div>
<?php
echo
form_close
();
?>
</div>
</div>
</div>
</div>
<!-- /.row -->
<script>
$
(
document
).
ready
(
function
()
{
$
(
'.chosen-select'
).
chosen
({
allow_single_deselect
:
true
,
no_results_text
:
"Không có kết quả cần tìm"
});
$
(
window
)
.
off
(
'resize.chosen'
)
.
on
(
'resize.chosen'
,
function
()
{
$
(
'.chosen-select'
).
each
(
function
()
{
var
$this
=
$
(
this
);
$this
.
next
().
css
({
'width'
:
$this
.
parent
().
width
()
});
})
}).
trigger
(
'resize.chosen'
);
//resize chosen on sidebar collapse/expand
$
(
document
).
on
(
'settings.ace.chosen'
,
function
(
e
,
event_name
,
event_val
)
{
if
(
event_name
!=
'sidebar_collapsed'
)
return
;
$
(
'.chosen-select'
).
each
(
function
()
{
var
$this
=
$
(
this
);
$this
.
next
().
css
({
'width'
:
$this
.
parent
().
width
()
});
})
});
});
</script>
\ No newline at end of file
application/views/backend/cms_track/edit_track_view.php
View file @
0a33c82e
...
@@ -108,7 +108,7 @@ $input_artist = array(
...
@@ -108,7 +108,7 @@ $input_artist = array(
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-lg-3"
>
Ảnh
nhạc sĩ
</label>
<label
class=
"col-lg-3"
>
Ảnh
Bài hát
</label>
<div
class=
"col-lg-3"
>
<div
class=
"col-lg-3"
>
<input
type=
"file"
name=
"avatar"
size=
"20"
/>
<input
type=
"file"
name=
"avatar"
size=
"20"
/>
</div>
</div>
...
...
application/views/backend/cms_track/show_track_view.php
View file @
0a33c82e
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<?php
if
(
isset
(
$track
[
0
]))
:
?>
<?php
if
(
isset
(
$track
[
0
]))
:
?>
<div
class=
"row"
>
<div
class=
"row"
>
<div
class=
"col-lg-2"
>
<div
class=
"col-lg-2"
>
<a
class=
"btn btn-sm btn-success"
href=
"
<?php
echo
base_url
(
'backend/cmsTrack/add
Track'
);
?>
"
><i
class=
"glyphicon-plus"
>
Thêm ca sĩ
</i></a>
<a
class=
"btn btn-sm btn-success"
href=
"
<?php
echo
base_url
(
'backend/cmsTrack/add
Singer/'
.
$track
[
0
][
'id'
]
);
?>
"
><i
class=
"glyphicon-plus"
>
Thêm ca sĩ
</i></a>
</div>
</div>
</div>
</div>
<br>
<br>
...
...
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