SHOW:
|
|
- or go back to the newest paste.
| 1 | <html lang="en"> | |
| 2 | <head> | |
| 3 | <meta charset="utf-8"> | |
| 4 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| 6 | <title>....:Tabungan:....</title> | |
| 7 | ||
| 8 | <!-- Bootstrap --> | |
| 9 | <link href="asset/bootstrap/css/bootstrap.min.css" rel="stylesheet"> | |
| 10 | <link href="asset/bootstrap/css/custom.css" rel="stylesheet"> | |
| 11 | <script type="text/javascript" src="jquery_del.min.js"></script> | |
| 12 | <script type="text/javascript"> | |
| 13 | function delete_confirm(){
| |
| 14 | var result = confirm("Are you sure to delete users?");
| |
| 15 | if(result){
| |
| 16 | return true; | |
| 17 | }else{
| |
| 18 | return false; | |
| 19 | } | |
| 20 | } | |
| 21 | ||
| 22 | $(document).ready(function(){
| |
| 23 | $('#select_all').on('click',function(){
| |
| 24 | if(this.checked){
| |
| 25 | $('.checkbox').each(function(){
| |
| 26 | this.checked = true; | |
| 27 | }); | |
| 28 | }else{
| |
| 29 | $('.checkbox').each(function(){
| |
| 30 | this.checked = false; | |
| 31 | }); | |
| 32 | } | |
| 33 | }); | |
| 34 | ||
| 35 | $('.checkbox').on('click',function(){
| |
| 36 | if($('.checkbox:checked').length == $('.checkbox').length){
| |
| 37 | $('#select_all').prop('checked',true);
| |
| 38 | }else{
| |
| 39 | $('#select_all').prop('checked',false);
| |
| 40 | } | |
| 41 | }); | |
| 42 | }); | |
| 43 | </script> | |
| 44 | ||
| 45 | </head> | |
| 46 | <body> | |
| 47 | <div class="container"> | |
| 48 | ||
| 49 | <!-- Bagian Header --> | |
| 50 | <div class="row"> | |
| 51 | <div class="col-md-12 header" id="site-header"> | |
| 52 | <header> | |
| 53 | <h1 class="title-site">Tabungan Siswa</h1> | |
| 54 | </header> | |
| 55 | <nav class="menus"> | |
| 56 | <ul> | |
| 57 | <li><a href="Admin/home.php">Beranda</a></li> | |
| 58 | <li><a href="daftar_transaksi.php">Data transaksi</a></li> | |
| 59 | <li><a href="daftar_siswa.php">Data peminjam</a></li> | |
| 60 | <li><a href="daftar_tabungan.php">Data Tabungan</a></li> | |
| 61 | <li><a href="daftar_pengguna.php">Pengguna</a></li> | |
| 62 | </ul> | |
| 63 | </nav> | |
| 64 | </div> | |
| 65 | </div> | |
| 66 | <!-- End Bagian Header --> | |
| 67 | ||
| 68 | <!-- Bagian Wrapper 2 kolom --> | |
| 69 | <div class="row"> | |
| 70 | <div class="col-lg-12 articles" id="content"> | |
| 71 | <article class="posts"> | |
| 72 | <h2 class="title-post">Daftar Transaksi</h2> | |
| 73 | <div class="meta-post"> | |
| 74 | <span><em class="glyphicon glyphicon-user"></em>Admin</span> | |
| 75 | <span><em class="glyphicon glyphicon-time"></em> 13 Juni 2015</span> | |
| 76 | </div> | |
| 77 | <div class="content"> | |
| 78 | <button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal"><em class="glyphicon glyphicon-plus"></em></button>  | |
| 79 | <div id="myModal" class="modal fade" role="dialog"> | |
| 80 | <div class="modal-dialog"> | |
| 81 | ||
| 82 | <!-- Modal content--> | |
| 83 | <div class="modal-content"> | |
| 84 | <div class="modal-header"> | |
| 85 | <button type="button" class="close" data-dismiss="modal">×</button> | |
| 86 | <h4 class="modal-title">Silahkan Tambah</h4> | |
| 87 | </div> | |
| 88 | <div class="modal-body"> | |
| 89 | <p>Some text in the modal.</p> | |
| 90 | </div> | |
| 91 | <div class="modal-footer"> | |
| 92 | <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |
| 93 | </div> | |
| 94 | </div> | |
| 95 | ||
| 96 | </div> | |
| 97 | </div> | |
| 98 | <button type="button" class="btn btn-info btn-lg" name="bulk_delete_submit"><em class="glyphicon glyphicon-trash"></em></button><br><br> | |
| 99 | <div class="table-responsive"> | |
| 100 | <?php session_start(); if(!empty($_SESSION['success_msg'])){ ?>
| |
| 101 | <div class="alert alert-success"><?php echo $_SESSION['success_msg']; ?></div> | |
| 102 | <?php unset($_SESSION['success_msg']); } ?> | |
| 103 | <form name="bulk_action_form" action="action.php" method="post" onSubmit="return delete_confirm();"/> | |
| 104 | <table class="table table-bordered"> | |
| 105 | <thead> | |
| 106 | <tr class="success"> | |
| 107 | <th><input type="checkbox" name="select_all" id="select_all" value=""/></th> | |
| 108 | <td>NO</td> | |
| 109 | <td>NISN</td> | |
| 110 | <td>Nama</td> | |
| 111 | <td>tanggal lahir</td> | |
| 112 | <td>tanggal tarnsaksi</td> | |
| 113 | <td>debet</td> | |
| 114 | <td>kredit</td> | |
| 115 | <td>saldo</td> | |
| 116 | <td>keterangan</td> | |
| 117 | <th>opsi</th> | |
| 118 | </tr> | |
| 119 | </thead> | |
| 120 | <?php | |
| 121 | include('koneksi/koneksi.php');
| |
| 122 | - | $read = "select * from daftar_transaksi"; |
| 122 | + | $sql = "select * from daftar_transaksi"; |
| 123 | - | $finish = mysql_query( $read ); |
| 123 | + | $read= mysql_query( $read ); |
| 124 | if(mysqli_num_rows($read) > 0){
| |
| 125 | while($row = mysqli_fetch_assoc($read)){
| |
| 126 | ?> | |
| 127 | <tbody> | |
| 128 | <tr><td align="center"><input type="checkbox" name="checked_id[]" class="checkbox" value="<?php echo $row['nis']; ?>"/></td> | |
| 129 | <td><?php echo $row ['no']; ?></td> | |
| 130 | <td><?php echo $row ['nis']; ?></td> | |
| 131 | <td><?php echo $row ['nama_siswa']; ?></td> | |
| 132 | <td><?php echo $row ['tempat_tgl_lahir']; ?></td> | |
| 133 | <td><?php echo $row ['tanggal_transaksi']; ?></td> | |
| 134 | <td><?php echo $row ['debet']; ?></td> | |
| 135 | <td><?php echo $row ['kredit']; ?></td> | |
| 136 | <td><?php echo $row ['saldo']; ?></td> | |
| 137 | <td><?php echo $row ['keterangan']; ?></td> | |
| 138 | <td><a href ="edit_user.php?id=$row['nisn']" data-toggle="modal" data-target="#myModal"><em class="glyphicon glyphicon-pencil"></em> </a> | |
| 139 | | <a href ="edit_user.php?id=$row['nisn']"><em class="glyphicon glyphicon-print"></em> </a> | |
| 140 | <div id="myModal" class="modal fade" role="dialog"> | |
| 141 | <div class="modal-dialog"> | |
| 142 | ||
| 143 | <!-- Modal content--> | |
| 144 | <div class="modal-content"> | |
| 145 | <div class="modal-header"> | |
| 146 | <button type="button" class="close" data-dismiss="modal">×</button> | |
| 147 | <h4 class="modal-title">Silahkan Tambah</h4> | |
| 148 | </div> | |
| 149 | <div class="modal-body"> | |
| 150 | ||
| 151 | </div> | |
| 152 | <div class="modal-footer"> | |
| 153 | <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> | |
| 154 | </div> | |
| 155 | </div> | |
| 156 | ||
| 157 | </div> | |
| 158 | </div></td></tr> | |
| 159 | </tbody> | |
| 160 | ||
| 161 | <?php } }else{ ?>
| |
| 162 | <tr><td colspan="5">No records found.</td></tr> | |
| 163 | <?php } ?> | |
| 164 | </table> | |
| 165 | </div> | |
| 166 | </form> | |
| 167 | </div> | |
| 168 | </article> | |
| 169 | </div> | |
| 170 | ||
| 171 | </div> | |
| 172 | <!-- End Bagian wrapper --> | |
| 173 | ||
| 174 | <!-- Bagian footer --> | |
| 175 | <div class="row"> | |
| 176 | <div class="col-md-12 footer" id="site-footer"> | |
| 177 | <footer class="copyright text-center"><p>copyright team Rudal_squad 2016</p></footer> | |
| 178 | </div> | |
| 179 | </div> | |
| 180 | <!-- End Bagian footer --> | |
| 181 | ||
| 182 | </div> | |
| 183 | <script src="asset/bootstrap/js/jquery.min.js"></script> | |
| 184 | ||
| 185 | <script src="asset/bootstrap/js/bootstrap.min.js"></script> | |
| 186 | ||
| 187 | </body> | |
| 188 | </html> |