Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
iwl-live
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Anthony.Suerte
iwl-live
Commits
a8cab3fb
Commit
a8cab3fb
authored
Jan 14, 2022
by
Antonio.Suerte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
List Optimization: Operation Logs and History
parent
eb513459
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
30 deletions
+28
-30
DevTools.php
system/api/dev/DevTools.php
+6
-2
model.php
system/logic/admin_log/model.php
+10
-19
model.php
system/logic/login_history/model.php
+12
-9
No files found.
system/api/dev/DevTools.php
View file @
a8cab3fb
...
@@ -454,8 +454,10 @@ class DevTools extends DevComponents {
...
@@ -454,8 +454,10 @@ class DevTools extends DevComponents {
if
(
isset
(
$action
[
VAL_INT_1
])){
if
(
isset
(
$action
[
VAL_INT_1
])){
if
(
in_array
(
$action
[
VAL_INT_1
],
$containerContent
->
ip_address
)){
if
(
in_array
(
$action
[
VAL_INT_1
],
$containerContent
->
ip_address
)){
foreach
(
$containerContent
->
ip_address
as
$key
=>
$ipAddr
){
foreach
(
$containerContent
->
ip_address
as
$key
=>
$ipAddr
){
if
(
$ipAddr
==
$action
[
VAL_INT_1
])
if
(
$ipAddr
==
$action
[
VAL_INT_1
])
{
unset
(
$containerContent
->
ip_address
[
$key
]);
unset
(
$containerContent
->
ip_address
[
$key
]);
$containerContent
->
ip_address
=
array_values
(
$containerContent
->
ip_address
);
}
}
}
$toUpdateDebugContainer
=
true
;
$toUpdateDebugContainer
=
true
;
}
else
}
else
...
@@ -490,8 +492,10 @@ class DevTools extends DevComponents {
...
@@ -490,8 +492,10 @@ class DevTools extends DevComponents {
if
(
in_array
(
$action
[
VAL_INT_1
],
$queryMap
)){
if
(
in_array
(
$action
[
VAL_INT_1
],
$queryMap
)){
foreach
(
$containerContent
->
my_commands
as
$key
=>
$nested
){
foreach
(
$containerContent
->
my_commands
as
$key
=>
$nested
){
if
(
$nested
->
query_name
==
$action
[
VAL_INT_1
])
if
(
$nested
->
query_name
==
$action
[
VAL_INT_1
])
{
unset
(
$containerContent
->
my_commands
[
$key
]);
unset
(
$containerContent
->
my_commands
[
$key
]);
$containerContent
->
my_commands
=
array_values
(
$containerContent
->
my_commands
);
}
}
}
$toUpdateDebugContainer
=
true
;
$toUpdateDebugContainer
=
true
;
}
else
}
else
...
...
system/logic/admin_log/model.php
View file @
a8cab3fb
...
@@ -288,26 +288,19 @@ class AdminLogModelClass extends ModelClassEx {
...
@@ -288,26 +288,19 @@ class AdminLogModelClass extends ModelClassEx {
}
}
//search via status
//search via status
// if($this -> getType() == NO_STRING) { // 検索ボタンを押している場合
if
(
is_array
(
$this
->
category
))
{
$where
.=
' AND ('
;
if
(
is_array
(
$this
->
category
))
{
foreach
(
$this
->
category
as
$row
)
$category
[]
=
'login_history.transaction_type = (\')'
.
$row
.
'(\')'
;
$where
.=
' AND ('
;
$where
.=
implode
(
DELIMIT_OR
,
$category
)
.
')'
;
foreach
(
$this
->
category
as
$row
)
{
}
else
$category
[]
=
'login_history.transaction_type = (\')'
.
$row
.
'(\')'
;
$where
.=
'AND login_history.transaction_type != (\')'
.
NO_COUNT
.
'(\')'
;
}
$where
.=
implode
(
DELIMIT_OR
,
$category
)
.
')'
;
}
else
{
$where
.=
'AND login_history.transaction_type != (\')'
.
NO_COUNT
.
'(\')'
;
}
// }
if
(
$this
->
sDate
!=
NO_STRING
){
if
(
$this
->
sDate
!=
NO_STRING
){
//search via date (FROM)
//search via date (FROM)
if
(
$this
->
sFrom
!=
'2014/01/01'
if
(
$this
->
sFrom
!=
NO_STRING
)
{
&&
$this
->
sFrom
!=
NO_STRING
)
{
$where
.=
' AND login_history.create_time >= (\')'
.
str_replace
(
DELIMIT_SLASH
,
DELIMIT_HYPHEN
,
$this
->
sFrom
)
.
'(\')'
;
$where
.=
' AND login_history.create_time >= (\')'
.
str_replace
(
DELIMIT_SLASH
,
DELIMIT_HYPHEN
,
$this
->
sFrom
)
.
'(\')'
;
}
}
...
@@ -316,17 +309,15 @@ class AdminLogModelClass extends ModelClassEx {
...
@@ -316,17 +309,15 @@ class AdminLogModelClass extends ModelClassEx {
$where
.=
' AND login_history.create_time < DATE_ADD((\')'
.
str_replace
(
DELIMIT_SLASH
,
DELIMIT_HYPHEN
,
$this
->
sTo
)
.
'(\'), INTERVAL 1 DAY)'
;
$where
.=
' AND login_history.create_time < DATE_ADD((\')'
.
str_replace
(
DELIMIT_SLASH
,
DELIMIT_HYPHEN
,
$this
->
sTo
)
.
'(\'), INTERVAL 1 DAY)'
;
}
}
}
else
{
}
else
{
$where
.=
' AND login_history.create_time >= (\')'
.
'2014/01/01'
.
'(\')'
;
$where
.=
' AND login_history.create_time >= (\')'
.
date
(
'Y-m-01'
)
.
'(\')'
;
$where
.=
' AND login_history.create_time < DATE_ADD((\')'
.
date
(
'Y-m-d'
)
.
'(\'), INTERVAL 1 DAY)'
;
$where
.=
' AND login_history.create_time < DATE_ADD((\')'
.
date
(
'Y-m-d'
)
.
'(\'), INTERVAL 1 DAY)'
;
}
}
// ページ数
// ページ数
$start
=
(
$this
->
getTargetPage
()
-
VAL_INT_1
)
*
VAR_DEFAULT_PAGE_COUNT
;
$start
=
(
$this
->
getTargetPage
()
-
VAL_INT_1
)
*
VAR_DEFAULT_PAGE_COUNT
;
$end
=
$this
->
getTargetPage
()
*
VAR_DEFAULT_PAGE_COUNT
;
$page
=
' LIMIT '
.
$start
.
DELIMIT_COMMA
.
VAL_INT_50
;
$page
=
' LIMIT '
.
$start
.
DELIMIT_COMMA
.
VAL_INT_50
;
$rtn
[]
=
$where
;
$rtn
[]
=
$where
;
$rtn
[]
=
$page
;
$rtn
[]
=
$page
;
...
...
system/logic/login_history/model.php
View file @
a8cab3fb
...
@@ -123,29 +123,32 @@ class LoginHistoryModelClass extends ModelClassEx {
...
@@ -123,29 +123,32 @@ class LoginHistoryModelClass extends ModelClassEx {
}
}
if
(
$this
->
loginFlg
!=
NO_STRING
){
if
(
$this
->
loginFlg
!=
NO_STRING
){
// 登録時刻(開始日)(検索項目)
// 登録時刻(開始日)(検索項目)
if
(
$this
->
sFrom
!=
NO_STRING
)
{
if
(
$this
->
sFrom
!=
NO_STRING
)
$rtn
[]
=
' login_history.create_time >= (\')'
.
$this
->
sFrom
.
'(\')'
;
$rtn
[]
=
' login_history.create_time >= (\')'
.
$this
->
sFrom
.
'(\')'
;
}
// 登録時刻(終了)(検索項目)
// 登録時刻(終了)(検索項目)
if
(
$this
->
sTo
!=
NO_STRING
)
{
if
(
$this
->
sTo
!=
NO_STRING
)
$rtn
[]
=
' login_history.create_time < DATE_ADD((\')'
.
$this
->
sTo
.
'(\'), INTERVAL 1 DAY)'
;
$rtn
[]
=
' login_history.create_time < DATE_ADD((\')'
.
$this
->
sTo
.
'(\'), INTERVAL 1 DAY)'
;
}
}
else
{
$firstDayOfTheMonth
=
date
(
"Y-m-01"
);
$crrntDayOfTheMonth
=
date
(
"Y-m-d"
);
$rtn
[]
=
" login_history.create_time >= (')
{
$firstDayOfTheMonth
}
(') AND login_history.create_time <= DATE_ADD((')
{
$crrntDayOfTheMonth
}
('), INTERVAL 1 DAY)"
;
}
}
// ページ数
// ページ数
$start
=
(
$this
->
getTargetPage
()
-
VAL_INT_1
)
*
VAR_DEFAULT_PAGE_COUNT
;
$start
=
(
$this
->
getTargetPage
()
-
VAL_INT_1
)
*
VAR_DEFAULT_PAGE_COUNT
;
$end
=
$this
->
getTargetPage
()
*
VAR_DEFAULT_PAGE_COUNT
;
$page
=
' LIMIT '
.
$start
.
DELIMIT_COMMA
.
VAL_INT_50
;
$page
=
' LIMIT '
.
$start
.
DELIMIT_COMMA
.
VAL_INT_50
;
// 検索条件の結合
// 検索条件の結合
if
(
count
(
$rtn
)
>
NO_COUNT
)
{
if
(
count
(
$rtn
)
>
NO_COUNT
)
return
array
(
DELIMIT_AND
.
implode
(
DELIMIT_AND
,
$rtn
),
$page
);
return
array
(
DELIMIT_AND
.
implode
(
DELIMIT_AND
,
$rtn
),
$page
);
}
else
{
return
array
(
NO_STRING
,
$page
);
return
array
(
NO_STRING
,
$page
);
}
}
}
/*-------------------------------------------------------------------------
/*-------------------------------------------------------------------------
...
...
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