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
3bad412f
Commit
3bad412f
authored
Nov 26, 2021
by
Antonio.Suerte
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Admin Account Whitelisting
parent
f2c51c09
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
29 deletions
+47
-29
model.php
logic/withdraw/model.php
+19
-16
html_builder.php
system/lib/html_builder.php
+28
-13
No files found.
logic/withdraw/model.php
View file @
3bad412f
...
@@ -42,6 +42,7 @@ class WithdrawModelClass extends ModelClassEx {
...
@@ -42,6 +42,7 @@ class WithdrawModelClass extends ModelClassEx {
private
$province
=
null
;
//province (SDPay)
private
$province
=
null
;
//province (SDPay)
private
$city
=
null
;
//city (SDPay)
private
$city
=
null
;
//city (SDPay)
private
$withdrawTool
=
null
;
//withdrawal tool class (SDPay)
private
$withdrawTool
=
null
;
//withdrawal tool class (SDPay)
private
$administrativeExceptions
=
null
;
//user account whitelisting settings
/*-------------------------------------------------------------------------
/*-------------------------------------------------------------------------
* @function_name: コントロールパネルシステムindexモデルクラスコンストラクタ
* @function_name: コントロールパネルシステムindexモデルクラスコンストラクタ
...
@@ -122,6 +123,8 @@ class WithdrawModelClass extends ModelClassEx {
...
@@ -122,6 +123,8 @@ class WithdrawModelClass extends ModelClassEx {
//get account data
//get account data
$this
->
account
=
$this
->
getRowData
(
$this
->
getAccountCommon
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
)));
$this
->
account
=
$this
->
getRowData
(
$this
->
getAccountCommon
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
)));
$this
->
administrativeExceptions
=
$this
->
getSettingConfiguration
(
"administrative_exception"
);
//if moneyout solution is not null save it to session
//if moneyout solution is not null save it to session
if
(
$this
->
moneyoutSolution
!=
NO_STRING
&&
in_array
(
$this
->
moneyoutSolution
,
VAL_ARR_MONEYOUT_SOLUTIONS
)){
if
(
$this
->
moneyoutSolution
!=
NO_STRING
&&
in_array
(
$this
->
moneyoutSolution
,
VAL_ARR_MONEYOUT_SOLUTIONS
)){
$_SESSION
[
'moneyoutSolution'
]
=
$this
->
moneyoutSolution
;
$_SESSION
[
'moneyoutSolution'
]
=
$this
->
moneyoutSolution
;
...
@@ -2138,22 +2141,16 @@ class WithdrawModelClass extends ModelClassEx {
...
@@ -2138,22 +2141,16 @@ class WithdrawModelClass extends ModelClassEx {
//
//
// }
// }
}
}
public
function
getOutStatus
()
public
function
getOutStatus
()
{
{
$account
=
$this
->
getUserData
(
PARAM_USER_ACCOUNT
);
$rs
=
$this
->
getAccountCommon
(
$account
);
$row
=
$this
->
getRowData
(
$rs
);
$accountType
=
$this
->
getColumnData
(
$row
,
COLUMN_ACCOUNT_TYPE
);
$rtn
=
array
();
$rtn
=
array
();
$array_list_IBT
=
array
(
$userAccounts
=
array_map
(
function
(
$element
){
'81691034'
,
//Restine
return
$element
->
user_account
;
'42156169'
// New iWallet 会計用 Corporate
},
$this
->
administrativeExceptions
);
);
if
(
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$array_list_IBT
)){
if
(
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$userAccounts
)){
$method
=
getOutMoney
();
$method
=
getOutMoney
();
}
else
{
}
else
{
$method
=
getOouMoney
();
$method
=
getOouMoney
();
...
@@ -2214,11 +2211,17 @@ class WithdrawModelClass extends ModelClassEx {
...
@@ -2214,11 +2211,17 @@ class WithdrawModelClass extends ModelClassEx {
$this
->
popUpSessionMessage
(
ERROR
,
'E_ERROR_REGULAR_NUMBER'
,
array
(
VAL_STR_AMOUNT
));
$this
->
popUpSessionMessage
(
ERROR
,
'E_ERROR_REGULAR_NUMBER'
,
array
(
VAL_STR_AMOUNT
));
$rtn
=
false
;
$rtn
=
false
;
}
elseif
(
!
$this
->
CheckWithdrawMinimum
(
$this
->
currency
,
$this
->
amount
))
{
//check withdrawal minimum
}
elseif
(
!
$this
->
CheckWithdrawMinimum
(
$this
->
currency
,
$this
->
amount
))
{
//check withdrawal minimum
$userAccounts
=
array_map
(
function
(
$element
){
return
$element
->
user_account
;
},
$this
->
administrativeExceptions
);
if
(
!
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$userAccounts
)){
$exchange
=
$this
->
getExchangeCommon
(
VAL_INT_MINIMUM_WITHDRAW_AMOUNT
,
'USD'
,
$this
->
currency
,
$exchange
=
$this
->
getExchangeCommon
(
VAL_INT_MINIMUM_WITHDRAW_AMOUNT
,
'USD'
,
$this
->
currency
,
false
,
false
,
NO_STRING
,
$this
->
getUserData
(
PARAM_USER_ACCOUNT
));
// anton
false
,
false
,
NO_STRING
,
$this
->
getUserData
(
PARAM_USER_ACCOUNT
));
// anton
$this
->
popUpSessionMessage
(
ERROR
,
'E_ERROR_WITHDRAW_MINIMUM'
,
array
(
$this
->
currency
,
$exchange
[
PARAM_ORIGINAL_AMOUNT
]));
$this
->
popUpSessionMessage
(
ERROR
,
'E_ERROR_WITHDRAW_MINIMUM'
,
array
(
$this
->
currency
,
$exchange
[
PARAM_ORIGINAL_AMOUNT
]));
$rtn
=
false
;
$rtn
=
false
;
}
}
}
// check currency if in list of allowed currenicies
// check currency if in list of allowed currenicies
if
(
!
$this
->
checkWithdrawCurrency
(
$this
->
currency
,
$_SESSION
[
'moneyoutSolution'
])){
if
(
!
$this
->
checkWithdrawCurrency
(
$this
->
currency
,
$_SESSION
[
'moneyoutSolution'
])){
...
...
system/lib/html_builder.php
View file @
3bad412f
...
@@ -86,21 +86,36 @@ class HtmlBuilder extends DBAccess {
...
@@ -86,21 +86,36 @@ class HtmlBuilder extends DBAccess {
// 国一覧の取得
// 国一覧の取得
$countries
=
$this
->
getCountyList
();
$countries
=
$this
->
getCountyList
();
$account_nums
=
[
"42156169"
$exceptions
=
$this
->
getSettingConfiguration
(
"administrative_exception"
);
];
$account_nums
=
array_map
(
function
(
$element
){
return
$element
->
user_account
;
},
$exceptions
);
if
(
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$account_nums
)){
if
(
in_array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
$account_nums
)){
$countries
=
array_merge
(
$countries
,
[
$additionalCountryPairs
=
[];
[
PARAM_DATA_KEY
=>
"US"
,
foreach
(
$exceptions
as
$exception
){
PARAM_DATA_VALUE
=>
"United States of America"
if
(
$exception
->
user_account
==
$this
->
getUserData
(
PARAM_USER_ACCOUNT
)){
],
$additionals
=
(
Array
)
$exception
->
add_countries
;
[
PARAM_DATA_KEY
=>
"HK"
,
foreach
(
$additionals
as
$additional
){
PARAM_DATA_VALUE
=>
"Hong Kong"
$additional
=
(
Array
)
$additional
;
],
]);
foreach
(
$additional
as
$key
=>
$value
){
$additionalCountryPairs
[]
=
[
PARAM_DATA_KEY
=>
$key
,
PARAM_DATA_VALUE
=>
$value
];
}
}
break
;
}
}
$countries
=
array_merge
(
$countries
,
$additionalCountryPairs
);
uasort
(
$countries
,
function
(
$a
,
$b
)
{
uasort
(
$countries
,
function
(
$a
,
$b
)
{
return
strcmp
(
$a
[
PARAM_DATA_VALUE
],
$b
[
PARAM_DATA_VALUE
]);
return
strcmp
(
$a
[
PARAM_DATA_VALUE
],
$b
[
PARAM_DATA_VALUE
]);
...
...
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