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
c426e26b
Commit
c426e26b
authored
Apr 23, 2020
by
Phạm Văn Đoan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbug lỗi ko up được sang src khác
parent
0e11d866
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
19 additions
and
12 deletions
+19
-12
CmsTrack.php
application/controllers/backend/CmsTrack.php
+4
-2
MyHelper.php
application/libraries/MyHelper.php
+5
-1
Track_model.php
application/models/Track_model.php
+2
-1
list_by_daily_view.php
...ion/views/backend/ajax/cms_ranking/list_by_daily_view.php
+1
-1
list_by_monthly_view.php
...n/views/backend/ajax/cms_ranking/list_by_monthly_view.php
+1
-1
list_by_weekly_view.php
...on/views/backend/ajax/cms_ranking/list_by_weekly_view.php
+1
-1
list_track_view.php
application/views/backend/ajax/cms_track/list_track_view.php
+1
-1
show_track_view.php
application/views/backend/cms_track/show_track_view.php
+1
-1
update_track_image_view.php
...ation/views/backend/cms_track/update_track_image_view.php
+1
-1
home_view.php
application/views/backend/home_view.php
+2
-2
No files found.
application/controllers/backend/CmsTrack.php
View file @
c426e26b
...
...
@@ -413,7 +413,7 @@ class CmsTrack extends CI_Controller
redirect
(
base_url
(
'backend/cmsTrack/showTrack/'
.
$track_id
));
}
$update
=
$this
->
privateUpdateTrackArt
(
$track_id
,
'track_image'
,
fals
e
);
$update
=
$this
->
privateUpdateTrackArt
(
$track_id
,
'track_image'
,
tru
e
);
if
(
$update
)
{
$this
->
session
->
set_flashdata
(
'success'
,
'Cập nhật ảnh bài hát thành công'
);
...
...
@@ -521,8 +521,10 @@ class CmsTrack extends CI_Controller
$db_art_path
=
''
;
$upload_path
=
'uploads/tracks/arts'
;
if
(
$is_same_src
)
{
$art_type
=
'same'
;
$upload_full_path
=
$upload_path
;
}
else
{
$art_type
=
'other'
;
$upload_full_path
=
'/home/aseanvn/public_html/vmusicchart.dcv.vn/'
.
$upload_path
;
}
...
...
@@ -538,7 +540,7 @@ class CmsTrack extends CI_Controller
if
(
$this
->
upload
->
do_upload
(
$track_image_field
))
{
$upload_data
=
$this
->
upload
->
data
();
$db_art_path
=
$upload_path
.
'/'
.
$upload_data
[
'file_name'
];
$this
->
track_model
->
update_art
(
$track_id
,
$db_art_path
);
$this
->
track_model
->
update_art
(
$track_id
,
$db_art_path
,
$art_type
);
return
true
;
}
...
...
application/libraries/MyHelper.php
View file @
c426e26b
...
...
@@ -768,7 +768,7 @@ class MyHelper
*
* @return string
*/
public
static
function
getArtByTrack
(
$art
,
$is_same_src
=
false
)
public
static
function
getArtByTrack
(
$art
,
$is_same_src
=
false
,
$art_type
=
'other'
)
{
$CI
=
&
get_instance
();
$default_image
=
base_url
(
'images/track.png'
);
...
...
@@ -776,7 +776,11 @@ class MyHelper
if
(
$is_same_src
)
{
$default_image
=
base_url
(
str_replace
(
'%w'
,
200
,
$art
));
}
else
{
if
(
$art_type
===
'other'
)
{
$default_image
=
$CI
->
config
->
item
(
'vmusicchart_url'
)
.
str_replace
(
'%w'
,
200
,
$art
);
}
else
{
$default_image
=
base_url
(
str_replace
(
'%w'
,
200
,
$art
));
}
}
}
return
$default_image
;
...
...
application/models/Track_model.php
View file @
c426e26b
...
...
@@ -110,9 +110,10 @@ class Track_model extends CI_Model
* @param $id
* @param $art_path
*/
public
function
update_art
(
$id
,
$art_path
)
public
function
update_art
(
$id
,
$art_path
,
$art_type
=
'same'
)
{
$this
->
db
->
set
(
'art'
,
$art_path
);
$this
->
db
->
set
(
'art_type'
,
$art_type
);
$this
->
db
->
where
(
'id'
,
$id
);
$this
->
db
->
update
(
$this
->
_table
);
}
...
...
application/views/backend/ajax/cms_ranking/list_by_daily_view.php
View file @
c426e26b
...
...
@@ -22,7 +22,7 @@
<td
style=
"text-align: center"
>
<?php
echo
MyHelper
::
getRankingCompare
(
$data
[
'track_id'
],
$data
[
'ranking'
],
$previousRanking
)
?>
</td>
<td
style=
"text-align: center"
><img
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$data
[
'art'
]);
?>
"
style=
"max-width: 50px; max-height: 50px"
></td>
<td
style=
"text-align: center"
><img
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$data
[
'art'
]
,
false
,
$data
[
'art_type'
]
);
?>
"
style=
"max-width: 50px; max-height: 50px"
></td>
<td
style=
"text-align: left"
>
<?php
echo
$data
[
'name_song'
];
?>
<br>
...
...
application/views/backend/ajax/cms_ranking/list_by_monthly_view.php
View file @
c426e26b
...
...
@@ -17,7 +17,7 @@
<td
style=
"text-align: center"
>
<?php
echo
MyHelper
::
getRankingCompare
(
$data
[
'track_id'
],
$data
[
'order'
],
$previousRanking
)
?>
</td>
<td
style=
"text-align: center"
><img
style=
"max-width: 50px"
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$data
[
'art'
]);
?>
"
></td>
<td
style=
"text-align: center"
><img
style=
"max-width: 50px"
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$data
[
'art'
]
,
false
,
$data
[
'art_type'
]
);
?>
"
></td>
<td
style=
"text-align: left"
>
<?php
echo
$data
[
'name_song'
];
?>
<br>
...
...
application/views/backend/ajax/cms_ranking/list_by_weekly_view.php
View file @
c426e26b
...
...
@@ -17,7 +17,7 @@
<td
style=
"text-align: center"
>
<?php
echo
MyHelper
::
getRankingCompare
(
$data
[
'track_id'
],
$data
[
'order'
],
$previousRanking
)
?>
</td>
<td
style=
"text-align: center"
><img
style=
"max-width: 50px"
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$data
[
'art'
]);
?>
"
></td>
<td
style=
"text-align: center"
><img
style=
"max-width: 50px"
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$data
[
'art'
]
,
false
,
$data
[
'art_type'
]
);
?>
"
></td>
<td
style=
"text-align: left"
>
<?php
echo
$data
[
'name_song'
];
?>
<br>
...
...
application/views/backend/ajax/cms_track/list_track_view.php
View file @
c426e26b
...
...
@@ -16,7 +16,7 @@
<tr>
<td
style=
"text-align: center"
>
<?php
echo
(
$key
+
1
+
$offset
);
?>
</td>
<td
style=
"text-align: center"
>
<img
style=
"max-width: 50px"
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$data
[
'art'
])
?>
"
>
<img
style=
"max-width: 50px"
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$data
[
'art'
]
,
false
,
$data
[
'art_type'
]
)
?>
"
>
</td>
<td
style=
"text-align: center"
>
<?php
echo
$data
[
'id'
];
?>
</td>
<td
style=
"text-align: left"
>
...
...
application/views/backend/cms_track/show_track_view.php
View file @
c426e26b
...
...
@@ -48,7 +48,7 @@
<div
class=
"profile-info-name"
>
Ảnh
</div>
<div
class=
"profile-info-value"
>
<span>
<img
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$track
[
0
][
'art'
],
false
)
?>
"
<img
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$track
[
0
][
'art'
],
false
,
$track
[
0
][
'art_type'
]
)
?>
"
style=
"max-width: 200px; max-height: 200px"
>
</span>
</div>
...
...
application/views/backend/cms_track/update_track_image_view.php
View file @
c426e26b
...
...
@@ -26,7 +26,7 @@
<div
class=
"form-group"
>
<label
class=
"col-lg-3"
>
Ảnh hiện tại
</label>
<div
class=
"col-lg-3"
>
<img
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$track
[
0
][
'art'
],
false
)
?>
"
style=
"max-width: 200px; max-height: 200px"
>
<img
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$track
[
0
][
'art'
],
false
,
$track
[
0
][
'art_type'
]
)
?>
"
style=
"max-width: 200px; max-height: 200px"
>
</div>
</div>
<div
class=
"form-group"
>
...
...
application/views/backend/home_view.php
View file @
c426e26b
...
...
@@ -44,7 +44,7 @@
<?php
foreach
(
$update_singer_list
as
$key
=>
$track
)
:
?>
<tr>
<td
style=
"text-align: center"
>
<?php
echo
(
$key
+
1
);
?>
</td>
<td
style=
"text-align: center"
><img
style=
"max-width: 50px"
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$track
[
'art'
]);
?>
"
></td>
<td
style=
"text-align: center"
><img
style=
"max-width: 50px"
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$track
[
'art'
]
,
false
,
$track
[
'art_type'
]
);
?>
"
></td>
<td
style=
"text-align: left"
title=
"
<?php
echo
$track
[
'title'
];
?>
"
>
<?php
echo
MyHelper
::
truncate
(
$track
[
'title'
]);
?>
<br>
...
...
@@ -95,7 +95,7 @@
<?php
foreach
(
$update_composer_list
as
$key
=>
$track
)
:
?>
<tr>
<td
style=
"text-align: center"
>
<?php
echo
(
$key
+
1
);
?>
</td>
<td
style=
"text-align: center"
><img
style=
"max-width: 50px"
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$track
[
'art'
]);
?>
"
></td>
<td
style=
"text-align: center"
><img
style=
"max-width: 50px"
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$track
[
'art'
]
,
false
,
$track
[
'art_type'
]
);
?>
"
></td>
<td
style=
"text-align: left"
title=
"
<?php
echo
$track
[
'title'
];
?>
"
>
<?php
echo
MyHelper
::
truncate
(
$track
[
'title'
]);
?>
<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