Download Source Code Simple Water Billing System Berbasis PHP & MYSQL Versi Berga

Kami akan mengajarkan Anda cara membuat Sederhana Sistem Billing Air. Sistem sederhana ini menggunakan untuk merekam konsumsi air setiap bulan Anda gunakan, juga menciptakan dan jumlah seluruh konsumsi Anda dari rekor sebelumnya Anda hingga saat ini. Anda juga dapat menghasilkan laporan untuk proses penagihan catatan Anda dari awal Anda mulai menggunakan sistem ini. Sistem sederhana ini menulis PHP, MySQL, Javascript dan Bootstrap.

Download  Source Code Simple Water Billing System Berbasis PHP & MYSQL Versi Berga


billing.php

  1. <?php session_start();
  2. if(!isset($_SESSION['id'])){
  3. echo '<script>windows: location="index.php"</script>';
  4. }
  5. ?>
  6. <?php
  7. $session=$_SESSION['id'];
  8. include 'db.php';
  9. $result = mysql_query("SELECT * FROM user where id= '$session'");
  10. while($row = mysql_fetch_array($result))
  11. {
  12. $sessionname=$row['name'];
  13. }
  14. ?>
  15. <!DOCTYPE html>
  16. <html>
  17. <head>
  18. <title>Simple Water Billing System</title>
  19. <link href="css/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
  20. <link href="css/facebox.css" media="screen" rel="stylesheet" type="text/css" />
  21. <script src="js/jquery1.js" type="text/javascript"></script>
  22. <script src="css/facebox.js" type="text/javascript"></script>
  23. <script type="text/javascript">
  24. jQuery(document).ready(function($) {
  25. $('a[rel*=facebox]').facebox({
  26. loadingImage : 'src/loading.gif',
  27. closeImage : 'src/closelabel.png'
  28. })
  29. })
  30. </script>
  31. <script src="js/application.js" type="text/javascript" charset="utf-8"></script>
  32. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  33. <title>Simple Water Billing System</title>
  34. </head>
  35. <body>
  36. <nav class="navbar navbar-default">
  37. <div class="container-fluid">
  38. <div class="navbar-header">
  39. <a class="navbar-brand" href="https://www.sourcecodester.com">Sourcecodester</a>
  40. </div>
  41. <ul class="nav navbar-nav">
  42. <li class="active"><a href="billing.php">Home</a></li>
  43. <li><a href="bill.php">Billing</a></li>
  44. <li><a href="user.php">Users</a></li>
  45. <li><a href="addclient.php">Add Client</a></li>
  46. <li><a href="viewuser.php">View Client</a></li>
  47. <li><a href="logout.php">Logout</a></li>
  48. </ul>
  49. </div>
  50. </nav>
  51. <h1 align="center">Simple Water Billing System</h1>
  52. </body>
  53. </html>


Viewpayment.php - Dan ini adalah untuk melihat pembayaran dan juga laporan yang dapat Anda mencetak keluar atau hanya disebut tanda terima.

  1. <?php session_start();
  2. if(!isset($_SESSION['id'])){
  3. echo '<script>windows: location="index.php"</script>';
  4. }
  5. ?>
  6. <?php
  7. include 'db.php';
  8. $id =$_REQUEST['id'];
  9. $result = mysql_query("SELECT * FROM bill where id='$id'");
  10. while($row = mysql_fetch_array($result))
  11. {
  12. $prev=$row['prev'];
  13. $owners_id=$row['owners_id'];
  14. $pres=$row['pres'];
  15. $price=$row['price'];
  16. $totalcons=$pres - $prev;
  17. $bill=$totalcons * $price;
  18. $date=$row['date'];
  19. }
  20. ?>
  21. <?php
  22. include 'db.php';
  23. $result = mysql_query("SELECT * FROM owners WHERE id = '$owners_id'");
  24. $test = mysql_fetch_array($result);
  25. if (!$result)
  26. {
  27. die("Error: Data not found..");
  28. }
  29. $id=$test['id'] ;
  30. $fname= $test['fname'] ;
  31. $lname=$test['lname'] ;
  32. $mi=$test['mi'] ;
  33. $address=$test['address'] ;
  34. $contact=$test['contact'] ;
  35. ?>
  36. <?php
  37. $session=$_SESSION['id'];
  38. include 'db.php';
  39. $result = mysql_query("SELECT * FROM user where id= '$session'");
  40. while($row = mysql_fetch_array($result))
  41. {
  42. $sessionname=$row['name'];
  43. }
  44. ?>

Paybill.php - Dan untuk membayar tagihan Anda dari sebelumnya untuk hadir.

  1. <?php session_start(); ?>
  2. <?php
  3. include 'db.php';
  4. $owner_id =$_REQUEST['id'];
  5. $result = mysql_query("SELECT * FROM owners WHERE id = '$owner_id'");
  6. $test = mysql_fetch_array($result);
  7. if (!$result)
  8. {
  9. die("Error: Data not found..");
  10. }
  11. $id=$test['id'] ;
  12. $fname= $test['fname'] ;
  13. $lname=$test['lname'] ;
  14. $mi=$test['mi'] ;
  15. $address=$test['address'] ;
  16. $contact=$test['contact'] ;
  17. ?>
  18. <h2 align="center">Client Bill</h2><hr>
  19. <h3>Name: <?php echo $fname.'&nbsp;' .$lname.'&nbsp;'.$mi;?></h3>
  20. <p><?php $date=date('y/m/d H:i:s');
  21. echo $date;?></p>
  22. <form method="post" action="addbill.php">
  23. <div>
  24. <table class="table" width="355px">
  25. <thead>
  26. <tr>
  27. <input type="hidden" name="owners_id" value="<?php echo $id; ?>" />
  28. <input type="hidden" name="date" value="<?php echo $date; ?>" />
  29. <td width="118">Previous Reading:</td>
  30. <td width="66"><input type="text" name="prev" /></td>
  31. <td>Cu.m</td>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. <tr>
  36. <td>Present Reading:</td>
  37. <td><input type="text" name="pres" /></td>
  38. <td>Cu.m</td>
  39. </tr>
  40. <tr>
  41. <td>Price/Cu.m</td>
  42. <td><input type="text" name="price" value="10" /></td>
  43. <td>php</td>
  44. </tr>
  45. <tr>
  46. <td><button type="submit" name="total" class="btn btn-default">ADD</button></td>
  47. </tr>
  48. </tbody>
  49. </table>
  50. </div>


Download  Source Code Simple Water Billing System Berbasis PHP & MYSQL Versi Berga




Berharap bahwa Anda pelajari dalam tutorial ini. Dan untuk lebih update dan tutorial pemrograman jangan ragu untuk bertanya dan kami akan menjawab pertanyaan Anda dan saran. Jangan lupa untuk SEPERTI & BERBAGI blog ini.
NEXT ARTICLE Next Post
PREVIOUS ARTICLE Previous Post
NEXT ARTICLE Next Post
PREVIOUS ARTICLE Previous Post
 

www.wordpressgratis.net