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
55dd0abc
Commit
55dd0abc
authored
Sep 04, 2024
by
iWallet Dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
KYC Referencing Enhancement
parent
bee0c369
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
24 deletions
+68
-24
logic.php
logic/setting/logic.php
+14
-7
reads.php
system/dat/reads.php
+30
-0
common.php
system/lib/common.php
+1
-9
AWSMangos3Bucket.php
system/lib/ext/aws/AWSMangos3Bucket.php
+5
-1
model.php
system/logic/account_edit/model.php
+8
-4
model.php
system/logic/kyc/model.php
+10
-3
No files found.
logic/setting/logic.php
View file @
55dd0abc
...
...
@@ -318,12 +318,13 @@ class LogicSetting extends SettingModelClass {
return
;
}
$userAccount
=
$this
->
getUserData
(
PARAM_USER_ACCOUNT
);
// ルートディレクトリを取得する
$path
=
$this
->
getKycDirectory
(
$
this
->
getUserData
(
PARAM_USER_ACCOUNT
)
);
$path
=
$this
->
getKycDirectory
(
$
userAccount
);
// 該当ディレクトリの確認
if
(
!
file_exists
(
$path
))
{
mkdir
(
$path
,
0777
);
mkdir
(
$path
,
0777
,
true
);
}
else
{
chmod
(
$path
,
0777
);
}
...
...
@@ -583,8 +584,10 @@ class LogicSetting extends SettingModelClass {
$this
->
accessModify
(
'UPDATE_KYC_FLG'
,
array
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
),
NO_COUNT
),
false
);
}
$keyPrefix
=
"kyc/"
.
substr
(
$userAccount
,
strlen
(
$userAccount
)
-
3
);
// syncing to bucket
AWSMangos3Bucket
::
getInstance
()
->
uploadDirectory
(
$path
);
AWSMangos3Bucket
::
getInstance
()
->
uploadDirectory
(
$path
,
$keyPrefix
);
}
/*-------------------------------------------------------------------------
...
...
@@ -601,11 +604,13 @@ class LogicSetting extends SettingModelClass {
$oldName
=
NO_STRING
;
$uploads
=
array
();
$path
=
$this
->
getKycDirectory
(
$this
->
getUserData
(
PARAM_USER_ACCOUNT
));
$userAccount
=
$this
->
getUserData
(
PARAM_USER_ACCOUNT
);
$path
=
$this
->
getKycDirectory
(
$userAccount
);
// 該当ディレクトリの確認
if
(
!
file_exists
(
$path
))
{
mkdir
(
$path
,
0777
);
mkdir
(
$path
,
0777
,
true
);
}
else
{
chmod
(
$path
,
0777
);
}
...
...
@@ -1044,8 +1049,10 @@ class LogicSetting extends SettingModelClass {
,
VAR_NOTICE_MAIL_ADDRESS
,
VAR_NOTICE_MAIL_ADDRESS
);
$keyPrefix
=
"kyc/"
.
substr
(
$userAccount
,
strlen
(
$userAccount
)
-
3
);
// syncing to bucket
AWSMangos3Bucket
::
getInstance
()
->
uploadDirectory
(
$path
);
AWSMangos3Bucket
::
getInstance
()
->
uploadDirectory
(
$path
,
$keyPrefix
);
}
}
...
...
system/dat/reads.php
0 → 100644
View file @
55dd0abc
<?php
require_once
"../lib/config.php"
;
class
reads
extends
System
{
private
static
$instance
;
public
function
__construct
(){
parent
::
__construct
();
$this
->
viewFile
();
}
private
function
viewFile
(){
$filekey
=
$this
->
getDataGet
(
"f"
);
if
(
!
AWSMangos3Bucket
::
getInstance
()
->
viewFile
(
$filekey
)){
http_response_code
(
404
);
echo
"404 Not Found"
;
}
}
public
static
function
render
(){
if
(
is_null
(
self
::
$instance
)){
self
::
$instance
=
new
reads
();
}
}
}
reads
::
render
();
\ No newline at end of file
system/lib/common.php
View file @
55dd0abc
...
...
@@ -4809,15 +4809,7 @@ class Common extends HtmlBuilder {
if
(
strlen
(
$account
)
==
VAL_INT_8
)
{
// アカウントの下3桁を取得する
$rtn
=
$root
.
substr
(
$account
,
VAL_INT_5
,
VAL_INT_3
);
// ディレクトリの存在確認
if
(
file_exists
(
$rtn
))
{
$rtn
.=
DELIMIT_SLASH
.
$account
;
}
else
{
$rtn
=
$root
.
$account
;
}
$rtn
=
$root
.
substr
(
$account
,
VAL_INT_5
,
VAL_INT_3
)
.
DELIMIT_SLASH
.
$account
;
}
else
{
$rtn
=
$root
.
$account
;
}
...
...
system/lib/ext/aws/AWSMangos3Bucket.php
View file @
55dd0abc
...
...
@@ -91,7 +91,7 @@ class AWSMangos3Bucket {
*
* @param string $directoryPath
*/
public
function
uploadDirectory
(
string
$directoryPath
){
public
function
uploadDirectory
(
string
$directoryPath
,
string
$keyPrefix
=
null
){
$files
=
new
RecursiveIteratorIterator
(
new
RecursiveDirectoryIterator
(
$directoryPath
));
foreach
(
$files
as
$file
){
...
...
@@ -99,6 +99,10 @@ class AWSMangos3Bucket {
$filekey
=
str_replace
(
"
\\
"
,
"/"
,
substr
(
$file
->
getPathname
(),
strrpos
(
$directoryPath
,
basename
(
$directoryPath
))));
if
(
!
is_null
(
$keyPrefix
)){
$filekey
=
"
{
$keyPrefix
}
/
{
$filekey
}
"
;
}
$this
->
uploadFile
(
$filekey
,
$file
->
getPathname
());
}
}
...
...
system/logic/account_edit/model.php
View file @
55dd0abc
...
...
@@ -2729,7 +2729,7 @@ class AccountEditModelClass extends ModelClassEx {
// 該当ディレクトリの確認
if
(
!
file_exists
(
$path
))
{
mkdir
(
$path
,
0777
);
mkdir
(
$path
,
0777
,
true
);
}
else
{
chmod
(
$path
,
0777
);
}
...
...
@@ -2983,7 +2983,9 @@ class AccountEditModelClass extends ModelClassEx {
$this
->
accessModify
(
'UPDATE_KYC_FLG'
,
array
(
$this
->
detailAccount
,
NO_COUNT
),
false
);
}
AWSMangos3Bucket
::
getInstance
()
->
uploadDirectory
(
$path
);
$keyPrefix
=
"kyc/"
.
substr
(
$this
->
detailAccount
,
strlen
(
$this
->
detailAccount
)
-
3
);
AWSMangos3Bucket
::
getInstance
()
->
uploadDirectory
(
$path
,
$keyPrefix
);
}
/*-------------------------------------------------------------------------
...
...
@@ -3003,7 +3005,7 @@ class AccountEditModelClass extends ModelClassEx {
$path
=
$this
->
getKycDirectory
(
$this
->
detailAccount
);
// 該当ディレクトリの確認
if
(
!
file_exists
(
$path
))
{
@
mkdir
(
$path
,
0777
);
@
mkdir
(
$path
,
0777
,
true
);
}
else
{
@
chmod
(
$path
,
0777
);
}
...
...
@@ -3399,7 +3401,9 @@ class AccountEditModelClass extends ModelClassEx {
$this
->
accessModify
(
'UPDATE_KYC_FLG'
,
array
(
$this
->
detailAccount
,
NO_COUNT
),
false
);
}
AWSMangos3Bucket
::
getInstance
()
->
uploadDirectory
(
$path
);
$keyPrefix
=
"kyc/"
.
substr
(
$this
->
detailAccount
,
strlen
(
$this
->
detailAccount
)
-
3
);
AWSMangos3Bucket
::
getInstance
()
->
uploadDirectory
(
$path
,
$keyPrefix
);
// アップロードファイルが存在したらメールを送信する
// if($this -> isLoopData($uploads)) {
...
...
system/logic/kyc/model.php
View file @
55dd0abc
...
...
@@ -579,8 +579,10 @@ class KYCModelClass extends ModelClassEx {
$filetype
=
$this
->
getFileType
(
$this
->
rs
[
$rCnt
+
$i
][
COLUMN_SAVE_FILENAME
]);
$keyPrefix
=
"kyc/"
.
substr
(
$this
->
userAccount
,
strlen
(
$this
->
userAccount
)
-
3
)
.
"/
{
$this
->
userAccount
}
"
;
$bucketKyc
=
AWSMangos3Bucket
::
getInstance
()
->
getPresignedBucketFile
(
"
{
$
this
->
userAccount
}
/
{
$this
->
rs
[
$rCnt
+
$i
][
COLUMN_SAVE_FILENAME
]
}
"
);
->
getPresignedBucketFile
(
"
{
$
keyPrefix
}
/
{
$this
->
rs
[
$rCnt
+
$i
][
COLUMN_SAVE_FILENAME
]
}
"
);
if
(
$filetype
==
'pdf'
){
$rtn
.=
'<td>'
...
...
@@ -662,8 +664,11 @@ class KYCModelClass extends ModelClassEx {
foreach
(
$this
->
rs
as
$row
)
{
$saveFilename
=
$this
->
getColumnData
(
$row
,
COLUMN_SAVE_FILENAME
);
}
//删除存在文件
AWSMangos3Bucket
::
getInstance
()
->
deleteFile
(
"
{
$this
->
userAccount
}
/
{
$saveFilename
}
"
);
$keyPrefix
=
"kyc/"
.
substr
(
$this
->
userAccount
,
strlen
(
$this
->
userAccount
)
-
3
)
.
"/
{
$this
->
userAccount
}
"
;
AWSMangos3Bucket
::
getInstance
()
->
deleteFile
(
"
{
$keyPrefix
}
/
{
$saveFilename
}
"
);
}
$this
->
accessModifyCommon
(
'DELETE_KYC_ADMIN_IMAGE_RECORDS'
,
array
(
$arr
[
0
]));
...
...
@@ -771,7 +776,9 @@ class KYCModelClass extends ModelClassEx {
if
(
$this
->
isLoopData
(
$this
->
rs
)){
foreach
(
$this
->
rs
as
$row
){
if
(
in_array
(
$row
[
'k_id'
],
$this
->
downArr
)){
$kycContent
=
file_get_contents
(
AWSMangos3Bucket
::
getInstance
()
->
getPresignedBucketFile
(
"
{
$this
->
userAccount
}
/
{
$row
[
'save_filename'
]
}
"
));
$keyPrefix
=
"kyc/"
.
substr
(
$this
->
userAccount
,
strlen
(
$this
->
userAccount
)
-
3
)
.
"/
{
$this
->
userAccount
}
"
;
$kycContent
=
file_get_contents
(
AWSMangos3Bucket
::
getInstance
()
->
getPresignedBucketFile
(
"
{
$keyPrefix
}
/
{
$row
[
'save_filename'
]
}
"
));
if
(
$kycContent
){
file_put_contents
(
$temp
.
DIRECTORY_SEPARATOR
.
$row
[
'save_filename'
],
$kycContent
);
...
...
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