<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>云阅卷</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"/>
<link rel="stylesheet" href="${ctxStatic}/aopeng/css/style.css">
<script src="${ctxStatic}/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
</head>
<body>
<div class="cont">
  <div class="wp">
    <div class="logo"><a href="${ctx}/"><img src="${ctxStatic}/aopeng/img/logo.png"/></a></div>
    <h1>管理员登录</h1>
    <div class="login">
      <form id="loginForm" action="${ctx}/admin-login" method="post">
        <div class="text">
          <label>
            <input type="text" id="loginName" name="loginName" value="${loginName}" placeholder="用户名"/>
          </label>
        </div>
        <div class="password">
          <label>
            <input type="password" id="password" name="password" placeholder="密 码"/>
          </label>
        </div>
        <div class="txt" id="message-div"><em class="error">${message}</em></div>
        <div class="button"><a href="javascript:void(0)" id="submit-button">登录</a></div>
      </form>
    </div>
  </div>
  <div class="ft"><!--Copyright ©武汉启明软件 2012-2014--></div>
</div>
<script type="text/javascript">
$(document).ready(function() {
    $("#submit-button").click(function(){
        if($('#loginName').val()=='') {
            alert('请输入用户名');
            return;
        }
        if($('#password').val()=='') {
            alert('请输入密码');
            return;
        }
        $('#loginForm').submit();
    });
});

function alert(message) {
    $('#message-div').show();
    $('#message-div').find('em').html(message);
}
// 如果在框架中，则跳转刷新上级页面
if(self.frameElement && self.frameElement.tagName=="IFRAME"){
    parent.location.reload();
}
</script>
</body>
</html>