Advertisement
GWibisono

tampilkan_link_halaman()

Apr 30th, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.01 KB | None | 0 0
  1. <?php
  2.                 function tampilkan_link_halaman()
  3.                 {
  4. echo "<br>jumlah halaman:".$this->jumlah_halaman;
  5.                         if ($this->jumlah_halaman > 1)
  6.                         {
  7.                                 print("Halaman: ");
  8.                                 for ($hal = 1; $hal <= $this->jumlah_halaman; $hal++)
  9.                                 {
  10.                                         If($hal == $this->halaman_sekarang)
  11.                                                 echo "$hal |";
  12.                                         else
  13.                                         {
  14.                                                 $nama_skrip = $_SERVER['PHP_SELF'];
  15.                                                 echo "<a href='$nama_skrip?page=$hal'" .
  16.                                                                 ">$hal</a> |\n";
  17.                                         }
  18.                                 }
  19.                         }
  20.                 }//function tampilkan_link_halaman()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement