From 0af6a53ba7edb6ea5e8d835f4ffff7b9543906d4 Mon Sep 17 00:00:00 2001
From: ELF <360197197@qq.com>
Date: Tue, 21 Apr 2020 15:53:45 +0800
Subject: [PATCH 01/62] =?UTF-8?q?=E5=90=8E=E5=8F=B0arpu=E5=8A=9F=E8=83=BD?=
=?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controller/ConsoleController.class.php | 1 -
.../Admin/Controller/StatController.class.php | 130 ++++++
Application/Admin/View/Stat/userarpu.html | 108 ++---
Application/Admin/View/Stat/userarpu_old.html | 407 ++++++++++++++++++
4 files changed, 577 insertions(+), 69 deletions(-)
create mode 100644 Application/Admin/View/Stat/userarpu_old.html
diff --git a/Application/Admin/Controller/ConsoleController.class.php b/Application/Admin/Controller/ConsoleController.class.php
index 7fd9fc095..fc7bef092 100644
--- a/Application/Admin/Controller/ConsoleController.class.php
+++ b/Application/Admin/Controller/ConsoleController.class.php
@@ -434,7 +434,6 @@ class ConsoleController extends Think {
$start = I('start', date('Y-m-d'));
$end = I('end', date('Y-m-d'));
$gameIds = I('game_ids', '');
-
$startTime = strtotime($start . ' 00:00:00');
$endTime = strtotime($end . ' 23:59:59');
$gameIdRows = explode(',', $gameIds);
diff --git a/Application/Admin/Controller/StatController.class.php b/Application/Admin/Controller/StatController.class.php
index 12b37a10a..3543c2d9b 100644
--- a/Application/Admin/Controller/StatController.class.php
+++ b/Application/Admin/Controller/StatController.class.php
@@ -672,6 +672,136 @@ AND UNIX_TIMESTAMP(
}
public function userarpu($p=0)
+ {
+ $start = I('start', date('Y-m-d'));
+ $end = I('end', date('Y-m-d'));
+ $gameIds = I('game_ids', '');
+ $promoteId = I('promote_id', 0);
+ $dataOrder = I('data_order', '');
+ $containBindCoins = I('contain_bind_coins', 0);
+
+ $orderType = '';
+ $order = 0;
+ if ($dataOrder != '') {
+ $dataOrderRow = explode(',', $dataOrder);
+ $order = $dataOrderRow[0];
+ $orderType = $dataOrderRow[1];
+ }
+
+ $promoteIds = [];
+ if ($promoteId > 0) {
+ $promote = M('promote', 'tab_')->field(['id', 'chain'])->where(['id' => $promoteId])->find();
+ $promoteIds = M('promote', 'tab_')->where(['chain' => ['like', $promote['chain'] . $promote['id'] . '/%']])->getField('id', true);
+ $promoteIds[] = $promote['id'];
+ }
+
+ $startTime = strtotime($start . ' 00:00:00');
+ $endTime = strtotime($end . ' 23:59:59');
+ $gameIdRows = $gameIds ? explode(',', $gameIds) : [];
+
+ $conditions = [];
+ if (count($gameIdRows)) {
+ $conditions['game_id'] = ['in', $gameIdRows];
+ }
+ if (count($promoteIds)) {
+ $conditions['promote_id'] = ['in', $promoteIds];
+ }
+ // 新增用户
+
+ /* M('user', 'tab_')
+ ->field('count(*) count, FROM_UNIXTIME(register_time, "%Y-%m-%d") date')
+ ->where([
+ 'game_id' => ['in', $gameIdRows],
+ 'register_time' => ['between', [$startTime, $endTime]]
+ ])
+ ->group('date')
+ ->select(); */
+
+ $newUsers = M('user_play', 'tab_')
+ ->field('count(DISTINCT user_id) count, FROM_UNIXTIME(create_time, "%Y-%m-%d") date')
+ ->where(array_merge($conditions, ['create_time' => ['between', [$startTime, $endTime]]]))
+ ->group('date')
+ ->select();
+ $newUsers = index_by_column('date', $newUsers);
+
+ // 活跃用户
+ $loginUsers = M('login_daily_record', 'tab_')
+ ->field('count(DISTINCT user_id) count, FROM_UNIXTIME(create_time, "%Y-%m-%d") date')
+ ->where(array_merge($conditions, ['create_time' => ['between', [$startTime, $endTime]]]))
+ ->group('date')
+ ->select();
+ $loginUsers = index_by_column('date', $loginUsers);
+
+ $spendConditions = array_merge($conditions, [
+ 'pay_time' => ['between', [$startTime, $endTime]],
+ 'pay_status' => 1,
+ ]);
+ if ($containBindCoins == 0) {
+ $spendConditions['pay_way'] = ['gt', -1];
+ }
+
+ // 付费玩家,付费金额
+ $payLogs = M('spend', 'tab_')
+ ->field('count(DISTINCT user_id) count, sum(pay_amount) amount, FROM_UNIXTIME(pay_time, "%Y-%m-%d") date')
+ ->where($spendConditions)
+ ->group('date')
+ ->select();
+ $payLogs = index_by_column('date', $payLogs);
+
+ $rows = [];
+ for ($time = $startTime; $time < $endTime; $time = $time + 24*3600) {
+ $date = date('Y-m-d', $time);
+ $newUser = isset($newUsers[$date]) ? $newUsers[$date]['count'] : 0;
+ $loginUser = isset($loginUsers[$date]) ? $loginUsers[$date]['count'] : 0;
+ $payAmount = isset($payLogs[$date]) ? $payLogs[$date]['amount'] : 0;
+ $payUser = isset($payLogs[$date]) ? $payLogs[$date]['count'] : 0;
+ $rows[] = [
+ 'date' => $date,
+ 'new_user' => $newUser,
+ 'login_user' => $loginUser,
+ 'pay_amount' => $payAmount,
+ 'pay_user' => $payUser,
+ 'pay_rate' => $loginUser > 0 ? (round($payUser / $loginUser * 100, 2)) : '0',
+ 'arpu' => $loginUser > 0 ? (round($payAmount / $loginUser, 2)) : '0.00',
+ 'arppu' => $payUser > 0 ? (round($payAmount / $payUser, 2)) : '0.00',
+ ];
+ }
+
+ if (I('export', 0) == 1) {
+ $fields = [
+ 'date' => '日期',
+ 'new_user' => '新增玩家',
+ 'login_user' => '活跃玩家',
+ 'pay_account' => '充值金额',
+ 'pay_user' => '付费玩家',
+ 'pay_rate' => '付费率',
+ 'arpu' => 'ARPU',
+ 'arppu' => 'ARPPU',
+ ];
+ foreach ($rows as &$item) {
+ $item['pay_rate'] = $item['pay_rate'] . '%';
+ }
+
+ addOperationLog(['op_type'=>3,'key'=>getNowDate(),'op_name'=>'ARPU分析','url'=>U('Stat/userarpu'),'menu'=>'统计-数据分析-ARPU分析']);
+
+ data2csv($rows, '数据分析_ARPU分析', $fields);
+ exit;
+ }
+
+ if ($dataOrder) {
+ $sort = $order == 3 ? SORT_DESC : SORT_ASC;
+ $orderColumn = array_column($rows, $orderType);
+ array_multisort($orderColumn, $sort, SORT_REGULAR, $rows);
+ }
+
+ $this->meta_title = 'ARPU统计';
+ $this->assign('records', $rows);
+ $this->assign('order', $order);
+ $this->assign('orderType', $orderType);
+ $this->display();
+ }
+
+ public function userarpu_old($p=0)
{
$request=$_REQUEST;
$page = intval($p);
diff --git a/Application/Admin/View/Stat/userarpu.html b/Application/Admin/View/Stat/userarpu.html
index de5c56d00..45e9da560 100644
--- a/Application/Admin/View/Stat/userarpu.html
+++ b/Application/Admin/View/Stat/userarpu.html
@@ -48,18 +48,18 @@
活跃玩家
当天登录的玩家总数
-
+
付费玩家
当天付费的玩家数量
-
+
付费率
付费玩家/活跃玩家
@@ -83,12 +83,12 @@
参与统计设置:
-
+
@@ -103,7 +103,7 @@
-
导出
+
导出
{$_page|default=''}
@@ -210,11 +182,11 @@
@@ -249,8 +221,8 @@ $(function(){
if(interval < 0 || start == ''){
layer.msg('请选择搜索时间');
return false;
- }else if(interval>90){
- layer.msg('请选择90日内的时间段');
+ }else if(interval>31){
+ layer.msg('请选择31日内的时间段');
return false;
}
@@ -283,8 +255,8 @@ $(function(){
$(".paixu").click(function(){
var that=$(this);
$data_order=that.attr('data-order');
- $order_type='{$userarpu_order}';
- if($order_type==''||$order_type=='4'){
+ $order_type='{$order}';
+ if($order_type==0||$order_type=='4'){
$(".sortBy").attr('name','data_order');
val='3,'+$data_order;
$(".sortBy").attr('value',val);
diff --git a/Application/Admin/View/Stat/userarpu_old.html b/Application/Admin/View/Stat/userarpu_old.html
new file mode 100644
index 000000000..de5c56d00
--- /dev/null
+++ b/Application/Admin/View/Stat/userarpu_old.html
@@ -0,0 +1,407 @@
+
+
+
+
+
+
+
+
+
+
+
+
ARPU分析
+
说明:根据日期,游戏,推广员分析ARPU等相关数据信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
导出
+ {$_page|default=''}
+
+
+
+
+
+
+if(C('COLOR_STYLE')=='blue_color') echo '';
+
+
+
+
+
+
From a29365fed8decf4315cc847f049195967ad1bee0 Mon Sep 17 00:00:00 2001
From: sunke <18850253506@163.com>
Date: Wed, 6 May 2020 15:13:09 +0800
Subject: [PATCH 02/62] =?UTF-8?q?=E7=99=BB=E9=99=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Home/Controller/IndexController.class.php | 63 +++++
.../Home/Controller/SafeController.class.php | 68 +++++
.../Home/View/default/Index/index.html | 1 +
.../Home/View/default/Index/phoneLogin.html | 267 ++++++++++++++++++
.../Home/View/default/Safe/bindTel.html | 265 +++++++++++++++++
5 files changed, 664 insertions(+)
create mode 100644 Application/Home/View/default/Index/phoneLogin.html
create mode 100644 Application/Home/View/default/Safe/bindTel.html
diff --git a/Application/Home/Controller/IndexController.class.php b/Application/Home/Controller/IndexController.class.php
index c91fac847..ad19c8d97 100644
--- a/Application/Home/Controller/IndexController.class.php
+++ b/Application/Home/Controller/IndexController.class.php
@@ -14,6 +14,7 @@ use OT\DataDictionary;
use User\Api\PromoteApi;
use Home\Controller\DownController;
+use Base\Tool\TaskClient;
/**
* 前台首页控制器
@@ -74,6 +75,12 @@ class IndexController extends HomeController
$map['account'] = $account;
$data['last_login_time'] = time();
M("promote", "tab_")->where($map)->save($data);
+ $loginrecord['promote_id'] = get_pid();
+ $loginrecord['account'] = $_POST['account'];
+ $loginrecord['client_ip'] = $_SERVER['REMOTE_ADDR'];
+ $loginrecord['login_type'] = 1;
+ $loginrecord['create_time'] = time();
+ M("promote_login_record", "tab_")->add($loginrecord);
$this->ajaxReturn(array("status" => 1, "msg" => "登录成功", 'url' => U('Promote/index')));
} else {
$msg = "";
@@ -99,6 +106,25 @@ class IndexController extends HomeController
}
}
+ public function doPhoneLogin($mobile = null, $verify = null) {
+ if (!$this->checksafecode($mobile, $verify)) {
+ $this->error('验证码错误');
+ }
+ $promote = M('promote', 'tab_')->where([
+ 'login_phone' => $mobile,
+ ])->find();
+ if($promote) {
+ $loginrecord['promote_id'] = get_pid();
+ $loginrecord['account'] = $_POST['account'];
+ $loginrecord['client_ip'] = $_SERVER['REMOTE_ADDR'];
+ $loginrecord['login_type'] = 1;
+ $loginrecord['create_time'] = time();
+ M("promote_login_record", "tab_")->add($loginrecord);
+ setcookie('login_phone', $mobile, time() + 3600 * 10000, $_SERVER["HTTP_HOST"]);
+ $this->success('登录成功!', U('Promote/index'));
+ }
+ }
+
/* public function register()
{
if (IS_POST) {
@@ -291,4 +317,41 @@ class IndexController extends HomeController
$Promote->logout();
redirect(U('Index/index'));
}
+
+ public function phoneLogin() {
+ $this->display();
+ }
+
+ /**
+ * 发动手机验证码
+ */
+ public function telsafecode($phone = '', $delay = 10, $flag = true)
+ {
+ $taskClient = new TaskClient();
+ $result = $taskClient->sendSmsCode($phone, get_client_ip());
+ $data = [];
+ if ($result['code'] == TaskClient::SUCCESS) {
+ $data['status'] = 1;
+ } else {
+ $data['status'] = 0;
+ }
+ $data['msg'] = $result['message'];
+ echo json_encode($data);
+ exit;
+ }
+
+ /**
+ * 手机安全码验证
+ */
+ public function checksafecode($phone, $code)
+ {
+ $taskClient = new TaskClient();
+ $result = $taskClient->checkSms($phone, $code);
+ $data = [];
+ if ($result && $result['code'] == TaskClient::SUCCESS) {
+ return true;
+ } else {
+ return false;
+ }
+ }
}
diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php
index 5e9d5bede..ba6a98334 100644
--- a/Application/Home/Controller/SafeController.class.php
+++ b/Application/Home/Controller/SafeController.class.php
@@ -9,6 +9,7 @@
namespace Home\Controller;
use Think\Controller;
use Base\Repository\PromoteRepository;
+use Base\Tool\TaskClient;
/**
* 扩展控制器
@@ -559,4 +560,71 @@ class SafeController extends BaseController{
$this->ajaxReturn(['code'=>0000,'mes'=>'删除成功']);
}
}
+
+ public function bindTel() {
+ $id = get_pid();
+ $promote = M('promote', 'tab_')->where(['id' => $id])->find();
+ if(!empty($promote['login_phone'])) {
+ $this->assign('login_phone', $promote['login_phone']);
+ }
+ return $this->display();
+ }
+
+ /**
+ * 发动手机验证码
+ */
+ public function telsafecode($phone = '', $delay = 10, $flag = true)
+ {
+ $taskClient = new TaskClient();
+ $result = $taskClient->sendSmsCode($phone, get_client_ip());
+ $data = [];
+ if ($result['code'] == TaskClient::SUCCESS) {
+ $data['status'] = 1;
+ } else {
+ $data['status'] = 0;
+ }
+ $data['msg'] = $result['message'];
+ echo json_encode($data);
+ exit;
+ }
+
+ /**
+ * 手机安全码验证
+ */
+ public function checksafecode($phone, $code)
+ {
+ $taskClient = new TaskClient();
+ $result = $taskClient->checkSms($phone, $code);
+ $data = [];
+ if ($result && $result['code'] == TaskClient::SUCCESS) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public function addLoginMobile($mobile = null, $verify = null) {
+ if (IS_POST) {
+ /* 检测验证码 TODO: */
+
+ if (!$this->checksafecode($mobile, $verify)) {
+ $this->error('验证码错误');
+ }
+ $id = get_pid();
+ $promote = M('promote', 'tab_')->where([
+ 'id' => $id
+ ])->find();
+ if ($promote) {
+ $promote['login_phone'] = $mobile;
+ $updateRs = M('promote', 'tab_')->where(['id' => $id])->save($promote);
+ if($updateRs) {
+ $this->success("更新登陆手机号成功");
+ }else {
+ $this->error("更新登陆手机号失败");
+ }
+ }else {
+ $this->error("无此推广账号信息");
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/Application/Home/View/default/Index/index.html b/Application/Home/View/default/Index/index.html
index 578362aeb..822ac37eb 100644
--- a/Application/Home/View/default/Index/index.html
+++ b/Application/Home/View/default/Index/index.html
@@ -38,6 +38,7 @@
diff --git a/Application/Home/View/default/Index/phoneLogin.html b/Application/Home/View/default/Index/phoneLogin.html
new file mode 100644
index 000000000..dcaec1ca9
--- /dev/null
+++ b/Application/Home/View/default/Index/phoneLogin.html
@@ -0,0 +1,267 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Application/Home/View/default/Safe/bindTel.html b/Application/Home/View/default/Safe/bindTel.html
new file mode 100644
index 000000000..dbaa93c66
--- /dev/null
+++ b/Application/Home/View/default/Safe/bindTel.html
@@ -0,0 +1,265 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 86944126094713192112a807c82b71d3c14bada6 Mon Sep 17 00:00:00 2001
From: sunke <18850253506@163.com>
Date: Wed, 6 May 2020 15:39:22 +0800
Subject: [PATCH 03/62] =?UTF-8?q?=E7=99=BB=E9=99=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Application/Home/Controller/IndexController.class.php | 4 +++-
Application/Home/Controller/SafeController.class.php | 5 +++--
Application/Home/View/default/Index/phoneLogin.html | 2 +-
Application/Home/View/default/Safe/bindTel.html | 5 ++---
4 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/Application/Home/Controller/IndexController.class.php b/Application/Home/Controller/IndexController.class.php
index ad19c8d97..adf2ac5e8 100644
--- a/Application/Home/Controller/IndexController.class.php
+++ b/Application/Home/Controller/IndexController.class.php
@@ -106,7 +106,9 @@ class IndexController extends HomeController
}
}
- public function doPhoneLogin($mobile = null, $verify = null) {
+ public function doPhoneLogin() {
+ $mobile = $_POST['login_phone'];
+ $verify = $_POST['code'];
if (!$this->checksafecode($mobile, $verify)) {
$this->error('验证码错误');
}
diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php
index ba6a98334..a37ae670b 100644
--- a/Application/Home/Controller/SafeController.class.php
+++ b/Application/Home/Controller/SafeController.class.php
@@ -603,10 +603,11 @@ class SafeController extends BaseController{
}
}
- public function addLoginMobile($mobile = null, $verify = null) {
+ public function addLoginMobile() {
if (IS_POST) {
/* 检测验证码 TODO: */
-
+ $mobile = $_POST['login_phone'];
+ $verify = $_POST['code'];
if (!$this->checksafecode($mobile, $verify)) {
$this->error('验证码错误');
}
diff --git a/Application/Home/View/default/Index/phoneLogin.html b/Application/Home/View/default/Index/phoneLogin.html
index dcaec1ca9..dca59442c 100644
--- a/Application/Home/View/default/Index/phoneLogin.html
+++ b/Application/Home/View/default/Index/phoneLogin.html
@@ -25,7 +25,7 @@
-
+
diff --git a/Application/Home/View/default/Safe/bindTel.html b/Application/Home/View/default/Safe/bindTel.html
index dbaa93c66..9a6b69d63 100644
--- a/Application/Home/View/default/Safe/bindTel.html
+++ b/Application/Home/View/default/Safe/bindTel.html
@@ -57,9 +57,9 @@
*短信验证码 |
-
+ |
-
+
|
@@ -216,7 +216,6 @@
+
+
+
+
+
服务协议
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ID |
+ 标题 |
+ 操作人 |
+ 操作时间 |
+ 操作 |
+
+
+
+
+
+ aOh! 暂时还没有内容! |
+
+
+
+
+ {$data.id} |
+ {$data.name} |
+ {:get_admin_nickname($data['creator'])} |
+ {$data.created_time|date='Y-m-d H:i:s',###} |
+
+ 编辑
+ 删除
+ |
+
+
+
+
+
+
+
+
+ {$_page|default=''}
+
+
+
+
+
+
+
+
+ if(C('COLOR_STYLE')=='blue_color') echo '
+
+ ';
+
+
+
+
+
+
+
+
diff --git a/Application/Admin/View/PromoteCompany/service_agreement_save.html b/Application/Admin/View/PromoteCompany/service_agreement_save.html
new file mode 100644
index 000000000..c8356295e
--- /dev/null
+++ b/Application/Admin/View/PromoteCompany/service_agreement_save.html
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php
index 70d61410b..d9cec83e2 100644
--- a/Application/Home/Controller/BaseController.class.php
+++ b/Application/Home/Controller/BaseController.class.php
@@ -46,6 +46,11 @@ class BaseController extends HomeController
define('G_SETTLEMENT_GRADE', 'sub_status,third_status');
}
+ if ($loginer['company_id']) {
+ $company = M('promote_company', 'tab_')->where(['id'=>$loginer['company_id']])->find();
+ $this->assign('company', $company);
+ }
+
$this->canViewUserRecharge = $this->promoteCan('view-user-recharge');
$this->checkUrlPermission();
diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php
index 5e9d5bede..d67b04885 100644
--- a/Application/Home/Controller/SafeController.class.php
+++ b/Application/Home/Controller/SafeController.class.php
@@ -338,7 +338,14 @@ class SafeController extends BaseController{
$this->assign('addr',json_decode($address)[1]);
}
$promoteInfo['address'] = json_decode($address);
-
+ // 获取推广员的公司
+ $promoteCompany = M('promote_company', 'tab_')->where(['id'=>$promoteInfo['company_id']])->find();
+ if ($promoteCompany['service_agreement_show'] > 0) {
+ $serviceAgreement = M('service_agreement', 'tab_')->where(['id'=>$promoteCompany['service_agreement_show']])->find();
+ $serviceAgreement['content'] = $this->renderServiceAgreement($serviceAgreement['content'], $promoteInfo);
+ $this->assign("serviceAgreement",$serviceAgreement);
+ }
+ $this->assign("promoteCompany",$promoteCompany);
$this->assign("ver_status",$promoteInfo['ver_status']);
$this->assign('promoteinfo', $promoteInfo);
@@ -461,37 +468,63 @@ class SafeController extends BaseController{
$this->ajaxReturn($res);
}
- public function safeDocument() {
- $realname = $_REQUEST['realname'];
- $phone = $_REQUEST['phone'];
- $email = $_REQUEST['email'];
- $address = $_REQUEST['address'];
- if (empty($realname)) {
- $realname = '您未填写真实姓名';
- }
- if (empty($email)) {
- $email = '您未填写联系邮箱';
- }
- if (empty($address)) {
- $address = '您未填写注册地址';
- }
- if (empty($phone)) {
- $phone = '您未填写联系号码';
- }
- $time = time();
- $loginPromote = $this->getLoginPromote();
- $sn = date('Ymd') . '-' . strtoupper(substr(md5($loginPromote['id']), 8, 16));
- $endTime = date('Y-m-d',strtotime('+1 year'));
- $this->assign('time',date('Y-m-d',$time));
- $this->assign('endTime',$endTime);
- $this->assign('sn',$sn);
- $this->assign('realname',$realname);
- $this->assign('email',$email);
- $this->assign('address',$address);
- $this->assign('phone',$phone);
+ public function safeDocument($templateId=0) {
+ $template = M('service_agreement', 'tab_')->where(['id'=>$templateId])->find();
+ $promoteInfo = $this->getLoginPromote();
+
+ $sn = date('Ymd') . '-' . strtoupper(substr(md5($promoteInfo['id']), 8, 16));
+
+ $content = $template['content'];
+ $content = str_replace("{time}", date('Y-m-d'), $content);
+ $content = str_replace("{sn}", $sn, $content);
+ $content = str_replace("{endTime}", date('Y-m-d',strtotime('+1 year')), $content);
+ $content = str_replace("{account}", $promoteInfo['account'], $content);
+ $content = str_replace("{email}", $promoteInfo['email'], $content);
+ $content = str_replace("{realname}", $promoteInfo['real_name'], $content);
+ $content = str_replace("{phone}", $promoteInfo['mobile_phone'], $content);
+ $content = str_replace("{address}", $promoteInfo['address'], $content);
+
+ // $realname = $_REQUEST['realname'];
+ // $phone = $_REQUEST['phone'];
+ // $email = $_REQUEST['email'];
+ // $address = $_REQUEST['address'];
+ // if (empty($realname)) {
+ // $realname = '您未填写真实姓名';
+ // }
+ // if (empty($email)) {
+ // $email = '您未填写联系邮箱';
+ // }
+ // if (empty($address)) {
+ // $address = '您未填写注册地址';
+ // }
+ // if (empty($phone)) {
+ // $phone = '您未填写联系号码';
+ // }
+ // $time = time();
+ // $loginPromote = $this->getLoginPromote();
+
+ // $endTime = date('Y-m-d',strtotime('+1 year'));
+ // $this->assign('time',date('Y-m-d',$time));
+ // $this->assign('endTime',$endTime);
+ // $this->assign('sn',$sn);
+ // $this->assign('realname',$realname);
+ // $this->assign('email',$email);
+ // $this->assign('address',$address);
+ // $this->assign('phone',$phone);
+ $this->assign('content', $content);
$this->display();
}
+ private function renderServiceAgreement($content, $promoteInfo)
+ {
+ $content = str_replace("{account}", $promoteInfo['account'], $content);
+ $content = str_replace("{email}", $promoteInfo['email'], $content);
+ $content = str_replace("{real_name}", $promoteInfo['real_name'], $content);
+ $content = str_replace("{mobile_phone}", $promoteInfo['mobile_phone'], $content);
+ $content = str_replace("{addr}", $promoteInfo['addr'], $content);
+ return $content;
+ }
+
public function promoteLogs() {
$page = intval(I('p', 1));
$row = intval(I('row', 10));
diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html
index fdc82b6fa..1e5f1685b 100644
--- a/Application/Home/View/default/Public/promote_base.html
+++ b/Application/Home/View/default/Public/promote_base.html
@@ -147,10 +147,10 @@