-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmindex.php
More file actions
105 lines (96 loc) · 3.69 KB
/
Copy pathmindex.php
File metadata and controls
105 lines (96 loc) · 3.69 KB
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
<?php
session_start();
if(!isset($_SESSION['managerId'])){ header('location:login.php');}
?>
<!DOCTYPE html>
<html>
<head>
<title>Banking</title>
<?php require 'assets/autoloader.php'; ?>
<?php require 'assets/db.php'; ?>
<?php require 'assets/function.php'; ?>
<?php if (isset($_GET['delete']))
{
if ($con->query("delete from useraccounts where id = '$_GET[delete]'"))
{
header("location:mindex.php");
}
} ?>
</head>
<body style="background: #ADD8E6; background-size: 100%">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed-top">
<a class="navbar-brand" href="#">
<img src="images/sbi_logo.png" width="30" height="30" class="d-inline-block align-top" alt="SBI Logo">
<!-- <i class="d-inline-block fa fa-building fa-fw"></i> --><?php echo bankname; ?>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item ">
<a class="nav-link active" href="mindex.php">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item "> <a class="nav-link" href="maccounts.php">Accounts</a></li>
<li class="nav-item "> <a class="nav-link" href="maddnew.php">Add New Account</a></li>
<li class="nav-item "> <a class="nav-link" href="mfeedback.php">Feedback</a></li>
<!-- <li class="nav-item "> <a class="nav-link" href="transfer.php">Funds Transfer</a></li> -->
<!-- <li class="nav-item "> <a class="nav-link" href="profile.php">Profile</a></li> -->
</ul>
<?php include 'msideButton.php'; ?>
</div>
</nav><br><br><br>
<div class="container">
<div class="card w-100 text-center shadowBlue">
<div class="card-header">
All accounts
</div>
<div class="card-body">
<table class="table table-bordered table-sm">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Holder Name</th>
<th scope="col">Account No.</th>
<th scope="col">Branch Name</th>
<th scope="col">Current Balance</th>
<th scope="col">Account type</th>
<th scope="col">Contact</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<?php
$i=0;
$array = $con->query("select * from useraccounts,branch where useraccounts.branch = branch.branchId");
if ($array->num_rows > 0)
{
while ($row = $array->fetch_assoc())
{$i++;
?>
<tr>
<th scope="row"><?php echo $i ?></th>
<td><?php echo $row['name'] ?></td>
<td><?php echo $row['accountNo'] ?></td>
<td><?php echo $row['branchName'] ?></td>
<td>Rs.<?php echo $row['balance'] ?></td>
<td><?php echo $row['accountType'] ?></td>
<td><?php echo $row['number'] ?></td>
<td>
<a href="show.php?id=<?php echo $row['id'] ?>" class='btn btn-success btn-sm' data-toggle='tooltip' title="View More info">View</a>
<a href="mnotice.php?id=<?php echo $row['id'] ?>" class='btn btn-primary btn-sm' data-toggle='tooltip' title="Send notice to this">Send Notice</a>
<a href="mindex.php?delete=<?php echo $row['id'] ?>" class='btn btn-danger btn-sm' data-toggle='tooltip' title="Delete this account">Delete</a>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
<div class="card-footer text-muted">
<?php echo bankname; ?>
</div>
</div>
</body>
</html>