|
@@ -6,19 +6,35 @@ use Dever;
|
|
|
|
|
|
class Account
|
|
|
{
|
|
|
- public function getInfo($id, $table = 'option/account')
|
|
|
+ public function getInfo($id)
|
|
|
{
|
|
|
if ($id < 0) {
|
|
|
return '无';
|
|
|
}
|
|
|
- $account = Dever::db($table)->find($id);
|
|
|
+ $account = Dever::db('option/account')->find($id);
|
|
|
if ($account) {
|
|
|
- $string = $account['name'] . '<br />' . $account['mobile'] . '<br />' . $account['idcard'] . '<br />' . $account['email'];
|
|
|
+ return Dever::load('option/lib/member')->getInfo($account['mid']);
|
|
|
+ } else {
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getEmail($id)
|
|
|
+ {
|
|
|
+ if ($id < 0) {
|
|
|
+ return '无';
|
|
|
+ }
|
|
|
+ $account = Dever::db('option/account')->find($id);
|
|
|
+ if ($account) {
|
|
|
+ $string = $account['email'];
|
|
|
+ if ($string) {
|
|
|
+ $string .= '<br />';
|
|
|
+ }
|
|
|
|
|
|
if ($account['is_email'] == 1) {
|
|
|
- $string .= '<br /><font style="color:blue">邮箱已验证</font>';
|
|
|
+ $string .= '<font style="color:blue">已验证</font>';
|
|
|
} else {
|
|
|
- $string .= '<br /><font style="color:red">邮箱未验证</font>';
|
|
|
+ $string .= '<font style="color:red">未验证</font>';
|
|
|
}
|
|
|
return $string;
|
|
|
|
|
@@ -90,57 +106,55 @@ class Account
|
|
|
*/
|
|
|
public function show()
|
|
|
{
|
|
|
- $aid = Dever::input('aid');
|
|
|
- $account = Dever::db('option/account')->one($aid);
|
|
|
+ $mid = Dever::input('mid');
|
|
|
|
|
|
- $config = Dever::db('option/account')->config['set'];
|
|
|
+ $member = Dever::db('option/member')->one($mid);
|
|
|
|
|
|
- $result['账户信息'] = $this->getShowInfo($account, $config);
|
|
|
+ $aid = $member['aid'];
|
|
|
|
|
|
- $button = array();
|
|
|
+ $account = Dever::db('option/account')->one($member['aid']);
|
|
|
|
|
|
- $button[0]['btn'][] = array
|
|
|
- (
|
|
|
- 'type' => 'edit',
|
|
|
- 'link' => Dever::url('project/database/update?project=option&table=account&where_id='.$account['id'].'&status=1&col=name,idcard,idcard_front,idcard_back', 'manage'),
|
|
|
- 'name' => '修改认证资料',
|
|
|
- );
|
|
|
- $url = '';
|
|
|
- if ($account['audit'] == 2) {
|
|
|
- $button[0]['btn'][] = array
|
|
|
- (
|
|
|
- 'type' => 'edit',
|
|
|
- 'link' => Dever::url('project/database/update?project=option&table=account&where_id='.$account['id'].'&status=1&col=audit,audit_desc', 'manage'),
|
|
|
- 'name' => '审核',
|
|
|
- );
|
|
|
- }
|
|
|
+ $config = Dever::db('option/account')->config['set'];
|
|
|
+ $member_config = Dever::db('option/member')->config['set'];
|
|
|
|
|
|
- if ($account['status'] == 3) {
|
|
|
- $button[0]['btn'][] = array
|
|
|
- (
|
|
|
- 'type' => 'action',
|
|
|
- 'link' => Dever::url('lib/account.setStatus?id=' . $account['id'] . '&value=2', 'option'),
|
|
|
- 'name' => '恢复账号',
|
|
|
- );
|
|
|
- } elseif ($account['status'] == 2) {
|
|
|
- $button[0]['btn'][] = array
|
|
|
- (
|
|
|
- 'type' => 'action',
|
|
|
- 'link' => Dever::url('lib/account.setStatus?id=' . $account['id'] . '&value=3', 'option'),
|
|
|
- 'name' => '禁用账号',
|
|
|
- );
|
|
|
+ $result['账户信息'] = $this->getMemberInfo($member, $member_config);
|
|
|
+
|
|
|
+ $search_audit = Dever::input('search_audit');
|
|
|
+ $option_aid = $aid;
|
|
|
+ if ($search_audit) {
|
|
|
+ $option_aid .= '&search_audit=' . $search_audit;
|
|
|
}
|
|
|
|
|
|
- $aid = $account['id'];
|
|
|
- if ($account['type'] == 1) {
|
|
|
-
|
|
|
- $parent = Dever::db('option/account')->find(array('type' => 2, 'key' => $account['key']));
|
|
|
- if ($parent) {
|
|
|
- $aid = $parent['id'];
|
|
|
- } else {
|
|
|
- $aid = false;
|
|
|
- }
|
|
|
+ $idcard_front = $idcard_back = '';
|
|
|
+ if ($account['idcard_front']) {
|
|
|
+ $idcard_front = '<a href="'.$account['idcard_front'].'" target="_blank"><img src="'.$account['idcard_front'].'" width="150" /></a>';
|
|
|
+ }
|
|
|
+
|
|
|
+ if ($account['idcard_back']) {
|
|
|
+ $idcard_back = ' <a href="'.$account['idcard_back'].'" target="_blank"><img src="'.$account['idcard_back'].'" width="150" /></a>';
|
|
|
}
|
|
|
+ if ($account['email']) {
|
|
|
+ $account['email'] .= '('.$config['is_email'][$account['is_email']].')';
|
|
|
+ }
|
|
|
+
|
|
|
+ $table = array();
|
|
|
+ $table['head'] = array('账户状态', '审核状态', '邮箱认证', '身份证正面', '身份证反面');
|
|
|
+ $table['body'] = array();
|
|
|
+
|
|
|
+ $table['body'][] = array
|
|
|
+ (
|
|
|
+ $config['status'][$account['status']],
|
|
|
+ $config['audit'][$account['audit']],
|
|
|
+ $account['email'],
|
|
|
+ $idcard_front,
|
|
|
+ $idcard_back,
|
|
|
+ );
|
|
|
+
|
|
|
+ $result['审核信息'] = array
|
|
|
+ (
|
|
|
+ 'type' => 'table',
|
|
|
+ 'content' => $table,
|
|
|
+ );
|
|
|
|
|
|
|
|
|
$cash_type = Dever::db('option/cash')->config['config_type'];
|
|
@@ -173,52 +187,79 @@ class Account
|
|
|
);
|
|
|
}
|
|
|
|
|
|
- if ($aid) {
|
|
|
- $search_type = Dever::input('search_type');
|
|
|
- $option_aid = $aid;
|
|
|
- if ($search_type) {
|
|
|
- $option_aid .= '&search_type=' . $search_type;
|
|
|
- }
|
|
|
+ $button = array();
|
|
|
+
|
|
|
+ $button[0]['btn'][] = array
|
|
|
+ (
|
|
|
+ 'type' => 'edit',
|
|
|
+ 'link' => Dever::url('project/database/update?project=option&table=member&where_id='.$account['mid'].'&status=1&col=name,idcard', 'manage'),
|
|
|
+ 'name' => '修改资料',
|
|
|
+ );
|
|
|
+
|
|
|
+ $url = '';
|
|
|
+ if ($account['audit'] == 2) {
|
|
|
$button[0]['btn'][] = array
|
|
|
(
|
|
|
'type' => 'edit',
|
|
|
- 'link' => Dever::url('project/database/update?project=option&table=push_cash&search_option_aid='.$option_aid, 'manage'),
|
|
|
- 'name' => '期权价值交付与发放',
|
|
|
+ 'link' => Dever::url('project/database/update?project=option&table=account&where_id='.$account['id'].'&status=1&col=audit,audit_desc', 'manage'),
|
|
|
+ 'name' => '审核',
|
|
|
);
|
|
|
+ }
|
|
|
|
|
|
- $button[1]['btn'][] = array
|
|
|
+ if ($account['status'] == 3) {
|
|
|
+ $button[0]['btn'][] = array
|
|
|
(
|
|
|
- 'type' => 'link',
|
|
|
- 'link' => Dever::url('project/database/list?project=option&table=bill_jiaofu&search_option_aid='.$option_aid.'', 'manage'),
|
|
|
- 'name' => '期权交付记录',
|
|
|
+ 'type' => 'action',
|
|
|
+ 'link' => Dever::url('lib/account.setStatus?id=' . $account['id'] . '&value=2', 'option'),
|
|
|
+ 'name' => '恢复账号',
|
|
|
);
|
|
|
-
|
|
|
- $button[1]['btn'][] = array
|
|
|
+ } elseif ($account['status'] == 2) {
|
|
|
+ $button[0]['btn'][] = array
|
|
|
(
|
|
|
- 'type' => 'link',
|
|
|
- 'link' => Dever::url('project/database/list?project=option&table=bill_fafang&search_option_aid='.$option_aid.'', 'manage'),
|
|
|
- 'name' => '期权发放记录',
|
|
|
+ 'type' => 'action',
|
|
|
+ 'link' => Dever::url('lib/account.setStatus?id=' . $account['id'] . '&value=3', 'option'),
|
|
|
+ 'name' => '禁用账号',
|
|
|
);
|
|
|
+ }
|
|
|
|
|
|
- $button[1]['btn'][] = array
|
|
|
- (
|
|
|
- 'type' => 'link',
|
|
|
- 'link' => Dever::url('project/database/list?project=option&table=bill_duifu&search_option_aid='.$option_aid.'', 'manage'),
|
|
|
- 'name' => '期权兑付记录',
|
|
|
- );
|
|
|
+ $button[0]['btn'][] = array
|
|
|
+ (
|
|
|
+ 'type' => 'link',
|
|
|
+ 'link' => Dever::url('project/database/list?project=option&table=agreement&search_option_aid='.$option_aid.'', 'manage'),
|
|
|
+ 'name' => '期权合同',
|
|
|
+ );
|
|
|
+
|
|
|
+ $button[0]['btn'][] = array
|
|
|
+ (
|
|
|
+ 'type' => 'edit',
|
|
|
+ 'link' => Dever::url('project/database/update?project=option&table=push_cash&search_option_mid='.$mid.'search_option_aid='.$option_aid, 'manage'),
|
|
|
+ 'name' => '期权价值交付与发放',
|
|
|
+ );
|
|
|
|
|
|
- $button[1]['btn'][] = array
|
|
|
- (
|
|
|
- 'type' => 'link',
|
|
|
- 'link' => Dever::url('project/database/list?project=option&table=agreement&search_option_aid='.$option_aid.'', 'manage'),
|
|
|
- 'name' => '期权合同',
|
|
|
- );
|
|
|
- }
|
|
|
+ $button[1]['btn'][] = array
|
|
|
+ (
|
|
|
+ 'type' => 'link',
|
|
|
+ 'link' => Dever::url('project/database/list?project=option&table=bill_jiaofu&search_option_mid='.$mid.'&search_option_aid='.$option_aid.'', 'manage'),
|
|
|
+ 'name' => '期权交付记录',
|
|
|
+ );
|
|
|
|
|
|
+ $button[1]['btn'][] = array
|
|
|
+ (
|
|
|
+ 'type' => 'link',
|
|
|
+ 'link' => Dever::url('project/database/list?project=option&table=bill_fafang&search_option_mid='.$mid.'&search_option_aid='.$option_aid.'', 'manage'),
|
|
|
+ 'name' => '期权发放记录',
|
|
|
+ );
|
|
|
+
|
|
|
+ $button[1]['btn'][] = array
|
|
|
+ (
|
|
|
+ 'type' => 'link',
|
|
|
+ 'link' => Dever::url('project/database/list?project=option&table=bill_duifu&search_option_mid='.$mid.'&search_option_aid='.$option_aid.'', 'manage'),
|
|
|
+ 'name' => '期权兑付记录',
|
|
|
+ );
|
|
|
|
|
|
$url = Dever::url('project/database/list?project=option&table=account', 'manage');
|
|
|
- if ($search_type) {
|
|
|
- $url .= '&search_option_type=' . $search_type;
|
|
|
+ if ($search_audit) {
|
|
|
+ $url .= '&search_option_audit=' . $search_audit;
|
|
|
}
|
|
|
$head_btn[] = array
|
|
|
(
|
|
@@ -237,23 +278,10 @@ class Account
|
|
|
return $html;
|
|
|
}
|
|
|
|
|
|
- private function getShowInfo($account, $config)
|
|
|
+ private function getMemberInfo($member, $member_config)
|
|
|
{
|
|
|
$result = array();
|
|
|
|
|
|
- $idcard_pic = '';
|
|
|
- if ($account['idcard_front']) {
|
|
|
- $idcard_pic = '<a href="'.$account['idcard_front'].'" target="_blank"><img src="'.$account['idcard_front'].'" width="150" /></a>';
|
|
|
- }
|
|
|
-
|
|
|
- if ($account['idcard_back']) {
|
|
|
- $idcard_pic .= ' <a href="'.$account['idcard_back'].'" target="_blank"><img src="'.$account['idcard_back'].'" width="150" /></a>';
|
|
|
- }
|
|
|
-
|
|
|
- if ($account['email']) {
|
|
|
- $account['email'] .= '('.$config['is_email'][$account['is_email']].')';
|
|
|
- }
|
|
|
-
|
|
|
$result = array
|
|
|
(
|
|
|
'type' => 'info',
|
|
@@ -261,26 +289,20 @@ class Account
|
|
|
(
|
|
|
array
|
|
|
(
|
|
|
- array('姓名', $account['name']),
|
|
|
- array('手机号', $account['mobile']),
|
|
|
- array('邮箱', $account['email']),
|
|
|
+ array('账户类型', $member_config['main'][$member['main']]),
|
|
|
+ array('账户索引', $member['key']),
|
|
|
+
|
|
|
),
|
|
|
|
|
|
array
|
|
|
(
|
|
|
- array('账户类型', $config['type'][$account['type']]),
|
|
|
- array('审核状态', $config['audit'][$account['audit']]),
|
|
|
- array('账户状态', $config['status'][$account['status']]),
|
|
|
+ array('姓名', $member['name']),
|
|
|
+ array('手机号', $member['mobile']),
|
|
|
+ array('身份证号', $member['idcard']),
|
|
|
),
|
|
|
),
|
|
|
);
|
|
|
|
|
|
- $result['content'][] = array
|
|
|
- (
|
|
|
- array('身份证号', $account['idcard']),
|
|
|
- array('身份证照片', $idcard_pic),
|
|
|
- );
|
|
|
-
|
|
|
return $result;
|
|
|
}
|
|
|
|
|
@@ -337,6 +359,12 @@ class Account
|
|
|
}
|
|
|
}
|
|
|
$daijiaofu .= '<br/ >' . number_format($total, 2, '.', '');
|
|
|
+ if (!$qiquan) {
|
|
|
+ $qiquan = '无';
|
|
|
+ }
|
|
|
+ if (!$yuanshiqiquan) {
|
|
|
+ $yuanshiqiquan = '无';
|
|
|
+ }
|
|
|
return array('daijiaofu' => $daijiaofu, 'qiquan' => $qiquan, 'yuanshiqiquan' => $yuanshiqiquan);
|
|
|
}
|
|
|
}
|