Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if(!isset($_SESSION["user"])){
- echo "<script>alert('Kamu Harus Login Dulu, Terima Kasih')</script>";
- header ("location: login.php");
- }
- include"header.php";
- include"navbarData.php";
- ?>
- <html>
- <body>
- <div class="container">
- <div class="row">
- <div class="col-sm-12">
- <table class="table" style="align : center">
- <tr class="tengah" style="background-color : #74b9ff">
- <center>
- <th><center>No</center></th>
- <th><center>Nama</center></th>
- <th><center>Nama Ruangan</center></th>
- <th><center>Prodi - Dosen</center></th>
- <th><center>Jam Mulai</center></th>
- <th><center>Periode</center></th>
- <th><center>Tanggal / Waktu</center></th>
- <th><center>Status</center></th>
- <th><center>Aksi</center></th>
- </center>
- </tr>
- <?php
- $sql = "SELECT * FROM pemesanan order by updated desc ";
- $hasil = $db->query($sql);
- $no = 0;
- if($hasil->num_rows>0){
- while($menu = $hasil->fetch_assoc()){
- $no++;
- $status=NULL;
- if($menu['status']=='yes'){
- $status='Approve';
- }
- if($menu['status']=='no'){
- $status='Tolak';
- }
- ?>
- <tr>
- <td style="line-height:50px"><?php echo $no;?></td>
- <td style="line-height:50px"><?php echo $menu["nama_pemesan"]; ?></td>
- <td style="line-height:50px"><?php echo $menu["nama_ruangan"]; ?></td>
- <td style="line-height:50px"><?php echo $menu["prodi_dosen"]; ?></td>
- <td style="line-height:50px"><?php echo $menu["jam_mulai"]; ?> WIB</td>
- <td style="line-height:50px"><?php echo $menu["sks"]; ?> SKS</td>
- <td style="line-height:50px"><?php echo $menu["tanggal"]; ?></td>
- <td>
- <?=$status;?>
- </td>
- <td style="line-height:50px">
- <center>
- <?php
- if($status==NULL){?>
- <a href="approve.php?id=<?php echo $menu["id"]; ?>" class="btn btn-primary">Approve</a>
- <a href="hapus.php?id=<?php echo $menu["id"]; ?>" class="btn btn-danger">Tolak</a>
- <?php
- }
- ?>
- <a href="data.php?id=<?php echo $menu["id"]; ?>" class="btn btn-info">Detail</a>
- </center>
- </td>
- </tr>
- <?php
- }
- }
- $sql = "SELECT * FROM ruang_dipesan where status='yes'";
- $hasil = $db->query($sql);
- if($hasil->num_rows>0){
- while($menu = $hasil->fetch_assoc()){
- $no++;
- ?>
- <tr>
- <td style="line-height:50px"><?php echo $no;?></td>
- <td style="line-height:50px"><?php echo $menu["nama_pemesan"]; ?></td>
- <td style="line-height:50px"><?php echo $menu["nama_ruangan"]; ?></td>
- <td style="line-height:50px"><?php echo $menu["prodi_dosen"]; ?></td>
- <td style="line-height:50px"><?php echo $menu["jam_mulai"]; ?> WIB</td>
- <td style="line-height:50px"><?php echo $menu["sks"]; ?> SKS</td>
- <td style="line-height:50px"><?php echo $menu["tanggal"]; ?></td>
- <td style="line-height:50px">
- <center>
- <a href="batal.php?id=<?php echo $menu["id"]; ?>" class="btn btn-success">Batalkan</a>
- <a href="data.php?id=<?php echo $menu["id"]; ?>" class="btn btn-default">Detail</a>
- <a href="hapus.php?id=<?php echo $menu["id"]; ?>" class="btn btn-danger">Hapus</a>
- </center>
- </td>
- </tr>
- <?php
- }
- }
- ?>
- <!--
- <tr>
- <td style="line-height:50px">2</td>
- <td style="line-height:50px">Haji Putra</td>
- <td style="line-height:50px">PTE - Ghufran Ibnu Yosa</td>
- <td style="line-height:50px">09 : 00</td>
- <td style="line-height:50px">3 SKS</td>
- <td style="line-height:50px">
- <center>
- <a href="#" class="btn btn-primary">Approve</a>
- <a href="#" class="btn btn-default">Detail</a>
- <a href="#" class="btn btn-danger">Tolak</a>
- </center>
- </td>
- </tr>
- <tr>
- <td style="line-height:50px">3</td>
- <td style="line-height:50px">Muhajir</td>
- <td style="line-height:50px">BK - Sri RIski</td>
- <td style="line-height:50px">09 : 00</td>
- <td style="line-height:50px">2 SKS</td>
- <td style="line-height:50px">
- <center>
- <a href="#" class="btn btn-primary">Approve</a>
- <a href="#" class="btn btn-default">Detail</a>
- <a href="#" class="btn btn-danger">Tolak</a>
- </center>
- </td>
- </tr>-->
- </table>
- </div>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement