Merge branch 'release-1.0.0' into dev
# Conflicts: # Application/Admin/Controller/access_data_foldline.txt # Data/update.sqlmaster
@ -0,0 +1,91 @@
|
||||
<?php
|
||||
namespace Admin\Controller;
|
||||
|
||||
/**
|
||||
* 新功能之后还未来的急跑的脚本初始化数据
|
||||
* @author chenzhi
|
||||
*/
|
||||
class OldCountController extends \Think\Controller
|
||||
{
|
||||
//超级签订单新增识别微信或者支付宝2019-12-11
|
||||
public function gameSupersignPaywayInit()
|
||||
{
|
||||
$map = array(
|
||||
"pay_status"=>1,
|
||||
"pay_way"=>0
|
||||
);
|
||||
$GameSupersign = M("GameSupersign","tab_");
|
||||
$dbres = $GameSupersign->field("id,trade_id")->where($map)->select();
|
||||
$countdb = count($dbres);
|
||||
if($countdb < 1){
|
||||
die("No initialization required");
|
||||
}
|
||||
foreach ($dbres as $key => $value) {
|
||||
$savedata = array(
|
||||
"id"=>$value['id']
|
||||
);
|
||||
$tmp = (int)substr($value['trade_id'],0,4);
|
||||
if($tmp > 3000){
|
||||
$savedata['pay_way'] = 2; //微信
|
||||
}else{
|
||||
$savedata['pay_way'] = 1;//支付宝
|
||||
}
|
||||
$tres = $GameSupersign->save($savedata);
|
||||
if($tres === false){
|
||||
die("DB ERROR");
|
||||
}
|
||||
}
|
||||
die("init ok");
|
||||
}
|
||||
/**
|
||||
* mend表新增paymount字段用于统计补链前归属金额
|
||||
*/
|
||||
public function mendPayamountInit()
|
||||
{
|
||||
//获取符合条件的
|
||||
$map = array("pay_amount"=>0);
|
||||
$Mend = M("mend","tab_");
|
||||
$Spend = M("Spend","tab_");
|
||||
$Mend->where($map)->select();
|
||||
$dbres = $Mend->field("id,user_account,promote_account,order_time,create_time")->where($map)->select();
|
||||
$countdb = count($dbres);
|
||||
if($countdb < 1) die("No initialization required");
|
||||
echo "总需要统计数:{$countdb}".PHP_EOL;
|
||||
foreach ($dbres as $key => $value) {
|
||||
$savedata = array("id"=>$value['id']);
|
||||
$saveflag = false;
|
||||
//设置订单时间
|
||||
$order_time = $value['order_time'];
|
||||
if($value['order_time'] == 0){
|
||||
$saveflag = true;
|
||||
$savedata['order_time'] = $value['create_time'];
|
||||
$order_time = $savedata['create_time'];
|
||||
}
|
||||
//获取金额
|
||||
$smap = array(
|
||||
"user_account"=>$value['user_account'],
|
||||
"promote_account"=>$value['promote_account'],
|
||||
"pay_time"=>array("LT",$order_time),
|
||||
"pay_status"=>1
|
||||
);
|
||||
$pay_amount = $Spend->field("IFNULL(sum(pay_amount),0) pay_amount")->where($smap)->find()["pay_amount"];
|
||||
if($pay_amount > 0){
|
||||
$saveflag = true;
|
||||
$savedata['pay_amount'] = $pay_amount;
|
||||
}
|
||||
if($saveflag){
|
||||
$tres = $Mend->save($savedata);
|
||||
if($tres === false){
|
||||
die("DB ERROR");
|
||||
}
|
||||
}
|
||||
if( $key % 20 == 0){
|
||||
$j = (floor)($key/$countdb*100);
|
||||
echo "当前进度:{$j}%".PHP_EOL;
|
||||
}
|
||||
|
||||
}
|
||||
die("init ok");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,372 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | OneThink [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: 麦当苗儿 <zuojiazi@vip.qq.com> <http://www.zjzit.cn>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace Admin\Controller;
|
||||
use User\Api\UserApi as UserApi;
|
||||
|
||||
/**
|
||||
* 后台首页控制器
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
class PresidentIndexChartSetController extends AdminController {
|
||||
|
||||
public $beginTime;
|
||||
public $endTime;
|
||||
public $date;
|
||||
public $nowdata;
|
||||
public $UserModel;
|
||||
public $ChartModel;
|
||||
public $LoginModel;
|
||||
public $SpendModel;
|
||||
public $PromoteModel;
|
||||
public $President_id;
|
||||
public $President_data;
|
||||
public $reset=false;
|
||||
|
||||
public function _initialize(){
|
||||
//初始化
|
||||
|
||||
$this->UserModel =M("User","tab_");
|
||||
$this->ChartModel =M("IndexChart","tab_");
|
||||
$this->LoginModel =M("user_login_record","tab_");
|
||||
$this->SpendModel =M("spend","tab_");
|
||||
$this->PromoteModel =M("promote","tab_");
|
||||
$this->nowdata =time();
|
||||
$group_concat_max_len = M()->execute("SET SESSION group_concat_max_len = 4294967295");
|
||||
echo "set group_concat_max_len ok,beging count".PHP_EOL;
|
||||
if(I("reset")) $this->reset = true;
|
||||
echo "<pre>";
|
||||
|
||||
}
|
||||
/**
|
||||
* 每日更新接口
|
||||
*/
|
||||
public function setChartCount()
|
||||
{
|
||||
$begin = date("Y-m-d",strtotime("-1 day"));
|
||||
$this->setDateCount($begin);
|
||||
}
|
||||
|
||||
public function setFreeDateCount($begin,$end='')
|
||||
{
|
||||
if($end == '') $end = $begin;
|
||||
//判断日期格式
|
||||
$patten = "/^\d{4}[\-](0?[1-9]|1[012])[\-](0?[1-9]|[12][0-9]|3[01])$/";
|
||||
if (!preg_match($patten, $begin)) {
|
||||
die("开始时间格式错误");
|
||||
}
|
||||
if (!preg_match($patten, $end)) {
|
||||
die("结束时间格式错误");
|
||||
}
|
||||
if(strtotime($end) < strtotime($begin)){
|
||||
die("结束时间不能比开始时间小");
|
||||
}
|
||||
if(strtotime($end)+86399 > time()){
|
||||
die("结束时间不能包含今日");
|
||||
}
|
||||
if($begin == $end){
|
||||
$this->setDateCount($begin);
|
||||
}else{
|
||||
$starttime = $begin?strtotime($begin):mktime(0,0,0,date('m'),date('d')-1,date('Y'));
|
||||
$endtime = $end?strtotime($end)+86399:$starttime+86399;
|
||||
$datelist = get_date_list($starttime,$endtime,1);
|
||||
$countdate = count($datelist);
|
||||
for($i=0;$i<$countdate;$i++){
|
||||
$this->setDateCount($datelist[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//
|
||||
public function setDateCount($date)
|
||||
{
|
||||
$this->date = $date;
|
||||
$tarry = explode('-',$date);
|
||||
$this->beginTime=mktime(0,0,0,$tarry[1],$tarry[2],$tarry[0]);
|
||||
$this->endTime=mktime(0,0,0,$tarry[1],$tarry[2]-0+1,$tarry[0])-1;
|
||||
|
||||
set_time_limit(0);
|
||||
$t1 = microtime(true);
|
||||
//判断是否存在
|
||||
$res = $this->ChartModel->where("date = '{$this->beginTime}'")->find();
|
||||
$reset='';
|
||||
if(!empty($res)){
|
||||
if($this->reset){
|
||||
$this->ChartModel->where("date = '{$this->beginTime}'")->delete();
|
||||
$reset = "reset and creat ";
|
||||
}else{
|
||||
echo ("{$this->date} 已统计,请勿重复提交".PHP_EOL);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$this->newUser();
|
||||
$this->activeUser();
|
||||
$this->payUser();
|
||||
// $this->payMoney();
|
||||
// $this->promoteNew();
|
||||
// $this->allCount();
|
||||
// $this->createDb();
|
||||
dump($this->President_data);
|
||||
$t2 = microtime(true);
|
||||
echo ("{$this->date} {$reset}success runtime:".round($t2-$t1,3).'s'.PHP_EOL);
|
||||
# code...
|
||||
}
|
||||
//获取每日的增长用户
|
||||
public function newUser()
|
||||
{
|
||||
$newUserdata = [];
|
||||
$map = ['register_time'=>['between',[$this->beginTime,$this->endTime]],"puid"=>0];//0不是小号
|
||||
$hoursnews = $this->UserModel->field('FROM_UNIXTIME(register_time, "%H") as time,GROUP_CONCAT(DISTINCT id) AS user_id')
|
||||
->where($map)
|
||||
->group("time")
|
||||
->select();
|
||||
//按小时统计每个会长的信息
|
||||
for ($i=0; $i < count($hoursnews); $i++) {
|
||||
$tempres = self::getPresidentCount($hoursnews[$i]['user_id'],"COUNT(1) AS news,IFNULL(p.account,'官方渠道') account");
|
||||
for($j=0; $j < count($tempres); $j++){
|
||||
$newUserdata[$tempres[$j]['p_id']]["hoursnews"][$hoursnews[$i]['time']] = $tempres[$j]['news'];
|
||||
$newUserdata[$tempres[$j]['p_id']]["president_account"]= $tempres[$j]['account'];
|
||||
$newUserdata[$tempres[$j]['p_id']]["president_id"]= $tempres[$j]['p_id'];
|
||||
}
|
||||
}
|
||||
//拼凑小时
|
||||
foreach ($newUserdata as $k=>&$v) {
|
||||
$h = $v['hoursnews'];
|
||||
$t = [];
|
||||
$hours = ['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23'];
|
||||
$v['new_user_count'] = 0;
|
||||
foreach($hours as $ht) {
|
||||
if(isset($h[$ht])){
|
||||
$t[] = $h[$ht];
|
||||
$v['new_user_count'] += (int)$h[$ht];
|
||||
}else{
|
||||
$t[] = 0;
|
||||
}
|
||||
}
|
||||
unset($v["hoursnews"]);
|
||||
$v["new_user_hours"] = json_encode(array_map("intFun",$t));
|
||||
// print_r($v['p_id']);die();
|
||||
$this->President_data[$v['president_id']] = $v;
|
||||
}
|
||||
unset($newUserdata);
|
||||
unset($hoursnews);
|
||||
}
|
||||
|
||||
/**
|
||||
* 活跃用户计算
|
||||
*/
|
||||
public function activeUser()
|
||||
{
|
||||
$newUserdata = [];
|
||||
$map = ['login_time'=>['between',[$this->beginTime,$this->endTime]]];//0不是小号
|
||||
$hoursnews = $this->LoginModel->field('FROM_UNIXTIME(login_time, "%H") as time,GROUP_CONCAT(DISTINCT user_id) AS user_id')
|
||||
->where($map)
|
||||
->group("time")
|
||||
->select();
|
||||
//按小时统计每个会长的信息
|
||||
for ($i=0; $i < count($hoursnews); $i++) {
|
||||
$tempres = self::getPresidentCount($hoursnews[$i]['user_id'],"COUNT(1) AS news,IFNULL(p.account,'官方渠道') account,GROUP_CONCAT(DISTINCT u.id) AS active_user_list");
|
||||
for($j=0; $j < count($tempres); $j++){
|
||||
$newUserdata[$tempres[$j]['p_id']]["hoursnews"][$hoursnews[$i]['time']] = $tempres[$j]['news'];
|
||||
$newUserdata[$tempres[$j]['p_id']]["president_account"]= $tempres[$j]['account'];
|
||||
$newUserdata[$tempres[$j]['p_id']]["president_id"]= $tempres[$j]['p_id'];
|
||||
$newUserdata[$tempres[$j]['p_id']]["active_user_list"] .= (",".$tempres[$j]['active_user_list']);
|
||||
}
|
||||
}
|
||||
//拼凑小时
|
||||
foreach ($newUserdata as $k=>&$v) {
|
||||
$h = $v['hoursnews'];
|
||||
$t = [];
|
||||
$hours = ['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23'];
|
||||
foreach($hours as $ht) {
|
||||
if(isset($h[$ht])){
|
||||
$t[] = $h[$ht];
|
||||
}else{
|
||||
$t[] = 0;
|
||||
}
|
||||
}
|
||||
unset($v["hoursnews"]);
|
||||
$v["active_user_hours"] = json_encode(array_map("intFun",$t));
|
||||
$ta = array_values(array_flip(array_flip(explode(",",trim($v["active_user_list"],",")))));
|
||||
$v["active_user_count"] = count($ta);
|
||||
$v["active_user_list"] = json_encode($ta);
|
||||
|
||||
if(array_key_exists($v['president_id'],$this->President_data)){
|
||||
$this->President_data[$v['president_id']]['active_user_hours'] = $v["active_user_hours"];
|
||||
$this->President_data[$v['president_id']]['active_user_count'] = $v["active_user_count"];
|
||||
$this->President_data[$v['president_id']]['active_user_list'] = $v["active_user_list"];
|
||||
}else{
|
||||
$this->President_data[$v['president_id']] = $v;
|
||||
}
|
||||
}
|
||||
unset($newUserdata);
|
||||
unset($hoursnews);
|
||||
}
|
||||
/**
|
||||
* 计算充值用户
|
||||
*/
|
||||
public function payUser()
|
||||
{
|
||||
$newUserdata = [];
|
||||
$map = ['pay_time'=>['between',[$this->beginTime,$this->endTime]],'pay_status'=>1];//1支付成功
|
||||
$hoursnews = $this->SpendModel->field('FROM_UNIXTIME(pay_time, "%H") as time,GROUP_CONCAT(DISTINCT user_id) AS user_id')
|
||||
->where($map)
|
||||
->group("time")
|
||||
->select();
|
||||
//按小时统计每个会长的信息
|
||||
for ($i=0; $i < count($hoursnews); $i++) {
|
||||
$tempres = self::getPresidentCount($hoursnews[$i]['user_id'],"COUNT(1) AS news,IFNULL(p.account,'官方渠道') account,GROUP_CONCAT(DISTINCT u.id) AS pay_user_list");
|
||||
for($j=0; $j < count($tempres); $j++){
|
||||
$newUserdata[$tempres[$j]['p_id']]["hoursnews"][$hoursnews[$i]['time']] = $tempres[$j]['news'];
|
||||
$newUserdata[$tempres[$j]['p_id']]["president_account"]= $tempres[$j]['account'];
|
||||
$newUserdata[$tempres[$j]['p_id']]["president_id"]= $tempres[$j]['p_id'];
|
||||
$newUserdata[$tempres[$j]['p_id']]["pay_user_list"] .= (",".$tempres[$j]['pay_user_list']);
|
||||
}
|
||||
}
|
||||
//拼凑小时
|
||||
foreach ($newUserdata as $k=>&$v) {
|
||||
$h = $v['hoursnews'];
|
||||
$t = [];
|
||||
$hours = ['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23'];
|
||||
foreach($hours as $ht) {
|
||||
if(isset($h[$ht])){
|
||||
$t[] = $h[$ht];
|
||||
}else{
|
||||
$t[] = 0;
|
||||
}
|
||||
}
|
||||
unset($v["hoursnews"]);
|
||||
$v["pay_user_hours"] = json_encode(array_map("intFun",$t));
|
||||
$ta = array_values(array_flip(array_flip(explode(",",trim($v["pay_user_list"],",")))));
|
||||
$v["pay_user_count"] = count($ta);
|
||||
$v["pay_user_list"] = json_encode($ta);
|
||||
|
||||
if(array_key_exists($v['president_id'],$this->President_data)){
|
||||
$this->President_data[$v['president_id']]['pay_user_hours'] = $v["pay_user_hours"];
|
||||
$this->President_data[$v['president_id']]['pay_user_count'] = $v["pay_user_count"];
|
||||
$this->President_data[$v['president_id']]['pay_user_list'] = $v["pay_user_list"];
|
||||
}else{
|
||||
$this->President_data[$v['president_id']] = $v;
|
||||
}
|
||||
}
|
||||
unset($newUserdata);
|
||||
unset($hoursnews);
|
||||
}
|
||||
/**
|
||||
* 充值金额计算
|
||||
*/
|
||||
public function payMoney()
|
||||
{
|
||||
$map = ['pay_time'=>['between',[$this->beginTime,$this->endTime]],"pay_status"=>1];//1支付成功
|
||||
$hoursnews = $this->SpendModel->field('FROM_UNIXTIME(pay_time, "%H") as time,sum(pay_amount) AS money')
|
||||
->where($map)
|
||||
->group("time")
|
||||
->select();
|
||||
|
||||
|
||||
$hours = ['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23'];
|
||||
$user_hours = array();
|
||||
foreach($hours as $v) {
|
||||
$user_hours[$v] = 0;
|
||||
}
|
||||
foreach($hoursnews as $h) {
|
||||
$user_hours[$h['time']] = (integer)$h['money'];
|
||||
}
|
||||
$this->adddata["pay_money_hours"] = json_encode($user_hours);
|
||||
unset($user_hours);
|
||||
|
||||
$activeCount = $this->SpendModel->field('sum(pay_amount) AS money')
|
||||
->where($map)
|
||||
->find();
|
||||
$this->adddata["pay_money_count"] = $activeCount['money']?:0;
|
||||
}
|
||||
/**
|
||||
* 新增推广
|
||||
*/
|
||||
public function promoteNew()
|
||||
{
|
||||
$map = ['create_time'=>['between',[$this->beginTime,$this->endTime]]];
|
||||
$hoursnews = $this->PromoteModel->field('FROM_UNIXTIME(create_time, "%H") as time,COUNT(1) AS news')
|
||||
->where($map)
|
||||
->group("time")
|
||||
->select();
|
||||
|
||||
|
||||
$hours = ['00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19','20','21','22','23'];
|
||||
$user_hours = array();
|
||||
foreach($hours as $v) {
|
||||
$user_hours[$v] = 0;
|
||||
}
|
||||
foreach($hoursnews as $h) {
|
||||
$user_hours[$h['time']] = (integer)$h['news'];
|
||||
}
|
||||
$this->adddata["promote_new_hours"] = json_encode($user_hours);//promote_new_hours
|
||||
unset($user_hours);
|
||||
|
||||
$activeCount = $this->PromoteModel->field('COUNT(1) AS news')
|
||||
->where($map)
|
||||
->find();
|
||||
$this->adddata["promote_new_count"] = $activeCount['news'];
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计其他综合信息
|
||||
* 1. 7天活跃
|
||||
* 2. 平台累计用户
|
||||
* 3. 累计付费用户
|
||||
*/
|
||||
public function allCount()
|
||||
{
|
||||
$user = D('User');
|
||||
$spend = D('Spend');
|
||||
$promote = D('Promote');
|
||||
$allcount = array();
|
||||
$allcount['user_count'] = $user->old();//平台累计用户
|
||||
$allcount['active_count'] =$user->active(['tab_user_login_record.login_time'=>['between',[mktime(0,0,0,date('m'),date('d')-7,date('Y')),mktime(0,0,0,date('m'),date('d'),date('Y'))-1]]]);//七日日活
|
||||
$allcount['player_count'] =$spend->player();//累计付费用户
|
||||
$allcount['money_sum'] =$spend->totalAmount();//累计充值
|
||||
$allcount['promote_sum'] =$promote->total();//推广员总数
|
||||
$allcount['game_count'] = M("game","tab_")->where("game_status = 1")->field("count(1) game_count")->find()['game_count'];//游戏接入数量
|
||||
$allcount['android_gamesource_count'] = M("GameSource","tab_")->where("file_type = 1")->field("count(1) game_count")->find()['game_count'];//安卓游戏原包
|
||||
$allcount['ios_gamesource_count'] = M("GameSource","tab_")->where("file_type = 2")->field("count(1) game_count")->find()['game_count'];//IOS游戏原包
|
||||
$allcount['promote_user_count'] = $user->where("promote_id > 0 and puid = 0")->field("count(1) user_count")->find()['user_count'];//推广员注册用户
|
||||
$allcount['promote_spend_sum'] = $spend->where("promote_id > 0 and pay_status = 1")->field("sum(pay_amount) pay_amount")->find()['pay_amount'];//推广员总充值
|
||||
|
||||
$this->adddata["all_count"] = json_encode($allcount);
|
||||
}
|
||||
public function createDb()
|
||||
{
|
||||
$this->adddata['date']=$this->beginTime;
|
||||
$this->adddata['create_time']=$this->nowdata;
|
||||
$this->ChartModel->add($this->adddata);
|
||||
}
|
||||
|
||||
//通过用户id串获取会长并统计
|
||||
private function getPresidentCount($ids,$field=false)
|
||||
{
|
||||
if($field){
|
||||
$fields = "IFNULL(if(substring_index(substring_index(`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(`chain`,'/',2),'/',-1)),0) p_id,{$field}";
|
||||
}else{
|
||||
$fields = "IFNULL(if(substring_index(substring_index(`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(`chain`,'/',2),'/',-1)),0) p_id";
|
||||
}
|
||||
|
||||
$userres = M("user u","tab_")
|
||||
->field($fields)
|
||||
->join("tab_promote p on u.promote_id = p.id","left")
|
||||
->where("u.id in ({$ids})")
|
||||
->group("p_id")
|
||||
->select();
|
||||
|
||||
return $userres;
|
||||
# code...
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,199 @@
|
||||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
|
||||
use User\Api\UserApi as UserApi;
|
||||
use OSS\OssClient;
|
||||
use OSS\Core\OSsException;
|
||||
use Think\Controller;
|
||||
|
||||
/**
|
||||
* 后台首页控制器
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
class PromoteCompanyController extends ThinkController
|
||||
{
|
||||
private $modelName = 'PromoteCompany';
|
||||
|
||||
//列表
|
||||
public function lists()
|
||||
{
|
||||
$model = M($this->modelName, 'tab_');
|
||||
$map = [];
|
||||
$id = intval(I('id', 0));
|
||||
$company_name = trim(I('company_name'));
|
||||
if (!empty($id)) {
|
||||
$map['tab_promote_company.id'] = $id;
|
||||
$parameter['id'] = $id;
|
||||
}
|
||||
if($company_name)
|
||||
$map['tab_promote_company.company_name'] = array('like',"%{$company_name}%");
|
||||
if (isset($_REQUEST['status']) && $_REQUEST['status'] !== '') {
|
||||
$status = intval($_REQUEST['status']);
|
||||
$map['tab_promote_company.status'] = $status;
|
||||
$parameter['status'] = $status;
|
||||
}
|
||||
|
||||
$page = intval(I('get.p', 0));
|
||||
$page = $page ? $page : 1; //默认显示第一页数据
|
||||
$row = intval(I('row', 0));
|
||||
$row = empty($row) ? 10 : $row;//每页条数
|
||||
|
||||
$data = $model
|
||||
->field('tab_promote_company.id,tab_promote_company.company_name,tab_promote_company.status,
|
||||
tab_promote_company.create_time,sys_member.nickname')
|
||||
->join('left join sys_member on sys_member.uid = tab_promote_company.uid')
|
||||
->where($map)
|
||||
->order('id desc')
|
||||
->page($page, $row)
|
||||
->select();
|
||||
|
||||
/* 查询记录总数 */
|
||||
$count = $model
|
||||
->where($map)
|
||||
->count();
|
||||
|
||||
if (!empty($data)) {
|
||||
foreach ($data as &$list) {
|
||||
$list['status'] = ($list['status'] == 0) ? '已关闭' : '已开启';
|
||||
$list['create_time'] = date('Y-m-d H:i:s', $list['create_time']);
|
||||
}
|
||||
}
|
||||
|
||||
//分页
|
||||
$parameter['p'] = $page;
|
||||
$parameter['row'] = $row;
|
||||
$page = set_pagination($count, $row, $parameter);
|
||||
if ($page) {
|
||||
$this->assign('_page', $page);
|
||||
}
|
||||
|
||||
$this->assign('listData', $data);
|
||||
$this->assign('count', $count);
|
||||
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Partner/lists'])->find());
|
||||
$this->meta_title = '推广公司';
|
||||
$this->display();
|
||||
}
|
||||
|
||||
//添加
|
||||
public function add()
|
||||
{
|
||||
if ($_POST) {
|
||||
$company_name = I('post.company_name', '');
|
||||
$status = intval(I('post.status', 1));
|
||||
|
||||
if (empty($company_name)) {
|
||||
$this->error('请输入推广公司名称');
|
||||
}
|
||||
if (!in_array($status, [0, 1])) {
|
||||
$this->error('参数异常');
|
||||
}
|
||||
|
||||
$model = M($this->modelName, 'tab_');
|
||||
$map['company_name'] = $company_name;
|
||||
$res = $model->where($map)->getField('id');
|
||||
if ($res) {
|
||||
$this->error('推广公司已存在');
|
||||
}
|
||||
|
||||
$time = time();
|
||||
$save['company_name'] = $company_name;
|
||||
$save['status'] = $status;
|
||||
$save['uid'] = UID;
|
||||
$save['create_time'] = $time;
|
||||
$save['last_up_time'] = $time;
|
||||
|
||||
$res = $model->add($save);
|
||||
if ($res) {
|
||||
\Think\Log::actionLog('PromoteCompany/add', 'partner', $res);
|
||||
$this->success('保存成功', U('lists'));
|
||||
} else {
|
||||
$this->error('保存失败');
|
||||
}
|
||||
} else {
|
||||
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'PromoteCompany/add'])->find());
|
||||
$this->meta_title = '新增推广公司';
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
//编辑
|
||||
public function edit()
|
||||
{
|
||||
$model = M($this->modelName, 'tab_');
|
||||
|
||||
if ($_POST) {
|
||||
$company_name = I('post.company_name', '');
|
||||
$status = intval(I('post.status', 1));
|
||||
$id = intval(I('post.id', 0));
|
||||
|
||||
if (empty($company_name)) {
|
||||
$this->error('请输入推广公司名称');
|
||||
}
|
||||
if (!in_array($status, [0, 1]) || $id == 0) {
|
||||
$this->error('参数异常');
|
||||
}
|
||||
|
||||
$data = $model->field('id,company_name')->find($id);
|
||||
if (empty($data)) {
|
||||
$this->error('数据异常');
|
||||
}
|
||||
|
||||
$map['company_name'] = $company_name;
|
||||
$res = $model->where($map)->getField('id');
|
||||
if ($res && $res != $id) {
|
||||
$this->error('推广公司已存在');
|
||||
}
|
||||
|
||||
$time = time();
|
||||
$save['id'] = $id;
|
||||
$save['company_name'] = $company_name;
|
||||
$save['status'] = $status;
|
||||
$save['last_up_time'] = $time;
|
||||
|
||||
$res = $model->save($save);
|
||||
if ($res === false) {
|
||||
$this->error('保存失败');
|
||||
} else {
|
||||
\Think\Log::actionLog('PromoteCompany/edit', 'PromoteCompany', $id);
|
||||
$this->success('保存成功', U('lists'));
|
||||
}
|
||||
} else {
|
||||
$id = intval(I('get.id', 0));
|
||||
$map['id'] = $id;
|
||||
$data = $model->field('id,company_name,status')->find($id);
|
||||
if (empty($data)) {
|
||||
$this->error('数据异常', U('lists'));
|
||||
}
|
||||
|
||||
$this->assign('data', $data);
|
||||
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'PromoteCompany/edit'])->find());
|
||||
$this->meta_title = '编辑推广公司';
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
//删除
|
||||
public function del()
|
||||
{
|
||||
if (!empty($_POST['ids'])) {
|
||||
if (!is_array($_POST['ids'])) {
|
||||
$this->error('参数异常');
|
||||
}
|
||||
|
||||
$id = implode(',', $_POST['ids']);
|
||||
} else {
|
||||
$id = intval(I('get.id', 0));
|
||||
if ($id == 0) {
|
||||
$this->error('参数异常');
|
||||
}
|
||||
}
|
||||
|
||||
$res = M($this->modelName, 'tab_')->delete($id);
|
||||
if ($res === false) {
|
||||
$this->error('删除失败');
|
||||
}
|
||||
|
||||
$this->success('删除成功', U('lists'));
|
||||
}
|
||||
}
|
@ -0,0 +1,273 @@
|
||||
<?php
|
||||
|
||||
namespace Admin\Controller;
|
||||
use Think\Controller;
|
||||
|
||||
/**
|
||||
* 后台总览聚合
|
||||
* @author cz
|
||||
*/
|
||||
class StatisticsCountSetController extends Controller {
|
||||
public $beginTime;
|
||||
public $endTime;
|
||||
public $date;
|
||||
public $nowdata;
|
||||
public $UserModel;
|
||||
public $ChartModel;
|
||||
public $LoginModel;
|
||||
public $SpendModel;
|
||||
public $PromoteModel;
|
||||
public $GameCountModel;
|
||||
public $addid;
|
||||
public $adddata;
|
||||
public $gameid;
|
||||
public $gamedata;
|
||||
public $reset=false;
|
||||
|
||||
public function _initialize(){
|
||||
//初始化
|
||||
$this->UserModel =M("User","tab_");
|
||||
$this->LoginModel =M("user_login_record","tab_");
|
||||
$this->SpendModel =M("spend","tab_");
|
||||
$this->PromoteModel =M("promote","tab_");
|
||||
$this->model =M();
|
||||
$this->PromoteCountModel =M("PromoteCount","tab_");
|
||||
$this->GameCountModel =M("GameCount","tab_");
|
||||
$this->nowdata =time();
|
||||
|
||||
$group_concat_max_len = M()->execute("SET SESSION group_concat_max_len = 4294967295");
|
||||
echo "set group_concat_max_len ok,beging count".PHP_EOL;
|
||||
if(I("reset")) $this->reset = true;
|
||||
|
||||
}
|
||||
public function setChartCount()
|
||||
{
|
||||
$begin = date("Y-m-d",strtotime("-1 day"));
|
||||
$this->setDateCount($begin);
|
||||
}
|
||||
public function setFreeDateCount($begin,$end='')
|
||||
{
|
||||
if($end == '') $end = $begin;
|
||||
//判断日期格式
|
||||
$patten = "/^\d{4}[\-](0?[1-9]|1[012])[\-](0?[1-9]|[12][0-9]|3[01])$/";
|
||||
if (!preg_match($patten, $begin)) {
|
||||
die("开始时间格式错误");
|
||||
}
|
||||
if (!preg_match($patten, $end)) {
|
||||
die("结束时间格式错误");
|
||||
}
|
||||
if(strtotime($end) < strtotime($begin)){
|
||||
die("结束时间不能比开始时间小");
|
||||
}
|
||||
if(strtotime($end)+86399 > time()){
|
||||
die("结束时间不能包含今日");
|
||||
}
|
||||
if($begin == $end){
|
||||
$this->setDateCount($begin);
|
||||
}else{
|
||||
$starttime = $begin?strtotime($begin):mktime(0,0,0,date('m'),date('d')-1,date('Y'));
|
||||
$endtime = $end?strtotime($end)+86399:$starttime+86399;
|
||||
$datelist = get_date_list($starttime,$endtime,1);
|
||||
$countdate = count($datelist);
|
||||
for($i=0;$i<$countdate;$i++){
|
||||
$this->setDateCount($datelist[$i]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
public function setDateCount($date)
|
||||
{
|
||||
$this->date = $date;
|
||||
$tarry = explode('-',$date);
|
||||
$this->beginTime=mktime(0,0,0,$tarry[1],$tarry[2],$tarry[0]);
|
||||
$this->endTime=mktime(0,0,0,$tarry[1],$tarry[2]-0+1,$tarry[0])-1;
|
||||
set_time_limit(0);
|
||||
$t1 = microtime(true);
|
||||
//判断是否存在
|
||||
$PromoteRes = $this->PromoteCountModel->where("date = '{$this->beginTime}'")->find();
|
||||
$GameRes = $this->GameCountModel->where("date = '{$this->beginTime}'")->find();
|
||||
$reset='';
|
||||
if(!empty($PromoteRes) || !empty($GameRes) ){
|
||||
if($this->reset){
|
||||
$this->PromoteCountModel->where("date = '{$this->beginTime}'")->delete();
|
||||
$this->GameCountModel->where("date = '{$this->beginTime}'")->delete();
|
||||
$reset = "reset and creat ";
|
||||
}else{
|
||||
echo ("{$this->date} 已统计,请勿重复提交".PHP_EOL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
$this->model->startTrans();
|
||||
$this->addid = [];
|
||||
$this->adddata = [];
|
||||
$this->promoteNew();
|
||||
$this->promotePayMoeny();
|
||||
$this->promoteActive();
|
||||
$this->promoteCreateDb();
|
||||
// unset($this->addid);
|
||||
// unset($this->adddata);
|
||||
$this->gameid = [];
|
||||
$this->gamedata = [];
|
||||
$this->gameNew();
|
||||
$this->gamePayMoeny();
|
||||
$this->gameActive();
|
||||
$this->gameCreateDb();
|
||||
$this->model->commit();
|
||||
$t2 = microtime(true);
|
||||
echo ("{$this->date} {$reset}success runtime:".round($t2-$t1,3).'s'.PHP_EOL);
|
||||
# code...
|
||||
}
|
||||
|
||||
//=======================聚合推广员========================
|
||||
//1聚合新增
|
||||
public function promoteNew()
|
||||
{
|
||||
$map = ['register_time'=>['between',[$this->beginTime,$this->endTime]],"puid"=>0,"promote_id"=>["gt",0]];
|
||||
$promoteNew = $this->UserModel->field('COUNT(1) AS new_user_count,promote_id,promote_account')
|
||||
->where($map)
|
||||
->group("promote_id")
|
||||
->select();
|
||||
$count = count($promoteNew);
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
$this->addid[] = $promoteNew[$i]["promote_id"];
|
||||
$this->adddata[$promoteNew[$i]["promote_id"]] = $promoteNew[$i];
|
||||
}
|
||||
unset($promoteNew);
|
||||
}
|
||||
//2聚合付费
|
||||
public function promotePayMoeny()
|
||||
{
|
||||
$map = ['pay_time'=>['between',[$this->beginTime,$this->endTime]],"pay_status"=>1,"promote_id"=>["gt",0]];//1支付成功
|
||||
$promotePayMoeny = $this->SpendModel->field('sum(pay_amount) AS pay_money_count,promote_id,promote_account')
|
||||
->where($map)
|
||||
->group("promote_id")
|
||||
->select();
|
||||
$count = count($promotePayMoeny);
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
if (in_array($promotePayMoeny[$i]["promote_id"],$this->addid)) {
|
||||
//存在
|
||||
$this->adddata[$promotePayMoeny[$i]["promote_id"]]["pay_money_count"] = $promotePayMoeny[$i]["pay_money_count"];
|
||||
}else{
|
||||
$this->addid[] = $promotePayMoeny[$i]["promote_id"];
|
||||
$this->adddata[$promotePayMoeny[$i]["promote_id"]] = $promotePayMoeny[$i];
|
||||
}
|
||||
}
|
||||
unset($promotePayMoeny);
|
||||
}
|
||||
//3聚合活跃
|
||||
public function promoteActive()
|
||||
{
|
||||
$map = ['login_time'=>['between',[$this->beginTime,$this->endTime]],"promote_id"=>["gt",0]];//0不是小号
|
||||
$promoteActive = $this->LoginModel->field('COUNT(DISTINCT user_id) AS active_user_count,GROUP_CONCAT(DISTINCT user_id) active_user_list,promote_id')
|
||||
->where($map)
|
||||
->group("promote_id")
|
||||
->select();
|
||||
$count = count($promoteActive);
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
if (in_array($promoteActive[$i]["promote_id"],$this->addid)) {
|
||||
//存在
|
||||
$this->adddata[$promoteActive[$i]["promote_id"]]["active_user_count"] = $promoteActive[$i]["active_user_count"];
|
||||
$this->adddata[$promoteActive[$i]["promote_id"]]["active_user_list"] = $promoteActive[$i]["active_user_list"];
|
||||
}else{
|
||||
$this->addid[] = $promoteActive[$i]["promote_id"];
|
||||
$this->adddata[$promoteActive[$i]["promote_id"]] = $promoteActive[$i];
|
||||
}
|
||||
}
|
||||
unset($promoteActive);
|
||||
}
|
||||
//4加入数据库
|
||||
public function promoteCreateDb()
|
||||
{
|
||||
$count = count($this->addid);
|
||||
if ($count > 0) {
|
||||
foreach ($this->adddata as $key => $value) {
|
||||
$value['date']=$this->beginTime;
|
||||
$value['create_time']=$this->nowdata;
|
||||
$value['active_user_list'] = @json_encode(array_map("intFun",explode(",",$value['active_user_list'])));
|
||||
if(empty($value['promote_account']) && $value['promote_id']){
|
||||
$value['promote_account'] = $this->PromoteModel->field("account")->where("id = {$value['promote_id']}")->find()['account'];
|
||||
}
|
||||
$tempdbres = $this->PromoteCountModel->add($value);
|
||||
if($tempdbres === false){
|
||||
$this->model->rollback();
|
||||
die("error");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//=======================聚合游戏========================
|
||||
//1聚合新增
|
||||
public function gameNew()
|
||||
{
|
||||
$map = ['register_time'=>['between',[$this->beginTime,$this->endTime]],"puid"=>0,"fgame_id"=>["gt",0]];//0不是小号
|
||||
$gameNew = $this->UserModel->field('COUNT(1) AS new_user_count,fgame_id game_id,fgame_name game_name')
|
||||
->where($map)
|
||||
->group("fgame_id")
|
||||
->select();
|
||||
$count = count($gameNew);
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
$this->gameid[] = $gameNew[$i]["game_id"];
|
||||
$this->gamedata[$gameNew[$i]["game_id"]] = $gameNew[$i];
|
||||
}
|
||||
unset($gameNew);
|
||||
}
|
||||
//2聚合付费
|
||||
public function gamePayMoeny()
|
||||
{
|
||||
$map = ['pay_time'=>['between',[$this->beginTime,$this->endTime]],"pay_status"=>1,"game_id"=>["gt",0]];//1支付成功
|
||||
$gamePayMoeny = $this->SpendModel->field('sum(pay_amount) AS pay_money_count,game_id,game_name')
|
||||
->where($map)
|
||||
->group("game_id")
|
||||
->select();
|
||||
$count = count($gamePayMoeny);
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
if (in_array($gamePayMoeny[$i]["game_id"],$this->gameid)) {
|
||||
//存在
|
||||
$this->gamedata[$gamePayMoeny[$i]["game_id"]]["pay_money_count"] = $gamePayMoeny[$i]["pay_money_count"];
|
||||
}else{
|
||||
$this->gameid[] = $gamePayMoeny[$i]["game_id"];
|
||||
$this->gamedata[$gamePayMoeny[$i]["game_id"]] = $gamePayMoeny[$i];
|
||||
}
|
||||
}
|
||||
unset($gamePayMoeny);
|
||||
}
|
||||
//3聚合活跃
|
||||
public function gameActive()
|
||||
{
|
||||
$map = ['login_time'=>['between',[$this->beginTime,$this->endTime]],"game_id"=>["gt",0]];//0不是小号
|
||||
$gameActive = $this->LoginModel->field('COUNT(DISTINCT user_id) AS active_user_count,GROUP_CONCAT(DISTINCT user_id) active_user_list,game_id,game_name')
|
||||
->where($map)
|
||||
->group("game_id")
|
||||
->select();
|
||||
$count = count($gameActive);
|
||||
for ($i=0; $i < $count; $i++) {
|
||||
if (in_array($gameActive[$i]["game_id"],$this->gameid)) {
|
||||
//存在
|
||||
$this->gamedata[$gameActive[$i]["game_id"]]["active_user_count"] = $gameActive[$i]["active_user_count"];
|
||||
$this->gamedata[$gameActive[$i]["game_id"]]["active_user_list"] = $gameActive[$i]["active_user_list"];
|
||||
}else{
|
||||
$this->gameid[] = $gameActive[$i]["game_id"];
|
||||
$this->gamedata[$gameActive[$i]["game_id"]] = $gameActive[$i];
|
||||
}
|
||||
}
|
||||
unset($gameActive);
|
||||
}
|
||||
//4加入数据库
|
||||
public function gameCreateDb()
|
||||
{
|
||||
$count = count($this->gameid);
|
||||
if ($count > 0) {
|
||||
foreach ($this->gamedata as $key => $value) {
|
||||
$value['date']=$this->beginTime;
|
||||
$value['create_time']=$this->nowdata;
|
||||
$value['active_user_list'] = @json_encode(array_map("intFun",explode(",",$value['active_user_list'])));
|
||||
$tempdbres = $this->GameCountModel->add($value);
|
||||
if($tempdbres === false){
|
||||
$this->model->rollback();
|
||||
die("error");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,85 @@
|
||||
<?php
|
||||
namespace Admin\Controller;
|
||||
|
||||
|
||||
/**
|
||||
* 后台首页控制器
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
class SuperSignController extends ThinkController
|
||||
{
|
||||
public function lists($p = 1) {
|
||||
|
||||
|
||||
|
||||
$page = intval($p);
|
||||
$page = $page ? $page : 1; //默认显示第一页数据
|
||||
$row=10;
|
||||
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
|
||||
|
||||
$map =[];
|
||||
if (I('account')) {
|
||||
$map['tab_user.account'] = I('account');
|
||||
}
|
||||
|
||||
if (I('order_id')) {
|
||||
$map['order_id'] = I('order_id');
|
||||
}
|
||||
|
||||
if (I('start')&&I('end')) {
|
||||
$map['pay_time'] = ['between',[strtotime(I('start')),strtotime(I('end'))]];
|
||||
} else if(I('start')&&!I('end')) {
|
||||
$map['pay_time'] = ['egt',strtotime(I('start'))];
|
||||
} else if (!I('start')&&I('end')) {
|
||||
$map['pay_time'] = ['elt',strtotime(I('end'))];
|
||||
}
|
||||
|
||||
if (I('game_name')) {
|
||||
$map['game_name'] = ['like',I('game_name').'%'];
|
||||
}
|
||||
|
||||
if (I('promote_id')||I('promote_id')=='0') {
|
||||
$map['tab_user.promote_id'] = I('promote_id');
|
||||
}
|
||||
|
||||
$map['tab_game_supersign.pay_status'] = 1;
|
||||
|
||||
$data = M('game_supersign','tab_')
|
||||
->field("order_id,ticket,pay_time,tab_user.account,tab_game.game_name,tab_user.promote_account,pay_price,pay_way")
|
||||
->join("left join tab_user on tab_game_supersign.user_id = tab_user.id")
|
||||
->join("left join tab_game on tab_game_supersign.game_id = tab_game.id")
|
||||
->page($p, $row)
|
||||
->order("pay_time DESC")
|
||||
->where($map)
|
||||
->select();
|
||||
|
||||
foreach ($data as $key => $Value) {
|
||||
$data[$key]['pay_time'] = date('Y-m-d H:i:s',$Value['pay_time']);
|
||||
if ($Value['pay_way']==1) {
|
||||
$data[$key]['pay_way'] = '支付宝';
|
||||
} else if ($Value['pay_way']==2) {
|
||||
$data[$key]['pay_way'] = '微信';
|
||||
} else if($Value['pay_way']==3){
|
||||
$data[$key]['pay_way'] = '双乾支付宝';
|
||||
}else if($Value['pay_way']==4){
|
||||
$data[$key]['pay_way'] = '双乾微信';
|
||||
}else {
|
||||
$data[$key]['pay_way'] = '未知';
|
||||
}
|
||||
}
|
||||
|
||||
$count = M('game_supersign','tab_')
|
||||
->field("order_id,ticket,pay_time,tab_user.account,tab_game.game_name,tab_user.promote_account,pay_price")
|
||||
->join("left join tab_user on tab_game_supersign.user_id = tab_user.id")
|
||||
->join("left join tab_game on tab_game_supersign.game_id = tab_game.id")->where($map)->count();
|
||||
|
||||
$page = set_pagination($count, $row);
|
||||
if ($page) {
|
||||
$this->assign('_page', $page);
|
||||
}
|
||||
$this->meta_title = '超级签订单';
|
||||
$this->assign('data',$data);
|
||||
$this->display();
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,193 @@
|
||||
<?php
|
||||
namespace Admin\Controller;
|
||||
|
||||
|
||||
/**
|
||||
* 后台首页控制器
|
||||
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
||||
*/
|
||||
class TestWhiteListController extends ThinkController
|
||||
{
|
||||
public function lists($p = 1) {
|
||||
|
||||
$page = intval($p);
|
||||
$page = $page ? $page : 1; //默认显示第一页数据
|
||||
$row=10;
|
||||
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
|
||||
|
||||
$map =[];
|
||||
if (I('account')) {
|
||||
$map['account'] = array('like',I('account').'%');
|
||||
}
|
||||
|
||||
$data = M('test_white_list','tab_')
|
||||
->page($p, $row)
|
||||
->where($map)
|
||||
->order('create_ime DESC')
|
||||
->select();
|
||||
|
||||
foreach ($data as $key => $Value) {
|
||||
// $data[$key]['show_status'] = $data[$key]['show_status']?'显示':'锁定';
|
||||
$data[$key]['create_ime'] = date('Y-m-d H:i:s',$Value['create_ime']);
|
||||
}
|
||||
|
||||
$count = M('test_white_list','tab_')
|
||||
->where($map)
|
||||
->count();
|
||||
|
||||
$page = set_pagination($count, $row);
|
||||
if ($page) {
|
||||
$this->assign('_page', $page);
|
||||
}
|
||||
$this->meta_title = '测试白名单';
|
||||
$this->assign('data',$data);
|
||||
$this->display();
|
||||
|
||||
}
|
||||
|
||||
public function add() {
|
||||
$this->meta_title = '测试白名单添加';
|
||||
$this->assign('title','新增');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
public function edit() {
|
||||
$this->meta_title = '测试白名单编辑';
|
||||
$this->assign('title','编辑');
|
||||
$this->display("add");
|
||||
}
|
||||
|
||||
public function edit_user() {
|
||||
$data = I('');
|
||||
|
||||
if (!$data['user_id']) {
|
||||
$this->error('请填写测试账号');
|
||||
}
|
||||
|
||||
$userData['account'] = $data['account'];
|
||||
|
||||
$user = M('user','tab_')->where(array('id'=>$data['user_id']))->find();
|
||||
|
||||
if (!$user) {
|
||||
$this->error('账号不存在');
|
||||
}
|
||||
$userData['check_status'] = $data['status']?$data['status']:0;
|
||||
|
||||
$userAdd = M('user','tab_')->where(array('id'=>$data['user_id']))->save($userData);
|
||||
if ($userAdd) {
|
||||
$whitedata['show_status'] = $data['status']?$data['status']:0;
|
||||
$whitedata['account'] = $data['account'];
|
||||
|
||||
$whiteList = M('test_white_list','tab_')->where(array('user_id'=>$data['user_id']))->save($whitedata);
|
||||
// echo M('test_white_list','tab_')->_sql();die();
|
||||
|
||||
if($whiteList) {
|
||||
$this->success('修改白名单成功',U('TestWhiteList/lists'));
|
||||
} else {
|
||||
$this->error('修改白名单失败');
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->error('修改用户失败');
|
||||
}
|
||||
}
|
||||
|
||||
public function edit_user1() {
|
||||
$data = $_GET;
|
||||
|
||||
if (!$data['user_id']) {
|
||||
$this->ajaxReturn(['status'=>0,'msg'=>"请填写测试账号"]);
|
||||
}
|
||||
|
||||
$userData['account'] = $data['account'];
|
||||
|
||||
$user = M('user','tab_')->where(array('id'=>$data['user_id']))->find();
|
||||
|
||||
if (!$user) {
|
||||
$this->ajaxReturn(['status'=>0,'msg'=>"账号不存在"]);
|
||||
}
|
||||
$userData['check_status'] = $data['status']?$data['status']:0;
|
||||
|
||||
$userAdd = M('user','tab_')->where(array('id'=>$data['user_id']))->save($userData);
|
||||
if ($userAdd) {
|
||||
$whitedata['show_status'] = $data['status']?$data['status']:0;
|
||||
$whitedata['account'] = $data['account'];
|
||||
|
||||
$whiteList = M('test_white_list','tab_')->where(array('user_id'=>$data['user_id']))->save($whitedata);
|
||||
// echo M('test_white_list','tab_')->_sql();die();
|
||||
|
||||
if($whiteList) {
|
||||
$this->ajaxReturn(['status'=>1,'msg'=>"修改白名单成功"]);
|
||||
} else {
|
||||
$this->ajaxReturn(['status'=>0,'msg'=>"修改白名单成功"]);
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->ajaxReturn(['status'=>0,'msg'=>"修改用户失败"]);
|
||||
}
|
||||
}
|
||||
|
||||
public function add_user() {
|
||||
$data = I('');
|
||||
|
||||
if (!$data['account']) {
|
||||
$this->error('请填写测试账号');
|
||||
}
|
||||
|
||||
$userData['account'] = $data['account'];
|
||||
|
||||
$user = M('user','tab_')->where($userData)->find();
|
||||
|
||||
if ($user) {
|
||||
$this->error('账号已经存在');
|
||||
}
|
||||
|
||||
$userData['password'] = md5(sha1('123456') . UC_AUTH_KEY);
|
||||
$userData['promote_id'] = 0;
|
||||
$userData['promote_account'] = '官方渠道';
|
||||
$userData['register_time'] = time();
|
||||
$userData['check_status'] = $data['status']?$data['status']:0;
|
||||
|
||||
$userAdd = M('user','tab_')->add($userData);
|
||||
if ($userAdd) {
|
||||
$data['user_id'] = $userAdd;
|
||||
$data['show_status'] = $data['status']?$data['status']:0;
|
||||
$data['add_user'] = $_SESSION['onethink_admin']['user_auth']['username'];
|
||||
$data['create_ime'] = time();
|
||||
|
||||
$whiteList = M('test_white_list','tab_')->add($data);
|
||||
if($whiteList) {
|
||||
$this->success('添加白名单成功',U('TestWhiteList/lists'));
|
||||
} else {
|
||||
$this->error('添加白名单失败');
|
||||
}
|
||||
|
||||
} else {
|
||||
$this->error('添加用户失败');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public function freezeSupport() {
|
||||
$supportId = I('status');
|
||||
|
||||
$data = [
|
||||
'check_status' => $supportId
|
||||
];
|
||||
|
||||
$isFreeze = M('user','tab_')->where("id=".$supportId)->save($data);
|
||||
|
||||
if ($supportId == 1) {
|
||||
$msg = '启用';
|
||||
} else if ($supportId == 0) {
|
||||
$msg = '锁定';
|
||||
}
|
||||
|
||||
if ($isFreeze) {
|
||||
$this->ajaxReturn(['status'=>1, 'msg'=> $msg.'成功']);
|
||||
} else {
|
||||
$this->ajaxReturn(['status'=>0, 'msg'=> $msg.'失败']);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -1 +1 @@
|
||||
{"news":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":2},{"time":"16:00","count":2},{"time":"17:00","count":1},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"sum":{"news":5,"active":17,"player":1,"money":6},"active":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":3},{"time":"10:00","count":1},{"time":"11:00","count":3},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":1},{"time":"15:00","count":3},{"time":"16:00","count":4},{"time":"17:00","count":2},{"time":"18:00","count":0},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"player":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":0},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":1},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}],"money":[{"time":"0:00","count":0},{"time":"1:00","count":0},{"time":"2:00","count":0},{"time":"3:00","count":0},{"time":"4:00","count":0},{"time":"5:00","count":0},{"time":"6:00","count":0},{"time":"7:00","count":0},{"time":"8:00","count":0},{"time":"9:00","count":0},{"time":"10:00","count":0},{"time":"11:00","count":0},{"time":"12:00","count":0},{"time":"13:00","count":0},{"time":"14:00","count":0},{"time":"15:00","count":0},{"time":"16:00","count":0},{"time":"17:00","count":0},{"time":"18:00","count":"6.00"},{"time":"19:00","count":0},{"time":"20:00","count":0},{"time":"21:00","count":0},{"time":"22:00","count":0},{"time":"23:00","count":0}]}
|
||||
{"news":[{"time":"0:00","count":6},{"time":"1:00","count":9},{"time":"2:00","count":7},{"time":"3:00","count":11},{"time":"4:00","count":16},{"time":"5:00","count":7},{"time":"6:00","count":9},{"time":"7:00","count":11},{"time":"8:00","count":14},{"time":"9:00","count":40},{"time":"10:00","count":58},{"time":"11:00","count":86},{"time":"12:00","count":41},{"time":"13:00","count":55},{"time":"14:00","count":194},{"time":"15:00","count":180},{"time":"16:00","count":121},{"time":"17:00","count":98},{"time":"18:00","count":120},{"time":"19:00","count":147},{"time":"20:00","count":146},{"time":"21:00","count":124},{"time":"22:00","count":93},{"time":"23:00","count":56}],"sum":{"news":1649,"active":8210,"player":1715,"money":226618},"active":[{"time":"0:00","count":967},{"time":"1:00","count":343},{"time":"2:00","count":176},{"time":"3:00","count":135},{"time":"4:00","count":118},{"time":"5:00","count":177},{"time":"6:00","count":465},{"time":"7:00","count":661},{"time":"8:00","count":622},{"time":"9:00","count":547},{"time":"10:00","count":480},{"time":"11:00","count":414},{"time":"12:00","count":326},{"time":"13:00","count":237},{"time":"14:00","count":354},{"time":"15:00","count":328},{"time":"16:00","count":215},{"time":"17:00","count":219},{"time":"18:00","count":256},{"time":"19:00","count":335},{"time":"20:00","count":274},{"time":"21:00","count":244},{"time":"22:00","count":197},{"time":"23:00","count":120}],"player":[{"time":"0:00","count":211},{"time":"1:00","count":84},{"time":"2:00","count":29},{"time":"3:00","count":25},{"time":"4:00","count":16},{"time":"5:00","count":24},{"time":"6:00","count":32},{"time":"7:00","count":56},{"time":"8:00","count":71},{"time":"9:00","count":66},{"time":"10:00","count":63},{"time":"11:00","count":69},{"time":"12:00","count":58},{"time":"13:00","count":62},{"time":"14:00","count":50},{"time":"15:00","count":99},{"time":"16:00","count":68},{"time":"17:00","count":61},{"time":"18:00","count":77},{"time":"19:00","count":157},{"time":"20:00","count":107},{"time":"21:00","count":101},{"time":"22:00","count":74},{"time":"23:00","count":55}],"money":[{"time":"0:00","count":"31554.00"},{"time":"1:00","count":"4117.00"},{"time":"2:00","count":"1839.00"},{"time":"3:00","count":"4513.00"},{"time":"4:00","count":"1008.00"},{"time":"5:00","count":"1981.00"},{"time":"6:00","count":"1270.00"},{"time":"7:00","count":"1906.00"},{"time":"8:00","count":"6683.00"},{"time":"9:00","count":"6119.00"},{"time":"10:00","count":"8974.00"},{"time":"11:00","count":"14147.00"},{"time":"12:00","count":"9775.00"},{"time":"13:00","count":"11908.00"},{"time":"14:00","count":"6781.00"},{"time":"15:00","count":"12626.00"},{"time":"16:00","count":"6742.00"},{"time":"17:00","count":"8303.00"},{"time":"18:00","count":"8804.00"},{"time":"19:00","count":"23476.00"},{"time":"20:00","count":"17464.00"},{"time":"21:00","count":"16899.00"},{"time":"22:00","count":"13143.00"},{"time":"23:00","count":"6586.00"}]}
|
||||
|
@ -0,0 +1,188 @@
|
||||
<!-- 成员授权编辑页面 -->
|
||||
<extend name="Public/base" />
|
||||
<block name="body">
|
||||
<div class="main-place">
|
||||
<span class="main-placetitle">位置</span>
|
||||
<ul class="main-placeul">
|
||||
<li><a href="{:U('User/index')}">用户</a></li>
|
||||
<li><a href="{:U('User/index')}">管理组</a></li>
|
||||
<li><a href="#">{$meta_title}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="tab-wrap">
|
||||
<div class="tab_nav">
|
||||
<ul>
|
||||
<li><a href="{:U('AuthManager/access',array('group_name'=>I('group_name') ,'group_id'=> I('group_id')))}">访问授权</a></li>
|
||||
<li><a href="{:U('AuthManager/category',array('group_name'=>I('group_name') ,'group_id'=> I('group_id')))}">分类授权</a></li>
|
||||
<!-- <li><a href="{:U('AuthManager/dataempower',array('group_name'=>I('group_name') ,'group_id'=> I('group_id')))}">数据授权</a></li>-->
|
||||
<li class="current"><a href="javascript:;">数据授权</a></li>
|
||||
<li><a href="{:U('AuthManager/user',array('group_name'=>I('group_name') ,'group_id'=> I('group_id')))}">成员授权</a></li>
|
||||
<!-- <li class="current"><a href="javascript:;">成员授权</a></li>-->
|
||||
<li class="fr tab_select">
|
||||
<select name="group">
|
||||
<volist name="auth_group" id="vo">
|
||||
<option value="{:U('AuthManager/dataempower',array('group_id'=>$vo['id'],'group_name'=>$vo['title']))}" <eq name="vo['id']" value="$_GET['group_id']">selected</eq> >{$vo.title}</option>
|
||||
</volist>
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-wrap">
|
||||
|
||||
<div class="tab-content tabcon1711" style="margin-top: 20px;">
|
||||
<span style="font-size: 20px;font-weight: 600;padding-left: 15px;padding-bottom: 30px">数据授权</span>
|
||||
<!-- 表单 -->
|
||||
<form id="form" action="{:U('dataEmpowerSave?model='.$model['id'])}" method="post" class="form-horizontal">
|
||||
<!-- 基础文档模型 -->
|
||||
<div id="tab1" class="tab-pane in tab1" style="margin-top: 10px;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l" style="padding-left: 15px;">数据授权类型:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn" style="width: auto">
|
||||
<label >
|
||||
<input type="radio" value="1" name="data_empower_type" <eq name="data_empower_type" value="1">checked="checked"</eq>>可查看全部数据
|
||||
</label >
|
||||
<label >
|
||||
<input type="radio" value="2" name="data_empower_type" <eq name="data_empower_type" value="2">checked="checked"</eq>>可查看部分数据
|
||||
</label>
|
||||
<label >
|
||||
<input type="radio" value="3" name="data_empower_type" <eq name="data_empower_type" value="3">checked="checked"</eq>>只能查看自己创建的会长数据
|
||||
</label>
|
||||
</span>
|
||||
<!-- <span class="notice-text">锁定状态下,推广员账号则无法登录</span>-->
|
||||
<input type="hidden" name="group_id" id="group_id" value="{$_GET['group_id']}">
|
||||
<input type="hidden" name="promote_data" id="promote_data" value="[]">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/layui-v2.5.5/css/layui.css">
|
||||
|
||||
<if condition="$data_empower_type neq 2">
|
||||
<div id="test4" class="demo-transfer" style="margin-left: 100px;margin-top: 35px;display: none" ></div>
|
||||
<else/>
|
||||
<div id="test4" class="demo-transfer" style="margin-left: 100px;margin-top: 35px"></div>
|
||||
</if>
|
||||
|
||||
<div class="form-item cf">
|
||||
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal" >
|
||||
确认
|
||||
</button>
|
||||
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back(-1);" style="color:#000000;background:#ffffff;border: solid 1px #000">
|
||||
返回
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="common_settings">
|
||||
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
|
||||
<form class="addShortcutIcon">
|
||||
<input type="hidden" name="title" value="{$m_title}">
|
||||
<input type="hidden" name="url" value="AuthManager/index">
|
||||
</form>
|
||||
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
|
||||
</div>
|
||||
|
||||
</block>
|
||||
|
||||
|
||||
<block name="script">
|
||||
|
||||
<script src="__STATIC__/layui-v2.5.5/layui.all.js"></script>
|
||||
|
||||
<script>
|
||||
var dataTransfer = '';
|
||||
$.ajax({
|
||||
url: "{:U('getRootPromote')}",
|
||||
type: "post",
|
||||
data: {group_id: $('#group_id').val()},
|
||||
dataType: 'json',
|
||||
success: function (data) {
|
||||
// datas = data;
|
||||
layui.use(['transfer', 'layer', 'util'], function(){
|
||||
var $ = layui.$
|
||||
,transfer = layui.transfer
|
||||
,layer = layui.layer
|
||||
,util = layui.util;
|
||||
|
||||
var data1 =data;
|
||||
|
||||
if (JSON.parse(data1).data_president) {
|
||||
var data2 = JSON.parse(data1).data_president.split(",");
|
||||
}
|
||||
//显示搜索框
|
||||
transfer.render({
|
||||
elem: '#test4'
|
||||
,data: JSON.parse(data1).list
|
||||
,title: ['全部成员', '选中成员']
|
||||
,showSearch: true,
|
||||
value: data2,
|
||||
id: 'key123',
|
||||
onchange: function(data, index){
|
||||
dataTransfer = transfer.getData('key123'); //获取右侧数据
|
||||
// layer.alert(JSON.stringify(dataTransfer));
|
||||
$('#promote_data').val(JSON.stringify(dataTransfer));
|
||||
}
|
||||
})
|
||||
transfets = transfer;
|
||||
//批量办法定事件
|
||||
util.event('lay-demoTransferActive', {
|
||||
getData: function(othis){
|
||||
var getData = transfer.getData('key123'); //获取右侧数据
|
||||
layer.alert(JSON.stringify(getData));
|
||||
}
|
||||
,reload:function(){
|
||||
//实例重载
|
||||
transfer.reload('key123', {
|
||||
title: ['文人', '喜欢的文人']
|
||||
,value: ['2', '5', '9']
|
||||
,showSearch: true
|
||||
})
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(function () {
|
||||
var status = $('input:radio[name="data_empower_type"]:checked').val();
|
||||
$('#status').val(status);
|
||||
});
|
||||
$(":radio").click(function () {
|
||||
var status = $('input:radio[name="data_empower_type"]:checked').val();
|
||||
$('#status').val(status);
|
||||
if (status != 2) {
|
||||
$("#test4").css('display','none');
|
||||
$('#promote_data').val('[]');
|
||||
} else {
|
||||
$("#test4").css('display','block');
|
||||
$('#promote_data').val(JSON.stringify(dataTransfer));
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
$('select[name=group]').change(function(){
|
||||
location.href = this.value;
|
||||
});
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('AuthManager/index')}');
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.layui-transfer-box{
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
</block>
|
@ -0,0 +1,277 @@
|
||||
<extend name="Public/base"/>
|
||||
|
||||
<block name="body">
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
||||
<style>
|
||||
.js-pop,.remarkView{
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
<!-- 标题栏 -->
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<div class="fr">
|
||||
<a href="{:U('lists')}">推广补链</a>
|
||||
<a class="tabchose" href="{:U('recordList',array('type'=>2))}">补链记录</a>
|
||||
</div>
|
||||
<h3 class="page_title">补链记录</h3>
|
||||
<p class="description_text">说明:此处功能查看玩家推广补链记录。</p>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="cf top_nav_list">
|
||||
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch fl cf search_list">
|
||||
<div class="input-list search-title-box">
|
||||
<label>搜索:</label>
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" name="account" placeholder="玩家账号" value="{:I('account')}">
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" name="promote_account" placeholder="补链前渠道" value="{:I('promote_account')}">
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" name="promote_account_to" placeholder="补链后渠道" value="{:I('promote_account_to')}">
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" name="op_account" placeholder="操作人员" value="{:I('op_account')}">
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<input type="text" readonly id="time_start" name="time_start" class="" value="{:I('time_start')}" placeholder="切分开始时间" />
|
||||
-
|
||||
<div class="input-append date" id="datetimepicker" style="display:inline-block">
|
||||
<input type="text" readonly id="time_end" name="time_end" class="" value="{:I('time_end')}" placeholder="切分结束时间" />
|
||||
<span class="add-on"><i class="icon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-list">
|
||||
<a class="sch-btn" href="javascript:;" id="search" url="{:U('Mend/recordList','model='.$model['name'] . '&row='.I('row'),false)}">搜索</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<input class="check-all" type="checkbox">
|
||||
</th>
|
||||
<th>玩家账号</th>
|
||||
<th>补链前渠道</th>
|
||||
<th>补链前归属金额</th>
|
||||
<th>补链后渠道</th>
|
||||
<th style="width:400px;">备注</th>
|
||||
<th>切分时间</th>
|
||||
<th>补链时间</th>
|
||||
<th>操作人员</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 列表 -->
|
||||
<tbody id="tablebox">
|
||||
<empty name ="list_data">
|
||||
<td colspan="9" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
<else />
|
||||
<volist name="list_data" id="data">
|
||||
<tr>
|
||||
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
|
||||
<td>{$data['user_account']}</td>
|
||||
<td>{$data['promote_account']}</td>
|
||||
<td>{$data['pay_amount']}</td>
|
||||
<td>{$data['promote_account_to']}</td>
|
||||
<td class="js-pop" style="max-width: 400px;padding: 0 20px;">
|
||||
<a href="javascript:" title="点击查看" class="remarkView" info="{$data['remark']}">{$data['remark']}</a>
|
||||
</td>
|
||||
<td>{$data.order_time}</td>
|
||||
<td>{$data.create_time}</td>
|
||||
<td>{$data.op_account}</td>
|
||||
</tr>
|
||||
</volist>
|
||||
</empty>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
<a class="sch-btn" href="{:U('Mend/recordList',array_merge(['export'=>1],I('get.')))}">导出</a>
|
||||
<div id="pagebox">
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="common_settings">
|
||||
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
|
||||
<form class="addShortcutIcon">
|
||||
<input type="hidden" name="title" value="{$m_title}">
|
||||
<input type="hidden" name="url" value="Mend/lists">
|
||||
</form>
|
||||
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
|
||||
</div>
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script type="text/html" id="tabletpl">
|
||||
{@each list_data as item,index}
|
||||
<tr>
|
||||
<td><input class="ids" type="checkbox" value="${item['id']}" name="ids[]"></td>
|
||||
<td>${item['user_account']}</td>
|
||||
<td>${item['promote_account']}</td>
|
||||
<td>${item['pay_amount']}</td>
|
||||
<td>${item['promote_account_to']}</td>
|
||||
<td class="js-pop" style="max-width: 400px;padding: 0 20px;">
|
||||
<a href="javascript:" title="点击查看" class="remarkView" info="${item['remark']}">${item['remark']}</a>
|
||||
</td>
|
||||
<td>${item.order_time}</td>
|
||||
<td>${item.create_time}</td>
|
||||
<td>${item.op_account}</td>
|
||||
</tr>
|
||||
{@/each}
|
||||
</script>
|
||||
<link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
|
||||
<php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
|
||||
<link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
|
||||
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
|
||||
|
||||
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
||||
<script src="__STATIC__/layer/extend/layer.ext.js" type="text/javascript"></script>
|
||||
<script src="__STATIC__/juicer-min.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
$(".select_gallery").select2();
|
||||
$(".input-list-user").click(function(){
|
||||
$('#select2-user_id-container').text('请选择玩家账号');
|
||||
$("#user_account").val('');
|
||||
});
|
||||
$("#user_id").change(function() {
|
||||
$("#user_account").val($("#user_id option:selected").val());
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav("{:U('Mend/lists')}");
|
||||
if('{$Think.get.account}'!=''){
|
||||
$('#select2-user_id-container').text('{$Think.get.account}');
|
||||
}
|
||||
Think.setValue('row','{:I("row",10)}')
|
||||
$(function(){
|
||||
//搜索功能
|
||||
$("#search").click(function(){
|
||||
var url = $(this).attr('url');
|
||||
var query = $('.jssearch').find('input').serialize();
|
||||
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
||||
query = query.replace(/^&/g,'');
|
||||
if( url.indexOf('?')>0 ){
|
||||
url += '&' + query;
|
||||
}else{
|
||||
url += '?' + query;
|
||||
}
|
||||
var start = $("#time_start").val();
|
||||
var end = $("#time_end").val();
|
||||
if(start !='' && end != ''){
|
||||
if (Date.parse(start) > Date.parse(end)){
|
||||
layer.msg('开始时间必须小于等于结束时间');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
window.location.href = url;
|
||||
});
|
||||
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
$('#time_start').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language:"zh-CN",
|
||||
minView:2,
|
||||
autoclose:true
|
||||
});
|
||||
|
||||
$('#datetimepicker').datetimepicker({
|
||||
format: 'yyyy-mm-dd',
|
||||
language:"zh-CN",
|
||||
minView:2,
|
||||
autoclose:true,
|
||||
pickerPosition:'bottom-left'
|
||||
})
|
||||
//下拉内容框
|
||||
$(".drop-down2").on('click',function(event) {
|
||||
var navlist = $(this).find('.i_list_li');
|
||||
if (navlist.hasClass('hidden')) {
|
||||
navlist.removeClass('hidden');
|
||||
$('#i_list_id').focus().val('');
|
||||
} else {
|
||||
navlist.addClass('hidden');
|
||||
}
|
||||
$(document).one("click", function(){
|
||||
navlist.addClass('hidden');
|
||||
});
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$('#i_list_id').on('keyup',function(event) {
|
||||
var val = $.trim($(this).val()).toLowerCase();
|
||||
$('#i_list_idh').val(val);
|
||||
});
|
||||
|
||||
$("#i_list_li").find("a").each(function(){
|
||||
$(this).click(function(){
|
||||
var text = $.trim($(this).text()).toLowerCase();
|
||||
$("#i_list_id").val(text);
|
||||
$('#i_list_idh').val(text);
|
||||
})
|
||||
});
|
||||
|
||||
pageAjax();
|
||||
})
|
||||
|
||||
function pageAjax(){
|
||||
$(".remarkView,.num,.prev,.next,.first,.end").off("click");
|
||||
$(".remarkView").click(function() {
|
||||
layer.alert($(this).attr("info"));
|
||||
})
|
||||
$(".num,.prev,.next,.first,.end").on("click",function(e){
|
||||
e.preventDefault();
|
||||
layer.load(2);
|
||||
|
||||
var url = $(this).attr("href");
|
||||
$.ajax({
|
||||
url:url,
|
||||
data:{
|
||||
row_count:{$row_count},
|
||||
row:'{:I("row",10)}'
|
||||
},
|
||||
type:"post",
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
layer.closeAll('loading');
|
||||
$("#pagebox").html(data.page);
|
||||
var tpl =$("#tabletpl").html();
|
||||
var html = juicer(tpl, data);
|
||||
$("#tablebox").html(html);
|
||||
pageAjax();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,85 @@
|
||||
<extend name="Public/base" />
|
||||
<block name="css">
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/webuploader.css" media="all">
|
||||
<style>
|
||||
#form .txt_area.download_url {width:400px;}
|
||||
.tabcon1711 .table_radio2 .table_btn {width:215px;}
|
||||
</style>
|
||||
</block>
|
||||
<block name="body">
|
||||
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
|
||||
|
||||
<script src="__STATIC__/md5.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.js"></script>
|
||||
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js"></script>
|
||||
|
||||
|
||||
<!-- 标签页导航 -->
|
||||
<div class="tab-wrap">
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<h3 class="page_title">{$meta_title}</h3>
|
||||
</div>
|
||||
|
||||
<div class="tab-content tabcon1711">
|
||||
<!-- 表单 -->
|
||||
<form id="form" action="{:U('add')}" method="post" class="form-horizontal">
|
||||
<!-- 基础 -->
|
||||
<div id="tab1" class="tab-pane in tab1 ">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>推广公司名称:</td>
|
||||
<td class="r" >
|
||||
<input type="text" class="txt " name="company_name" value="" placeholder="请输入推广公司名称">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>显示状态:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn">
|
||||
<label>
|
||||
<input type="radio" class="inp_radio" value="1" name="status" checked> 开启
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" class="inp_radio" value="0" name="status"> 关闭
|
||||
</label>
|
||||
</span>
|
||||
<span class="notice-text"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-item cf">
|
||||
<button class="submit_btn ajax-post" id="submit" type="submit" target-form="form-horizontal" style="margin-left:210px;">
|
||||
保存
|
||||
</button>
|
||||
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:history.back(-1);" >
|
||||
返回
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common_settings">
|
||||
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
|
||||
<form class="addShortcutIcon">
|
||||
<input type="hidden" name="title" value="{$meta_title}">
|
||||
<input type="hidden" name="url" value="Partner/add">
|
||||
</form>
|
||||
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
|
||||
</div>
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav("{:U('PromoteCompany/lists')}");
|
||||
$('#submit').click(function(){
|
||||
$('#form').submit();
|
||||
});
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,88 @@
|
||||
<extend name="Public/base" />
|
||||
<block name="css">
|
||||
<link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all">
|
||||
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/webuploader.css" media="all">
|
||||
<style>
|
||||
#form .txt_area.download_url {width:400px;}
|
||||
.tabcon1711 .table_radio2 .table_btn {width:215px;}
|
||||
</style>
|
||||
</block>
|
||||
<block name="body">
|
||||
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
|
||||
|
||||
<script src="__STATIC__/md5.js" type="text/javascript" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="__STATIC__/webuploader/webuploader.js"></script>
|
||||
<script src="__STATIC__/layer/layer.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="__STATIC__/layer/extend/layer.ext.js"></script>
|
||||
|
||||
|
||||
<!-- 标签页导航 -->
|
||||
<div class="tab-wrap">
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<h3 class="page_title">{$meta_title}</h3>
|
||||
</div>
|
||||
|
||||
<div class="tab-content tabcon1711">
|
||||
<!-- 表单 -->
|
||||
<form id="form" action="{:U('edit')}" method="post" class="form-horizontal">
|
||||
<!-- 基础 -->
|
||||
<div id="tab1" class="tab-pane in tab1 ">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l"><i class="mustmark" style="margin-left:-7px">*</i>推广公司名称:</td>
|
||||
<td class="r" >
|
||||
<input type="text" class="txt " name="company_name" value="{$data.company_name}" placeholder="请输入推广公司名称">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="l noticeinfo"><i class="mustmark" style="margin-left:-7px">*</i>显示状态:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn">
|
||||
<label>
|
||||
<input type="radio" class="inp_radio" value="1" name="status"
|
||||
<eq name="data.status" value="1"> checked </eq>> 开启
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" class="inp_radio" value="0" name="status"
|
||||
<eq name="data.status" value="0"> checked </eq>> 关闭
|
||||
</label>
|
||||
</span>
|
||||
<span class="notice-text"></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-item cf">
|
||||
<input type="hidden" name="id" value="{$data.id}">
|
||||
<button class="submit_btn ajax-post" id="submit" type="submit" target-form="form-horizontal" style="margin-left:210px;">
|
||||
保存
|
||||
</button>
|
||||
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="{:U('Partner/lists')}" >
|
||||
返回
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="common_settings">
|
||||
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
|
||||
<form class="addShortcutIcon">
|
||||
<input type="hidden" name="title" value="{$meta_title}">
|
||||
<input type="hidden" name="url" value="Partner/edit">
|
||||
</form>
|
||||
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
|
||||
</div>
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav("{:U('Partner/lists')}");
|
||||
$('#submit').click(function(){
|
||||
$('#form').submit();
|
||||
});
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,163 @@
|
||||
<extend name="Public/base"/>
|
||||
|
||||
<block name="body">
|
||||
|
||||
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
|
||||
<script type="text/javascript" src="__JS__/bootstrap.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/select2.min.js"></script>
|
||||
<style>
|
||||
.select2-container--default .select2-selection--single {
|
||||
color: #000;
|
||||
resize: none;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #a7b5bc #ced9df #ced9df #a7b5bc;
|
||||
box-shadow: 0px 3px 3px #F7F8F9 inset;height:35px;
|
||||
height:28px;border-radius:3px;font-size:12px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
line-height:35px;
|
||||
line-height:28px;
|
||||
}
|
||||
.select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
height:26px;
|
||||
}
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field {
|
||||
height:26px;line-height:26px;font-size:12px;
|
||||
}
|
||||
.select2-results__option[aria-selected] {font-size:12px;}
|
||||
.data_list table td{
|
||||
text-indent:0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<h3 class="page_title">{$meta_title}</h3>
|
||||
<p class="description_text">说明:该功能是用于录入工会所属的推广公司名称</p>
|
||||
</div>
|
||||
|
||||
<div class="cf top_nav_list">
|
||||
<div class="fl button_list">
|
||||
<div class="tools">
|
||||
<a class="" href="{:U('add')}"><span class="button_icon button_icon1"></span>新增</a>
|
||||
<a class="ajax-post confirm " target-form="ids" url="{:U('del')}"><span class="button_icon button_icon2"></span>删除</a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 高级搜索 -->
|
||||
<div class="jssearch fl cf search_list">
|
||||
<div class="input-list search-title-box">
|
||||
<label>搜索:</label>
|
||||
</div>
|
||||
<div class="sleft">
|
||||
<input type="text" name="company_name" class="search-input" value="{:I('company_name')}" placeholder="请输入公司名称搜索">
|
||||
<a class="sch-btn" href="javascript:;" id="search" url="__SELF__">搜索</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 数据列表 -->
|
||||
<div class="data_list data_game_list">
|
||||
<div class="">
|
||||
<table>
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<input class="check-all" type="checkbox">
|
||||
</th>
|
||||
<th>推广公司</th>
|
||||
<th>显示状态</th>
|
||||
<th>添加人</th>
|
||||
<th>添加时间</th>
|
||||
<th style="width:10%;min-width:150px;">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 列表 -->
|
||||
<tbody>
|
||||
<empty name ="listData">
|
||||
<td colspan="6" class="text-center">aOh! 暂时还没有内容!</td>
|
||||
<else />
|
||||
<volist name="listData" id="data">
|
||||
<tr>
|
||||
<td><input class="ids" type="checkbox" value="{$data['id']}" name="ids[]"></td>
|
||||
<td>{$data.company_name}</td>
|
||||
<td>{$data.status}</td>
|
||||
<td>{$data.nickname}</td>
|
||||
<td>{$data.create_time}</td>
|
||||
<td>
|
||||
<a href="{:U('edit',array('id'=>$data['id']))}">编辑</a>
|
||||
<a href="{:U('del',array('id'=>$data['id']))}" class="confirm ajax-get">删除</a>
|
||||
</td>
|
||||
</tr>
|
||||
</volist>
|
||||
</empty>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page">
|
||||
{$_page|default=''}
|
||||
</div>
|
||||
|
||||
<div class="common_settings">
|
||||
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
|
||||
<form class="addShortcutIcon">
|
||||
<input type="hidden" name="title" value="{$meta_title}">
|
||||
<input type="hidden" name="url" value="Partner/lists">
|
||||
</form>
|
||||
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
|
||||
</div>
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script src="__STATIC__/layer/layer.js"></script>
|
||||
<script src="__STATIC__/layer/extend/layer.ext.js"></script>
|
||||
<style>
|
||||
.layui-layer-demo .layui-layer-title {background:#F0F5F7;font-weight:bold;}
|
||||
.layui-layer-demo .layui-layer-content {}
|
||||
.layui-layer-demo .layui-layer-content table{width:100%;border:0;border-spacing:0;padding:0;}
|
||||
.layui-layer-demo .layui-layer-content td {height:42px;padding-left:20px;}
|
||||
.layui-layer-demo .layui-layer-content tr:hover {background:#F0F5F7;}
|
||||
.layui-layer-demo .layui-layer-content tr~tr {border-top:1px solid #ccc;}
|
||||
.layui-layer-demo .layui-layer-content td~td {border-left:1px solid #ccc;}
|
||||
.layui-layer-demo .layui-layer-content tr:last-child td {}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
<volist name=":I('get.')" id="vo">
|
||||
Think.setValue('{$key}',"{$vo}");
|
||||
</volist>
|
||||
$(".select_gallery").select2();
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav("{:U('lists')}");
|
||||
$(function(){
|
||||
//搜索功能
|
||||
$("#search").click(function(){
|
||||
var url = $(this).attr('url');
|
||||
var query = $('.jssearch').find('input').serialize();
|
||||
query += "&"+$('.jssearch').find('select').serialize();
|
||||
query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
|
||||
query = query.replace(/^&/g,'');
|
||||
|
||||
if( url.indexOf('?')>0 ){
|
||||
url += '&' + query;
|
||||
}else{
|
||||
url += '?' + query;
|
||||
}
|
||||
|
||||
window.location.href = url;
|
||||
});
|
||||
|
||||
//回车自动提交
|
||||
$('.jssearch').find('input').keyup(function(event){
|
||||
if(event.keyCode===13){
|
||||
$("#search").click();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</block>
|
@ -0,0 +1,115 @@
|
||||
<extend name="Public/base" />
|
||||
|
||||
<block name="body">
|
||||
<!-- <link rel="stylesheet" type="text/css" href="__CSS__/admin_table.css" media="all"> -->
|
||||
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/provincecityarea/area1.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/provincecityarea/AreaData_min.js"></script>
|
||||
<script type="text/javascript" src="__STATIC__/provincecityarea/jquery-1.7.min.js"></script>
|
||||
<script type="text/javascript" src="__JS__/jquery.mousewheel.js"></script>
|
||||
|
||||
|
||||
<div class="cf main-place top_nav_list navtab_list">
|
||||
<ul class="tabnav1711 fr jstabnav">
|
||||
<li data-tab="tab1" class="current"><a href="javascript:void(0);">基本信息</a></li></li>
|
||||
<li data-tab="tab2" ><a href="javascript:void(0);">结算信息</a></li>
|
||||
</ul>
|
||||
<h3 class="page_title">{$title}测试账号</h3>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 标签页导航 -->
|
||||
<div class="tab-wrap">
|
||||
|
||||
<div class="tab-content tabcon1711">
|
||||
<!-- 表单 -->
|
||||
<if condition="$title eq '编辑'" >
|
||||
<form id="form" action="{:U('edit_user?model='.$model['id'])}" method="post" class="form-horizontal">
|
||||
<else />
|
||||
<form id="form" action="{:U('add_user?model='.$model['id'])}" method="post" class="form-horizontal">
|
||||
</if>
|
||||
|
||||
<!-- 基础文档模型 -->
|
||||
<div id="tab1" class="tab-pane in tab1">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="l">测试账号:</td>
|
||||
<td class="r">
|
||||
<input type="text" class="txt" name="account" value="{$_REQUEST['account']}" onKeyUp="value=value.replace(/[^\w\.\/]/ig,'')">
|
||||
<input type="hidden" name="user_id" value="{$_REQUEST['user_id']}">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<td class="l">显示状态:</td>
|
||||
<td class="r table_radio">
|
||||
<span class="form_radio table_btn">
|
||||
<label >
|
||||
<input type="radio" value="1" name="status" <if condition="$_REQUEST['status'] eq 1">checked="checked"</if>>开启
|
||||
</label >
|
||||
<label >
|
||||
<input type="radio" value="0" name="status" <if condition="$_REQUEST['status'] eq 0">checked="checked"</if>>{:L('Lock')}
|
||||
</label>
|
||||
</span>
|
||||
<input type="hidden" name="status" id="status" value="{$data['status']}">
|
||||
<script>
|
||||
$(function () {
|
||||
var status = $('input:radio[name="status"]:checked').val();
|
||||
$('#status').val(status);
|
||||
});
|
||||
$(":radio").click(function () {
|
||||
var status = $('input:radio[name="status"]:checked').val();
|
||||
$('#status').val(status);
|
||||
})
|
||||
</script>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="form-item cf">
|
||||
<button class="submit_btn ajax-post mlspacing" id="submit" type="submit" target-form="form-horizontal">
|
||||
保存
|
||||
</button>
|
||||
<a class="submit_btn " alt="返回上一页" title="返回上一页" href="javascript:window.history.back(-1);" >
|
||||
返回
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="common_settings">
|
||||
<span class="plus_icon"><span><img src="__IMG__/zwmimages/icon_jia.png"></span></span>
|
||||
<form class="addShortcutIcon">
|
||||
<input type="hidden" name="title" value="{$m_title}">
|
||||
<input type="hidden" name="url" value="Promote/lists/type/1">
|
||||
</form>
|
||||
<a class="ajax-post add-butn <notempty name='commonset'>addSIsetted</notempty>" href="javascript:;" target-form="addShortcutIcon" url="{:U('Think/addShortcutIcon')}"><img src="__IMG__/zwmimages/icon_jia.png"><span><notempty name='commonset'>已添加<else />添加至常用设置</notempty></span></a>
|
||||
</div>
|
||||
|
||||
</block>
|
||||
|
||||
<block name="script">
|
||||
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
//导航高亮
|
||||
highlight_subnav('{:U('TestWhiteList/lists')}');
|
||||
Think.setValue("game_type_id", {$data.game_type_id|default = 0});
|
||||
Think.setValue("category", {$data.category|default = 0});
|
||||
Think.setValue("ba_id", {$data.ba_id|default = 0});
|
||||
|
||||
$(function(){
|
||||
// var pro="{:$data['bank_area']['0']}";
|
||||
// alert (pro);
|
||||
showTab();
|
||||
prov="{:substr($data['bank_area'],0,2)}";
|
||||
city="{:substr($data['bank_area'],2,2)}";
|
||||
ciarea="{:substr($data['bank_area'],4,2)}";
|
||||
//initComplexArea('seachprov', 'seachcity', 'seachdistrict', area_array, sub_array, prov, city, ciarea);
|
||||
});
|
||||
</script>
|
||||
</block>
|
||||
|
@ -0,0 +1,2 @@
|
||||
/** layui-v2.5.5 MIT License By https://www.layui.com */
|
||||
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
|
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 701 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 277 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 7.3 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 6.6 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 3.1 KiB |