-
Notifications
You must be signed in to change notification settings - Fork 3
/
all-user.php
149 lines (103 loc) · 3.87 KB
/
all-user.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
<?php
session_start();
if(isset($_SESSION['username'])){
?>
<!DOCTYPE html>
<html lang="en">
<?php
include("header.php");
?>
<body>
<div class="container-scroller">
<!-- partial:partials/_navbar.html -->
<?php
require("navigation.php");
?>
<!-- partial -->
<div class="container-fluid page-body-wrapper">
<!-- partial:partials/_sidebar.html -->
<?php
include("sidebar.php");
?>
<!-- partial -->
<div class="main-panel">
<div class="content-wrapper">
<!-- Page Title Header Starts-->
<!-- Page Title Header Ends-->
<?php
//include("dashboard-grid.php");
//include("main-content.php");
?>
<div class="row">
<div class="col-lg-12 grid-margin stretch-card">
<div class="card">
<div class="card-body">
<h4 class="card-title">
<?php
if(isset($_GET['msg'])){
echo $_GET['msg'];
}
?>
</h4>
<p class="card-description"> Add class <code>.table-striped</code> </p>
<table class="table table-striped">
<thead>
<tr>
<th> SLN </th>
<th> username </th>
<th> email </th>
<th> cell </th>
<th> address </th>
<th> Action </th>
</tr>
</thead>
<tbody>
<?php
include("config.php");
if($link==true){
$query = "SELECT * FROM user_registration";
$sql=mysqli_query($link,$query);
//var_dump($sql);
if(mysqli_num_rows($sql)>0){
$serial=0;
while( $userlist=mysqli_fetch_assoc($sql)){
?>
<tr>
<td class="py-1">
<?php echo $serial+=1;?>
</td>
<td> <?php echo $userlist['username'];?> </td>
<td>
<?php echo $userlist['email'];?>
</td>
<td> <?php echo $userlist['cell'];?> </td>
<td> <?php echo $userlist['address'];?> </td>
<td> <a href="user-edit.php?id=<?php echo $userlist['id'];?>">Edit</a> || <a href="user-delete.php?id=<?php echo $userlist['id'];?>" onclick=" return confirm('ai beta detelte ki korte chaw');" target="_self" rel="noopener noreferrer"> Delete </a> </td>
</tr>
<?php
}
}
else{
echo "Data pai nai";
}
}
else{
echo "Sorry";
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- content-wrapper ends -->
<!-- partial:partials/_footer.html -->
<?php
include("footer.php");
}
else{
header("location: login.php?msg=ai betach chor");
}
?>