上传市场专员结算代码

master
zhengyongxing 5 years ago
parent c3bf153546
commit a2408407b7

@ -593,4 +593,16 @@ class AuthManagerController extends AdminController{
$this->ajaxReturn(json_encode($returnData));
}
function AuthMarketMember() {
$mid = I('id');
$gid = I('group_id');
$AuthGroup = D('AuthGroup');
if( !$AuthGroup->find($gid)){
$this->error('用户组不存在');
}
}
}

@ -0,0 +1,18 @@
<?php
namespace Admin\Controller;
use User\Api\UserApi as UserApi;
/**
* 后台首页控制器
* @author 麦当苗儿 <zuojiazi@vip.qq.com>
*/
class MarketPercentageController extends ThinkController
{
public function index(){
}
}

@ -261,7 +261,7 @@ class UserController extends AdminController
}
}
public function add($username = '', $password = '', $repassword = '', $email = '', $second_pwd = '')
public function add($username = '', $real_name='', $password = '', $repassword = '', $email = '', $second_pwd = '')
{
if (IS_POST) {
@ -269,6 +269,9 @@ class UserController extends AdminController
if (empty($username)) {
$this->error('管理员账号不能为空!');
}
if (empty($real_name)) {
$this->error('真实姓名不能为空!');
}
/* 检测密码 */
if ($password != $repassword) {
$this->error('管理员密码和确认密码不一致!');
@ -285,7 +288,7 @@ class UserController extends AdminController
$User = new UserApi;
$uid = $User->register($username, $password, $email, $second_pwd);
if (0 < $uid) { //注册成功
$user = array('uid' => $uid, 'nickname' => $username, 'status' => 1,"birthday"=>date('Y-m-d',time()));
$user = array('uid' => $uid,'realname'=>$real_name, 'nickname' => $username, 'status' => 1,"birthday"=>date('Y-m-d',time()));
$data['uid'] = $uid;
$data['group_id'] = I('auth');
M('auth_group_access')->data($data)->add();
@ -343,6 +346,9 @@ class UserController extends AdminController
}
}
}
if (empty($_POST['real_name'])) {
$this->error('真实姓名不能为空!');
}
if ($_POST['auth'] == '' && $id != 1) {
$this->error('请选择用户权限!');
}
@ -389,6 +395,7 @@ class UserController extends AdminController
$maps['uid'] = $id;
$info['username'] = $_POST['username'];
$in['nickname'] = $_POST['username'];
$in['real_name'] = $_POST['real_name'];
$pwd = $this->think_ucenter_md5($_POST['password'], UC_AUTH_KEY);
$spwd = $this->think_ucenter_md5($_POST['second_pwd'], UC_AUTH_KEY);
$rpwd = $Member->where(array('id' => $id))->find();

@ -12,7 +12,7 @@
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td class="l"><i class="mustmark">*</i>管理员账号</td>
<td class="l"><i class="mustmark">*</i>账号</td>
<td class="r">
<input name="username" type="text" class="">
<!-- <input type="hidden" class="" name="username" value="{$list.username}" > -->
@ -20,7 +20,15 @@
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>管理员密码</td>
<td class="l"><i class="mustmark">*</i>真实姓名</td>
<td class="r">
<input name="real_name" type="text" class="">
<!-- <input type="hidden" class="" name="username" value="{$list.username}" > -->
<span class="notice-text">管理员账号用于管理后台登录</span>
</td>
</tr>
<tr>
<td class="l"><i class="mustmark">*</i>密码</td>
<td class="r">
<input name="password" type="password" class="">
<span class="notice-text">管理员密码不能少于6位</span>

@ -18,6 +18,14 @@
<span class="notice-text">管理员账号用于管理后台登录</span>
</td>
</tr>
<tr>
<td class="l">真实姓名</td>
<td class="r">
<input name="real_name" value="{$list.real_name}" type="text" class="">
<!-- <input type="hidden" class="" name="username" value="{$list.username}" > -->
<span class="notice-text">管理员账号用于管理后台登录</span>
</td>
</tr>
<tr>
<td class="l">管理员密码</td>
<td class="r">

Loading…
Cancel
Save