|
|
@ -54,12 +54,10 @@ class SafeController extends BaseController{
|
|
|
|
$this->checkPaswwordFormat($confirmpassword);
|
|
|
|
$this->checkPaswwordFormat($confirmpassword);
|
|
|
|
$data['second_pwd'] = $this->think_ucenter_md5($confirmpassword, UC_AUTH_KEY);
|
|
|
|
$data['second_pwd'] = $this->think_ucenter_md5($confirmpassword, UC_AUTH_KEY);
|
|
|
|
$id = get_pid();
|
|
|
|
$id = get_pid();
|
|
|
|
$updateRs = M("promote","tab_")->where(['id'=>$id])->save($data);
|
|
|
|
M("promote","tab_")->where(['id'=>$id])->save($data);
|
|
|
|
if($updateRs) {
|
|
|
|
|
|
|
|
recordPromoteLogs('安全管理','设置安全密码');
|
|
|
|
recordPromoteLogs('安全管理','设置安全密码');
|
|
|
|
$this->success("安全密码设置成功");
|
|
|
|
$this->success("安全密码设置成功");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function think_ucenter_md5($str, $key = 'ThinkUCenter')
|
|
|
|
public function think_ucenter_md5($str, $key = 'ThinkUCenter')
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -99,6 +97,7 @@ class SafeController extends BaseController{
|
|
|
|
// if(empty($oldpwd)) {
|
|
|
|
// if(empty($oldpwd)) {
|
|
|
|
// $this->error("旧密码不能为空");
|
|
|
|
// $this->error("旧密码不能为空");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
$this->checkPaswwordFormat($safepwd);
|
|
|
|
if(empty($safepwd)) {
|
|
|
|
if(empty($safepwd)) {
|
|
|
|
$this->error("安全密码不能为空");
|
|
|
|
$this->error("安全密码不能为空");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -107,12 +106,8 @@ class SafeController extends BaseController{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$id = get_pid();
|
|
|
|
$id = get_pid();
|
|
|
|
$data['second_pwd'] = $this->think_ucenter_md5($safepwd, UC_AUTH_KEY);
|
|
|
|
$data['second_pwd'] = $this->think_ucenter_md5($safepwd, UC_AUTH_KEY);
|
|
|
|
$updateRs = M("promote","tab_")->where(['id'=>$id])->save($data);
|
|
|
|
M("promote","tab_")->where(['id'=>$id])->save($data);
|
|
|
|
if($updateRs) {
|
|
|
|
|
|
|
|
$this->success("修改成功");
|
|
|
|
$this->success("修改成功");
|
|
|
|
}else {
|
|
|
|
|
|
|
|
$this->error("修改失败,请重新操作");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$this->display();
|
|
|
|
$this->display();
|
|
|
|