-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathADeleteUser.php
More file actions
194 lines (157 loc) · 4.12 KB
/
ADeleteUser.php
File metadata and controls
194 lines (157 loc) · 4.12 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
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
<?php session_start() ?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bidding System</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<style>
body {
font-family: Agency FB;
}
table {
margin: auto;
font-family: "Lucida Sans Unicode", "Lucida Grande", "Segoe Ui";
font-size: 12px;
}
h1 {
margin: 25px auto 0;
text-align: center;
text-transform: uppercase;
font-size: 17px;
}
table td {
transition: all .5s;
}
/* Table */
.data-table {
border-collapse: collapse;
font-size: 14px;
min-width: 537px;
}
.data-table th,
.data-table td {
border: 1px solid #e1edff;
padding: 7px 17px;
}
.data-table caption {
margin: 7px;
}
/* Table Header */
.data-table thead th {
background-color: #508abb;
color: #FFFFFF;
border-color: #6ea1cc !important;
text-transform: uppercase;
}
/* Table Body */
.data-table tbody td {
color: #353535;
}
.data-table tbody td:first-child,
.data-table tbody td:nth-child(4),
.data-table tbody td:last-child {
text-align: right;
}
.data-table tbody tr:nth-child(odd) td {
background-color: #f4fbff;
}
.data-table tbody tr:hover td {
background-color: lightgray;
border-color: #ffff0f;
}
/* Table Footer */
.data-table tfoot th {
background-color: #e5f5ff;
text-align: right;
}
.data-table tfoot th:first-child {
text-align: left;
}
.data-table tbody td:empty
{
background-color: #ffcccc;
}
</style>
<script type="text/javascript">
function delete(id)
{
if(confirm('Are Your Sure Delete This User?'))
{
window.location='AUserDelete.php?delete='+id
}
}
</script>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Kinbo.Com</a>
</div>
<ul class="nav navbar-nav">
<li><a href="AdminMagane.php"><b>    Home</b></a></li>
<li><a href="AddAdmin.php"><b>Add Admin</b></a></li>
<li class="active"><a href="ADeleteUser.php"><b>Delete User</b></a></li>
<li><a href="ADeletePost.php"><b>Delete Post</b></a></li>
<li><a href="ANotification.php"><b>Notification</b></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="ULogout.php"><span class="glyphicon glyphicon-user"></span> <b>Logout</b></a></li>
</ul>
</div>
</nav>
<form action="" method="POST">
<table class="data-table">
<thead>
<tr>
<th>Photo</th>
<th>Name</th>
<th>Email</th>
<th>Gender</th>
<th>Address</th>
<th>Delete</th>
</tr>
</thead>
<tbody>
<?php
$Server="localhost";
$username="root";
$psrd="";
$dbname = "Bidding";
$connection= mysqli_connect($Server,$username,$psrd,$dbname);
$query="select * from User";
$Result=mysqli_query($connection,$query);
while ($row=mysqli_fetch_array($Result))
{
echo "<tr>";
echo "<td>";
echo "<img style='width:100px;height:100px' src='".$row['Photo']."'>";
echo "</td>";
echo "<td>";
echo $row['Name'];
echo "</td>";
echo "<td>";
echo $row['Email'];
echo "</td>";
echo "<td>";
echo $row['Gender'];
echo "</td>";
echo "<td>";
echo $row['Address'];
echo "</td>";
echo "<td>";
$name=$row[1];
echo"<a href=javascript:delete('$name')> <img src='Image/Delete.jpg' width='50px' height='50px' alt='Bid'/> </a>";
echo "</td>";
echo "</tr>";
}
?>
</tbody>
</table>
</form>
</body>
</html>