 <?php $setting = get_setting(); ?>
<div class="login-box">
  <div class="login-logo">
    <a href="#"><img class="site_logo" src="<?= base_url(!empty($setting['logo'])?$setting['logo'] :"assets/images/logo-example.png"); ?>" alt="">
  </a>
  </div>
  <!-- /.login-logo -->
  <div class="login-box-body">
    <p class="login-box-msg"><?= html_escape(lang('login_heading'));?></p>
	 <span class="reg_msg"></span>

   <?php if ($this->session->flashdata('verify')) { ?>
    <div class="alert alert-success alert-dismissible mb-5" id="successMessage">
        <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
        <h4>
            <i class="icon fa fa-check"></i>
            success!
        </h4>
        <?= $this->session->flashdata('verify'); ?>
    </div>
    <?php } ?>

    <form action="<?= base_url('admin/home/user_login') ?>" method="post" id="user_login_form">


      <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" value="<?= $this->security->get_csrf_hash(); ?>">


      <div class="form-group has-feedback">
        <input type="text" name="email" class="form-control usermail" placeholder="<?= html_escape(lang('username'));?> / <?= html_escape(lang('email'));?> / <?= !empty(lang('customer_phone'))?lang('customer_phone'):"Customer Phone" ;?>">
        <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
      </div>
      <div class="form-group has-feedback">
        <input type="password" name="password" class="form-control pass" placeholder="<?= html_escape(lang('password'));?>">
        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
      </div>
      <div class="row">
        <div class="col-xs-8 mb-5">
          <?php if(isset($setting['is_recaptcha']) && $setting['is_recaptcha']==1): ?>
           <div class="g-recaptcha" data-sitekey="<?= !empty($setting['g_site_key'])?$setting['g_site_key']:"";?>"></div>
         <?php endif;?>
       </div>
        <!-- /.col -->
        <div class="col-xs-12">
          <button type="submit" name="login" class="btn btn-primary btn-block btn-flat"><?= html_escape(!empty(lang('login_btn_text'))?lang('login_btn_text'):"login");?></button>
        </div>
        <!-- /.col -->
      </div>
    </form>
    <?php if(is_demo()==1): ?>
       <div class="social-auth-links text-center">
        <a href="javascript:;" data-user="admin" data-pass="123456" class="btn btn-info loginBTN mb-5 ">Admin Login</a>
        <a href="javascript:;" class="btn btn-info loginBTN mb-5" data-user="user" data-pass="123456">User Login</a>
        <a href="javascript:;" class="btn btn-info loginBTN mb-5" data-user="123456789" data-pass="1234">Customer Login</a>
      </div>
    <?php endif;?>
    <div class="social-auth-links text-center">
     
    </div>
    <!-- /.social-auth-links -->
    <a href="#forgetModal" data-toggle="modal"><?= html_escape(!empty(lang('forgot_text'))?lang('forgot_text'):"I forgot my password");?></a><br>
  </div>
  <!-- /.login-box-body -->
</div>

  <!-- Modal -->
  <div id="forgetModal" class="modal fade customModal" role="dialog">
    <div class="modal-dialog">

      <!-- Modal content-->
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal">&times;</button>
          <h4 class="modal-title"><?= html_escape(lang('recovery_password_heading'));?></h4>
        </div>
        <form action="<?= base_url('admin/home/recovery_password'); ?>" method="post" class="form-submit">
          <div class="modal-body">
            <div class="recovery_password">
              <!-- show alert  -->
              <div class="reg_msg"></div>  

              <div class="form-group">
                <label ><?= html_escape(lang('username'));?></label>
                <input type="text" name="username" class="form-control" placeholder="<?= html_escape(lang('username'));?>">
              </div>
              <div class="form-group">
                <label ><?= html_escape(lang('email'));?></label>
                <input type="email" name="email" class="form-control" placeholder="<?= html_escape(lang('email'));?>">
              </div>
            </div>
          </div>
          <div class="modal-footer">
            <!-- csrf token -->
            <input type="hidden" name="<?= $this->security->get_csrf_token_name(); ?>" value="<?= $this->security->get_csrf_hash(); ?>">
            <button type="submit" class="btn btn-success submit_btn mail_btn" ><?= html_escape(lang('submit'));?></button>
          </div>
        </form>
      </div>

    </div>
  </div>