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
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
20 additions
and
13 deletions
+20
-13
CmsTrack.php
application/controllers/backend/CmsTrack.php
+4
-2
MyHelper.php
application/libraries/MyHelper.php
+6
-2
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
...
@@ -413,7 +413,7 @@ class CmsTrack extends CI_Controller
redirect
(
base_url
(
'backend/cmsTrack/showTrack/'
.
$track_id
));
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
)
{
if
(
$update
)
{
$this
->
session
->
set_flashdata
(
'success'
,
'Cập nhật ảnh bài hát thành công'
);
$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
...
@@ -521,8 +521,10 @@ class CmsTrack extends CI_Controller
$db_art_path
=
''
;
$db_art_path
=
''
;
$upload_path
=
'uploads/tracks/arts'
;
$upload_path
=
'uploads/tracks/arts'
;
if
(
$is_same_src
)
{
if
(
$is_same_src
)
{
$art_type
=
'same'
;
$upload_full_path
=
$upload_path
;
$upload_full_path
=
$upload_path
;
}
else
{
}
else
{
$art_type
=
'other'
;
$upload_full_path
=
'/home/aseanvn/public_html/vmusicchart.dcv.vn/'
.
$upload_path
;
$upload_full_path
=
'/home/aseanvn/public_html/vmusicchart.dcv.vn/'
.
$upload_path
;
}
}
...
@@ -538,7 +540,7 @@ class CmsTrack extends CI_Controller
...
@@ -538,7 +540,7 @@ class CmsTrack extends CI_Controller
if
(
$this
->
upload
->
do_upload
(
$track_image_field
))
{
if
(
$this
->
upload
->
do_upload
(
$track_image_field
))
{
$upload_data
=
$this
->
upload
->
data
();
$upload_data
=
$this
->
upload
->
data
();
$db_art_path
=
$upload_path
.
'/'
.
$upload_data
[
'file_name'
];
$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
;
return
true
;
}
}
...
...
application/libraries/MyHelper.php
View file @
c426e26b
...
@@ -768,7 +768,7 @@ class MyHelper
...
@@ -768,7 +768,7 @@ class MyHelper
*
*
* @return string
* @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
();
$CI
=
&
get_instance
();
$default_image
=
base_url
(
'images/track.png'
);
$default_image
=
base_url
(
'images/track.png'
);
...
@@ -776,7 +776,11 @@ class MyHelper
...
@@ -776,7 +776,11 @@ class MyHelper
if
(
$is_same_src
)
{
if
(
$is_same_src
)
{
$default_image
=
base_url
(
str_replace
(
'%w'
,
200
,
$art
));
$default_image
=
base_url
(
str_replace
(
'%w'
,
200
,
$art
));
}
else
{
}
else
{
$default_image
=
$CI
->
config
->
item
(
'vmusicchart_url'
)
.
str_replace
(
'%w'
,
200
,
$art
);
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
;
return
$default_image
;
...
...
application/models/Track_model.php
View file @
c426e26b
...
@@ -110,9 +110,10 @@ class Track_model extends CI_Model
...
@@ -110,9 +110,10 @@ class Track_model extends CI_Model
* @param $id
* @param $id
* @param $art_path
* @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'
,
$art_path
);
$this
->
db
->
set
(
'art_type'
,
$art_type
);
$this
->
db
->
where
(
'id'
,
$id
);
$this
->
db
->
where
(
'id'
,
$id
);
$this
->
db
->
update
(
$this
->
_table
);
$this
->
db
->
update
(
$this
->
_table
);
}
}
...
...
application/views/backend/ajax/cms_ranking/list_by_daily_view.php
View file @
c426e26b
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
<td
style=
"text-align: center"
>
<td
style=
"text-align: center"
>
<?php
echo
MyHelper
::
getRankingCompare
(
$data
[
'track_id'
],
$data
[
'ranking'
],
$previousRanking
)
?>
<?php
echo
MyHelper
::
getRankingCompare
(
$data
[
'track_id'
],
$data
[
'ranking'
],
$previousRanking
)
?>
</td>
</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"
>
<td
style=
"text-align: left"
>
<?php
echo
$data
[
'name_song'
];
?>
<?php
echo
$data
[
'name_song'
];
?>
<br>
<br>
...
...
application/views/backend/ajax/cms_ranking/list_by_monthly_view.php
View file @
c426e26b
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<td
style=
"text-align: center"
>
<td
style=
"text-align: center"
>
<?php
echo
MyHelper
::
getRankingCompare
(
$data
[
'track_id'
],
$data
[
'order'
],
$previousRanking
)
?>
<?php
echo
MyHelper
::
getRankingCompare
(
$data
[
'track_id'
],
$data
[
'order'
],
$previousRanking
)
?>
</td>
</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"
>
<td
style=
"text-align: left"
>
<?php
echo
$data
[
'name_song'
];
?>
<?php
echo
$data
[
'name_song'
];
?>
<br>
<br>
...
...
application/views/backend/ajax/cms_ranking/list_by_weekly_view.php
View file @
c426e26b
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
<td
style=
"text-align: center"
>
<td
style=
"text-align: center"
>
<?php
echo
MyHelper
::
getRankingCompare
(
$data
[
'track_id'
],
$data
[
'order'
],
$previousRanking
)
?>
<?php
echo
MyHelper
::
getRankingCompare
(
$data
[
'track_id'
],
$data
[
'order'
],
$previousRanking
)
?>
</td>
</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"
>
<td
style=
"text-align: left"
>
<?php
echo
$data
[
'name_song'
];
?>
<?php
echo
$data
[
'name_song'
];
?>
<br>
<br>
...
...
application/views/backend/ajax/cms_track/list_track_view.php
View file @
c426e26b
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<tr>
<tr>
<td
style=
"text-align: center"
>
<?php
echo
(
$key
+
1
+
$offset
);
?>
</td>
<td
style=
"text-align: center"
>
<?php
echo
(
$key
+
1
+
$offset
);
?>
</td>
<td
style=
"text-align: center"
>
<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>
<td
style=
"text-align: center"
>
<?php
echo
$data
[
'id'
];
?>
</td>
<td
style=
"text-align: center"
>
<?php
echo
$data
[
'id'
];
?>
</td>
<td
style=
"text-align: left"
>
<td
style=
"text-align: left"
>
...
...
application/views/backend/cms_track/show_track_view.php
View file @
c426e26b
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<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'
],
false
)
?>
"
<img
src=
"
<?php
echo
MyHelper
::
getArtByTrack
(
$track
[
0
][
'art'
],
false
,
$track
[
0
][
'art_type'
]
)
?>
"
style=
"max-width: 200px; max-height: 200px"
>
style=
"max-width: 200px; max-height: 200px"
>
</span>
</span>
</div>
</div>
...
...
application/views/backend/cms_track/update_track_image_view.php
View file @
c426e26b
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-lg-3"
>
Ảnh hiện tại
</label>
<label
class=
"col-lg-3"
>
Ảnh hiện tại
</label>
<div
class=
"col-lg-3"
>
<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>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
...
...
application/views/backend/home_view.php
View file @
c426e26b
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
<?php
foreach
(
$update_singer_list
as
$key
=>
$track
)
:
?>
<?php
foreach
(
$update_singer_list
as
$key
=>
$track
)
:
?>
<tr>
<tr>
<td
style=
"text-align: center"
>
<?php
echo
(
$key
+
1
);
?>
</td>
<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'
];
?>
"
>
<td
style=
"text-align: left"
title=
"
<?php
echo
$track
[
'title'
];
?>
"
>
<?php
echo
MyHelper
::
truncate
(
$track
[
'title'
]);
?>
<?php
echo
MyHelper
::
truncate
(
$track
[
'title'
]);
?>
<br>
<br>
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
<?php
foreach
(
$update_composer_list
as
$key
=>
$track
)
:
?>
<?php
foreach
(
$update_composer_list
as
$key
=>
$track
)
:
?>
<tr>
<tr>
<td
style=
"text-align: center"
>
<?php
echo
(
$key
+
1
);
?>
</td>
<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'
];
?>
"
>
<td
style=
"text-align: left"
title=
"
<?php
echo
$track
[
'title'
];
?>
"
>
<?php
echo
MyHelper
::
truncate
(
$track
[
'title'
]);
?>
<?php
echo
MyHelper
::
truncate
(
$track
[
'title'
]);
?>
<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