SRCMS V2社区开发版 (版本:2017/02/07)

[新增] 漏洞报告邮件提醒
[新增] 前台用户积分记录
[新增] 后台审核页面调整
[优化] 后台管理登录速度
This commit is contained in:
Martin Zhou
2017-02-07 17:41:22 +08:00
parent 2b4c8fc6b3
commit ceac6bb9fa
30 changed files with 2932 additions and 175 deletions

View File

@@ -17,10 +17,8 @@ class InfoController extends BaseController{
*/
public function index()
{
$tmodel= M('setting');
$title = $tmodel->where('id=1')->select();
$this->assign('title', $title);
$id = session('userId');
if (!IS_POST) {
$info = M('member')->where(array('id'=>$id))->select();
$this->assign('info',$info);
@@ -29,10 +27,17 @@ class InfoController extends BaseController{
if (IS_POST) {
$model = M("member");
$data = I();
if ($model->where(array('id'=>$id))->field('realname,zipcode,address,tel,alipay,bankcode,idcode,qqnumber,website,description,qqnumber')->save($data)) {
$token = $data['token'];
$user = $model->where(array('id'=>$id))->find();
if($token != $user['token']){
$this->error("非法请求");
}
if ($model->where(array('id'=>$id))->field('realname,zipcode,address,tel,alipay,bankcode,idcode,qqnumber,website,description,qqnumber,idcode,team')->save($data)) {
$this->success("联系方式更新成功", U('info/index'));
} else {
$this->error("联系方式更新失败");
$this->error("联系方式更新失败", U('info/index'));
}
}
}