-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathall_cust.php
153 lines (129 loc) · 5.92 KB
/
all_cust.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" sizes="180x180" href="statics/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="statics/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="statics/favicon-16x16.png">
<link rel="manifest" href="statics/site.webmanifest">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"
integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w=="
crossorigin="anonymous" referrerpolicy="no-referrer" />
<title>All customers - Sparks Bank</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body style="background-color:#212529;">
<?php include 'spin.php'; ?>
<style>
.nav-link:hover {
text-decoration: underline;
}
</style>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark fixed fixed-top"
style="font-family:candara; font-size:18px; box-shadow: 0px 0px 10px 0px black;">
<div class="container-fluid">
<a href="index.php"><img src="statics\logo.png" alt=""
style="height: 80px; margin-left:25px; margin-top:10px;"></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<b>
<ul class="navbar-nav ">
<li class="nav-item nav-links" style="margin-left:15px;">
<a class="nav-link text-nowrap" aria-current="page" href="index.php">Home</a>
</li>
<li class="nav-item" style="margin-left:15px; ">
<a class="nav-link text-nowrap" href="send_money.php">Send Money</a>
</li>
<li class="nav-item" style="margin-left:15px;">
<a class="nav-link text-nowrap active" href="all_cust.php">View All Customers</a>
</li>
<li class="nav-item" style="margin-left:15px;">
<a class="nav-link text-nowrap" href="transactions.php">Transactions</a>
</li>
<li class="nav-item" style="margin-left:15px;">
<a class="nav-link text-nowrap" href="contact_us.php">Contact Us</a>
</li>
<li class="nav-item" style="margin-left:15px; margin-right:75px;">
<a class="nav-link text-nowrap" href="about_us.php">About Us</a>
</li>
</ul>
</b>
</div>
</nav>
<style>
th,
td {
text-align: center;
}
</style>
<center>
<div class="container" style="margin-top: 10%; padding:10px 80px 10px 80px; ">
<div
style="width:80%; background-color:rgba(0,0,0,.5); padding:5px 5px 5px 5px; border-radius:30px; box-shadow: 2px 2px 10px gray;">
<h1 style=" color:white;">All Customers</h1>
</div>
<?php
$conn = mysqli_connect($servername, $username, $password, $database);
if(!$conn){
die("Connection not established: ".mysqli_connect_error());
}else{
$sql = "SELECT * FROM `users`";
$result = mysqli_query($conn, $sql);
?>
<table class="table table-dark" style="margin-top: 30px;">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col">Account No</th>
<th scope="col">Balance</th>
<th scope="col">Send Money From</th>
</tr>
</thead>
<style>
.mybtn {
box-shadow: 2px 2px 10px black;
border-radius: 30px;
font-weight: bold;
background-color: lightgreen;
color: green;
}
.mybtn:active {
background-color: green;
color: lightgreen;
}
</style>
<?php
echo "<tbody>";
while($row = mysqli_fetch_assoc($result)){
echo '
<tr>
<td>'.$row['name'].'</td>
<td>'.$row['email'].'</td>
<td>'.$row['accno'].'</td>
<td>'.$row['blc'].'</td>
<td style="padding:10px 10px 10px 10px">
<a href="send_money.php?reads='.$row['accno'].'"
<button type="button" class="btn mybtn btn-outline-light">Send Money</button>
</a>
</td>
</tr>';
}
}
echo "</tbody>";
?>
</div>
</center>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous">
</script>
</body>
</html>