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
9e0aaa73
Commit
9e0aaa73
authored
Jan 24, 2022
by
Antonio.Suerte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CDS Popup Banner [Initial Commit]
parent
165d3712
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
137 additions
and
41 deletions
+137
-41
tmp_menu.php
en/template/tmp_menu.php
+13
-0
card-pop-up-JP-v2.jpg
img/card-pop-up-JP-v2.jpg
+0
-0
tmp_menu.php
ja/template/tmp_menu.php
+13
-0
menu.js
js/menu.js
+25
-15
controller.php
logic/menu/controller.php
+10
-7
logic.php
logic/menu/logic.php
+33
-0
sql.xml
system/lib/sql.xml
+19
-0
model.php
system/logic/admin_log/model.php
+16
-5
model.php
system/logic/admin_user/model.php
+1
-1
model.php
system/logic/login_history/model.php
+7
-13
No files found.
en/template/tmp_menu.php
View file @
9e0aaa73
...
...
@@ -72,6 +72,19 @@ include_once('template/base_head.php');
</div>
</div>
</div>
<div
id=
"popup_adv"
class=
"add-pop-cont"
>
<div
class=
"add-popup"
>
<a
href=
"https://www.iwl.hk/guide/card-guide.php"
target=
"_blank"
>
<img
src=
"../img/pop-up-banner.jpg"
>
</a>
<div
class=
"pt40 calign"
>
<a
class=
"add-pop-close btn bg-parent px180 m_btn"
>
Close
</a>
</div>
</div>
</div>
<!-- /メインカラム -->
</div>
<?php
include_once
(
'template/base_foot.php'
);
?>
...
...
img/card-pop-up-JP-v2.jpg
0 → 100644
View file @
9e0aaa73
This diff is collapsed.
Click to expand it.
ja/template/tmp_menu.php
View file @
9e0aaa73
...
...
@@ -64,6 +64,19 @@ include_once('template/base_head.php');
</div>
</div>
</div>
<div
id=
"popup_adv"
class=
"add-pop-cont"
>
<div
class=
"add-popup"
>
<a
href=
"https://www.iwl.hk/jp/guide/card-guide.php"
target=
"_blank"
>
<img
src=
"../img/card-pop-up-JP-v2.jpg"
>
</a>
<div
class=
"pt40 calign"
>
<a
class=
"add-pop-close btn bg-parent px180 m_btn"
>
閉じる
</a>
</div>
</div>
</div>
<!-- /メインカラム -->
</div>
<?php
include_once
(
'template/base_foot.php'
);
?>
...
...
js/menu.js
View file @
9e0aaa73
...
...
@@ -11,7 +11,7 @@
var
loc
=
window
.
location
.
pathname
;
if
(
loc
==
"
/ja/menu
"
||
loc
==
"
/ja/menu.php
"
||
loc
==
"
/en/menu
"
||
loc
==
"
/en/menu.php
"
)
{
if
(
loc
==
"
/ja/menu
"
||
loc
==
"
/ja/menu.php
"
)
{
var
slideIndex
=
Math
.
floor
((
Math
.
random
()
*
document
.
getElementsByClassName
(
"
mySlides
"
).
length
));
}
else
{
var
slideIndex
=
1
;
...
...
@@ -52,7 +52,6 @@ $(window).on('hashchange', function(e){
});
$
(
function
(){
$
(
'
.mySlides
'
).
click
(
function
()
{
$
.
ajax
({
url
:
'
../api/getAds.php
'
,
...
...
@@ -67,7 +66,18 @@ $(function(){
}
});
});
$
.
post
(
"
menu?type=advertisement
"
)
.
done
(
function
(
advflg
){
if
(
advflg
.
accountType
==
0
&&
advflg
.
adStatus
)
$
(
"
#popup_adv
"
).
addClass
(
"
active
"
)
})
$
(
'
.add-pop-close
'
).
click
(
function
(
e
)
{
$
(
"
.add-pop-cont
"
).
removeClass
(
"
active
"
)
})
});
logic/menu/controller.php
View file @
9e0aaa73
...
...
@@ -22,9 +22,6 @@ class ControlMenu extends LogicMenu {
* @return : なし
-------------------------------------------------------------------------*/
function
action
()
{
// 変数宣言部
$result
=
NO_STRING
;
try
{
$this
->
checkAvailability
(
"site"
,
function
(){
require_once
$this
->
getUserHTML
(
'TEMPLATE_MAINTENANCE_MODE_SITE_PATH'
);
...
...
@@ -32,10 +29,16 @@ class ControlMenu extends LogicMenu {
});
// アクション実行
$
result
=
$
this
->
logic
();
$this
->
logic
();
// 画面の表示
switch
(
$this
->
getType
()){
case
"advertisement"
:
$this
->
adsLogic
();
break
;
default
:
require_once
(
$this
->
getUserHTML
(
'TEMPLATE_MENU_PATH'
,
$this
->
dispHTML
()));
break
;
}
}
catch
(
Exception
$e
)
{
header
(
'Location: /'
.
$this
->
getLangage
()
.
'/login'
);
...
...
logic/menu/logic.php
View file @
9e0aaa73
...
...
@@ -37,6 +37,39 @@ class LogicMenu extends MenuModelClass {
}
}
public
function
adsLogic
(){
header
(
"Content-type:text/json;"
);
if
(
$this
->
getColumnData
(
$_SERVER
,
"REQUEST_METHOD"
)
!=
"POST"
)
throw
new
Exception
();
$account
=
$this
->
getRowData
(
$this
->
getAccountCommon
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
)));
$expirationDate
=
strtotime
(
"2022-04-01"
);
$result
=
$this
->
accessSelect
(
"SELECT_DEPOSIT_CDS_FOR_CHECKING"
,
[
$this
->
getUserData
(
PARAM_USER_ACCOUNT
)]);
$language
=
strtolower
(
$this
->
getLangage
());
$siteSessionPopupAdvertisement
=
isset
(
$_SESSION
[
SITE_USER_DATA
][
'adv_popup_session'
]);
$adStatus
=
(
!
$this
->
isLoopData
(
$this
->
getRowData
(
$result
))
&&
$expirationDate
>
strtotime
(
date
(
"Y-m-d"
))
&&
in_array
(
$language
,
[
"en"
,
"ja"
])
&&
!
$siteSessionPopupAdvertisement
);
if
(
!
$siteSessionPopupAdvertisement
&&
!
$this
->
isLoopData
(
$this
->
getRowData
(
$result
)))
$_SESSION
[
SITE_USER_DATA
][
"adv_popup_session"
]
=
VAL_INT_1
;
echo
json_encode
([
"accountType"
=>
$this
->
getColumnData
(
$account
,
PARAM_ACCOUNT_TYPE
),
"adStatus"
=>
$adStatus
]);
}
/*-------------------------------------------------------------------------
* @function_name: ロジックの実行
* @parameter : なし
...
...
system/lib/sql.xml
View file @
9e0aaa73
...
...
@@ -1612,6 +1612,25 @@
AND users.admin_flg = 0 AND users.status in (2,3,4,5,6,7)
</SELECT_DEPOSIT>
<!--
Advertisement Query
-->
<SELECT_DEPOSIT_CDS_FOR_CHECKING>
SELECT
transaction_number,
amount,
currency,
deposit_date,
fee
FROM
t_deposit
WHERE
user_account = '__ELEMENT01__'
AND
deposit_bank = 'Credit Card Deposit'
LIMIT 5
</SELECT_DEPOSIT_CDS_FOR_CHECKING>
<!--
入金の登録
登録値:口座番号
...
...
system/logic/admin_log/model.php
View file @
9e0aaa73
...
...
@@ -271,24 +271,30 @@ class AdminLogModelClass extends ModelClassEx {
$where
=
NO_STRING
;
$rtn
=
array
();
$category
=
array
();
$searching
=
false
;
// search name
if
(
$this
->
name
!=
NO_STRING
)
{
$searching
=
true
;
$where
.=
' AND (users_admin.last_name LIKE (\')%'
.
$this
->
name
.
'%(\') OR users_admin.first_name LIKE (\')%'
.
$this
->
name
.
'%(\'))'
;
}
// search details
if
(
$this
->
details
!=
NO_STRING
)
{
$searching
=
true
;
$where
.=
' AND (login_history.details LIKE (\')%'
.
$this
->
details
.
'%(\'))'
;
}
// search ip
if
(
$this
->
ip
!=
NO_STRING
)
{
$searching
=
true
;
$where
.=
' AND (login_history.ip_address LIKE (\')%'
.
$this
->
ip
.
'%(\'))'
;
}
//search via status
if
(
is_array
(
$this
->
category
))
{
$searching
=
true
;
$where
.=
' AND ('
;
foreach
(
$this
->
category
as
$row
)
...
...
@@ -301,14 +307,19 @@ class AdminLogModelClass extends ModelClassEx {
if
(
$this
->
sDate
!=
NO_STRING
){
//search via date (FROM)
if
(
$this
->
sFrom
!=
NO_STRING
)
{
$searching
=
true
;
$where
.=
' AND login_history.create_time >= (\')'
.
str_replace
(
DELIMIT_SLASH
,
DELIMIT_HYPHEN
,
$this
->
sFrom
)
.
'(\')'
;
}
//search via date (TO)
if
(
$this
->
sTo
!=
NO_STRING
)
{
$searching
=
true
;
$where
.=
' AND login_history.create_time < DATE_ADD((\')'
.
str_replace
(
DELIMIT_SLASH
,
DELIMIT_HYPHEN
,
$this
->
sTo
)
.
'(\'), INTERVAL 1 DAY)'
;
}
}
else
{
}
// default condition if there's nothing to search when fetching data
if
(
!
$searching
){
$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)'
;
}
...
...
system/logic/admin_user/model.php
View file @
9e0aaa73
...
...
@@ -551,7 +551,7 @@ class AdminUserModelClass extends ModelClassEx {
</tr>
<tr>
<th>'
.
VAL_STR_PASSWORD
.
'</th>
<td>
'
.
$this
->
getColumnData
(
$row
,
COLUMN_PASSWORD
)
.
'
</td>
<td>
<code>内緒</code>
</td>
</tr>'
;
}
}
else
{
...
...
system/logic/login_history/model.php
View file @
9e0aaa73
...
...
@@ -107,20 +107,13 @@ class LoginHistoryModelClass extends ModelClassEx {
$rtn
=
array
();
$page
=
NO_STRING
;
// ログインチェック
if
(
!
$this
->
checkAdminUserLogin
())
{
throw
new
Exception
(
NO_STRING
);
}
// 口座番号(検索項目)
if
(
$this
->
sUserAccout
!=
NO_STRING
)
{
if
(
$this
->
sUserAccout
!=
NO_STRING
)
$rtn
[]
=
' users.user_account = (\')'
.
$this
->
sUserAccout
.
'(\') '
;
}
// IPアドレス(検索項目)
if
(
$this
->
sIPAddress
!=
NO_STRING
)
{
if
(
$this
->
sIPAddress
!=
NO_STRING
)
$rtn
[]
=
' login_history.ip_address = (\')'
.
$this
->
sIPAddress
.
'(\') '
;
}
if
(
$this
->
loginFlg
!=
NO_STRING
){
...
...
@@ -131,8 +124,9 @@ class LoginHistoryModelClass extends ModelClassEx {
// 登録時刻(終了)(検索項目)
if
(
$this
->
sTo
!=
NO_STRING
)
$rtn
[]
=
' login_history.create_time < DATE_ADD((\')'
.
$this
->
sTo
.
'(\'), INTERVAL 1 DAY)'
;
}
}
else
{
if
(
!
$this
->
isLoopData
(
$rtn
))
{
$firstDayOfTheMonth
=
date
(
"Y-m-01"
);
$crrntDayOfTheMonth
=
date
(
"Y-m-d"
);
...
...
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