Advertisement
anss123

daftar_komentar.php

Aug 21st, 2019
575
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.37 KB | None | 0 0
  1. <!-- Content Wrapper. Contains page content -->
  2. <div class="content-wrapper">
  3. <!-- Content Header (Page header) -->
  4. <section class="content-header">
  5. <h1>
  6. Daftar Komentar
  7. </h1>
  8. <ol class="breadcrumb">
  9. <li><a href="index.php"><i class="fa fa-dashboard"></i> Home</a></li>
  10. <li class="active">Daftar Komentar</li>
  11. </ol>
  12. </section>
  13.  
  14. <!-- Main content -->
  15. <section class="content">
  16. <div class="row">
  17. <div class="col-xs-12">
  18. <div class="box box-primary">
  19. <div class="box-header">
  20. <a href="index.php?page=tambah_komentar" class="btn btn-primary" role="button" title="Tambah Data"><i class="glyphicon glyphicon-plus"></i> Tambah</a>
  21. </div>
  22. <div class="box-body table-responsive">
  23. <table id="komentar" class="table table-bordered table-hover">
  24. <thead>
  25. <tr>
  26. <th>#</th>
  27. <th>Nama</th>
  28. <th>Email</th>
  29. <th>Subjek</th>
  30. <th>Pesan</th>
  31. <th>Aksi</th>
  32. </tr>
  33. </thead>
  34. <tbody>
  35.  
  36. <?php
  37. include "conf/connect.php";
  38. $no=0;
  39. $showData = mysqli_query($connect,"select * from komentar order by id desc;;");
  40. while ($data=mysqli_fetch_array($showData))
  41. {
  42. ?>
  43.  
  44. <tr>
  45. <td><?php echo $no=$no+1;?></td>
  46. <td><?php echo $data['nama'];?></td>
  47. <td><?php echo $data['email'];?></td>
  48. <td><?php echo $data['subjek'];?></td>
  49. <td><?php echo $data['pesan'];?></td>
  50. <td>
  51. <a href="index.php?page=ubah_komentar&id=<?php echo $data['id'];?>" class="btn btn-success" role="button" title="Ubah Data"><i class="glyphicon glyphicon-edit"></i></a>
  52. <a href="index.php?page=hapus_komentar&id=<?php echo $data['id'];?>" class="btn btn-danger" role="button" title="Hapus Data"><i class="glyphicon glyphicon-trash"></i></a>
  53. </td>
  54. </tr>
  55.  
  56. <?php } ?>
  57.  
  58. </tbody>
  59. </table>
  60. </div>
  61. <!-- /.box-body -->
  62. </div><!-- Content Wrapper. Contains page content -->
  63. <div class="content-wrapper">
  64. <!-- Content Header (Page header) -->
  65. <section class="content-header">
  66. <h1>
  67. Daftar Komentar
  68. </h1>
  69. <ol class="breadcrumb">
  70. <li><a href="index.php"><i class="fa fa-dashboard"></i> Home</a></li>
  71. <li class="active">Daftar Komentar</li>
  72. </ol>
  73. </section>
  74.  
  75. <!-- Main content -->
  76. <section class="content">
  77. <div class="row">
  78. <div class="col-xs-12">
  79. <div class="box box-primary">
  80. <div class="box-header">
  81. <a href="index.php?page=tambah_komentar" class="btn btn-primary" role="button" title="Tambah Data"><i class="glyphicon glyphicon-plus"></i> Tambah</a>
  82. </div>
  83. <div class="box-body table-responsive">
  84. <table id="komentar" class="table table-bordered table-hover">
  85. <thead>
  86. <tr>
  87. <th>#</th>
  88. <th>Nama</th>
  89. <th>Email</th>
  90. <th>Subjek</th>
  91. <th>Pesan</th>
  92. <th>Aksi</th>
  93. </tr>
  94. </thead>
  95. <tbody>
  96.  
  97. <?php
  98. include "conf/connect.php";
  99. $no=0;
  100. $showData = mysqli_query($connect,"select * from komentar order by id desc;;");
  101. while ($data=mysqli_fetch_array($showData))
  102. {
  103. ?>
  104.  
  105. <tr>
  106. <td><?php echo $no=$no+1;?></td>
  107. <td><?php echo $data['nama'];?></td>
  108. <td><?php echo $data['email'];?></td>
  109. <td><?php echo $data['subjek'];?></td>
  110. <td><?php echo $data['pesan'];?></td>
  111. <td>
  112. <a href="index.php?page=ubah_komentar&id=<?php echo $data['id'];?>" class="btn btn-success" role="button" title="Ubah Data"><i class="glyphicon glyphicon-edit"></i></a>
  113. <a href="index.php?page=hapus_komentar&id=<?php echo $data['id'];?>" class="btn btn-danger" role="button" title="Hapus Data"><i class="glyphicon glyphicon-trash"></i></a>
  114. </td>
  115. </tr>
  116.  
  117. <?php } ?>
  118.  
  119. </tbody>
  120. </table>
  121. </div>
  122. <!-- /.box-body -->
  123. </div>
  124. <!-- /.box -->
  125. </div>
  126. <!-- /.col -->
  127. </div>
  128. <!-- /.row -->
  129. </section>
  130. <!-- /.content -->
  131. </div>
  132. <!-- /.content-wrapper -->
  133.  
  134. <!-- Javascript Datatable -->
  135. <script type="text/javascript">
  136. $(document).ready(function(){
  137. $('#komentar').DataTable();
  138. });
  139. </script>
  140. <!-- /.box -->
  141. </div>
  142. <!-- /.col -->
  143. </div>
  144. <!-- /.row -->
  145. </section>
  146. <!-- /.content -->
  147. </div>
  148. <!-- /.content-wrapper -->
  149.  
  150. <!-- Javascript Datatable -->
  151. <script type="text/javascript">
  152. $(document).ready(function(){
  153. $('#komentar').DataTable();
  154. });
  155. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement