| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="author" content="芝麻开发 http://www.zhimawork.com" />
- <title> 管理系统登录 </title>
- <link rel="stylesheet" href="css/basic.css" type="text/css" />
- <link rel="stylesheet" href="css/login.css" type="text/css" />
- <script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
- <script type="text/javascript" src="js/layer/layer.js"></script>
- <script type="text/javascript" src="js/common.js"></script>
- <script type="text/javascript">
- $(function(){
- /**按Enter登录**/
- $('#loginform').keydown(function(e){
-
- var e = e || event,
- keycode = e.which || e.keyCode;
-
- if (keycode == 13) {
- $("#btn_login").trigger("click");
- }
- });
- /**点击刷新验证码**/
- $('#vercodeimg').click(function(){
- $(this).attr('src', 'vercode.php?'+Math.random());
- });
- /**点击登录**/
- $('#btn_login').click(function(){
- var ac = $('input[name="account"]').val();
- var pwd = $('input[name="pwd"]').val();
- var vercode = $('input[name="vercode"]').val();
- var remember = 0;
- if($('.remember').prop('checked')){
- remember = 1;
- }
-
- if(ac == ''){
- $('input[name="account"]').focus();
- return false;
- }
- if(pwd == ''){
- $('input[name="pwd"]').focus();
- return false;
- }
- if(vercode == ''){
- $('input[name="vercode"]').focus();
- return false;
- }
-
- $.ajax({
- type : 'POST',
- data : {
- account : ac,
- pass : pwd,
- vercode : vercode,
- remember : remember
- },
- dataType : 'json',
- url : 'adminlogin_do.php',
- success : function(data){
- code = data.code;
- msg = data.msg;
- switch(code){
- case 1:
- location.href = 'index.php';
- break;
- default:
- $('#vercodeimg').attr('src', 'vercode.php?'+Math.random());
- layer.alert(msg, {icon: 5});
-
- }
- }
- });
- });
-
- });
- </script>
-
- </head>
- <body id="bg">
- <div id="login_container">
- <div class="login_top">管理系统登录</div>
- <div class="login_content">
- <form action="adminlogin_do.php" id="loginform" method="post">
- <p class="text">账号</p>
- <p><input type="text" name="account" class="input-text" ></p>
- <p class="text">密码</p>
- <p><input type="password" name="pwd" class="input-text" ></p>
- <p class="text">验证码</p>
- <p>
- <input type="text" name="vercode" class="input-text vercode" >
- <img src="vercode.php" class="vercode-img" height="30" alt="刷新换一张" id="vercodeimg"/>
- </p>
- <p class="submit-line">
- <div class="pull-left">
- <input type="checkbox" name="remember" class="remember" id="remember" value="1">
- <label id="remember-label" for="remember">记住我</label>
- </div>
- <div class="pull-right">
- <input type="button" id="btn_login" class="btn_submit" value="登 陆" />
- </div>
- <div class="clear"></div>
- </p>
- </form>
- </div>
- <div class="login_copyright">Powered by <a href="http://www.zhimawork.com/" target="_blank">ZhimaWork</a></div>
- </div>
-
- </body>
- </html>
|