<?php if ($this->session->userdata('admin_level') == "Admin"){ ?>
<?php
                  $mode		= $this->uri->segment(3);

                  if ($mode == "edt" || $mode == "act_edt") {
                    
                    $act			      = "act_edt";
                    $idp			      = $datpil->id_progres;
                    $ket			    = $datpil->ket;
                    $verif			    = $datpil->verif;
                    $ket_verif			= $datpil->ket_verif;
                    $tgl    			= $datpil->tgl;
                    

                    
                    
                    
                    
                    
                  } else {
                    $act			= "act_add";
                    $idp			= "";
                    $ket			      = "";
                    $verif			    = "";
                    $ket_verif			= "";
                    

                  }
                  ?>
<body>
  <br>
  <script>
  function validateVerif() {
    
    var id_progres = document.forms["formverf"]["id_umkm"].value;
    var ket = document.forms["formverf"]["verif"].value;
    var verif = document.forms["formverf"]["verif"].value;
    var ket_verif = document.forms["formverf"]["ket_verif"].value;
    var tgl = document.forms["formverf"]["tgl"].value;
   
    if (id_progres == " ") {
      alert("Pilih Data Yang Akan Diverfikasi");
      return false;
    }
    else if (ket == "") {
      alert("Pilih Data Yang Akan Diverfikasi");
      return false;
    }
    else if (verif == "") {
      alert("Pilih Data Yang Akan Diverfikasi");
      return false;
    }
    else if (ket_verif == "k") {
      alert("Pilih Data Yang Akan Diverfikasi");
      return false;
    }
    else if (tgl == "") {
      alert("Pilih Data Yang Akan Diverfikasi");
      return false;
    }
  }
  
  </script>




<div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
           
          </div><!-- /.col -->
         
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <section class="content">
      <div class="container-fluid">
        <div class="row">
          <div class="col-12">
            
            <!-- /.card -->

            <div class="card">
              <div class="card-header">
             
              </div>
              <!-- /.card-header -->
              <div class="card-body">
              <table  id="verifatas" class="table table-bordered table-striped">
                  <thead>
                  <tr>
                    <th>No</th>
                    <th>Nama Usaha</th>
                    <th>Nama Pemilik</th>
                    <th>Fasilitator</th>
                    <th>Progres</th>
                    <th>Kendala</th>
                    <th>Status</th>
                    
                 
                   
                    <th>Aksi</th>
                  </tr>
                           
                  </thead>
                  <tbody >
                  <tr>
                  <?php 
                  if (empty($data_unverif)) {
                    echo "<tr></tr>";
                  } else {
                    $no 	= ($this->uri->segment(4) + 1);
                    foreach ($data_unverif as $b) {
                  ?>
                    
                  <td> 
                <?=$no?>
                 
                </td>
                 <td> 
                <?=$b->nama_usaha?>
                 
                </td>
                  
                  <td>
                  <?=$b->nama_pemilik?><br>
                  <?=$b->telp?> 
                  </td>
                  <td>
                  <?=$b->nama_lengkap?>
                    </td>
                    <td>
                    <?php  
                     if ($b->step == '1' ){echo "1. Pembuatan NIB dan KBLI yang sesuai";}
                     else if ($b->step == '2' ){echo "2. Pembuatan Dokumen SOP dan Panduan Mutu";}
                     else if ($b->step == '3' ){echo "3. Persetujuan Denah dan Alur Produksi";}
                     else if ($b->step == '4' ){echo "4. Input permohonan melalui OSS RBA yang terintegrasi e-sertifikasi BPOM";}
                     else if ($b->step == '5' ){echo "5. Sertifikasi Sarana Produksi (oleh TIM BBPOM Palangka Raya) untuk mendapatkan Sertifikat CPPOB";}
                     else if ($b->step == '6' ){echo "6. Pengujian Produk (khusus untuk produk dengan resiko sedang-tinggi)";}
                    
                    
                     else {echo "7. Pendaftaran Nomor Izin Edar produk melalui OSS yang terintegrasi e-Registrasi BPOM";}
                    ?>
                    <br>
                    <br>
                    <small>
                     <b>File Progres           :  </b> <a  <?php echo "<a href='".base_URL()."upload/bukti/".$b->file_progres."' " ?>  rel="noopener" target="_blank" class="btn btn-default"><i class="fas fa-download"></i></a><br>
                    </small>
                    </td>
                    <td>
                    <?=$b->kendala?><br><br>
                    <?=$b->ket?>
                   </td>
                   <td>
                   <?php  
                     if ($b->verif == 0 ){echo '<span class="badge badge-danger">' ."Belum verifikasi". '</span>';;}
                     else if ($b->verif == 1 ){echo '<span class="badge badge-warning">' ."Sudah Verifikasi". '</span>';;}
                     else {echo '<span class="badge badge-success">' ."Selesai". '</span>';;}
                    ?><br><br>
                    <?=$b->ket_verif?>
                   </td>
             
                   
                   
                      
                    <td class="text-center py-0 align-middle">
                      <div class="btn-group btn-group-sm">
                     
                      <a class="btn btn-info" href="<?=base_URL()?>sistem/verifikasi/edt/<?php echo encrypt_url ($b->id_progres)?>">Pilih</a>
                        <?php if ($b->verif == 1  || $b->verif == 2 ) { ?> <!-- Acton Operator -->
                        <a onclick="return confirm('Anda Yakin..?')" href="<?=base_URL()?>sistem/verifikasi/<?php echo $this->uri->segment(3)?>/del/<?php echo encrypt_url ($b->id_progres)?>" class="btn btn-danger disabled"><i class="fas fa-trash"></i></a>
								 
											 <?php } ?>
                       <?php if ($b->verif == 0 ) { ?> <!-- Acton Operator -->
                        <a onclick="return confirm('Anda Yakin..?')" href="<?=base_URL()?>sistem/verifikasi/<?php echo $this->uri->segment(3)?>/del/<?php echo encrypt_url ($b->id_progres)?>" class="btn btn-danger"><i class="fas fa-trash"></i></a>
								 
											 <?php } ?>
                      </div>
                    </td>
                 
                </tr>
                  
                  <?php 
			$no++;
			}
		}
		?> 
    
                  </tbody>
                 
                </table>
              </div>
              <!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>
          <!-- /.col -->
        </div>
        <!-- /.row -->
      </div>
      <!-- /.container-fluid -->
    </section>
  </body>
















  <section class="content">
      <div class="container-fluid">
        <!-- SELECT2 EXAMPLE -->
        <div class="card card-default">
          <div class="card-header">
            <h3 class="card-title">Form Verifikasi</h3>

            <div class="card-tools">
              <button type="button" class="btn btn-tool" data-card-widget="collapse">
                <i class="fas fa-minus"></i>
              </button>
              <button type="button" class="btn btn-tool" data-card-widget="remove">
                <i class="fas fa-times"></i>
              </button>
            </div>
          </div>
          <!-- /.card-header -->
          <form name="formverf" onsubmit="return validateVerif()"  action="<?=base_URL()?>sistem/verifikasi/<?php echo $act; ?>"  method="post" accept-charset="utf-8" enctype="multipart/form-data" id="quickForm" class="form-horizontal">
          <input type="hidden" name="idp" value="<?php echo $idp; ?>"> 
          
         
                   
          <div class="card-body">
            <div class="row">
              <div class="col-md-6">

              <div class="form-group">
              <?php  
                     if ($idp > 0 ){echo '<span class="badge badge-success">' ."Data Siap Diverfikasi". '</span>';;}
                    else {echo '<span class="badge badge-danger">' ."Pilih Data Yang Akan Diverfikasi". '</span>';;}
                ?> 
               <?php echo $ket; ?>
              </div>



                <div class="form-group">
                  <label>Verifikasi</label>
                  
                  <select  name="verif" id="verif"  class="form-control" ><option  value=""> - Pilih - </option>
                  <option  value="1">Tahap Berikutnya</option>
                  <option  value="2">Selesai</option>
                 
                  </select>   
                         </div>               
                <!-- /.form-group -->
              </div>
              <!-- /.col -->
              <div class="col-md-6">
              
              <div class="form-group">
                  <label>Keterangan:</label>
                  <textarea name="ket_verif"  id="ket_verif"   class="form-control "><?php echo $ket_verif; ?></textarea>
                </div>
               
                
                
                
                
              </div>
              
            </div>
            <!-- /.row -->
            
        </div>
        <!-- /.card -->

        <!-- SELECT2 EXAMPLE -->
        
        <!-- /.card -->

       
          <!-- /.card-header -->
          
        
        <!-- /.card -->

        
        <!-- /.row -->
        
        <!-- /.row -->
        <div class="card-footer">
         <button type="submit"   class="form-control btn btn-primary" >Proses</button>
         </div>
        <!-- /.row -->
      </div>
      <!-- /.container-fluid -->
    </section>








<div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
           
          </div><!-- /.col -->
         
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    <section class="content">
      <div class="container-fluid">
        <div class="row">
          <div class="col-12">
            
            <!-- /.card -->

            <div class="card">
              <div class="card-header">
                <h3 class="card-title"><?php echo $this->session->flashdata("k");?></h3>
                <h3 class="card-title"><?php echo $this->session->flashdata("kk");?></h3>
              </div>
              <!-- /.card-header -->
              <div class="card-body">
              <table  id="verifbawah" class="table table-bordered table-striped">
                  <thead>
                  <tr>
                    <th>No</th>
                    <th>Nama Usaha</th>
                    <th>Nama Pemilik</th>
                    <th>Fasilitator</th>
                    <th>Progres</th>
                    <th>Kendala</th>
                    <th>Status</th>
                 
                   
                    <th>Aksi</th>
                  </tr>
                           
                  </thead>
                  <tbody >
                  <tr>
                  <?php 
                  if (empty($data_verif)) {
                    echo "<tr></tr>";
                  } else {
                    $no 	= ($this->uri->segment(4) + 1);
                    foreach ($data_verif as $b) {
                  ?>
                    
                  <td> 
                 
                <?=$no?>
                 
                </td>
                 <td> 
                <?=$b->nama_usaha?>
                 
                </td>
                  
                  <td>
                  <?=$b->nama_pemilik?><br>
                  <?=$b->telp?> 
                  </td>
                  <td>
                  <?=$b->nama_lengkap?>
                    </td>
                    <td>
                    <?php  
                     if ($b->step == '1' ){echo "1. Pembuatan NIB dan KBLI yang sesuai";}
                     else if ($b->step == '2' ){echo "2. Pembuatan Dokumen SOP dan Panduan Mutu";}
                     else if ($b->step == '3' ){echo "3. Persetujuan Denah dan Alur Produksi";}
                     else if ($b->step == '4' ){echo "4. Input permohonan melalui OSS RBA yang terintegrasi e-sertifikasi BPOM";}
                     else if ($b->step == '5' ){echo "5. Sertifikasi Sarana Produksi (oleh TIM BBPOM Palangka Raya) untuk mendapatkan Sertifikat CPPOB";}
                     else if ($b->step == '6' ){echo "6. Pengujian Produk (khusus untuk produk dengan resiko sedang-tinggi)";}
                    
                    
                     else {echo "7. Pendaftaran Nomor Izin Edar produk melalui OSS yang terintegrasi e-Registrasi BPOM";}
                    ?><br><br>
                    
                    <small>
                     <b>File Progres           :  </b> <a  <?php echo "<a href='".base_URL()."upload/bukti/".$b->file_progres."' " ?>  rel="noopener" target="_blank" class="btn btn-default"><i class="fas fa-download"></i></a><br>
                    </small>
                   </td>
                    <td>
                    <?=$b->kendala?><br><br>
                    <?=$b->ket?>
                   </td>
                   <td>
                   <?php  
                     if ($b->verif == 0 ){echo '<span class="badge badge-danger">' ."Belum verifikasi". '</span>';;}
                     else if ($b->verif == 1 ){echo '<span class="badge badge-warning">' ."Sudah Verifikasi". '</span>';;}
                     else {echo '<span class="badge badge-success">' ."Selesai". '</span>';;}
                    ?><br><br>
                    <?=$b->ket_verif?>
                   </td>
                   
                   
                   
                      
                    <td class="text-center py-0 align-middle">
                      <div class="btn-group btn-group-sm">
                     
                      <?php if ($b->verif == 1  || $b->verif == 2 ) { ?> <!-- Acton Operator -->
                        <a onclick="return confirm('Anda Yakin..?')" href="<?=base_URL()?>sistem/verifikasi/<?php echo $this->uri->segment(3)?>/del/<?php echo encrypt_url ($b->id_progres)?>" class="btn btn-danger disabled"><i class="fas fa-trash"></i></a>
								 
											 <?php } ?>
                       <?php if ($b->verif == 0 ) { ?> <!-- Acton Operator -->
                        <a onclick="return confirm('Anda Yakin..?')" href="<?=base_URL()?>sistem/verifikasi/<?php echo $this->uri->segment(3)?>/del/<?php echo encrypt_url ($b->id_progres)?>" class="btn btn-danger"><i class="fas fa-trash"></i></a>
								 
											 <?php } ?>
                      
                      </div>
                    </td>
                 
                </tr>
                  
                  <?php 
			$no++;
			}
		}
		?> 
    
                  </tbody>
                 
                </table>
              </div>
              <!-- /.card-body -->
            </div>
            <!-- /.card -->
          </div>
          <!-- /.col -->
        </div>
        <!-- /.row -->
      </div>
      <!-- /.container-fluid -->
    </section>
  </body>
    	
  <?php } ?> <!-- Acton Admin-->
    <?php if ($this->session->userdata('admin_level') == "User"){ ?>
      <h1>Page Not Found</h1>
    <p>Sorry, but the page you requested has not been found</p>
      <?php } ?> <!-- Acton Admin-->