<?php 
$domain = "http://$_SERVER[HTTP_HOST]";
?>


<div class="card card-primary" id="content-box-1">
  <div class="card-header" style="padding-top: 3px; padding-bottom: 1px">      
    <center>
      <h4>
        <?php echo strtoupper($data_tampilan->poliklinik_1_value) ?>
      </h4>
    </center>
  </div>
</div>
<div class="col-12">

  <?php if(sizeof($poliklinik_1) <= 11){ ?> 

    <table class="table table-sm table-bordered table-striped table-hover">
      <thead>
        <tr>
          <th style="text-align: center; width: 150px">No Daftar</th>
          <th style="text-align: center;">Nama Pasien</th>
        </tr>
      </thead>
      <tbody>
        <?php foreach ($poliklinik_1 as $key){ ?>         
          <tr>     
            <td style="text-align: center; font-size: 25px"><?php echo $key->no_reg ?></td> 
            <td style="text-align: center; font-size: 25px"><?php echo $key->nm_pasien ?></td> 
          </tr>
        <?php } ?>

        <?php if(sizeof($poliklinik_1) == 0){ ?>
          <tr>     
            <td style="text-align: center;" colspan="2">TIDAK ADA PASIEN</td> 
          </tr>
        <?php } ?>

      </tbody>
    </table>

  <?php } else if(sizeof($poliklinik_1) <= 21){ ?>

    <div class="row">
      <div class="col-6">
        <table class="table table-sm table-bordered table-striped table-hover">
          <thead>
            <tr>
              <th style="text-align: center; width: 150px">No Daftar</th>
              <th style="text-align: center;">Nama Pasien</th>
            </tr>
          </thead>
          <tbody>
            <?php for ($i=0; $i < 11; $i++) { ?>         
              <tr>     
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->no_reg ?></td> 
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->nm_pasien ?></td> 
              </tr>
            <?php } ?>
          </tbody>
        </table>
      </div>
      <div class="col-6">
        <table class="table table-sm table-bordered table-striped table-hover">
          <thead>
            <tr>
              <th style="text-align: center; width: 150px">No Daftar</th>
              <th style="text-align: center;">Nama Pasien</th>
            </tr>
          </thead>
          <tbody>
            <?php for ($i=11; $i < sizeof($poliklinik_1) ; $i++) { ?>         
              <tr>     
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->no_reg ?></td> 
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->nm_pasien ?></td> 
              </tr>
            <?php } ?>
          </tbody>
        </table>
      </div>
    </div>

  <?php } else if(sizeof($poliklinik_1) <= 31){  ?>

    <div class="row">
      <div class="col-4">
        <table class="table table-sm table-bordered table-striped table-hover">
          <thead>
            <tr>
              <th style="text-align: center; width: 150px">No Daftar</th>
              <th style="text-align: center;">Nama Pasien</th>
            </tr>
          </thead>
          <tbody>
            <?php for ($i=0; $i < 11 ; $i++) { ?>         
              <tr>     
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->no_reg ?></td> 
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->nm_pasien ?></td> 
              </tr>
            <?php } ?>
          </tbody>
        </table>
      </div>
      <div class="col-4">
        <table class="table table-sm table-bordered table-striped table-hover">
          <thead>
            <tr>
              <th style="text-align: center; width: 150px">No Daftar</th>
              <th style="text-align: center;">Nama Pasien</th>
            </tr>
          </thead>
          <tbody>
            <?php for ($i=11; $i < 21 ; $i++) { ?>         
              <tr>     
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->no_reg ?></td> 
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->nm_pasien ?></td> 
              </tr>
            <?php } ?>
          </tbody>
        </table>
      </div>
      <div class="col-4">
        <table class="table table-sm table-bordered table-striped table-hover">
          <thead>
            <tr>
              <th style="text-align: center; width: 150px">No Daftar</th>
              <th style="text-align: center;">Nama Pasien</th>
            </tr>
          </thead>
          <tbody>
            <?php for ($i=21; $i < sizeof($poliklinik_1) ; $i++) { ?>         
              <tr>     
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->no_reg ?></td> 
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->nm_pasien ?></td> 
              </tr>
            <?php } ?>
          </tbody>
        </table>
      </div>
    </div>      

  <?php } else if(sizeof($poliklinik_1) <= 41){  ?>

    <div class="row">
      <div class="col-3">
        <table class="table table-sm table-bordered table-striped table-hover">
          <thead>
            <tr>
              <th style="text-align: center; width: 150px">No Daftar</th>
              <th style="text-align: center;">Nama Pasien</th>
            </tr>
          </thead>
          <tbody>
            <?php for ($i=0; $i < 11 ; $i++) { ?>         
              <tr>     
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->no_reg ?></td> 
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->nm_pasien ?></td> 
              </tr>
            <?php } ?>
          </tbody>
        </table>
      </div>
      <div class="col-3">
        <table class="table table-sm table-bordered table-striped table-hover">
          <thead>
            <tr>
              <th style="text-align: center; width: 150px">No Daftar</th>
              <th style="text-align: center;">Nama Pasien</th>
            </tr>
          </thead>
          <tbody>
            <?php for ($i=11; $i < 21 ; $i++) { ?>         
              <tr>     
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->no_reg ?></td> 
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->nm_pasien ?></td> 
              </tr>
            <?php } ?>
          </tbody>
        </table>
      </div>
      <div class="col-3">
        <table class="table table-sm table-bordered table-striped table-hover">
          <thead>
            <tr>
              <th style="text-align: center; width: 150px">No Daftar</th>
              <th style="text-align: center;">Nama Pasien</th>
            </tr>
          </thead>
          <tbody>
            <?php for ($i=21; $i < 31 ; $i++) { ?>         
              <tr>     
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->no_reg ?></td> 
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->nm_pasien ?></td> 
              </tr>
            <?php } ?>
          </tbody>
        </table>
      </div>
      <div class="col-3">
        <table class="table table-sm table-bordered table-striped table-hover">
          <thead>
            <tr>
              <th style="text-align: center; width: 150px">No Daftar</th>
              <th style="text-align: center;">Nama Pasien</th>
            </tr>
          </thead>
          <tbody>
            <?php for ($i=31; $i < sizeof($poliklinik_1) ; $i++) { ?>         
              <tr>     
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->no_reg ?></td> 
                <td style="text-align: center; font-size: 25px"><?php echo $poliklinik_1[$i]->nm_pasien ?></td> 
              </tr>
            <?php } ?>
          </tbody>
        </table>
      </div>
    </div>

  <?php }  ?>

</div>