|
|
@ -8,6 +8,7 @@
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
// +----------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
namespace Admin\Controller;
|
|
|
|
namespace Admin\Controller;
|
|
|
|
|
|
|
|
|
|
|
|
use User\Api\UserApi;
|
|
|
|
use User\Api\UserApi;
|
|
|
|
use Com\Wechat;
|
|
|
|
use Com\Wechat;
|
|
|
|
use Com\WechatAuth;
|
|
|
|
use Com\WechatAuth;
|
|
|
@ -16,13 +17,15 @@ use Com\WechatAuth;
|
|
|
|
* 后台用户控制器
|
|
|
|
* 后台用户控制器
|
|
|
|
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
|
|
|
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
class UserController extends AdminController {
|
|
|
|
class UserController extends AdminController
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 用户管理首页
|
|
|
|
* 用户管理首页
|
|
|
|
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
|
|
|
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function index(){
|
|
|
|
public function index()
|
|
|
|
|
|
|
|
{
|
|
|
|
$nickname = I('nickname');
|
|
|
|
$nickname = I('nickname');
|
|
|
|
if (isset($_REQUEST['status'])) {
|
|
|
|
if (isset($_REQUEST['status'])) {
|
|
|
|
$map['status'] = $_REQUEST['status'];
|
|
|
|
$map['status'] = $_REQUEST['status'];
|
|
|
@ -49,7 +52,8 @@ class UserController extends AdminController {
|
|
|
|
* 修改昵称初始化
|
|
|
|
* 修改昵称初始化
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function updateNickname(){
|
|
|
|
public function updateNickname()
|
|
|
|
|
|
|
|
{
|
|
|
|
$nickname = M('Member')->getFieldByUid(UID, 'nickname');
|
|
|
|
$nickname = M('Member')->getFieldByUid(UID, 'nickname');
|
|
|
|
$this->assign('nickname', $nickname);
|
|
|
|
$this->assign('nickname', $nickname);
|
|
|
|
$this->meta_title = '修改昵称';
|
|
|
|
$this->meta_title = '修改昵称';
|
|
|
@ -60,7 +64,8 @@ class UserController extends AdminController {
|
|
|
|
* 修改昵称提交
|
|
|
|
* 修改昵称提交
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function submitNickname(){
|
|
|
|
public function submitNickname()
|
|
|
|
|
|
|
|
{
|
|
|
|
//获取参数
|
|
|
|
//获取参数
|
|
|
|
$nickname = I('post.nickname');
|
|
|
|
$nickname = I('post.nickname');
|
|
|
|
$password = I('post.password');
|
|
|
|
$password = I('post.password');
|
|
|
@ -95,7 +100,8 @@ class UserController extends AdminController {
|
|
|
|
* 修改密码初始化
|
|
|
|
* 修改密码初始化
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function updatePassword(){
|
|
|
|
public function updatePassword()
|
|
|
|
|
|
|
|
{
|
|
|
|
$this->meta_title = '修改密码';
|
|
|
|
$this->meta_title = '修改密码';
|
|
|
|
$this->display('updatepassword');
|
|
|
|
$this->display('updatepassword');
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -104,7 +110,8 @@ class UserController extends AdminController {
|
|
|
|
* 修改密码提交
|
|
|
|
* 修改密码提交
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function submitPassword(){
|
|
|
|
public function submitPassword()
|
|
|
|
|
|
|
|
{
|
|
|
|
//获取参数
|
|
|
|
//获取参数
|
|
|
|
$password = I('post.old');
|
|
|
|
$password = I('post.old');
|
|
|
|
empty($password) && $this->error('请输入原密码');
|
|
|
|
empty($password) && $this->error('请输入原密码');
|
|
|
@ -130,7 +137,8 @@ class UserController extends AdminController {
|
|
|
|
* 用户行为列表
|
|
|
|
* 用户行为列表
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function action(){
|
|
|
|
public function action()
|
|
|
|
|
|
|
|
{
|
|
|
|
//获取列表数据
|
|
|
|
//获取列表数据
|
|
|
|
$Action = M('Action')->where(array('status' => array('gt', -1)));
|
|
|
|
$Action = M('Action')->where(array('status' => array('gt', -1)));
|
|
|
|
$list = $this->lists($Action);
|
|
|
|
$list = $this->lists($Action);
|
|
|
@ -147,7 +155,8 @@ class UserController extends AdminController {
|
|
|
|
* 新增行为
|
|
|
|
* 新增行为
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function addAction(){
|
|
|
|
public function addAction()
|
|
|
|
|
|
|
|
{
|
|
|
|
$this->meta_title = '新增行为';
|
|
|
|
$this->meta_title = '新增行为';
|
|
|
|
$this->assign('data', null);
|
|
|
|
$this->assign('data', null);
|
|
|
|
$this->display('editaction');
|
|
|
|
$this->display('editaction');
|
|
|
@ -157,7 +166,8 @@ class UserController extends AdminController {
|
|
|
|
* 编辑行为
|
|
|
|
* 编辑行为
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function editAction(){
|
|
|
|
public function editAction()
|
|
|
|
|
|
|
|
{
|
|
|
|
$id = I('get.id');
|
|
|
|
$id = I('get.id');
|
|
|
|
empty($id) && $this->error('参数不能为空!');
|
|
|
|
empty($id) && $this->error('参数不能为空!');
|
|
|
|
$data = M('Action')->field(true)->find($id);
|
|
|
|
$data = M('Action')->field(true)->find($id);
|
|
|
@ -171,7 +181,8 @@ class UserController extends AdminController {
|
|
|
|
* 更新行为
|
|
|
|
* 更新行为
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
* @author huajie <banhuajie@163.com>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function saveAction(){
|
|
|
|
public function saveAction()
|
|
|
|
|
|
|
|
{
|
|
|
|
$res = D('Action')->update();
|
|
|
|
$res = D('Action')->update();
|
|
|
|
if (!$res) {
|
|
|
|
if (!$res) {
|
|
|
|
$this->error(D('Action')->getError());
|
|
|
|
$this->error(D('Action')->getError());
|
|
|
@ -184,7 +195,8 @@ class UserController extends AdminController {
|
|
|
|
* 会员状态修改
|
|
|
|
* 会员状态修改
|
|
|
|
* @author 朱亚杰 <zhuyajie@topthink.net>
|
|
|
|
* @author 朱亚杰 <zhuyajie@topthink.net>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function changeUserStatus($method=null){
|
|
|
|
public function changeUserStatus($method = null)
|
|
|
|
|
|
|
|
{
|
|
|
|
$id = array_unique((array)I('id', 0));
|
|
|
|
$id = array_unique((array)I('id', 0));
|
|
|
|
if (in_array(C('USER_ADMINISTRATOR'), $id)) {
|
|
|
|
if (in_array(C('USER_ADMINISTRATOR'), $id)) {
|
|
|
|
$this->error("不允许对超级管理员执行该操作!");
|
|
|
|
$this->error("不允许对超级管理员执行该操作!");
|
|
|
@ -211,7 +223,8 @@ class UserController extends AdminController {
|
|
|
|
* 会员状态修改
|
|
|
|
* 会员状态修改
|
|
|
|
* @author 朱亚杰 <zhuyajie@topthink.net>
|
|
|
|
* @author 朱亚杰 <zhuyajie@topthink.net>
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function changeStatus($method=null){
|
|
|
|
public function changeStatus($method = null)
|
|
|
|
|
|
|
|
{
|
|
|
|
$id = array_unique((array)I('id', 0));
|
|
|
|
$id = array_unique((array)I('id', 0));
|
|
|
|
if (in_array(C('USER_ADMINISTRATOR'), $id)) {
|
|
|
|
if (in_array(C('USER_ADMINISTRATOR'), $id)) {
|
|
|
|
$this->error("不允许对超级管理员执行该操作!");
|
|
|
|
$this->error("不允许对超级管理员执行该操作!");
|
|
|
@ -239,7 +252,8 @@ class UserController extends AdminController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function add($username = '', $password = '', $repassword = '', $email = '',$second_pwd=''){
|
|
|
|
public function add($username = '', $password = '', $repassword = '', $email = '', $second_pwd = '')
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
if (IS_POST) {
|
|
|
|
if (IS_POST) {
|
|
|
|
/*检测用户名是否为空*/
|
|
|
|
/*检测用户名是否为空*/
|
|
|
@ -285,19 +299,22 @@ class UserController extends AdminController {
|
|
|
|
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'User/index', 'status' => 1])->find());
|
|
|
|
$this->assign('commonset', M('Kuaijieicon')->where(['url' => 'User/index', 'status' => 1])->find());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$this->display();
|
|
|
|
$this->display();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 系统非常规MD5加密方法
|
|
|
|
* 系统非常规MD5加密方法
|
|
|
|
* @param string $str 要加密的字符串
|
|
|
|
* @param string $str 要加密的字符串
|
|
|
|
* @return string
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
function think_ucenter_md5($str, $key = 'ThinkUCenter'){
|
|
|
|
function think_ucenter_md5($str, $key = 'ThinkUCenter')
|
|
|
|
|
|
|
|
{
|
|
|
|
return '' === $str ? '' : md5(sha1($str) . $key);
|
|
|
|
return '' === $str ? '' : md5(sha1($str) . $key);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public function edit($id){
|
|
|
|
|
|
|
|
|
|
|
|
public function edit($id)
|
|
|
|
|
|
|
|
{
|
|
|
|
// var_dump(session());exit;
|
|
|
|
// var_dump(session());exit;
|
|
|
|
if (IS_POST) {
|
|
|
|
if (IS_POST) {
|
|
|
|
if (isset($_POST['bind_wx'])) {
|
|
|
|
if (isset($_POST['bind_wx'])) {
|
|
|
@ -407,7 +424,9 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
|
|
|
|
$this->display();
|
|
|
|
$this->display();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public function bdwx(){
|
|
|
|
|
|
|
|
|
|
|
|
public function bdwx()
|
|
|
|
|
|
|
|
{
|
|
|
|
$map['id'] = UID;
|
|
|
|
$map['id'] = UID;
|
|
|
|
$Member = D('UcenterMember')->field('id,username,admin_openid,openid_sign')->where($map)->find();
|
|
|
|
$Member = D('UcenterMember')->field('id,username,admin_openid,openid_sign')->where($map)->find();
|
|
|
|
$this->assign('id', $map['id']);
|
|
|
|
$this->assign('id', $map['id']);
|
|
|
@ -415,10 +434,16 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
|
|
|
|
$this->meta_title = '绑定微信';
|
|
|
|
$this->meta_title = '绑定微信';
|
|
|
|
$this->display();
|
|
|
|
$this->display();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public function updatelist($p=0){
|
|
|
|
|
|
|
|
|
|
|
|
public function updatelist($p = 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
$page = intval($p);
|
|
|
|
$page = intval($p);
|
|
|
|
$page = $page ? $page : 1; //默认显示第一页数据
|
|
|
|
$page = $page ? $page : 1; //默认显示第一页数据
|
|
|
|
if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;}
|
|
|
|
if (isset($_REQUEST['row'])) {
|
|
|
|
|
|
|
|
$row = $_REQUEST['row'];
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$row = 10;
|
|
|
|
|
|
|
|
}
|
|
|
|
if (isset($_REQUEST['op_account'])) {
|
|
|
|
if (isset($_REQUEST['op_account'])) {
|
|
|
|
if ($_REQUEST['op_account'] == '全部') {
|
|
|
|
if ($_REQUEST['op_account'] == '全部') {
|
|
|
|
unset($_REQUEST['op_account']);
|
|
|
|
unset($_REQUEST['op_account']);
|
|
|
@ -441,7 +466,8 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (isset($_REQUEST['timestart']) && isset($_REQUEST['timeend'])) {
|
|
|
|
if (isset($_REQUEST['timestart']) && isset($_REQUEST['timeend'])) {
|
|
|
|
$map['create_time'] = array('BETWEEN', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 24 * 60 * 60 - 1));
|
|
|
|
$map['create_time'] = array('BETWEEN', array(strtotime($_REQUEST['timestart']), strtotime($_REQUEST['timeend']) + 24 * 60 * 60 - 1));
|
|
|
|
unset($_REQUEST['timestart']);unset($_REQUEST['timeend']);
|
|
|
|
unset($_REQUEST['timestart']);
|
|
|
|
|
|
|
|
unset($_REQUEST['timeend']);
|
|
|
|
} elseif (isset($_REQUEST['timestart'])) {
|
|
|
|
} elseif (isset($_REQUEST['timestart'])) {
|
|
|
|
$map['create_time'] = ['GT', strtotime(I('timestart'))];
|
|
|
|
$map['create_time'] = ['GT', strtotime(I('timestart'))];
|
|
|
|
unset($_REQUEST['timestart']);
|
|
|
|
unset($_REQUEST['timestart']);
|
|
|
@ -457,7 +483,9 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
|
|
|
|
$count = M('balance_edit', 'tab_')->where($map)->count();
|
|
|
|
$count = M('balance_edit', 'tab_')->where($map)->count();
|
|
|
|
//分页
|
|
|
|
//分页
|
|
|
|
$page = set_pagination($count, $row);
|
|
|
|
$page = set_pagination($count, $row);
|
|
|
|
if($page) {$this->assign('_page', $page);}
|
|
|
|
if ($page) {
|
|
|
|
|
|
|
|
$this->assign('_page', $page);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$this->assign('list', $list);
|
|
|
|
$this->assign('list', $list);
|
|
|
|
$this->meta_title = '修改记录';
|
|
|
|
$this->meta_title = '修改记录';
|
|
|
@ -468,30 +496,59 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
|
|
|
|
|
|
|
|
|
|
|
|
$this->display('updatelist');
|
|
|
|
$this->display('updatelist');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 获取用户注册错误信息
|
|
|
|
* 获取用户注册错误信息
|
|
|
|
* @param integer $code 错误编码
|
|
|
|
* @param integer $code 错误编码
|
|
|
|
* @return string 错误信息
|
|
|
|
* @return string 错误信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private function showRegError($code = 0){
|
|
|
|
private function showRegError($code = 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
switch ($code) {
|
|
|
|
switch ($code) {
|
|
|
|
case -1: $error = '管理员账号长度必须在16个字符以内!'; break;
|
|
|
|
case -1:
|
|
|
|
case -2: $error = '管理员账号被禁止注册!'; break;
|
|
|
|
$error = '管理员账号长度必须在16个字符以内!';
|
|
|
|
case -3: $error = '管理员账号被占用!'; break;
|
|
|
|
break;
|
|
|
|
case -4: $error = '管理员密码长度必须在6-30个字符之间!'; break;
|
|
|
|
case -2:
|
|
|
|
case -5: $error = '邮箱格式不正确!'; break;
|
|
|
|
$error = '管理员账号被禁止注册!';
|
|
|
|
case -6: $error = '邮箱长度必须在1-32个字符之间!'; break;
|
|
|
|
break;
|
|
|
|
case -7: $error = '邮箱被禁止注册!'; break;
|
|
|
|
case -3:
|
|
|
|
case -8: $error = '邮箱被占用!'; break;
|
|
|
|
$error = '管理员账号被占用!';
|
|
|
|
case -9: $error = '手机格式不正确!'; break;
|
|
|
|
break;
|
|
|
|
case -10: $error = '手机被禁止注册!'; break;
|
|
|
|
case -4:
|
|
|
|
case -11: $error = '手机号被占用!'; break;
|
|
|
|
$error = '管理员密码长度必须在6-30个字符之间!';
|
|
|
|
case -12: $error = '二级密码长度必须在6-30个字符之间!';break;
|
|
|
|
break;
|
|
|
|
default: $error = '未知错误';
|
|
|
|
case -5:
|
|
|
|
|
|
|
|
$error = '邮箱格式不正确!';
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case -6:
|
|
|
|
|
|
|
|
$error = '邮箱长度必须在1-32个字符之间!';
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case -7:
|
|
|
|
|
|
|
|
$error = '邮箱被禁止注册!';
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case -8:
|
|
|
|
|
|
|
|
$error = '邮箱被占用!';
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case -9:
|
|
|
|
|
|
|
|
$error = '手机格式不正确!';
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case -10:
|
|
|
|
|
|
|
|
$error = '手机被禁止注册!';
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case -11:
|
|
|
|
|
|
|
|
$error = '手机号被占用!';
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
case -12:
|
|
|
|
|
|
|
|
$error = '二级密码长度必须在6-30个字符之间!';
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
$error = '未知错误';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $error;
|
|
|
|
return $error;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public function get_openid(){
|
|
|
|
|
|
|
|
|
|
|
|
public function get_openid()
|
|
|
|
|
|
|
|
{
|
|
|
|
$User = new UserApi;
|
|
|
|
$User = new UserApi;
|
|
|
|
if ($_POST['id'] > 999) {
|
|
|
|
if ($_POST['id'] > 999) {
|
|
|
|
$this->ajaxReturn(array('status' => 0, 'msg' => '管理员id不能大于999'));
|
|
|
|
$this->ajaxReturn(array('status' => 0, 'msg' => '管理员id不能大于999'));
|
|
|
@ -525,12 +582,16 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
|
|
|
|
$return = array('status' => 1, 'data' => $qrcode);
|
|
|
|
$return = array('status' => 1, 'data' => $qrcode);
|
|
|
|
$this->ajaxReturn($return);
|
|
|
|
$this->ajaxReturn($return);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function checkpwd(){
|
|
|
|
|
|
|
|
|
|
|
|
function checkpwd()
|
|
|
|
|
|
|
|
{
|
|
|
|
$User = new UserApi;
|
|
|
|
$User = new UserApi;
|
|
|
|
$data = $User->verifyPwd($_POST['id'], $_POST['pwd']);
|
|
|
|
$data = $User->verifyPwd($_POST['id'], $_POST['pwd']);
|
|
|
|
$this->ajaxReturn(array('data' => $data));
|
|
|
|
$this->ajaxReturn(array('data' => $data));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function checkOpenidpic(){
|
|
|
|
|
|
|
|
|
|
|
|
function checkOpenidpic()
|
|
|
|
|
|
|
|
{
|
|
|
|
sleep(2);
|
|
|
|
sleep(2);
|
|
|
|
$data = M('ucenter_member')->where(array('id' => $_REQUEST['id']))->find();
|
|
|
|
$data = M('ucenter_member')->where(array('id' => $_REQUEST['id']))->find();
|
|
|
|
if ($data['openid_sign'] == session('scene_id')) {
|
|
|
|
if ($data['openid_sign'] == session('scene_id')) {
|
|
|
@ -540,7 +601,8 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function delete($id){
|
|
|
|
public function delete($id)
|
|
|
|
|
|
|
|
{
|
|
|
|
M()->startTrans();
|
|
|
|
M()->startTrans();
|
|
|
|
$res1 = M('member')->delete($id);
|
|
|
|
$res1 = M('member')->delete($id);
|
|
|
|
$res2 = M('ucenter_member')->delete($id);
|
|
|
|
$res2 = M('ucenter_member')->delete($id);
|
|
|
@ -600,15 +662,18 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
|
|
|
|
* 更新游戏角色数据
|
|
|
|
* 更新游戏角色数据
|
|
|
|
* @param $id
|
|
|
|
* @param $id
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function user_update($ids){
|
|
|
|
public function user_update($ids)
|
|
|
|
|
|
|
|
{
|
|
|
|
$res = D('User')->update_user_player($ids);
|
|
|
|
$res = D('User')->update_user_player($ids);
|
|
|
|
$this->success("更新成功:{$res['suc']}个,失败:{$res['ero']}");
|
|
|
|
$this->success("更新成功:{$res['suc']}个,失败:{$res['ero']}");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 更新游戏角色数据
|
|
|
|
* 更新游戏角色数据
|
|
|
|
* @param $id
|
|
|
|
* @param $id
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function age(){
|
|
|
|
public function age()
|
|
|
|
|
|
|
|
{
|
|
|
|
if (IS_POST) {
|
|
|
|
if (IS_POST) {
|
|
|
|
$data = $_POST;
|
|
|
|
$data = $_POST;
|
|
|
|
$a = new ToolController();
|
|
|
|
$a = new ToolController();
|
|
|
@ -628,7 +693,8 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function update_pwd(){
|
|
|
|
public function update_pwd()
|
|
|
|
|
|
|
|
{
|
|
|
|
if (IS_POST) {
|
|
|
|
if (IS_POST) {
|
|
|
|
if (strlen($_POST['new_pwd']) < 6 || strlen($_POST['new_pwd']) > 30) {
|
|
|
|
if (strlen($_POST['new_pwd']) < 6 || strlen($_POST['new_pwd']) > 30) {
|
|
|
|
$this->error('密码格式不正确!');
|
|
|
|
$this->error('密码格式不正确!');
|
|
|
@ -648,7 +714,8 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
|
|
|
|
$this->display();
|
|
|
|
$this->display();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function get_server_lists($game_id=0){
|
|
|
|
public function get_server_lists($game_id = 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
$server = M("server", "tab_");
|
|
|
|
$server = M("server", "tab_");
|
|
|
|
$map['game_id'] = $game_id;
|
|
|
|
$map['game_id'] = $game_id;
|
|
|
|
$lists = $server->field('id,server_name,game_name')->where($map)->select();
|
|
|
|
$lists = $server->field('id,server_name,game_name')->where($map)->select();
|
|
|
@ -657,5 +724,4 @@ function think_ucenter_md5($str, $key = 'ThinkUCenter'){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $this->ajaxReturn(array('status' => 1, 'data' => $lists));
|
|
|
|
return $this->ajaxReturn(array('status' => 1, 'data' => $lists));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|