gundambison

cuma mindahin tbody doank.. sapa tau bener

Dec 26th, 2015
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.74 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3.  
  4. <head>
  5.   <meta charset="utf-8">
  6.   <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7.   <meta name="viewport" content="width=device-width, initial-scale=1">
  8.   <meta name="description" content="">
  9.   <meta name="author" content="">
  10.  
  11.   <title>SB Admin - Bootstrap Admin Template</title>
  12.  
  13.   <!-- Bootstrap Core CSS -->
  14.   <link href="css/bootstrap.min.css" rel="stylesheet">
  15.  
  16.   <!-- Custom CSS -->
  17.   <link href="css/sb-admin.css" rel="stylesheet">
  18.  
  19.   <!-- Morris Charts CSS -->
  20.   <link href="css/plugins/morris.css" rel="stylesheet">
  21.  
  22.   <!-- Custom Fonts -->
  23.   <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
  24.  
  25.   <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  26.   <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  27.   <!--[if lt IE 9]>
  28.       <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  29.       <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  30.   <![endif]-->
  31.  
  32.   <!-- DataTables -->
  33.   <link rel="stylesheet" href="css/dataTables.bootstrap.css">
  34.  
  35. <?php
  36.   require_once('core/init.php');
  37.  
  38.   $result = tampilUser();
  39.   //print_r($result);
  40. ?>
  41.  
  42. </head>
  43.  
  44. <body>
  45.  
  46.     <div id="wrapper">
  47.  
  48.       <?php
  49.         require_once('template/nav.php');
  50.       ?>
  51.  
  52.         <div id="page-wrapper">
  53.  
  54.             <div class="container-fluid">
  55.  
  56.                 <!-- Page Heading -->
  57.                 <div class="row">
  58.                     <div class="col-lg-12">
  59.                         <h1 class="page-header">
  60.                             Data User
  61.                         </h1>
  62.                         <ol class="breadcrumb">
  63.                             <li>
  64.                                 <i class="fa fa-dashboard"></i>  <a href="index.html">Dashboard</a>
  65.                             </li>
  66.                             <li class="active">
  67.                                 <i class="fa fa-table"></i> Tables
  68.                             </li>
  69.                         </ol>
  70.                     </div>
  71.                 </div>
  72.                 <!-- /.row -->
  73.  
  74.               <div class="container-fluid">
  75.                 <div class="row">
  76.                   <div class="col-lg-12">
  77.                       <a href="add_user.php" class="btn btn-primary">Tambah Data</a>
  78.                     <hr>
  79.                       <div class="table-responsive">
  80.                           <table class="table table-bordered table-hover table-striped" id="example1">
  81.                               <thead>
  82.                                   <tr>
  83.                                       <th>#</th>
  84.                                       <th>Username</th>
  85.                                       <th>Password</th>
  86.                                       <th>Status</th>
  87.                                       <th>Action</th>
  88.                                   </tr>
  89.                               </thead>
  90.  
  91.                               <tbody>
  92.  
  93.                               <?php
  94.                               $no=0;
  95.                               $no++;
  96.                                  while ($row = mysqli_fetch_assoc($result)) {
  97.                               ?>
  98.                                   <tr>
  99.                                     <td><?php echo $no++; ?></td>
  100.                                     <td><?php echo $row['username']; ?></td>
  101.                                     <td><?php echo $row['password']; ?></td>
  102.                                     <td><?php echo $row['status']; ?></td>
  103.                                     <td><a href="edit_user.php?id=<?php echo $row['id']; ?>" class="btn btn-sm btn-success">Edit</a>
  104.                                         <a href="delete_user.php?id=<?php echo $row['id']; ?>" class="btn btn-sm btn-danger">Delete</a>
  105.                                     </td>
  106.                                   </tr>
  107.                                     <?php } //end while  ?>
  108.                               </tbody>
  109.                           </table>
  110.                       </div>
  111.                   </div>
  112.                 </div>
  113.               </div>
  114.                 <!-- /.row -->
  115.  
  116.  
  117.  
  118.             </div>
  119.             <!-- /.container-fluid -->
  120.  
  121.         </div>
  122.         <!-- /#page-wrapper -->
  123.  
  124.     </div>
  125.     <!-- /#wrapper -->
  126.  
  127.     <?php
  128.       require_once('template/header.php');
  129.     ?>
  130.     <script src="js/jquery-1.11.1.min.js"></script>
  131.     <script src="js/bootstrap.min.js"></script>
  132.     <script src="js/jquery.dataTables.min.js"></script>
  133.     <script src="js/dataTables.bootstrap.js"></script>
  134.     <script type="text/javascript">
  135.         $(function() {
  136.             $('#example1').dataTable();
  137.         });
  138.     </script>
  139. </body>
  140.  
  141. </html>
Advertisement
Add Comment
Please, Sign In to add comment