Advertisement
kenhoang

Untitled

Jun 4th, 2020
1,790
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.48 KB | None | 0 0
  1. <?php
  2. if(!isAdmin()){
  3.     header("Location: /404");
  4.     exit();
  5. }
  6. ?>
  7. <div class="container" style="margin-top: 70px;">
  8.         <div class="rows">
  9.             <div class="col-md-12">
  10.                 <div class="btn-group btn-breadcrumb btn-breadcrumb" style="margin-bottom: 20px;">
  11.                     <a href="javascript:;" class="btn btn-danger"><i class="glyphicon glyphicon-home"></i></a>
  12.                     <a href="/admin/" class="btn btn-default">Trang Chủ</a>
  13.                     <a href="javascript:;" class="btn btn-default" disabled="">Hoạt động gần đây</a>
  14.                 </div>
  15.             </div>
  16.         </div>
  17.  
  18.         <div class="rows">
  19.  
  20.             <div class="col-lg-12">
  21.                 <div class="panel panel-default">
  22.                     <div class="panel-heading"><i class="fas fa-history"></i> Lịch Sử Mua Robux</div>
  23.                     <div class="table-responsive">
  24.                         <table class="table table-bordered">
  25.                             <thead>
  26.                                 <tr>
  27.                                     <th>#</th>
  28.                                     <th>Tài Khoản</th>
  29.                                     <th>Tên tài khoản</th>
  30.                                     <th>Số Tiền Nạp</th>
  31.                                     <th>Số Coin</th>
  32.                                     <th>Thời Gian</th>
  33.                                 </tr>
  34.                             </thead>
  35.                             <tbody>
  36.                                 <?php
  37.                                 $current_page = isset($_GET['p']) ? $_GET['p'] : "1";
  38.                                 if ($current_page < 1) {
  39.                                     $current_page = 1;
  40.                                 }
  41.                                 if (!is_numeric($current_page)) {
  42.                                     $current_page = 1;
  43.                                 }
  44.                                 $limit = 10;
  45.                                 $offset = ($current_page-1) * $limit;
  46.                                 $system->query("SELECT * FROM `transaction_buy`");
  47.                                 $total_page = ceil($system->num_rows()/$limit);
  48.                                 $system->query("SELECT * FROM `transaction_buy` ORDER BY id DESC LIMIT $offset,$limit");
  49.                                 if($system->num_rows()>0){
  50.                                     while ($transaction_rb = $system->fetch()) {
  51.                                         if($transaction_rb['status']==0){
  52.                                             $transaction_rb['status'] = '<span class="text-success">Thành Công</span>';
  53.                                         }
  54.                                         ?>
  55.                                         <tr>
  56.                                             <td scope="col"><?=$transaction_rb['id']?></td>
  57.                                             <td scope="col"><?=$transaction_rb['username']?></td>
  58.                                             <td scope="col">$ <?=number_format($transaction_rb['sotien'])?></td>
  59.                                             <td scope="col"><?=$transaction_rb['userId']?></td>
  60.                                             <td scope="col"><?=$transaction_rb['coin']?></td>
  61.                                             <td scope="col"><?=convert_time($transaction_rb['time'])?></td>
  62.                                         </tr>
  63.                                         <?php
  64.                                     }
  65.                                 }else{
  66.                                     ?>
  67.                                     <tr>
  68.                                         <td colspan="5">Không Có Dữ Liệu :D</td>
  69.                                     </tr>
  70.                                     <?php
  71.                                 }
  72.                                 ?>
  73.                             </tbody>
  74.                         </table>
  75.                     </div>
  76.                 </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement