Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <table class="table table-striped table-hover fill-head">
- <thead>
- <tr>
- <th>Code Poli</th>
- <th>Name Poli</th>
- <th>Floor</th>
- <th style="width: 150px">Action</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $per_page = 15;
- $page_query = mysql_query("SELECT COUNT(*) FROM poliknik");
- $pages = ceil(mysql_result($page_query, 0) / $per_page);
- $page = (isset($_GET['hal'])) ? (int)$_GET['hal'] : 1;
- $start = ($page - 1) * $per_page;
- $data_kg=mysql_query("select * from poliknik order by id_poli DESC LIMIT $start,$per_page");
- while ($kg=mysql_fetch_object($data_kg)){
- ?>
- <tr>
- <td><?php echo $kg->code_poli?></td>
- <td><?php echo $kg->name_poli?></td>
- <td><?php echo $kg->lt?></td>
- <td>
- <a class="btn btn-primary btn-sm" href="home.php?p=edit_poliknik&id_poli=<?php echo $kg->id_poli ?>"><i class="fa fa-edit"></i> Edit</a>
- <a class="btn btn-danger btn-sm" href="home.php?p=hapus_poliknik&id_poli=<?php echo $kg->id_poli ?>"><i class="fa fa-trash-o"></i> Delete</a>
- </td>
- </tr>
- <?php }?>
- </tbody>
- </table>
- <center>
- <div>
- <ul class="pagination pagination-lg pagination-colory">
- <?php if($pages >= 1 && $page <= $pages){
- for($x=1; $x<=$pages; $x++){
- echo ($x == $page) ? '<li class="active"><a href="home.php?p=poliknik&hal='.$x.'">'.$x.'</a></li>' : '<li><a href="home.php?p=poliknik&hal='.$x.'">'.$x.'</a></li>';
- }
- }
- ?>
- </ul>
- </div></center>
Advertisement
Add Comment
Please, Sign In to add comment