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
dcd12eeb
Commit
dcd12eeb
authored
Mar 05, 2020
by
Phạm Văn Đoan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
đổi tên class model theo chuẩn ci3x
parent
957cf04a
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
177 additions
and
42 deletions
+177
-42
config.php
application/config/config.php
+5
-1
Account.php
application/controllers/backend/Account.php
+6
-6
AdminSetting.php
application/controllers/backend/AdminSetting.php
+8
-8
CmsArtist.php
application/controllers/backend/CmsArtist.php
+5
-5
CmsRanking.php
application/controllers/backend/CmsRanking.php
+125
-0
CmsSetting.php
application/controllers/backend/CmsSetting.php
+0
-0
CmsTrack.php
application/controllers/backend/CmsTrack.php
+7
-7
CmsUser.php
application/controllers/backend/CmsUser.php
+1
-1
Accessaction_model.php
application/models/Accessaction_model.php
+1
-1
Accesscontroller_model.php
application/models/Accesscontroller_model.php
+1
-1
Actionlog_model.php
application/models/Actionlog_model.php
+1
-1
Admin_model.php
application/models/Admin_model.php
+1
-1
Adminaccessaction_model.php
application/models/Adminaccessaction_model.php
+3
-3
Group_model.php
application/models/Group_model.php
+1
-1
Groupaccesscontroller_model.php
application/models/Groupaccesscontroller_model.php
+3
-3
Track_model.php
application/models/Track_model.php
+1
-1
User_model.php
application/models/User_model.php
+1
-1
Userlog_model.php
application/models/Userlog_model.php
+1
-1
admin_template_view.php
application/views/backend/admin_template_view.php
+6
-0
vmusicchart_20200305_v2.sql
data/vmusicchart_20200305_v2.sql
+0
-0
No files found.
application/config/config.php
View file @
dcd12eeb
...
@@ -40,7 +40,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
...
@@ -40,7 +40,11 @@ defined('BASEPATH') OR exit('No direct script access allowed');
| path to your installation.
| path to your installation.
|
|
*/
*/
$config
[
'base_url'
]
=
'http://localhost/vmusicchart-cms/'
;
if
(
$_SERVER
[
'SERVER_NAME'
]
==
'localhost'
)
{
$config
[
'base_url'
]
=
'http://localhost/vmusicchart-cms/'
;
}
else
{
$config
[
'base_url'
]
=
'http://cms.vmusicchart.vn/'
;
}
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
...
...
application/controllers/backend/Account.php
View file @
dcd12eeb
...
@@ -14,8 +14,8 @@ class Account extends CI_Controller
...
@@ -14,8 +14,8 @@ class Account extends CI_Controller
parent
::
__construct
();
parent
::
__construct
();
date_default_timezone_set
(
"Asia/Ho_Chi_Minh"
);
date_default_timezone_set
(
"Asia/Ho_Chi_Minh"
);
//
//
$this
->
load
->
model
(
'
madmin
'
);
$this
->
load
->
model
(
'
admin_model
'
);
$this
->
load
->
model
(
'
muserlog
'
);
$this
->
load
->
model
(
'
userlog_model
'
);
}
}
public
function
index
()
public
function
index
()
...
@@ -44,7 +44,7 @@ class Account extends CI_Controller
...
@@ -44,7 +44,7 @@ class Account extends CI_Controller
}
else
{
}
else
{
$username
=
trim
(
$this
->
input
->
post
(
'txtUsername'
));
$username
=
trim
(
$this
->
input
->
post
(
'txtUsername'
));
$password
=
MyHelper
::
genKeyCode
(
trim
(
$this
->
input
->
post
(
'txtPassword'
)));
$password
=
MyHelper
::
genKeyCode
(
trim
(
$this
->
input
->
post
(
'txtPassword'
)));
$checkUserAdmin
=
$this
->
madmin
->
getUserAdminLogin
(
$username
,
$password
);
$checkUserAdmin
=
$this
->
admin_model
->
getUserAdminLogin
(
$username
,
$password
);
//MyHelper::echoPreDie($checkUserAdmin);
//MyHelper::echoPreDie($checkUserAdmin);
if
(
$checkUserAdmin
)
{
if
(
$checkUserAdmin
)
{
// Thiết lập session
// Thiết lập session
...
@@ -59,7 +59,7 @@ class Account extends CI_Controller
...
@@ -59,7 +59,7 @@ class Account extends CI_Controller
);
);
// Ghi log
// Ghi log
$user_log_id
=
$this
->
muserlog
->
add
(
'LOGIN/LOGOUT'
,
$this
->
input
->
post
(
'txtUsername'
),
'SUCCESS'
);
$user_log_id
=
$this
->
userlog_model
->
add
(
'LOGIN/LOGOUT'
,
$this
->
input
->
post
(
'txtUsername'
),
'SUCCESS'
);
$sessionData
[
'user_log_id'
]
=
$user_log_id
;
$sessionData
[
'user_log_id'
]
=
$user_log_id
;
$sessionData
[
'time_login'
]
=
date
(
'Y-m-d H:i:s'
);
$sessionData
[
'time_login'
]
=
date
(
'Y-m-d H:i:s'
);
$this
->
session
->
set_userdata
(
$sessionData
);
$this
->
session
->
set_userdata
(
$sessionData
);
...
@@ -68,7 +68,7 @@ class Account extends CI_Controller
...
@@ -68,7 +68,7 @@ class Account extends CI_Controller
redirect
(
base_url
(
'backend/home/index'
));
redirect
(
base_url
(
'backend/home/index'
));
}
else
{
}
else
{
// Ghi log
// Ghi log
$this
->
muserlog
->
add
(
'LOGIN'
,
$this
->
input
->
post
(
'txtUsername'
),
'FAILED'
);
$this
->
userlog_model
->
add
(
'LOGIN'
,
$this
->
input
->
post
(
'txtUsername'
),
'FAILED'
);
// Chuyển trang
// Chuyển trang
$this
->
session
->
set_flashdata
(
'loginErrorMsg'
,
'Đăng nhập không thành công!'
);
$this
->
session
->
set_flashdata
(
'loginErrorMsg'
,
'Đăng nhập không thành công!'
);
...
@@ -93,7 +93,7 @@ class Account extends CI_Controller
...
@@ -93,7 +93,7 @@ class Account extends CI_Controller
// Xóa session
// Xóa session
if
(
$this
->
session
->
userdata
(
'username'
))
{
if
(
$this
->
session
->
userdata
(
'username'
))
{
// Ghi log
// Ghi log
$this
->
muserlog
->
update
(
$this
->
session
->
userdata
(
'user_log_id'
),
$this
->
session
->
userdata
(
'time_login'
));
$this
->
userlog_model
->
update
(
$this
->
session
->
userdata
(
'user_log_id'
),
$this
->
session
->
userdata
(
'time_login'
));
// Xóa session
// Xóa session
$this
->
session
->
sess_destroy
();
$this
->
session
->
sess_destroy
();
}
}
...
...
application/controllers/backend/AdminSetting.php
View file @
dcd12eeb
...
@@ -13,20 +13,20 @@ class AdminSetting extends CI_Controller
...
@@ -13,20 +13,20 @@ class AdminSetting extends CI_Controller
//
//
date_default_timezone_set
(
"Asia/Ho_Chi_Minh"
);
date_default_timezone_set
(
"Asia/Ho_Chi_Minh"
);
//
//
$this
->
load
->
model
(
'
madmin
'
);
$this
->
load
->
model
(
'
admin_model
'
);
$this
->
load
->
model
(
'
mactionlog
'
);
$this
->
load
->
model
(
'
actionlog_model
'
);
//
//
}
}
//==================================================================================================================
//==================================================================================================================
public
function
changePassword
(
$id
){
public
function
changePassword
(
$id
){
$this
->
_data
[
'adminById'
]
=
$this
->
madmin
->
getById
(
$id
);
$this
->
_data
[
'adminById'
]
=
$this
->
admin_model
->
getById
(
$id
);
$userAdmin
=
$this
->
_data
[
'adminById'
];
$userAdmin
=
$this
->
_data
[
'adminById'
];
// Kiểm tra quyền sửa: nếu là dcv_super_admin thì chỉ người đó mới có quyền sửa
// Kiểm tra quyền sửa: nếu là dcv_super_admin thì chỉ người đó mới có quyền sửa
if
(
$this
->
session
->
userdata
(
'id'
)
!=
$id
){
if
(
$this
->
session
->
userdata
(
'id'
)
!=
$id
){
// Ghi log
// Ghi log
$this
->
mactionlog
->
add
(
'RESET_PASSWORD'
,
'Cố ý cập nhật mật khẩu người khác có ID='
.
$id
,
'madmin
'
,
'admin'
,
$id
);
$this
->
actionlog_model
->
add
(
'RESET_PASSWORD'
,
'Cố ý cập nhật mật khẩu người khác có ID='
.
$id
,
'AdminModel
'
,
'admin'
,
$id
);
//
//
$this
->
session
->
set_flashdata
(
'error'
,
'Bạn không có quyền cập nhật mật khẩu của user khác.'
);
$this
->
session
->
set_flashdata
(
'error'
,
'Bạn không có quyền cập nhật mật khẩu của user khác.'
);
redirect
(
base_url
()
.
'usersetting/changePassword/'
.
$this
->
session
->
userdata
(
'id'
));
redirect
(
base_url
()
.
'usersetting/changePassword/'
.
$this
->
session
->
userdata
(
'id'
));
...
@@ -77,10 +77,10 @@ class AdminSetting extends CI_Controller
...
@@ -77,10 +77,10 @@ class AdminSetting extends CI_Controller
$dataUpdate
=
array
();
$dataUpdate
=
array
();
if
(
trim
(
$this
->
input
->
post
(
'password'
))
!=
''
){
if
(
trim
(
$this
->
input
->
post
(
'password'
))
!=
''
){
$dataUpdate
[
'password'
]
=
MyHelper
::
genKeyCode
(
trim
(
$this
->
input
->
post
(
'password'
)));
$dataUpdate
[
'password'
]
=
MyHelper
::
genKeyCode
(
trim
(
$this
->
input
->
post
(
'password'
)));
$this
->
madmin
->
update
(
$id
,
$dataUpdate
);
$this
->
admin_model
->
update
(
$id
,
$dataUpdate
);
$this
->
session
->
set_flashdata
(
'success'
,
'Cập nhật thành công mật khẩu.'
);
$this
->
session
->
set_flashdata
(
'success'
,
'Cập nhật thành công mật khẩu.'
);
// Ghi log
// Ghi log
$this
->
mactionlog
->
add
(
'RESET_PASSWORD'
,
'Cập nhật mật khẩu người dùng'
,
'madmin
'
,
'admin'
,
$id
);
$this
->
actionlog_model
->
add
(
'RESET_PASSWORD'
,
'Cập nhật mật khẩu người dùng'
,
'AdminModel
'
,
'admin'
,
$id
);
//
//
}
}
redirect
(
base_url
(
'adminSetting/changePassword/'
.
$userAdmin
[
0
][
'id'
]));
redirect
(
base_url
(
'adminSetting/changePassword/'
.
$userAdmin
[
0
][
'id'
]));
...
@@ -101,14 +101,14 @@ class AdminSetting extends CI_Controller
...
@@ -101,14 +101,14 @@ class AdminSetting extends CI_Controller
// Kiểm tra quyền xem: chỉ xem thông tin của mình
// Kiểm tra quyền xem: chỉ xem thông tin của mình
if
(
$this
->
session
->
userdata
(
'id'
)
!=
$id
){
if
(
$this
->
session
->
userdata
(
'id'
)
!=
$id
){
// Ghi log
// Ghi log
$this
->
mactionlog
->
add
(
'SHOW_USER_INFO'
,
'Cố ý xem thông tin cá nhân người khác có ID='
.
$id
,
'madmin
'
,
'admin'
,
$id
);
$this
->
actionlog_model
->
add
(
'SHOW_USER_INFO'
,
'Cố ý xem thông tin cá nhân người khác có ID='
.
$id
,
'AdminModel
'
,
'admin'
,
$id
);
//
//
$this
->
session
->
set_flashdata
(
'error'
,
'Bạn không có quyền xem thông tin cá nhân người khác.'
);
$this
->
session
->
set_flashdata
(
'error'
,
'Bạn không có quyền xem thông tin cá nhân người khác.'
);
redirect
(
base_url
(
'adminSetting/userInfo/'
.
$this
->
session
->
userdata
(
'id'
)));
redirect
(
base_url
(
'adminSetting/userInfo/'
.
$this
->
session
->
userdata
(
'id'
)));
}
}
//
//
$this
->
_data
[
'adminById'
]
=
$this
->
madmin
->
getById
(
$id
);
$this
->
_data
[
'adminById'
]
=
$this
->
admin_model
->
getById
(
$id
);
//
//
$this
->
_data
[
'functionName'
]
=
'Người dùng hệ thống'
;
$this
->
_data
[
'functionName'
]
=
'Người dùng hệ thống'
;
$this
->
_data
[
'action'
]
=
'userInfo'
;
$this
->
_data
[
'action'
]
=
'userInfo'
;
...
...
application/controllers/backend/CmsArtist.php
View file @
dcd12eeb
...
@@ -14,8 +14,8 @@ class CmsArtist extends CI_Controller
...
@@ -14,8 +14,8 @@ class CmsArtist extends CI_Controller
parent
::
__construct
();
parent
::
__construct
();
date_default_timezone_set
(
"Asia/Ho_Chi_Minh"
);
date_default_timezone_set
(
"Asia/Ho_Chi_Minh"
);
//
//
$this
->
load
->
model
(
'
muser
'
);
$this
->
load
->
model
(
'
user_model
'
);
$this
->
load
->
model
(
'
mactionlog
'
);
$this
->
load
->
model
(
'
actionlog_model
'
);
}
}
public
function
listArtist
()
public
function
listArtist
()
...
@@ -38,9 +38,9 @@ class CmsArtist extends CI_Controller
...
@@ -38,9 +38,9 @@ class CmsArtist extends CI_Controller
$limit
=
25
;
$limit
=
25
;
$offset
=
(
$pageId
-
1
)
*
$limit
;
$offset
=
(
$pageId
-
1
)
*
$limit
;
$data
[
'offset'
]
=
(
$pageId
-
1
)
*
$limit
;
$data
[
'offset'
]
=
(
$pageId
-
1
)
*
$limit
;
$totalRecord
=
$this
->
muser
->
cmsCountAll
(
$fByName
);
$totalRecord
=
$this
->
user_model
->
cmsCountAll
(
$fByName
);
$data
[
'pagination'
]
=
MyHelper
::
genPaginationLink
(
$totalRecord
,
$limit
,
$pageId
);
$data
[
'pagination'
]
=
MyHelper
::
genPaginationLink
(
$totalRecord
,
$limit
,
$pageId
);
$data
[
'listData'
]
=
$this
->
muser
->
cmsGetPagination
(
$limit
,
$offset
,
$fByName
);
$data
[
'listData'
]
=
$this
->
user_model
->
cmsGetPagination
(
$limit
,
$offset
,
$fByName
);
//
//
$this
->
load
->
view
(
'backend/ajax/cms_artist/list_artist_view'
,
$data
);
$this
->
load
->
view
(
'backend/ajax/cms_artist/list_artist_view'
,
$data
);
}
}
...
@@ -111,7 +111,7 @@ class CmsArtist extends CI_Controller
...
@@ -111,7 +111,7 @@ class CmsArtist extends CI_Controller
public
function
showUser
(
$user_id
)
public
function
showUser
(
$user_id
)
{
{
$this
->
_data
[
'user'
]
=
$this
->
muser
->
getById
(
$user_id
);
$this
->
_data
[
'user'
]
=
$this
->
user_model
->
getById
(
$user_id
);
//
//
$this
->
_data
[
'functionName'
]
=
'Thông tin Người chơi'
;
$this
->
_data
[
'functionName'
]
=
'Thông tin Người chơi'
;
$this
->
_data
[
'action'
]
=
'showUser'
;
$this
->
_data
[
'action'
]
=
'showUser'
;
...
...
application/controllers/backend/CmsRanking.php
0 → 100644
View file @
dcd12eeb
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 25/12/2015
* Time: 2:22 CH
*/
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
class
CmsRanking
extends
CI_Controller
{
public
function
__construct
()
{
parent
::
__construct
();
date_default_timezone_set
(
"Asia/Ho_Chi_Minh"
);
//
$this
->
load
->
model
(
'track_model'
);
$this
->
load
->
model
(
'user_model'
);
$this
->
load
->
model
(
'actionlog_model'
);
}
public
function
listTrack
()
{
$this
->
_data
[
'functionName'
]
=
'Track'
;
$this
->
_data
[
'action'
]
=
'listTrack'
;
$this
->
_data
[
'titlePage'
]
=
'Track'
;
$this
->
_data
[
'loadPage'
]
=
'backend/cms_track/list_track_view'
;
$this
->
load
->
view
(
'backend/admin_template_view'
,
$this
->
_data
);
}
public
function
listTrackAjax
()
{
$data
=
array
();
$fByName
=
$this
->
input
->
post
(
'fByName'
);
$pageId
=
$this
->
input
->
post
(
'pageId'
);
//
$pageId
=
(
$pageId
==
0
)
?
1
:
$pageId
;
//
$limit
=
25
;
$offset
=
(
$pageId
-
1
)
*
$limit
;
$data
[
'offset'
]
=
(
$pageId
-
1
)
*
$limit
;
$totalRecord
=
$this
->
mtrack
->
cmsCountAll
(
$fByName
);
$data
[
'pagination'
]
=
MyHelper
::
genPaginationLink
(
$totalRecord
,
$limit
,
$pageId
);
$data
[
'listData'
]
=
$this
->
mtrack
->
cmsGetPagination
(
$limit
,
$offset
,
$fByName
);
//
$this
->
load
->
view
(
'backend/ajax/cms_track/list_track_view'
,
$data
);
}
public
function
editContest
(
$contest_id
)
{
$this
->
_data
[
'contest'
]
=
$contest
=
$this
->
mtrack
->
getById
(
$contest_id
);
// Kiểm tra trùng giá trị nếu thay đổi ở form
// Thiết lập validate
$this
->
form_validation
->
set_rules
(
'id'
,
'ID'
,
'trim'
);
$this
->
form_validation
->
set_rules
(
'date_limit'
,
'Số ngày diễn ra cuộc thi'
,
'trim|required|xss_clean'
);
$this
->
form_validation
->
set_rules
(
'date_from'
,
'Ngày bắt đầu diễn ra cuộc thi'
,
'trim|required|xss_clean'
);
$this
->
form_validation
->
set_message
(
'required'
,
'<li>Bắt buộc nhập, chọn.</li>'
);
$this
->
form_validation
->
set_message
(
'is_unique'
,
'<li>Đã tồn tại.</li>'
);
// Xử lý form đăng nhập
if
(
$this
->
form_validation
->
run
(
$this
)
==
false
)
{
$this
->
_data
[
'date_limit'
]
=
$this
->
input
->
post
(
'name'
);
$this
->
_data
[
'date_from'
]
=
$this
->
input
->
post
(
'description'
);
//
$this
->
_data
[
'functionName'
]
=
'QL Cuộc đua'
;
$this
->
_data
[
'action'
]
=
'editContest'
;
$this
->
_data
[
'titlePage'
]
=
'QL Cuộc đua'
;
$this
->
_data
[
'loadPage'
]
=
'backend/cms_track/edit_track_view'
;
$this
->
load
->
view
(
'backend/admin_template_view'
,
$this
->
_data
);
}
else
{
$date_limit
=
intval
(
trim
(
$this
->
input
->
post
(
'date_limit'
)));
$date_from
=
trim
(
$this
->
input
->
post
(
'date_from'
));
if
((
$date_limit
>=
7
)
&&
(
$date_limit
<=
50
)
&&
(
strtotime
(
$date_from
)
>=
strtotime
(
date
(
'Y-m-d'
,
time
())))){
$dataUpdate
=
array
(
'date_limit'
=>
$date_limit
,
'date_from'
=>
$date_from
,
'updated_at'
=>
date
(
"Y-m-d H:i:s"
)
);
$this
->
mtrack
->
update
(
$contest_id
,
$dataUpdate
);
// Cap nhat mang thoi gian ngay tham gia tu so ngay
for
(
$i
=
1
;
$i
<=
$date_limit
;
$i
++
){
$data_update_contest_details
=
array
(
'date_play'
=>
date
(
'Y-m-d'
,
strtotime
(
$date_from
)
+
(
$i
-
1
)
*
86400
)
);
$this
->
mcontest_details
->
update
(
$i
,
$data_update_contest_details
);
}
// Ghi log
$this
->
mactionlog
->
add
(
'UPDATED'
,
'Cập nhật Cuộc đua thành công!'
,
'Mactionlog'
,
'action_log'
,
$contest_id
);
//
$this
->
session
->
set_flashdata
(
'success'
,
'Cập nhật Cuộc đua thành công'
);
}
else
{
$this
->
session
->
set_flashdata
(
'error'
,
'Cập nhật Cuộc đua không thành công'
);
}
redirect
(
base_url
()
.
'backend/cmsContest/listContest'
);
}
}
public
function
showUser
(
$user_id
)
{
$this
->
_data
[
'user'
]
=
$this
->
muser
->
getById
(
$user_id
);
//
$this
->
_data
[
'functionName'
]
=
'Thông tin Người chơi'
;
$this
->
_data
[
'action'
]
=
'showUser'
;
$this
->
_data
[
'titlePage'
]
=
'Thông tin Người chơi'
;
$this
->
_data
[
'loadPage'
]
=
'backend/cms_user/show_user_view'
;
$this
->
load
->
view
(
'backend/admin_template_view'
,
$this
->
_data
);
}
}
\ No newline at end of file
application/controllers/backend/CmsSetting.php
View file @
dcd12eeb
This diff is collapsed.
Click to expand it.
application/controllers/backend/CmsTrack.php
View file @
dcd12eeb
...
@@ -14,9 +14,9 @@ class CmsTrack extends CI_Controller
...
@@ -14,9 +14,9 @@ class CmsTrack extends CI_Controller
parent
::
__construct
();
parent
::
__construct
();
date_default_timezone_set
(
"Asia/Ho_Chi_Minh"
);
date_default_timezone_set
(
"Asia/Ho_Chi_Minh"
);
//
//
$this
->
load
->
model
(
'
mtrack
'
);
$this
->
load
->
model
(
'
track_model
'
);
$this
->
load
->
model
(
'
muser
'
);
$this
->
load
->
model
(
'
user_model
'
);
$this
->
load
->
model
(
'
mactionlog
'
);
$this
->
load
->
model
(
'
actionlog_model
'
);
}
}
public
function
listTrack
()
public
function
listTrack
()
...
@@ -39,16 +39,16 @@ class CmsTrack extends CI_Controller
...
@@ -39,16 +39,16 @@ class CmsTrack extends CI_Controller
$limit
=
25
;
$limit
=
25
;
$offset
=
(
$pageId
-
1
)
*
$limit
;
$offset
=
(
$pageId
-
1
)
*
$limit
;
$data
[
'offset'
]
=
(
$pageId
-
1
)
*
$limit
;
$data
[
'offset'
]
=
(
$pageId
-
1
)
*
$limit
;
$totalRecord
=
$this
->
mtrack
->
cmsCountAll
(
$fByName
);
$totalRecord
=
$this
->
track_model
->
cmsCountAll
(
$fByName
);
$data
[
'pagination'
]
=
MyHelper
::
genPaginationLink
(
$totalRecord
,
$limit
,
$pageId
);
$data
[
'pagination'
]
=
MyHelper
::
genPaginationLink
(
$totalRecord
,
$limit
,
$pageId
);
$data
[
'listData'
]
=
$this
->
mtrack
->
cmsGetPagination
(
$limit
,
$offset
,
$fByName
);
$data
[
'listData'
]
=
$this
->
track_model
->
cmsGetPagination
(
$limit
,
$offset
,
$fByName
);
//
//
$this
->
load
->
view
(
'backend/ajax/cms_track/list_track_view'
,
$data
);
$this
->
load
->
view
(
'backend/ajax/cms_track/list_track_view'
,
$data
);
}
}
public
function
editContest
(
$contest_id
)
public
function
editContest
(
$contest_id
)
{
{
$this
->
_data
[
'contest'
]
=
$contest
=
$this
->
mtrack
->
getById
(
$contest_id
);
$this
->
_data
[
'contest'
]
=
$contest
=
$this
->
track_model
->
getById
(
$contest_id
);
// Kiểm tra trùng giá trị nếu thay đổi ở form
// Kiểm tra trùng giá trị nếu thay đổi ở form
// Thiết lập validate
// Thiết lập validate
...
@@ -91,7 +91,7 @@ class CmsTrack extends CI_Controller
...
@@ -91,7 +91,7 @@ class CmsTrack extends CI_Controller
'date_from'
=>
$date_from
,
'date_from'
=>
$date_from
,
'updated_at'
=>
date
(
"Y-m-d H:i:s"
)
'updated_at'
=>
date
(
"Y-m-d H:i:s"
)
);
);
$this
->
mtrack
->
update
(
$contest_id
,
$dataUpdate
);
$this
->
track_model
->
update
(
$contest_id
,
$dataUpdate
);
// Cap nhat mang thoi gian ngay tham gia tu so ngay
// Cap nhat mang thoi gian ngay tham gia tu so ngay
for
(
$i
=
1
;
$i
<=
$date_limit
;
$i
++
){
for
(
$i
=
1
;
$i
<=
$date_limit
;
$i
++
){
$data_update_contest_details
=
array
(
$data_update_contest_details
=
array
(
...
...
application/controllers/backend/CmsUser.php
View file @
dcd12eeb
...
@@ -14,7 +14,7 @@ class CmsUser extends CI_Controller
...
@@ -14,7 +14,7 @@ class CmsUser extends CI_Controller
parent
::
__construct
();
parent
::
__construct
();
date_default_timezone_set
(
"Asia/Ho_Chi_Minh"
);
date_default_timezone_set
(
"Asia/Ho_Chi_Minh"
);
//
//
$this
->
load
->
model
(
'muser'
);
$this
->
load
->
model
(
'muser
_model
'
);
}
}
public
function
listUser
()
public
function
listUser
()
...
...
application/models/
MAccessAction
.php
→
application/models/
Accessaction_model
.php
View file @
dcd12eeb
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
class
Maccessaction
extends
CI_Model
{
class
Accessaction_model
extends
CI_Model
{
protected
$_table
=
'access_action'
;
protected
$_table
=
'access_action'
;
public
function
__construct
(){
public
function
__construct
(){
...
...
application/models/
MAccessController
.php
→
application/models/
Accesscontroller_model
.php
View file @
dcd12eeb
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
class
Maccesscontroller
extends
CI_Model
{
class
Accesscontroller_model
extends
CI_Model
{
protected
$_table
=
'access_controller'
;
protected
$_table
=
'access_controller'
;
public
function
__construct
(){
public
function
__construct
(){
...
...
application/models/
MActionLog
.php
→
application/models/
Actionlog_model
.php
View file @
dcd12eeb
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
class
Mactionlog
extends
CI_Model
{
class
Actionlog_model
extends
CI_Model
{
protected
$_table
=
'action_log'
;
protected
$_table
=
'action_log'
;
public
function
__construct
(){
public
function
__construct
(){
...
...
application/models/
MAdmin
.php
→
application/models/
Admin_model
.php
View file @
dcd12eeb
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
class
Madmin
extends
CI_Model
{
class
Admin_model
extends
CI_Model
{
protected
$_table
=
'admin'
;
protected
$_table
=
'admin'
;
public
function
__construct
(){
public
function
__construct
(){
...
...
application/models/
MAdminAccessAction
.php
→
application/models/
Adminaccessaction_model
.php
View file @
dcd12eeb
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
class
Madminaccessaction
extends
CI_Model
{
class
Adminaccessaction_model
extends
CI_Model
{
protected
$_table
=
'admin_access_action'
;
protected
$_table
=
'admin_access_action'
;
public
function
__construct
(){
public
function
__construct
(){
...
@@ -60,7 +60,7 @@ class Madminaccessaction extends CI_Model {
...
@@ -60,7 +60,7 @@ class Madminaccessaction extends CI_Model {
}
}
public
function
getListPermissionForMenu
(){
public
function
getListPermissionForMenu
(){
$this
->
load
->
model
(
'
madmin
'
);
$this
->
load
->
model
(
'
AdminModel
'
);
$admin_id
=
$this
->
session
->
userdata
(
'id'
);
$admin_id
=
$this
->
session
->
userdata
(
'id'
);
$this
->
db
->
select
(
'aa.name'
);
$this
->
db
->
select
(
'aa.name'
);
...
@@ -78,7 +78,7 @@ class Madminaccessaction extends CI_Model {
...
@@ -78,7 +78,7 @@ class Madminaccessaction extends CI_Model {
}
}
public
function
getCountActionInControllerAssigned
(){
public
function
getCountActionInControllerAssigned
(){
$this
->
load
->
model
(
'
madmin
'
);
$this
->
load
->
model
(
'
AdminModel
'
);
$admin_id
=
$this
->
session
->
userdata
(
'id'
);
$admin_id
=
$this
->
session
->
userdata
(
'id'
);
$adminInfo
=
$this
->
madmin
->
getById
(
$admin_id
);
$adminInfo
=
$this
->
madmin
->
getById
(
$admin_id
);
...
...
application/models/
MGroup
.php
→
application/models/
Group_model
.php
View file @
dcd12eeb
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
class
Mgroup
extends
CI_Model
{
class
Group_model
extends
CI_Model
{
protected
$_table
=
'group'
;
protected
$_table
=
'group'
;
public
function
__construct
(){
public
function
__construct
(){
...
...
application/models/
MGroupAccessController
.php
→
application/models/
Groupaccesscontroller_model
.php
View file @
dcd12eeb
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
class
Mgroupaccesscontroller
extends
CI_Model
{
class
Groupaccesscontroller_model
extends
CI_Model
{
protected
$_table
=
'group_access_controller'
;
protected
$_table
=
'group_access_controller'
;
public
function
__construct
(){
public
function
__construct
(){
...
@@ -40,7 +40,7 @@ class Mgroupaccesscontroller extends CI_Model {
...
@@ -40,7 +40,7 @@ class Mgroupaccesscontroller extends CI_Model {
* @return array
* @return array
*/
*/
public
function
getControllerNameAssigned
(){
public
function
getControllerNameAssigned
(){
$this
->
load
->
model
(
'
madmin
'
);
$this
->
load
->
model
(
'
AdminModel
'
);
$admin_id
=
$this
->
session
->
userdata
(
'id'
);
$admin_id
=
$this
->
session
->
userdata
(
'id'
);
$adminInfo
=
$this
->
madmin
->
getById
(
$admin_id
);
$adminInfo
=
$this
->
madmin
->
getById
(
$admin_id
);
...
@@ -64,7 +64,7 @@ class Mgroupaccesscontroller extends CI_Model {
...
@@ -64,7 +64,7 @@ class Mgroupaccesscontroller extends CI_Model {
}
}
public
function
getCountActionInControllerAssigned
(){
public
function
getCountActionInControllerAssigned
(){
$this
->
load
->
model
(
'
madmin
'
);
$this
->
load
->
model
(
'
AdminModel
'
);
$admin_id
=
$this
->
session
->
userdata
(
'id'
);
$admin_id
=
$this
->
session
->
userdata
(
'id'
);
$adminInfo
=
$this
->
madmin
->
getById
(
$admin_id
);
$adminInfo
=
$this
->
madmin
->
getById
(
$admin_id
);
...
...
application/models/
Mtrack
.php
→
application/models/
Track_model
.php
View file @
dcd12eeb
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
class
Mtrack
extends
CI_Model
class
Track_model
extends
CI_Model
{
{
protected
$_table
=
'tracks'
;
protected
$_table
=
'tracks'
;
...
...
application/models/
MUser
.php
→
application/models/
User_model
.php
View file @
dcd12eeb
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
class
Muser
extends
CI_Model
class
User_model
extends
CI_Model
{
{
protected
$_table
=
'users'
;
protected
$_table
=
'users'
;
...
...
application/models/
MUserLog
.php
→
application/models/
Userlog_model
.php
View file @
dcd12eeb
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
<?php
if
(
!
defined
(
'BASEPATH'
))
exit
(
'No direct script access allowed'
);
class
MUserLog
extends
CI_Model
{
class
Userlog_model
extends
CI_Model
{
protected
$_table
=
'user_log'
;
protected
$_table
=
'user_log'
;
public
function
__construct
(){
public
function
__construct
(){
...
...
application/views/backend/admin_template_view.php
View file @
dcd12eeb
...
@@ -144,6 +144,12 @@ $action = $CI->router->fetch_method();
...
@@ -144,6 +144,12 @@ $action = $CI->router->fetch_method();
<ul
class=
"submenu"
>
<ul
class=
"submenu"
>
<li
class=
"
<?php
if
(
$action
&&
(
in_array
(
$action
,
array
(
'listGame'
,
'addGame'
,
'editGame'
))))
echo
'active'
?>
"
>
<li
class=
"
<?php
if
(
$action
&&
(
in_array
(
$action
,
array
(
'listGame'
,
'addGame'
,
'editGame'
))))
echo
'active'
?>
"
>
<a
href=
"
<?php
echo
base_url
(
'backend/cmsStatistic/listGame'
);
?>
"
>
<a
href=
"
<?php
echo
base_url
(
'backend/cmsStatistic/listGame'
);
?>
"
>
<i
class=
"menu-icon fa fa-caret-right"
></i>
BXH Ngày
</a>
<b
class=
"arrow"
></b>
</li>
<li
class=
"
<?php
if
(
$action
&&
(
in_array
(
$action
,
array
(
'listGame'
,
'addGame'
,
'editGame'
))))
echo
'active'
?>
"
>
<a
href=
"
<?php
echo
base_url
(
'backend/cmsStatistic/listGame'
);
?>
"
>
<i
class=
"menu-icon fa fa-caret-right"
></i>
BXH Tuần
<i
class=
"menu-icon fa fa-caret-right"
></i>
BXH Tuần
</a>
</a>
<b
class=
"arrow"
></b>
<b
class=
"arrow"
></b>
...
...
data/vmusicchart_20200305_v2.sql
0 → 100644
View file @
dcd12eeb
This diff is collapsed.
Click to expand it.
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