Commit 849d7da9 authored by Antonio.Suerte's avatar Antonio.Suerte

KYC List Enhancement

parent bd2d437c
......@@ -6457,8 +6457,29 @@ WHERE
counter > 0
ORDER BY
MAX(kyc.create_time) DESC
__ELEMENT02__
</LIST_KYC_ADMIN>
<COUNT_KYC_ADMIN>
SELECT COUNT(*) as counter from (
SELECT
COUNT(kyc.user_account) AS counter
FROM
v_users_active AS users
LEFT OUTER JOIN t_kyc AS kyc ON(
users.user_account = kyc.user_account
)
WHERE
kyc.user_account IS NOT NULL
AND users.kyc_validate_status != '99'
__ELEMENT01__
GROUP BY
users.user_account
HAVING
counter > 0
) as KYC_comp
</COUNT_KYC_ADMIN>
<!--
KYC確認書類の取得(1件)
......
......@@ -106,7 +106,10 @@ class LogicKYC extends KYCModelClass {
* @return : なし
-------------------------------------------------------------------------*/
function lists() {
$this -> setResult($this -> accessSelect('LIST_KYC_ADMIN', $this -> getWhere()));
$countData = $this -> getRowData($this -> accessSelect('COUNT_KYC_ADMIN', $this -> getWhere()));
$this -> setCount($this -> getColumnData($countData, COLUMN_COUNTER));
$this -> setResult($this -> accessSelect('LIST_KYC_ADMIN', $this -> getWhere(true)));
}
/*-------------------------------------------------------------------------
......
......@@ -23,7 +23,6 @@ class KYCModelClass extends ModelClassEx {
private $arrStatus = array();
private $arrSelectAll = array();
private $arrValidate = array();
//private $country;
/**
*
......@@ -31,6 +30,7 @@ class KYCModelClass extends ModelClassEx {
*
*/
private $lang = NO_STRING;
private $count = NO_COUNT;
/*-------------------------------------------------------------------------
......@@ -204,10 +204,10 @@ class KYCModelClass extends ModelClassEx {
-------------------------------------------------------------------------*/
function dispPager() {
echo $this -> getPagerCommon($this -> getTargetPage()
, $this -> getTotalPageCommon(VAR_DEFAULT_PAGE_COUNT, count($this -> rs))
, count($this -> rs)
, $this -> getTotalPageCommon(VAR_DEFAULT_PAGE_COUNT, $this -> count)
, $this -> count
, NO_STRING
, True);
, true);
}
/*-------------------------------------------------------------------------
......@@ -219,12 +219,21 @@ class KYCModelClass extends ModelClassEx {
$this -> rs = $rs;
}
/*-------------------------------------------------------------------------
* @function_name: 回数の設定
* @parameter : 回数
* @return : なし
-------------------------------------------------------------------------*/
public function setCount($count){
$this -> count = $count;
}
/*-------------------------------------------------------------------------
* @function_name: 検索条件の取得
* @parameter : 結果セット
* @return : 検索条件配列
-------------------------------------------------------------------------*/
function getWhere() {
function getWhere($applyLimit = false) {
// 変数宣言部
$where = NO_STRING;
......@@ -312,6 +321,12 @@ class KYCModelClass extends ModelClassEx {
}
$where .= ' '.$having;
$rtn[] = $where;
if($applyLimit){
$start = ($this -> getTargetPage() - VAL_INT_1) * VAR_DEFAULT_PAGE_COUNT;
$rtn[] = " LIMIT {$start}, ".VAL_INT_50;
}
return $rtn;
}
......@@ -346,9 +361,6 @@ class KYCModelClass extends ModelClassEx {
// 更新用户Comments与状态
function getDetailCondition(){
$rtn = array();
$statuses = array();
$updates = NO_STRING;
$where = NO_STRING;
if($this -> updateStatus != NO_STRING){
$rtn[] = $this -> updateStatus;
......@@ -383,7 +395,6 @@ class KYCModelClass extends ModelClassEx {
function getUpdateStatusParams($arr){
$rtn = array();
$statuses = array();
$rtn[] = $arr[VAL_INT_1];
$rtn[] = $arr[NO_COUNT];
return $rtn;
......@@ -424,21 +435,12 @@ class KYCModelClass extends ModelClassEx {
// 変数宣言部
$rtn = NO_STRING;
$exist = NO_STRING;
$err = NO_STRING;
$amount = NO_STRING;
$rout = NO_STRING;
if($this -> isLoopData($this -> rs)) {
// データの数だけループを回す
$start = ($this -> getTargetPage() - VAL_INT_1) * VAR_DEFAULT_PAGE_COUNT;
$end = $this -> getTargetPage() * VAR_DEFAULT_PAGE_COUNT;
$listCount = count($this -> rs);
for($cnt = $start; $cnt < $end && $cnt < $listCount; $cnt++) {
$row = $this -> getRowData($this -> rs, $cnt);
foreach($this -> rs as $row){
$rtn .= '<tr>'
. '<td>' . $this -> dispCountryCommon($this -> getColumnData($row , COLUMN_COUNTRY)) . '</td>'
// . '<td class="l"><a href="javascript:userDetail(\'' . $this -> getColumnData($row, COLUMN_USER_ACCOUNT) . '\', \'_blank\');">' . $this -> getColumnData($row, COLUMN_USER_NAME) . '</a></td>'
. '<td class="l"><a href="account_edit?detail_account=' . $this -> getColumnData($row, COLUMN_USER_ACCOUNT) . '">'. $this -> getColumnData($row, COLUMN_USER_NAME) .'</a></td>'
. '<td class="l">' . $this -> getNameCommon($this -> getColumnData($row, COLUMN_USER_ACCOUNT)) . '</td>'
. '<td>' . $this -> getColumnData($row, COLUMN_USER_ACCOUNT) . '</td>'
......@@ -451,9 +453,9 @@ class KYCModelClass extends ModelClassEx {
. '<td><input name="selectAll[]" value="'.$this -> getColumnData($row, COLUMN_USER_ACCOUNT).'" type="checkbox"></td>'
. '</tr>';
}
} else {
} else
$rtn = '<tr><td colspan="11">' . $this -> getMessage(INFO, 'I_NO_SUCHE_SEARCH_DATA', array()) . '</td></tr>';
}
echo $rtn;
}
......@@ -525,8 +527,6 @@ class KYCModelClass extends ModelClassEx {
function echoImageList(){
// 変数宣言部
$rtn = NO_STRING;
$btn = NO_STRING;
$cnt = NO_COUNT;
$base = NO_COUNT;
$rCnt = NO_COUNT;
$kycStatus = array();
......@@ -559,9 +559,6 @@ class KYCModelClass extends ModelClassEx {
for ($i = 0; $i <= 4; $i++) {
if(isset($this -> rs[$rCnt + $i][COLUMN_FILE_TYPE])) {
$s0 = NO_STRING;
$s1 = NO_STRING;
$row = $this -> getRowData($this -> rs, $rCnt + $i);
$key = $this -> getColumnData($row, COLUMN_K_ID) . DELIMIT_UNDER_BAR;
......@@ -631,7 +628,6 @@ class KYCModelClass extends ModelClassEx {
function updateImagesStatus($idStr){
// 変数宣言部
$rtn = NO_COUNT;
$arr = null;
// まずはパラメータを分割
$arr = explode(DELIMIT_UNDER_BAR, $idStr);
......@@ -651,7 +647,6 @@ class KYCModelClass extends ModelClassEx {
-------------------------------------------------------------------------*/
function deleteImage($idStr){
// 変数宣言部
$rtn = NO_COUNT;
$arr = null;
// まずはパラメータを分割
$arr = explode(DELIMIT_UNDER_BAR, $idStr);
......@@ -719,12 +714,14 @@ class KYCModelClass extends ModelClassEx {
public function getCheckValidateList(){
$str = '';
foreach($this -> arrValidate as $key=>$val){
$str .= '<label>';
$checked = '';
$checked = VAL_INT_99;
if(!empty($this -> arrStatus)){
foreach($this -> arrStatus as $k=>$v){
foreach($this -> arrStatus as $v){
if($key == $v){
$checked = $v;
break;
......@@ -789,7 +786,7 @@ class KYCModelClass extends ModelClassEx {
}
//処理制限時間を外す
set_time_limit(0);
foreach($arrTmp as $key=>$val){
foreach($arrTmp as $val){
$filename = basename($val);
//取得ファイルをZipに追加
$zip->addFromString($filename,file_get_contents(SYSTEM_PATH.$val));
......@@ -990,11 +987,9 @@ class KYCModelClass extends ModelClassEx {
* @return : なし
-------------------------------------------------------------------------*/
function makeExportData() {
// 変数宣言部
$data = NO_STRING;
$arr = null;
$intermediaryFlg = NO_STRING;
// まずはタイトル
header("Content-Type: text/html; charset=UTF-8");
......@@ -1042,10 +1037,8 @@ class KYCModelClass extends ModelClassEx {
$type = $this -> getType();
$rs = array();
$detail = array();
$oldStatus = array();
$where = NO_STRING;
$status = $this -> updateStatus;
$user = $this -> userAccount;
if($type == TYPE_UPDATE_ALL){
if(!empty($this -> arrSelectAll)){
......@@ -1097,9 +1090,7 @@ class KYCModelClass extends ModelClassEx {
$message = 'Saved without any changes';
}
}elseif($type == TYPE_SAVE_IMAGE){
$result = array();
}else if($type == TYPE_SAVE_IMAGE){
$kId = array();
$arr = array();
$rs = $this -> accessSelect('SELECT_USER_KYC', array($this -> userAccount));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment