public function show_content()
 {
     $id = intval($_REQUEST['id']);
     $status = intval($_REQUEST['status']);
     $user = M("user")->getById($id);
     if ($status == 1) {
         $user['do_info'] = '审核通过';
     } elseif ($status == 3) {
         $user['do_info'] = '审核';
         $show_bnt = 3;
     } else {
         $user['do_info'] = '审核不通过';
     }
     $user['is_investor_name'] = get_investor($user['is_investor']);
     $user['investor_status_name'] = get_investor_status($user['investor_status']);
     $this->assign('user', $user);
     $this->assign('status', $status);
     $this->assign('show_bnt', $show_bnt);
     $this->display();
 }
Пример #2
0
 public function msg_invest_status($type, $dest, $user_info)
 {
     if ($type == 'email' && $user_info) {
         //邮件通知
         if (!empty($user_info['email'])) {
             $user_info['is_investor_name'] = get_investor($user_info['is_investor']);
             $user_info['investor_status_name'] = get_investor_status($user_info['investor_status']);
             $user_info['zc_type'] = "修改申请";
             if ($user_info['investor_status'] == 1) {
                 $user_info['verify_url'] = get_domain() . url("settings#invest_info");
                 $info = "您的投资人申请已经通过";
                 $info_url = "account#index";
             } else {
                 $user_info['verify_url'] = get_domain() . url("investor#index");
                 $info = "您的投资人申请未通过";
                 if ($user_info['investor_send_info']) {
                     $info .= ",理由是" . $user_info['investor_send_info'];
                 }
                 $info .= ",点击链接重新申请";
                 $info_url = "settings#security";
             }
             $this->user_info = $user_info;
             $msg_data['title'] = app_conf("SITE_NAME") . "帐号-" . $user_info['is_investor_name'] . $user_info['investor_status_name'];
             $msg_data['dest'] = $user_info['email'];
             $msg_data['user_id'] = $user_info['user_id'];
             $msg_data['is_html'] = 1;
             $msg_data['send_type'] = 1;
             $this->msg_reply('email', 'TPL_MAIL_INVESTOR_STATUS', $msg_data);
             $GLOBALS['db']->query("update " . DB_PREFIX . "user set investor_status_send=1 where id=" . $user_info['id']);
             $this->msg_notify($dest, $info, $info_url, '');
         }
     } elseif ($type == 'sms' && $user_info && app_conf("INVEST_STATUS_SEND_STATUS") == 2) {
         if (!empty($user_info['mobile'])) {
             $user_info['is_investor_name'] = get_investor($user_info['is_investor']);
             $user_info['investor_status_name'] = get_investor_status($user_info['investor_status']);
             if ($user_info['investor_status'] == 1) {
                 $user_info['verify_url'] = get_domain() . url("account#index");
                 $info = "您的投资人申请已经通过";
                 $info_url = "account#index";
             } else {
                 $user_info['verify_url'] = get_domain() . url("investor#index");
                 $info = "您的投资人申请未通过";
                 if ($user_info['investor_send_info']) {
                     $info .= ",理由是" . $user_info['investor_send_info'];
                 }
                 $info .= ",点击链接重新申请";
                 $info_url = "settings#security";
             }
             $this->user_info = $user_info;
             $msg_data['title'] = "短信通知-" . $user_info['is_investor_name'] . $user_info['investor_status_name'];
             $msg_data['dest'] = $user_info['mobile'];
             $msg_data['user_id'] = $user_info['user_id'];
             $msg_data['is_html'] = 0;
             $msg_data['send_type'] = 0;
             $this->msg_reply('sms', 'TPL_SMS_INVESTOR_STATUS', $msg_data);
             $GLOBALS['db']->query("update " . DB_PREFIX . "user set investor_status_send=1 where id=" . $user_info['id']);
             $this->msg_notify($dest, $info, $info_url, '');
         }
     }
 }