Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('config.php');
- include('cek-login.php');
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Tutorial Hak Akses - Nurwahyudin.Com</title>
- <link rel="stylesheet" href="css/reset.css" type="text/css" />
- <link rel="stylesheet" href="css/normalize.css" type="text/css" />
- <link rel="stylesheet" href="css/permata-ui-kit.css" type="text/css" />
- <link rel="stylesheet" href="css/bootstrap.css" type="text/css" />
- <link rel="stylesheet" href="css/style.css" type="text/css" />
- </head>
- <body>
- <div style="margin:auto; padding:50px 0 30px; text-align:center">
- <h1>Sistem Informasi Perpustakaan</h1>
- <p>Dimas Rangga Respati</p>
- </div>
- <div style="margin:auto">
- <div class="rounded_3 shadow_3 content">
- <?php
- $username = $_SESSION['username'];
- $query_user_login = mysql_query("select * from anggota where username='$username'");
- $user_login = mysql_fetch_array($query_user_login);
- ?>
- <h3>Selamat Datang <?php echo $user_login['nm_anggota']; ?></h3>
- <br />
- <?php
- $message = $_GET['msg'];
- if ($message == 'success') {
- ?>
- <div class="info">Success</div>
- <?php } else if ($message == 'failed') {?>
- <div class="error">Error</div>
- <?php }
- if ($_SESSION['role'] == 'admin') {
- ?>
- <a href="tambahb.html" class="left">Tambah buku</a>
- <?php } ?>
- <a href="logout.php" class="right">Logout</a>
- <br />
- <table class="view">
- <thead>
- <tr>
- <th width="20">No.</th>
- <th>Tanggal Pinjam</th>
- <th>Jumlah Pinjam</th>
- <th>Nama Peminjam</th>
- <th>Buku</th>
- <th>Aksi</th>
- </tr>
- </thead>
- <tbody>
- <?php
- $query = "select * from meminjam,buku,anggota
- where meminjam.id_anggota = anggota.id_anggota and
- meminjam.kd_buku = buku.kd_buku and meminjam.kembali = 1
- order by id_pinjam";
- $sql = mysql_query ($query);
- $no = 1;
- while ($data=mysql_fetch_array($sql)) {
- ?>
- <tr>
- <td><?php echo $no?></td>
- <td><?php echo $data['tgl_pinjam'];?></td>
- <td><?php echo $data['jumlah_pinjam'];?></td>
- <td><?php echo $user_login['nm_anggota'];?></td>
- <td class="center"><?php echo $data['judul_buku'];?></td>
- </tr>
- <?php
- $no++;
- }
- ?>
- </tbody>
- </table>
- </div>
- </div>
- <div class="clear"></div>
- <div style="padding-bottom:50px;"></div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement