<?php include _include(APP_PATH.'view/htm/header.inc.htm');?>

<!--{hook user_login_start.htm}-->
<div class="row">
<div class="login-1">
	<div class="login-2">
	<form action="<?php echo url('user-login');?>" method="post" id="form"  class="login-3">
			<div class="login-4">
				欢迎登陆umbbs
				<!--{hook user_login_title_after.htm}-->
			</div>
		
				
					
					<div class="login-4-1">
					<div class="login-5">
					账户
					</div>
					<div class="login-6">
					<div class="login-7">
						<input type="text" class="form-control" placeholder="<?php echo lang('email');?> / <?php echo lang('username');?>" id="email" name="email">
						<div class="invalid-feedback"></div>
					</div>
					</div>
					</div>
					<!--{hook user_login_email_after.htm}-->
					<div class="login-4-1">
					<div class="login-5">
					密码
					</div>
					
					<div class="login-6">
					<div class="login-7">
						<input type="password" class="form-control" placeholder="<?php echo lang('password');?>" id="password" name="password">
						<div class="invalid-feedback"></div>
					</div></div>
					</div>
					<!--{hook user_login_password_after.htm}-->
					<div class="login-4-1">
					<div class="login-8">
						<button type="submit" class="btn btn-primary btn-block btn-block-2" id="submit" data-loading-text="<?php echo lang('submiting');?>..."><?php echo lang('login');?></button>
					</div>
					<!--{hook user_login_submit_after.htm}-->
					<div class="media">
						<div>
							<!--{hook user_login_form_footer_left.htm}-->
						</div>
						</div>
						</div>
						<div class="login-9">
							<!--{hook user_login_form_footer_right_start.htm}-->
							<a href="<?php echo url('user-create');?>" class="text-muted-5">没有账户？立即注册</a>
							<?php if(!empty($conf['user_resetpw_on'])) { ?>
							<a href="<?php echo url('user-resetpw');?>" class="text-muted-5 ml-3"><?php echo lang('forgot_pw');?></a>
							<?php } ?>
							<!--{hook user_login_form_footer_right_end.htm}-->
						</div>
					
		</form>
		<!--{hook user_login_card_after.htm}-->
	</div>
</div>
</div>
<!--{hook user_login_end.htm}-->

<?php include _include(APP_PATH.'view/htm/footer.inc.htm');?>

<script src="<?php echo $conf['view_url'];?>js/md5.js"></script>

<script>
var jform = $('#form');
var jsubmit = $('#submit');
var jemail = $('#email');
var jpassword = $('#password');
var referer = '<?php echo $referer;?>';
jform.on('submit', function() {
	jform.reset();
	jsubmit.button('loading');
	var postdata = jform.serializeObject();
	postdata.password = $.md5(postdata.password);
	$.xpost(jform.attr('action'), postdata, function(code, message) {
		if(code == 0) {
			jsubmit.button(message).delay(1000).location(referer);
		} else if(xn.is_number(code)) {
			alert(message);
			jsubmit.button('reset');
		} else {
			jform.find('[name="'+code+'"]').alert(message).focus();
			jsubmit.button('reset');
		}
		/*
		if(code == 0) {
			jsubmit.button(message).delay(1000).location(referer);
		} else if(code == 'email') {
			jemail.alert(message).focus();
			jsubmit.button('reset');
		} else if(code == 'password') {
			jpassword.alert(message).focus();
			jsubmit.button('reset');
		} else {
			alert(message);
			jsubmit.button('reset');
		}*/
	});
	return false;
});

</script>
<script>
$('li[data-active="fid-00"]').addClass('active');
</script>
<!--{hook user_login_js.htm}-->