<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Wecome to MyNongLam - Log In, Sign Up or Learn More </title>
<link rel="stylesheet" type="text/css" href="css/basic_login.css">
<link rel="stylesheet" type="text/css" href="css/messi.css" />
<link rel="stylesheet" type="text/css" href="css/jquery-ui.css">
<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="js/messi.js"></script>
<script src="js/jquery-ui.js"></script>
<%
String accountlogin = (String) session.getAttribute("accountinfo"); 
if(accountlogin != null) {
	response.sendRedirect("index.jsp?acc=" + accountlogin);
}
String mess = (String) request.getAttribute("mess");
if(mess != null) {
	if(mess.equalsIgnoreCase("error")) {
	%>
	
	<script type="text/javascript">
		$(document).ready(function(e) {
			new Messi('Tài khoản hoặc mật khẩu không đúng', {
				title: 'Đăng nhập không thành công',
				titleClass: 'anim error', 
				buttons: [{
						id: 0, 
						label: 'Đóng', 
						val: 'X'
					}]
			});
		 });
	</script>
	<%
	} else if(mess.equalsIgnoreCase("lockacc")) {
		%>
    <script type="text/javascript">
		$(document).ready(function(e) {
			new Messi('Tài khoản của bạn tạm thời bị khóa, vui lòng liên hệ với quản trị qua email: <strong>luanxt@zing.vn</strong>', {
				title: 'Lỗi',
				titleClass: 'anim error',
				buttons: [{
						id: 0, 
						label: 'Đóng', 
						val: 'X'
					}]
			});
		 });
	</script>
        <%
	}
}
%>
</head>
<body>
    <div id="headerlogin">
        <div id="headercontent">
        	<div id="hederleft">
        		<p>MYNONGLAM</p>
            </div>
            <div id="headerright">
            	<form onsubmit="" method="post" action="loginuser">
                    <table>
                        <tr>
                            <td class="login_form_standalone_labels">
                                <label for="email">Email</label>
                            </td>
                            <td class="login_form_standalone_labels">
                                <label for="password">Password</label>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input class="inputtext" autofocus required name="email" id="email" tabindex="1" placeholder="Enter your email" type="email" title="Ví dụ: luanxt@zing.vn" />
                            </td>
                            <td>
                                <input class="inputpassword" name="password" required id="password" tabindex="2" placeholder="Password" type="password" title="Gõ password" />
                            </td>
                            <td>
                                <label class="uiButton uiButtonConfirm" id="loginbutton" for="login">
                                    <input value="Log In" tabindex="4" class="login" id="login" type="submit" />
                                </label>
                            </td>
                        </tr>
                        <tr>
                            <td class="login_form_label_field">
                                <input type="checkbox" id="remember" value="1" tabindex="3" /> 
                                <label for="remember">Keep me logged in</label>
                            </td>
                            <td class="login_form_label_field">
                            <a rel="nofollow" href="#">Forgot your password?</a>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
            <div class="cl"></div>
        </div>
    </div>
    <div id="bodylogin">
    	<div id="bodycontent">
        	<div id="bodyleft">
        		<p>MyNongLam giúp bạn kết nối và chia sẻ trong cuộc sống.</p>
            </div>
            <div id="bodyright">
            	<h1>Đăng Ký</h1>
                <p>Miễn Phí.</p>
                <form id="registryacc" method="post">
                    <table>
                        <tr>
                            <td>
                                <input type="text" tabindex="5" id="fullname" title="Vui Lòng Nhập Họ Tên" required placeholder="Họ Tên" class="login_form_text_field" maxlength="100" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="email" tabindex="6" id="emailregis" title="Vui Lòng Nhập Email" required placeholder="Email" class="login_form_text_field" maxlength="255" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="text" tabindex="7" id="emailregisre" title="Vui Lòng Nhập Lại Email" required placeholder="Nhập Lại Email" class="login_form_text_field" maxlength="255" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="password" tabindex="8" id="passwordregis" title="Vui Lòng Nhập Mật Khẩu" required placeholder="Mật Khẩu" class="login_form_text_field" maxlength="100" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="text" tabindex="9" id="birthday" required placeholder="Ngày Sinh Nhật" class="login_form_text_field" maxlength="10" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="radio" id="gendermale" name="gender" value="1" checked /> <label for="gendermale"><strong>Nam</strong></label>
                                <input type="radio" id="genderfemale" name="gender" value="0" /> <label for="genderfemale"><strong>Nữ</strong></label>
                            </td>
                        </tr>
                        <tr>
                        	<td><input type="submit" id="buttom_form_submit" value="Đăng Ký" /></td>
                        </tr>
                	</table>
                </form>
            </div>
            <div class="cl"></div>
        </div>
    </div>
    <div id="footerlogin">
    	<div id="footercontent">
        	MyNongLam © 2013
        </div>
    </div>
    <div id="disablescreen" style="position:fixed; height:100%; width:100%; background:#000; background: rgba(0,0,0,.8); z-index:10000; display:none; top:0; left:0"></div>
    <script type="text/javascript" src="js/ajax-login.js"></script>
</body>
</html>
