Download Source Code Simple Water Billing System Berbasis PHP & MYSQL
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.
billing.php
<?php session_start();
if(!isset($_SESSION['id'])){
echo '<script>windows: location="index.php"</script>';
}
?>
<?php
$session=$_SESSION['id'];
include 'db.php';
$result = mysql_query("SELECT * FROM user where id= '$session'");
while($row = mysql_fetch_array($result))
{
$sessionname=$row['name'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Simple Water Billing System</title>
<link href="css/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
<link href="css/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="js/jquery1.js" type="text/javascript"></script>
<script src="css/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage : 'src/closelabel.png'
})
})
</script>
<script src="js/application.js" type="text/javascript" charset="utf-8"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Simple Water Billing System</title>
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="https://www.sourcecodester.com">Sourcecodester</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="billing.php">Home</a></li>
<li><a href="bill.php">Billing</a></li>
<li><a href="user.php">Users</a></li>
<li><a href="addclient.php">Add Client</a></li>
<li><a href="viewuser.php">View Client</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</div>
</nav>
<h1 align="center">Simple Water Billing System</h1>
</body>
</html>
Viewpayment.php - Dan ini adalah untuk melihat pembayaran dan juga laporan yang dapat Anda mencetak keluar atau hanya disebut tanda terima.
<?php session_start();
if(!isset($_SESSION['id'])){
echo '<script>windows: location="index.php"</script>';
}
?>
<?php
include 'db.php';
$id =$_REQUEST['id'];
$result = mysql_query("SELECT * FROM bill where id='$id'");
while($row = mysql_fetch_array($result))
{
$prev=$row['prev'];
$owners_id=$row['owners_id'];
$pres=$row['pres'];
$price=$row['price'];
$totalcons=$pres - $prev;
$bill=$totalcons * $price;
$date=$row['date'];
}
?>
<?php
include 'db.php';
$result = mysql_query("SELECT * FROM owners WHERE id = '$owners_id'");
$test = mysql_fetch_array($result);
if (!$result)
{
die("Error: Data not found..");
}
$id=$test['id'] ;
$fname= $test['fname'] ;
$lname=$test['lname'] ;
$mi=$test['mi'] ;
$address=$test['address'] ;
$contact=$test['contact'] ;
?>
<?php
$session=$_SESSION['id'];
include 'db.php';
$result = mysql_query("SELECT * FROM user where id= '$session'");
while($row = mysql_fetch_array($result))
{
$sessionname=$row['name'];
}
?>
Paybill.php - Dan untuk membayar tagihan Anda dari sebelumnya untuk hadir.
<?php session_start(); ?>
<?php
include 'db.php';
$owner_id =$_REQUEST['id'];
$result = mysql_query("SELECT * FROM owners WHERE id = '$owner_id'");
$test = mysql_fetch_array($result);
if (!$result)
{
die("Error: Data not found..");
}
$id=$test['id'] ;
$fname= $test['fname'] ;
$lname=$test['lname'] ;
$mi=$test['mi'] ;
$address=$test['address'] ;
$contact=$test['contact'] ;
?>
<h2 align="center">Client Bill</h2><hr>
<h3>Name: <?php echo $fname.' ' .$lname.' '.$mi;?></h3>
<p><?php $date=date('y/m/d H:i:s');
echo $date;?></p>
<form method="post" action="addbill.php">
<div>
<table class="table" width="355px">
<thead>
<tr>
<input type="hidden" name="owners_id" value="<?php echo $id; ?>" />
<input type="hidden" name="date" value="<?php echo $date; ?>" />
<td width="118">Previous Reading:</td>
<td width="66"><input type="text" name="prev" /></td>
<td>Cu.m</td>
</tr>
</thead>
<tbody>
<tr>
<td>Present Reading:</td>
<td><input type="text" name="pres" /></td>
<td>Cu.m</td>
</tr>
<tr>
<td>Price/Cu.m</td>
<td><input type="text" name="price" value="10" /></td>
<td>php</td>
</tr>
<tr>
<td><button type="submit" name="total" class="btn btn-default">ADD</button></td>
</tr>
</tbody>
</table>
</div>
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.
billing.php
<?php session_start();
if(!isset($_SESSION['id'])){
echo '<script>windows: location="index.php"</script>';
}
?>
<?php
$session=$_SESSION['id'];
include 'db.php';
$result = mysql_query("SELECT * FROM user where id= '$session'");
while($row = mysql_fetch_array($result))
{
$sessionname=$row['name'];
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Simple Water Billing System</title>
<link href="css/bootstrap.min.css" media="screen" rel="stylesheet" type="text/css" />
<link href="css/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="js/jquery1.js" type="text/javascript"></script>
<script src="css/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : 'src/loading.gif',
closeImage : 'src/closelabel.png'
})
})
</script>
<script src="js/application.js" type="text/javascript" charset="utf-8"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Simple Water Billing System</title>
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="https://www.sourcecodester.com">Sourcecodester</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="billing.php">Home</a></li>
<li><a href="bill.php">Billing</a></li>
<li><a href="user.php">Users</a></li>
<li><a href="addclient.php">Add Client</a></li>
<li><a href="viewuser.php">View Client</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</div>
</nav>
<h1 align="center">Simple Water Billing System</h1>
</body>
</html>
Viewpayment.php - Dan ini adalah untuk melihat pembayaran dan juga laporan yang dapat Anda mencetak keluar atau hanya disebut tanda terima.
<?php session_start();
if(!isset($_SESSION['id'])){
echo '<script>windows: location="index.php"</script>';
}
?>
<?php
include 'db.php';
$id =$_REQUEST['id'];
$result = mysql_query("SELECT * FROM bill where id='$id'");
while($row = mysql_fetch_array($result))
{
$prev=$row['prev'];
$owners_id=$row['owners_id'];
$pres=$row['pres'];
$price=$row['price'];
$totalcons=$pres - $prev;
$bill=$totalcons * $price;
$date=$row['date'];
}
?>
<?php
include 'db.php';
$result = mysql_query("SELECT * FROM owners WHERE id = '$owners_id'");
$test = mysql_fetch_array($result);
if (!$result)
{
die("Error: Data not found..");
}
$id=$test['id'] ;
$fname= $test['fname'] ;
$lname=$test['lname'] ;
$mi=$test['mi'] ;
$address=$test['address'] ;
$contact=$test['contact'] ;
?>
<?php
$session=$_SESSION['id'];
include 'db.php';
$result = mysql_query("SELECT * FROM user where id= '$session'");
while($row = mysql_fetch_array($result))
{
$sessionname=$row['name'];
}
?>
Paybill.php - Dan untuk membayar tagihan Anda dari sebelumnya untuk hadir.
<?php session_start(); ?>
<?php
include 'db.php';
$owner_id =$_REQUEST['id'];
$result = mysql_query("SELECT * FROM owners WHERE id = '$owner_id'");
$test = mysql_fetch_array($result);
if (!$result)
{
die("Error: Data not found..");
}
$id=$test['id'] ;
$fname= $test['fname'] ;
$lname=$test['lname'] ;
$mi=$test['mi'] ;
$address=$test['address'] ;
$contact=$test['contact'] ;
?>
<h2 align="center">Client Bill</h2><hr>
<h3>Name: <?php echo $fname.' ' .$lname.' '.$mi;?></h3>
<p><?php $date=date('y/m/d H:i:s');
echo $date;?></p>
<form method="post" action="addbill.php">
<div>
<table class="table" width="355px">
<thead>
<tr>
<input type="hidden" name="owners_id" value="<?php echo $id; ?>" />
<input type="hidden" name="date" value="<?php echo $date; ?>" />
<td width="118">Previous Reading:</td>
<td width="66"><input type="text" name="prev" /></td>
<td>Cu.m</td>
</tr>
</thead>
<tbody>
<tr>
<td>Present Reading:</td>
<td><input type="text" name="pres" /></td>
<td>Cu.m</td>
</tr>
<tr>
<td>Price/Cu.m</td>
<td><input type="text" name="price" value="10" /></td>
<td>php</td>
</tr>
<tr>
<td><button type="submit" name="total" class="btn btn-default">ADD</button></td>
</tr>
</tbody>
</table>
</div>
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.
Comments
Post a Comment
-Berkomentarlah yang baik dan rapi.
-Menggunakan link aktif akan dihapus.