forked from akhs722/microfinance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreciept.php
111 lines (104 loc) · 1.88 KB
/
reciept.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
<?php
session_start();
include 'functions.php';
include 'session.php';
?>
<!DOCTYPE html>
<head>
<title>Reciept</title>
<style>
#logo {
display: block;
margin-left: auto;
margin-right: auto;
}
}
table {
border-collapse:collapse;
width:100%;
overflow-x:auto;
}
th{
height:25px;
background-color: #4CAF50;
color: white;
}
td
{
text-align:center;
height:25px;
}
#print
{
margin-left:737px;
margin-top:30px;
}
.login-help {
width: 100%;
text-align: center;
font-size: 12px;
margin-top :20px;
}
</style>
<script>
function myFunction()
{
window.print();
}
</script>
</head>
<body>
<?php
$account = $_SESSION['accno'];
include 'bond.php';
if(!$con)
alert("Error !! Check whether server is on","-1");
else
{
$q = "select * from mno order by tid desc";
$result = mysqli_query($con,$q);
$n = mysqli_num_rows($result);
if($n==0)
{
mysqli_close($con);
alert("Nothing to Show....","8");
}
}
?>
<img id = "logo" src = "image/logo.png"/>
<div style="overflow-x:auto;">
<table align = "center" width = "100%" border cellspacing = 2px >
<tr>
<th>TID</th>
<th>Acc No</th>
<th>DATE</th>
<th>TIME</th>
<th>DEBIT</th>
<th>CREDIT</th>
<th>BALANCE</th>
</tr>
<?php $row = mysqli_fetch_array($result);?>
<tr>
<td><?php echo $row['tid'];?></td>
<td><?php echo $row['accno'];?></td>
<td><?php echo $row['date'];?></td>
<td><?php echo $row['time'];?></td>
<td><?php echo $row['debit'].'.De';?></td>
<td><?php echo $row['credit'].'.Cr';?></td>
<td><?php echo 'INR'.$row['endamont'];?></td>
</tr>
</table>
<button id = "print" onclick="myFunction()">Print</button>
<div class="login-help">
<?php
if(isset($_SESSION['admin']))
$y = 1;
else
$y = 0;
?>
<a href=<?php if($y==1)
echo "adminportal.php";else echo "portal.php";?> >Back to Portal</a>
</div>
</div>
</body>
</html>