<h1 align="center">..:: Tentang Kami ::..</h1>
  
<?php
  //menampilkan tentang kami 
  $nourut=1;

  $start=0;
  $limit=3;
  
  if(isset($_GET['p']))
  {
    $p=$_GET['p'];
    $start=($p-1)*$limit;
  }else{
    $p=1;
    $start=0;
    $limit=3;
  }

  $qryx=mysqli_query($mysqli,"SELECT * FROM tentang_kami ORDER BY id DESC LIMIT $start, $limit");
  if($qryx){
    if(mysqli_num_rows($qryx)>0){
      $link="index.php";

      while($datax=mysqli_fetch_array($qryx)){
        
        $separator="<center><img src='images/separator.png' class='no-border'/></center>";
        echo "<h1>$datax[judul]</h1>
            <i style=\"margin-left:15px\">Oleh: $datax[penulis] ($datax[tanggal])</i><br/>";
        echo "<center><img src='foto_berita/$datax[foto]' width='80%' height='80%' style=\"margin-left:15px\" class='no-border'/></center>$datax[isi]<br/>$separator";
      }

      $rows=mysqli_num_rows(mysqli_query($mysqli,"SELECT * FROM tentang_kami"));
      $total=ceil($rows/$limit);
      
      if($p>1)
      {
      echo "<a href='$link?p=".($p-1)."' class='button'>Sebelumnya</a>";
      }
      if($p!=$total)
      {
      echo "<a href='$link?p=".($p+1)."' class='button'>Berikutnya</a>";
      }
      
      echo "<ul class='page'>";
      for($i=1;$i<=$total;$i++)
      {
      if($i==$p) { echo "<li class='current'>".$i."</li>"; }
      
      else { echo "<li><a href='$link?p=".$i."'>".$i."</a></li>"; }
      }
      echo "</ul>";

      echo "<br/><br/>&nbsp;";
      
    }else{
      echo "<p>Tidak ada info tentang kami untuk ditampilkan</p>";
    }
  }else{
    //lempar("index.php");
  }
?>