<!DOCTYPE html>
<html >
  <head>
    <meta charset="UTF-8">
    <title>Single Signin System</title>
    <link rel="stylesheet" href="<?php echo base_url()?>media/css/login/css/style.css">
  </head>
  <body>
    <style type="text/css">
      body{background: #fff}
    </style>
      
    <div class="wrapper">
      <div class="container">
        <h1 style="margin-top:-30px; font-size:30px; font-family: Segoe UI;">
          Filter Akses<br>
        </h1>
        <h1 style="font-size:9px; margin-top:-5px; margin-bottom: -20px"><?php $id_cabang = $this->session->userdata('id_cabang'); ?>
          Admin Akademik 
          <?php $adm = $this->Content_m->get_value('permohonan_daftar_cabang', 'id_permohonan_daftar_cabang', $id_cabang, 'nama_cabang') ?>
          <?php if($adm == '') { ?>
              - Super User (Administrator IT)
          <?php } else { ?>
              - <?=$adm?>
          <?php } ?>  
        </h1> 
        <br> <br>
        <?php if (in_array(1, $this->session->userdata('id_global_hakakses')) || in_array(2, $this->session->userdata('id_global_hakakses'))) { ?>
        <form action="<?=site_url('administrator/select_prefillage/filter_admin_proses')?>" method="POST" class="form" id="form" style="margin-bottom:10px; ">
          <select class="satuan_pendidikan" name="id_sp" style="width:250px; height:40px; margin-bottom:10px; border-radius:3px; border:0px;text-align-last:center; padding-left:15px ; color:black; font-size:18px;font-family: Segoe UI; ">
            <?php foreach ($this->Content_m->select_db('pddikti_tr_satuan_pendidikan')->result() as $key ) { ?>
                <option value="<?=$key->id_sp?>"><?=$key->nm_singkat?></option>
            <?php } ?>    
          </select>
          <br>

          <select class="angkatan_srt4" name="angkatan_srt4" style="width:250px; height:40px; margin-bottom:10px; border-radius:3px; border:0px;text-align-last:center; padding-left:15px ; color:black; font-size:18px;font-family: Segoe UI; ">             
            <option value="">Pilih Angkatan..</option>
            <option value="2016" class="a_srt4">2016/2018</option>
            <option value="2017" class="a_srt4">2017/2019</option>
            <option value="2018" class="a_srt4">2018/2020</option>
            <option value="2019" class="a_srt4">2019/2021</option>
          </select>

          <select class="angkatan_srt3" name="angkatan_srt3" style="width:250px; height:40px; margin-bottom:10px; border-radius:3px; border:0px;text-align-last:center; padding-left:15px ; color:black; font-size:18px;font-family: Segoe UI; display: none">
            <option value="">Pilih Angkatan..</option>
            <option value="2017" class="a_srt3">2017/2018</option>
            <option value="2018" class="a_srt3">2018/2019</option>
            <option value="2019" class="a_srt3">2019/2020</option>
          </select>
          <br>

          <!--
          <select class="semester_srt4" name="semester_srt4" style="width:250px; height:40px; margin-bottom:10px; border-radius:3px; border:0px;text-align-last:center; padding-left:15px ; color:black; font-size:18px;font-family: Segoe UI; ">
                  <option value="">Pilih Semester..</option>
                  <option value="3" class="srt4">Semester 3</option>
                  <option value="4" class="srt4">Semester 4</option>  
          </select>

          <select class="semester_srt3" name="semester_srt3" style="width:250px; height:40px; margin-bottom:10px; border-radius:3px; border:0px;text-align-last:center; padding-left:15px ; color:black; font-size:18px;font-family: Segoe UI; display: none;">
                  <option value="">Pilih Semester..</option>
                  <option value="1" class="srt3">Semester 1</option>
                  <option value="2" class="srt3">Semester 2</option>                 
          </select>
          <br>
          -->

          <script type="text/javascript">               
            $('.satuan_pendidikan').change(function() {
              var sp = $('.satuan_pendidikan').val();
              $(".angkatan_srt4").val('').change();
              $(".angkatan_srt3").val('').change();
              if(sp == '555ef70d-c159-4dd2-98f1-ee79b0f8e844') {
                $('.angkatan_srt4').css('display','none');
                $('.angkatan_srt3').css('display','inline-block');
                $('.semester_srt4').css('display','none');
                $('.semester_srt3').css('display','inline-block');
              } else {
                $('.angkatan_srt4').css('display','inline-block');
                $('.angkatan_srt3').css('display','none'); 
                $('.semester_srt4').css('display','inline-block');
                $('.semester_srt3').css('display','none');
              }
            });
          </script>

          <button type="submit" id="login-button" style="font-family: Segoe UI; ">
              <span style="font-size:13px; font-weight:bold">MASUK</span><br>
          </button>
        </form>
        <?php } ?>   
      </div>

      <ul class="bg-bubbles">
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <li></li>
      </ul>

    </div>
  
  <script src='<?php echo base_url()?>media/css/login/js/jquery.min.js'></script>
  <script src="<?php echo base_url()?>media/css/login/js/index.js"></script>
  
  </body>
</html>

<script type="text/javascript">
  $('#login-button').click(function() {
      setTimeout(explode, 1200);
  });

  function explode() {
    document.getElementById("form").submit();
  }
</script>