Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include("../inc/koneksi.php");
- session_start();
- if(isset($_SESSION['username'])){
- ?>
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <title>CA - Kalimantan Tengah</title>
- <link href="assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
- <link href="assets/plugin/datepicker/css/datepicker.css" rel="stylesheet">
- <link href="assets/css/style.css" rel="stylesheet">
- </head>
- <body>
- <!--HEADER-->
- <div class="container">
- <a class="logo">Website<br/>
- <span>CA - Kalimantan Tengah</span></a>
- </div>
- <div class="container">
- <nav class="navbar navbar-default">
- <div class="container-fluid">
- <div class="navbar-header">
- <ul class="nav navbar-nav navbar-right">
- <li><a href="cabang.php">Beranda</a></li>
- <li><a href="profil_cabang.php">Cabang</a></li>
- <li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Input Data <span class="caret"></span></a>
- <ul class="dropdown-menu">
- <li><a href="input_rektel.php">Input Rekening Telpon</a></li>
- <li role="separator" class="divider"></li>
- <li><a href="input_rekpln.php">Input Rekening PLN</a></li>
- <li role="separator" class="divider"></li>
- <li><a href="input_rekpdam.php">Input Rekening PDAM</a></li>
- </ul>
- </li>
- <li class="dropdown">
- <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Lihat Data <span class="caret"></span></a>
- <ul class="dropdown-menu">
- <li class="active"><a href="data_rektel.php">Data Rekening Telpon</a></li>
- <li role="separator" class="divider"></li>
- <li><a href="data_rekpln.php">Data Rekening PLN</a></li>
- <li role="separator" class="divider"></li>
- <li><a href="data_rekpdam.php">Data Rekening PDAM</a></li>
- </ul>
- </li>
- </ul>
- </div><!--/.nav-collapse -->
- </div>
- </nav>
- </div>
- <!--HEADER-->
- <div class="container">
- <div class="row">
- <div class="col-md-12 content">
- <!--ISI-->
- <div class="panel panel-default">
- <div class="panel-heading">Tabel Rekening Telpon</div>
- <div class="panel-heading">
- <a href="input_rektel.php" class="btn btn-primary" title="Input Data">Input Data</a>
- <a href="data_rektel.php" class="btn btn-default">Refresh</a>
- </div>
- <div class="panel-body">
- <form role="form" action="" method="post" enctype="multipart/form-data" name="form">
- <input name="tanggal_awal" type="date"> - <input name="tanggal_akhir" type="date">
- <input name="cari" type="submit" class="btn btn-primary" value="Cari">
- <table data-toggle="table" data-url="tables/data1.json"
- data-show-refresh="true" data-show-columns="true"
- data-select-item-name="toolbar1" data-sort-name="name" data-sort-order="desc" border="1">
- <thead>
- <tr>
- <th width="200" scope="col"><div align="center">Tanggal</div></th>
- <th width="100" scope="col"><div align="center">T-Vis</div></th>
- <th width="100" scope="col"><div align="center">T-Kom</div></th>
- <th width="100" scope="col"><div align="center">Hallo</div></th>
- <th width="100" scope="col"><div align="center">Pulsa @10</div></th>
- <th width="100" scope="col"><div align="center">Pulsa @20</div></th>
- <th width="100" scope="col"><div align="center">Pulsa @25</div></th>
- <th width="100" scope="col"><div align="center">Pulsa @50</div></th>
- <th width="100" scope="col"><div align="center">Pulsa @100</div></th>
- <th width="100" scope="col"><div align="center">Jumlah Lembar</div></th>
- <th width="100" scope="col"><div align="center">Total</div></th>
- <?php
- if ($_SESSION['id_cabang']=='002PKY')
- {
- ?>
- <th width="100" scope="col"><div align="center">Fee Hallo & Tsel</div></th>
- <?php
- }
- else
- {
- }
- ?>
- <th width="100" scope="col"><div align="center">Fee ICC Telpon</div></th>
- <th width="100" scope="col"><div align="center">Finnet</div></th>
- <th width="100" scope="col"><div align="center">ICC Setor</div></th>
- <th width="200" scope="col"><div align="center">Tanggal Transfer</div></th>
- <th width="50" scope="col"><div align="center">Perintah</div></th>
- </tr>
- </thead>
- <?php
- if(isset($_POST['cari'])){
- $where=" AND tanggal BETWEEN '{$_POST['tanggal_awal']}' AND '{$_POST['tanggal_akhir']}' ";
- }
- $a="SELECT * FROM rekening_telpon WHERE id_cabang='$_SESSION[id_cabang]'".$where;
- $b=mysqli_query($koneksi,$a);
- while($data=mysqli_fetch_array($b)){
- ?>
- <tr>
- <td><div align="center"><?PHP echo $data['tanggal']?></div></td>
- <td><div align="center"><?PHP echo $data['t_vis']?></div></td>
- <td><div align="center"><?PHP echo $data['t_kom']?></div></td>
- <td><div align="center"><?PHP echo $data['hallo']?></div></td>
- <td><div align="center"><?PHP echo $data['pulsa_10']?></div></td>
- <td><div align="center"><?PHP echo $data['pulsa_20']?></div></td>
- <td><div align="center"><?PHP echo $data['pulsa_25']?></div></td>
- <td><div align="center"><?PHP echo $data['pulsa_50']?></div></td>
- <td><div align="center"><?PHP echo $data['pulsa_100']?></div></td>
- <td><div align="center"><?PHP echo $data['jumlah_lembar']?></div></td>
- <td><div align="center"><?PHP echo $data['total']?></div></td>
- <?php
- if ($_SESSION['id_cabang']=='002PKY')
- {
- ?>
- <td><div align="center">
- <?PHP echo $data['fee_hallo_tsel']?>
- </div></td>
- <?php
- }
- else
- {
- echo "";
- }
- ?>
- <td><div align="center"><?PHP echo $data['fee_icc_telpon']?></div></td>
- <td><div align="center"><?PHP echo $data['finnet']?></div></td>
- <td><div align="center"><?PHP echo $data['icc_setor']?></div></td>
- <td><div align="center"><?PHP echo $data['tanggal_tf']?></div></td>
- <td><div align="center"><a href="edit_rektel.php?id_rektel=<?php echo $data['id_rektel']?>">Edit</a></div></td>
- </tr>
- <?PHP
- }
- ?>
- <tr>
- <td><div align="center"><strong>TOTAL</strong></div></td>
- <?php
- $pilihtotal="
- SELECT
- SUM(t_vis) as total_t_vis,
- SUM(t_kom) as total_t_kom,
- SUM(hallo) as total_hallo,
- SUM(pulsa_10) as total_pulsa_10,
- SUM(pulsa_20) as total_pulsa_20,
- SUM(pulsa_25) as total_pulsa_25,
- SUM(pulsa_50) as total_pulsa_50,
- SUM(pulsa_100) as total_pulsa_100,
- SUM(jumlah_lembar) as total_jumlah_lembar,
- SUM(total) as total_uang,
- SUM(fee_hallo_tsel) as total_hallo_tsel,
- SUM(fee_icc_telpon) as total_fee_telpon,
- SUM(finnet) as total_finnet,
- SUM(icc_setor) as total_icc_setor
- FROM rekening_telpon
- WHERE id_cabang='$_SESSION[id_cabang]'".$where;
- $query=mysqli_query($koneksi,$pilihtotal);
- $total=mysqli_fetch_array($query);
- ?>
- <td><div align="center"><strong><?php echo $total['total_t_vis'] ?></strong></div></td>
- <td><div align="center"><strong><?php echo $total['total_t_kom'] ?></strong></div></td>
- <td><div align="center"><strong><?php echo $total['total_hallo'] ?></strong></div></td>
- <td><div align="center"><strong><?php echo $total['total_pulsa_10'] ?></strong></div></td>
- <td><div align="center"><strong><?php echo $total['total_pulsa_20'] ?></strong></div></td>
- <td><div align="center"><strong><?php echo $total['total_pulsa_25'] ?></strong></div></td>
- <td><div align="center"><strong><?php echo $total['total_pulsa_50'] ?></strong></div></td>
- <td><div align="center"><strong><?php echo $total['total_pulsa_100'] ?></strong></div></td>
- <td><div align="center"><strong><?php echo $total['total_jumlah_lembar'] ?></strong></div></td>
- <td><div align="center"><strong><?php echo $total['total_uang'] ?></strong></div></td>
- <?php
- if ($_SESSION['id_cabang']=='002PKY')
- {
- ?>
- <td><div align="center"><strong>
- <?PHP echo $total['total_hallo_tsel']?>
- </strong></div></td>
- <?php
- }
- else
- {
- echo "";
- }
- ?>
- <td><div align="center"><strong><?php echo $total['total_fee_telpon'] ?></strong></div></td>
- <td><div align="center"><strong><?php echo $total['total_finnet'] ?></strong></div></td>
- <td><div align="center"><strong><?php echo $total['total_icc_setor'] ?></strong></div></td>
- <td><div align="center"><strong>-</strong></div></td>
- <td><div align="center"><strong>-</strong></div></td>
- </tr>
- </table>
- </form>
- </div>
- </div>
- <!--ISI-->
- </div>
- </div>
- <!--FOOTER-->
- <div class="footer">Copyright© 2017 CA - Kalimantan Tengah, Palangka Raya<br/></div>
- <!--FOOTER-->
- </div>
- <script src="assets/js/jquery.min.js"></script>
- <script src="assets/bootstrap/js/bootstrap.min.js"></script>
- <script src="assets/plugin/datepicker/js/bootstrap-datepicker.js"></script>
- <script src="assets/plugin/jquery.maskedinput/jquery.maskedinput.min.js"></script>
- <script src="assets/js/main.js"></script>
- </body>
- </html>
- <?php
- }
- else
- {
- echo "<script>alert('Anda tidak bisa mengakses halaman ini, karena belum login');document.location='index.php'</script>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement