<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<title><?php echo C('softname'); ?></title> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="__PUBLIC__/admin/login/js/jquery-1.9.0.min.js"></script>
<link href="__PUBLIC__/admin/login/css/login2.css" rel="stylesheet" type="text/css" />
<script>
$(document).ready(function(){
	///// LOGIN FORM SUBMIT /////
	$('#login').submit(function(){
		$('.loginmsg').html('');
		if($('#username').val() == '') {
			$('.loginmsg').html('账号不能为空');
			$(".login_form").css('marginTop','0px');
			$('.nopassword').fadeIn();
			return false;	
		}
		if($("#password").val()==''){
			$(".loginmsg").html("密码不能为空");
			$(".login_form").css('marginTop','0px');
			$(".nopassword").fadeIn();
			return false;
		}
		var username = $("#username").val();
		var password = $("#password").val();
		$.post("admin.php?m=login&a=check",{username:username,password:password},function(result){
			if(result == '1') {
				$(".loginmsg").html("登陆成功");
				$(".login_form").css('marginTop','0px');
				$(".nopassword").fadeIn();
				window.location.href="/admin.php";
			}else{
				$(".loginmsg").html("登陆失败");
				$(".login_form").css('marginTop','0px');
				$(".nopassword").fadeIn();
			}
		});
		return false;
	});
	
	///// ADD PLACEHOLDER /////
	jQuery('#username').attr('placeholder','请输入用户名');
	jQuery('#password').attr('placeholder','请输入密码');
});
</script>
<style>
	.nopassword{background-color:#CACECF;display:none;}
	.loginmsg{text-align:center;padding:10px 10px;color:#fff;}
</style>
</head>
<body>
<h1><?php echo C('softname'); ?><sup><?php echo C('version'); ?></sup></h1>

<div class="login" style="margin-top:50px;">
    
    <div class="header">
        <div class="switch" id="switch">
		<a class="switch_btn_focus" id="switch_qlogin" href="javascript:void(0);" tabindex="7">快速登录</a>
		<div class="switch_bottom" id="switch_bottom" style="position: absolute; width: 64px; left: 0px;"></div>
        </div>
    </div>    
    <div class="web_qr_login" id="web_qr_login" style="display: block; height: 235px;">    

            <!--登录-->
            <div class="web_login" id="web_login">
            <div class="login-box">
			<div class="nopassword">
				<div class="loginmsg"></div>
            </div>
			<div class="login_form">
				<form action="" name="loginform" accept-charset="utf-8" id="login" class="loginForm" method="post">
                <div class="uinArea" id="uinArea">
                <label class="input-tips" for="username">帐号：</label>
                <div class="inputOuter" id="uArea">
                    <input type="text" id="username" name="username" class="inputstyle"/>
                </div>
                </div>
                <div class="pwdArea" id="pwdArea">
               <label class="input-tips" for="password">密码：</label> 
               <div class="inputOuter" id="pArea">
                    <input type="password" id="password" name="password" class="inputstyle"/>
                </div>
                </div>
               
                <div style="padding-left:50px;margin-top:20px;"><input type="submit" value="登 录" name="dosubmit" style="width:150px;" class="button_blue"/></div>
              </form>
           </div>
           
            	</div>
               
            </div>
            <!--登录end-->
  </div>
</div>
<div class="jianyi">*推荐使用ie8或以上版本ie浏览器或Chrome内核浏览器访问本站</div>
</body></html>