<?php

/* ========================================================================
 * $Id: pwd.php 1333 2017-06-09 13:52:02Z onez $
 * 
 * Email: www@onez.cn
 * QQ: 6200103
 * HomePage: http://www.onezphp.com
 * ========================================================================
 * Copyright 2016-2017 佳蓝科技.
 * 
 * ======================================================================== */

!defined('IN_ONEZ') && exit('Access Denied');
include_once(dirname(__FILE__).'/header.php');
?>
<link rel="stylesheet" href="<?php echo onez('login')->url?>/php/images/signin.css" />
<link rel="stylesheet" href="<?php echo onez('admin')->url?>/assets/css/font-awesome.min.css">
<style>
body{
  background-image:url(<?php echo $baseurl?>/images/bg.jpg);
}
.signin:before{
  display: none;
}
</style>
<div class="signin" style="margin-top: -60px">
	<form class="form-signin" method="post" role="form">
    <p class="form-item">
      <i class="fa fa-key"></i>
      <input type="password" id="password" name="password" class="form-control" placeholder="请输入房间密码" required />
    </p>
    <?php echo $this->get('form')?>
		<button class="btn btn-lg btn-warning btn-block" type="submit">立即进入</button>
    <input type="hidden" name="action" value="chklogin" />
	</form>
</div>
<script type="text/javascript">
$(function(){
  $('.form-signin').unbind('submit').bind('submit',function(){
    $.post(window.location.href,$(this).serialize(),function(o){
      if(o.error){
        $('.rndcode-img').trigger('click');
        onez.alert(o.error);
      }else{
        location.reload();
      }
    },'json');
    return false;
  });
});
</script>
<?php echo $this->get('footer')?>
<?php 
include_once(dirname(__FILE__).'/footer.php');
