-
Notifications
You must be signed in to change notification settings - Fork 0
/
bill.php
196 lines (167 loc) · 5.37 KB
/
bill.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
<?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 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>
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap/dist/css/bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="css/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css" />
<link href="src/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<script src="lib/jquery.js" type="text/javascript"></script>
<script src="src/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>Billing System</title>
<style type="text/css">
#wrapper{
width:100%;
margin:0 auto;
border:3px solid rgba(0,0,0,0);
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
-webkit-box-shadow:0 0 18px rgba(0,0,0,0.4);
-moz-box-shadow:0 0 18px rgba(0,0,0,0.4);
box-shadow:0 0 18px rgba(0,0,0,0.4);
margin-top:2%;
padding:10px;
height:550px;
}
#header { width:900px; height:100px;}
table th {background:#999;}
#form {
width:400px;
float:left;
border:3px solid rgba(0,0,0,0);
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
-webkit-box-shadow:0 0 18px rgba(0,0,0,0.4);
-moz-box-shadow:0 0 18px rgba(0,0,0,0.4);
box-shadow:0 0 18px rgba(0,0,0,0.4);
margin-top:5%;
}
#ryt {
float:right;
border:3px solid rgba(0,0,0,0);
-webkit-border-radius:5px;
-moz-border-radius:5px;
border-radius:5px;
-webkit-box-shadow:0 0 18px rgba(0,0,0,0.4);
-moz-box-shadow:0 0 18px rgba(0,0,0,0.4);
box-shadow:0 0 18px rgba(0,0,0,0.4);
margin-top:5%;
}
#header ul li{
list-style:none;
float:left; margin-top:30px; margin-left:10px;}
</style>
</head>
<body>
<div class="container">
<div id="wrapper">
<h1><center><b>Water Billing System</b></center></h1>
<div style="color:#F00; font-size:12px; margin-left:900px;">
<span><?php echo $sessionname;?></span><a href="logout.php"><span class="btn btn-danger glyphicon glyphicon-log-out"> Logout</span></a>
</div>
<ul class="nav nav-pills">
<li><a href="billing.php"><span class="glyphicon glyphicon-home"></span> Home</a></li>
<li class="btn btn-default btn-xs"><a href="bill.php"><span class="glyphicon glyphicon-usd"></span> Billing</a></li>
<li><a href="user.php"><span class="glyphicon glyphicon-user"></span> Users</a></li>
<li><a href="clients.php"><span class="glyphicon glyphicon-list"></span> Clients</a></li>
</ul>
<hr color="#999999" />
<div style="overflow:scroll; height:350px;">
<div class="tab-content">
<div id="home" class="tab-pane fade in active">
<!-------- home panel ----------------------------->
<div class="panel panel-info">
<div class="panel-heading">
<div class="panel-title"><h5>Billing Sequence</h5></div>
</div>
<div class="panel-body">
<?php
include 'db.php';
$result = mysql_query("SELECT * FROM owners");
echo "<table class=\"table\" bgcolor=\"#003399\">
<tr>
<th>Id</th>
<th>Firstname</th>
<th>Lastname</th>
<th>Mi</th>
<th>Address</th>
<th>Contact</th>
<th>Action</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['fname'] . "</td>";
echo "<td>" . $row['lname'] . "</td>";
echo "<td>" . $row['mi'] . "</td>";
echo "<td>" . $row['address'] . "</td>";
echo "<td>" . $row['contact'] . "</td>";
echo "<td><a rel='facebox' href='paybill.php?id=".$row['id']."'><span class=\"btn btn-info btn-xs glyphicon glyphicon-usd\">Run</span> </a>| ";
echo "<a rel='facebox' href='viewbill.php?id=".$row['id']."'><span class=\"btn btn-danger btn-xs glyphicon glyphicon-eye-open\">View</span></td>";
echo "</tr>";
}
echo "</table>";
?>
</div>
</div>
</div>
</div>
</div>
<!----- ######################################### -->
</div>
</body>
</html>
<script src="js/jquery.js"></script>
<script type="text/javascript">
$(function() {
$(".delbutton").click(function(){
//Save the link in a variable called element
var element = $(this);
//Find the id of the link that was clicked
var del_id = element.attr("id");
//Built a url to send
var info = 'id=' + del_id;
if(confirm("Sure you want to delete this update? There is NO undo!"))
{
$.ajax({
type: "GET",
url: "delete.php",
data: info,
success: function(){
}
});
$(this).parents(".record").animate({ backgroundColor: "#fbc7c7" }, "fast")
.animate({ opacity: "hide" }, "slow");
}
return false;
});
});
</script>