<?php      
  $pengaturan = $this->Pengaturan_model->get_by_id_1();
  $infopublik = $this->Pengumuman_model->get_by_publik();
  $infoppdb = $this->Tahunpelajaran_model->get_tahun_aktif();  
?>
<!DOCTYPE html>
<html>
<head>
  <link href='<?= base_url('assets/dist/img/'.$pengaturan->logo) ?>' rel='icon' type='image/png'/>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title><?= $this->config->item('title')?> <?php echo strtoupper($pengaturan->nama_sekolah) ?></title>
  <!-- Tell the browser to be responsive to screen width -->
  <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  <!-- Bootstrap 3.3.7 -->
  <link rel="stylesheet" href="<?= base_url();?>assets/bower_components/bootstrap/dist/css/bootstrap.min.css">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="<?= base_url();?>assets/bower_components/fontawesome/css/all.min.css">
  <!-- Ionicons -->
  <link rel="stylesheet" href="<?= base_url();?>assets/bower_components/Ionicons/css/ionicons.min.css">
  <!-- Theme style -->
  <link rel="stylesheet" href="<?= base_url();?>assets/dist/css/AdminLTE.min.css">
  <!-- iCheck -->
  <link rel="stylesheet" href="<?= base_url();?>assets/plugins/iCheck/square/purple.css">
  <style type="text/css">
  .kiri{
    background-image: url("<?= base_url('assets/dist/img/'.$pengaturan->bglogin) ?>");
    background-size: cover;
    height: 100%;
    margin: 0px;
    padding: 0px;
  }
  .kanan{
    background-color: white;
    height: 100%;
    padding-top: 4%;
  }
  .container-login{
    padding: 10%;
    padding-top: 0;
  }
  .login-logo{
    padding-top: 0;
  }
  .logo {
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 2;
    color: #000;
    -webkit-filter: drop-shadow(5px 5px 5px #222);
    filter: drop-shadow(2px 2px 2px #222);
  } 
  h4 {
    margin-bottom: 15px;
    font-size: 30px;
  }     
  .main {
    margin:auto 10%;
    /*padding-top: 8%;*/
    text-align: center;
    color: #696969;
  }
  #clock > div {
    border-radius: 5px;
    background: #ffa500;
    padding: 5px 5px 0px 5px;
    color: #fff;
    display: inline-block;
  }
  #clock > div > p {
    font-size: 12px;
  }
  #days, #hours, #minutes, #seconds {
    padding: 5px;
    font-size: 15px;
    background: #fb8e00;
    display: inline-block;
    width: 40px;
  }
  span.turn {
    animation: turn 0.7s ease;
  }
  @keyframes turn {
    0% {transform: rotateX(0deg)}
    100% {transform: rotateX(360deg)}
  }  
  </style>
</head>
<body class="hold-transition login-page" style="height: 100%;overflow: hidden;">

  <div class="col-md-8 hidden-xs hidden-sm kiri">
    <div class='logo hidden-xs'><img class='img img-responsive' style='max-width:200px;' src="<?= base_url('assets/dist/img/'.$pengaturan->logo) ?>" width='100px'>
    </div>
  </div>
  <div class="col-md-4 col-xs-12 kanan">
    <div class="login-logo">
        <center><img class='img img-responsive' style='max-width:200px;' src="<?= base_url('assets/dist/img/'.$pengaturan->logo) ?>" width='50px'></center>
        <h1><strong><?= $this->config->item('sitename')?></strong></h1>
        <h5><strong><?= $pengaturan->nama_sekolah ?></strong></h5>
        <h5>version <?= $this->config->item('version')?></h5>
    </div>
    <div class="container-login ">
    <?php if ($this->config->item('identity', 'ion_auth') != 'email') { ?>  
      <p class="login-box-msg"><?php echo lang('login_subheading1');?></p>
    <?php } else { ?>
      <p class="login-box-msg"><?php echo lang('login_subheading');?></p>
    <?php } ?>   

      <?php
        if($message != ""){
      ?>
        <div id="infoMessage" class="callout callout-danger"><?php echo $message;?></div>
      <?php } else if ($this->session->flashdata('success')== TRUE){
      ?> 
        <div id="infoMessage" class="callout callout-success"><?php echo $this->session->flashdata('success'); ?></div>
      <?php } else if ($this->session->flashdata('successreset')== TRUE){
      ?> 
        <div id="infoMessage" class="callout callout-success"><?php echo $this->session->flashdata('successreset'); ?></div>
      <?php } else if ($this->session->flashdata('logout')== TRUE){
      ?> 
        <div id="infoMessage" class="callout callout-success"><?php echo $this->session->flashdata('logout'); ?></div>
      <?php } else if ($this->session->flashdata('register')== TRUE){
      ?> 
        <div id="infoMessage" class="callout callout-danger"><?php echo $this->session->flashdata('register'); ?></div>   
      <?php } else if ($this->session->flashdata('aktif')== TRUE){
      ?> 
        <div id="infoMessage" class="callout callout-danger"><?php echo $this->session->flashdata('aktif'); ?></div>
      <?php } ?>  

      <?php echo form_open("auth/login");?>
      <?php if ($this->config->item('identity', 'ion_auth') != 'email') { ?>
         <div class="form-group has-feedback">
          <label><?php echo lang('login_identity_label1') ?></label>
          <input type="text" name="identity" class="form-control" placeholder="<?php echo lang('login_identity_label1') ?>" autofocus required />
        </div>
      <?php } else { ?>
         <div class="form-group has-feedback">
          <label><?php echo lang('login_identity_label') ?></label>
          <input type="text" name="identity" class="form-control" placeholder="<?php echo lang('login_identity_label') ?>" autofocus required />
        </div>
      <?php } ?>  
        <div class="form-group has-feedback">
          <label><?php echo lang('login_password_label') ?></label>
          <input type="password" id="password" data-toggle="password" name="password" class="form-control" placeholder="<?php echo lang('login_password_label') ?>" required />
        </div>
        <div class="row">
          <div class="col-xs-8">
            <div class="checkbox icheck">
              <label>
                <input name="remember" type="checkbox" class="icheckbox_flat-green" value="1"> <?php echo lang('login_remember_label') ?>
              </label>
            </div>
          </div><!-- /.col -->
          <div class="col-xs-4">
            <input type="submit" class="<?= $this->config->item('botton')?> btn-block" id="loginBtn" value="<?php echo lang('login_submit_btn') ?>" />
          </div><!-- /.col -->
        </div>
        <?php echo form_close();?>
        <?php if ($this->config->item('identity', 'ion_auth') == 'email') { ?>
        <!-- <a href="forgot_password"><?php echo lang('login_forgot_password');?></a><br/> -->
        <?php } ?>
        Belum punya akun? <a href="registrasi"><?php echo lang('register_a_new_membership');?></a>
    </div>
  </div>
<!-- /.login-box -->

<!-- jQuery 3 -->
<script src="<?= base_url();?>assets/bower_components/jquery/dist/jquery.min.js"></script>
<!-- Bootstrap 3.3.7 -->
<script src="<?= base_url();?>assets/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- iCheck -->
<script src="<?= base_url();?>assets/plugins/iCheck/icheck.min.js"></script>
<script src="<?= base_url();?>assets/plugins/bootstrap-show-password/bootstrap-show-password.min.js"></script>
<script>
  $(function () {
    $('input').iCheck({
      checkboxClass: 'icheckbox_square-purple',
      radioClass: 'icheckbox_square-purple',
      increaseArea: '20%' /* optional */
    });
  });
</script>

<!-- live chat telegram -->
<script>
window.intergramId="<?php echo $pengaturan->intergramid ?>";
window.intergramCustomizations={
  titleClosed:'Chat Admin',
  titleOpen:'Sedang Chat...',
  introMessage:'Halo selamat datang, ada yang bisa kami bantu',
  autoResponse:'Silahkan tunggu',
  autoNoResponse:'Pesan anda akan kami jawab, silahkan tunggu',
  maincolor:"#1a73c8",
  alwaysUseFloatingButton: false
};
</script>
<script id="intergram" type="text/javascript" src="https://www.intergram.xyz/js/widget.js"></script>
<!-- end chat -->
</body>
</html>  

