<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="renderer" content="webkit"/>
<meta name="force-rendering" content="webkit"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>管理登录</title>
<style type="text/css">
*{ margin:0; padding:0; font-size:14px; font-family:'Microsoft Yahei';  }
body { line-height: 1.5; height:99%; margin:0; padding:5px; background:#f9f9f9; overflow: hidden; background-attachment: fixed; background:#135A9F; } 
html.addbg,html.addbg body{ background:#e2e9ea }
h1, h2, h3, h4, h5, h6 {font-size:100%;}
ol, ul, li, dl, dd, dt {list-style:none;}
a{ color: #666; font-size:12px;  text-decoration:none; } 
a:hover{ color:#F60; text-decoration:underline; text-decoration:none; } 
::-webkit-input-placeholder { color:#fff; }
:-moz-placeholder{color:#fff; }
::-moz-placeholder{color:#fff; }
:-ms-input-placeholder{color:#fff; } 
.mbox_bar{width:100%; float:left; }
.mbox{ width:310px; margin:120px auto 0 auto; } 
.conBox{ width:100%; padding:0 0 20px 0; float:left; }

.logo{ width:100%; padding:30px 0 10px; text-align:center; font-size:30px; color:#fff; font-weight:bold; float:left; }
.loginBox{ width:310px; padding:15px 0; border-radius:3px; float:left; } 
.loginBox dd{ width:310px; border-radius:3px; background:#03519C; margin-bottom:12px; float:left;}
.loginBox dd span{ width:53px; padding:12px 10px 10px 0; text-align:right; color:#C9EBFD; float:left; }
  
.code{ padding:0 0 0 5px; }
a.vcode_box{ border-left:none; padding:0; float:right; } 
.login_input{ width:230px; border:none; padding:12px 8px; background:rgba(255,255,255,0.3); background:#0863BB; color:#fff; -webkit-appearance: none; float:left; } 
.login_input2{ width:126px; padding:12px 8px 11px; border:none; background:#fff; background:#0863BB; color:#fff; float: left; }
.login_submit{ width:312px; border:1px solid #DF8F04; height:44px; color:#333; font-weight:bold; border-radius:5px; padding:0 8px; background:#EB9500; float:left; }
#vcode_img{ padding:0; width:103px; height:42px; border-radius:0 2px 2px 0; float:left;} 
.bq{ width:380px; margin:20px auto 0 auto; text-align:center; color:#fff; font-size:12px; } 
 
</style>
</head>
<body> 
<div class="stars"></div> 
<form action="#" method="post"> 
	<div class="mbox_bar">
		<div class="mbox"> 
			<div class="conBox"> 
				<div class="logo">UQ云商系统</div>
				<div class="loginBox"> 
					<dd>
						<span>用户名</span>
						<input type="text" class="login_input" id="username" size="30" name="username" placeholder="请输入用户名" autocomplete="off"/>
					</dd>
					<dd>
						<span>密&nbsp;&nbsp;&nbsp;码</span>
						<input type="password" class="login_input" id="password" size="30" name="password" placeholder="请输入密码" autocomplete="off"/>
					</dd> 
					<dd>
						<span>验证码</span>
						<input type="text" name="vcode" class="login_input2" id="vcode" placeholder="验证码" autocomplete="off">
						<a href="javascript:;" onClick="change_img()" class="vcode_box"><img id="vcode_img"/></a> 
					</dd> 
					<dd style="border:none;"><input type="submit" class="login_submit" name="submit" value="登 录"/></dd> 
				</div> 
			</div> 
		</div> 
	</div> 
</form>
<{import file="index/index_footer.html"}>
<script type="text/javascript" src="<{$__PUBLIC__}>js/jquery.min.js"></script> 
<script type="text/javascript">
$(function(){
	$("form").submit(function(){
		username = $('#username').val();
		password = $('#password').val();
		vcode = $('#vcode').val(); 
		$.ajax({
			type:"POST",
			url:ADMIN+"index/login_submit",
			data:{username:username, password:password, vcode:vcode}, 
			success:function(result){ 
				var data = jQuery.parseJSON(result); 
				if(data.error == '0'){
					location.href=ADMIN+"index/login";
				}else{
					$('#vcode').val('');
					alert(data.msg);
					change_img();
				}
			},
			error:function(){
				alert('系统繁忙');
			}
		});
		return false;
	});
	
	
});
function change_img(){ 
	var timestamp = (new Date()).valueOf();
	var src = '<{$__URI__}>ajax/vcode?color=blank&time='+timestamp;
	$("#vcode_img").attr('src',src);
} 
change_img(); 
</script>