Commit 88dcf85f by HTML5-侯张振

验证码更新

parent a7b90a9a
......@@ -130,6 +130,7 @@ class Index extends CI_Controller{
$captcha_type = 'small';
$captcha = generate_captcha($captcha_type);
//var_dump($captcha);die;
//将校验码存到session中
$this->session->set_userdata('captcha',$captcha['word']);
$this->data['image'] = $captcha['image'];
......
......@@ -67,7 +67,8 @@
</div>
<div class="form-group">
<input type="text" name="captcha" id="captcha" class="input-sm input-small" onkeypress="EnterPress()">
<?php echo isset($image)?$image:'';?>
<?php echo isset($image)?$image:'no';?>
</div>
<div class="form-actions text-center">
<input type="checkbox" checked="true" name="chkRememberUsername" class="text-left" id="rmbUser">记住用户名
......@@ -148,7 +149,7 @@
saveUserInfo();
$('.login-form').submit();
})
getCaptcha();
$("form img").click(function (){
getCaptcha();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment