<style type="text/css">
    .table > thead > tr > th {
        vertical-align: middle;
        text-align: center;
    }
</style>
<?php $this->load->view('uji_analis/header_panel');?>
  <table class="table table-bordered table-hover table-striped table-td-valign-middle">
      <thead>
          <tr>
              <th class="text-center">No.</th>
              <th class="text-center">
                Aksi
              </th>
              <?php if(!empty($data[0]["abu_ks"])) : ?>
                <th class="text-center">Kontrol Sampel</th>
              <?php endif; ?>
              <th class="text-center">Nomor Sampel</th>
              <th width="100" class="text-center">Kode krusibel porselen</th>
              <th class="text-center">Berat Sampel (gram)</th>
              <th class="text-center">V Indukan (mL)</th>
              <th class="text-center">V Labu (mL)</th>
              <th class="text-center">V Pipet (mL)</th>
              <th class="text-center">Abs</th>
              <th class="text-center">Intercept (a)</th>
              <th class="text-center">Slope (b)</th>
              <th class="text-center">Konsentrasi Sampel (ppm)</th>
              <th width="130" class="text-center">% P</th>
          </tr>
      </thead>
      <tbody>
          <?php
          $z = 1;
          foreach ($data as $r) {
              ?>
              <tr class="">
                  <td class="text-center"><?php echo $this->uri->segment(5) + $z++ ?></td>
                  <td class="text-center">
                      <input type="checkbox" name="id[]" id="id_check<?php echo $r['id']; ?>" onchange="onCheck(<?php echo $r['id']; ?>);" value="<?php echo $r['id']; ?>">
                  </td>
                  <?php if(!empty($r["abu_ks"])) : ?>
                    <td><?php echo val_ks($r["abu_ks"]); ?></td>
                  <?php endif; ?>
                  <td><?php echo ($r["id_sampel"] && $r["id_sampel"] != 0 ? $r["nomor_sampel"] : val_ks($r['kontrol_sampel'])); ?></td>
                  <td><?php echo ($r["kode_krusibel_porselen"]) ? $r["kode_krusibel_porselen"] : $r["abu_kb"]; ?></td>
                  <td><?php echo ($r["berat_sampel"]) ? $r["berat_sampel"] : $r["abu_bs"]; ?></td>
                  <td><?php echo $r["v_indukan"]; ?></td>
                  <td><?php echo $r["v_labu"]; ?></td>
                  <td><?php echo $r["v_pipet"]; ?></td>
                  <td><?php echo $r["abs"]; ?></td>
                  <td><?php echo $r["intercept"]; ?></td>
                  <td><?php echo $r["slope"]; ?></td>
                  <td><?php echo $r["konsentrasi_sampel"]; ?></td>
                  <td class="text-center"><?php echo $r["kadar_p"]. ($r["id_sampel"] && $r["id_sampel"] != 0 ? '' : '<br>KS:&nbsp;'.$r['c_range']); ?></td>
              </tr>
          <?php } ?>
      </tbody>
      <tfoot>
      </tfoot>
  </table>
<?php $this->load->view('uji_analis/footer_panel');?>
