-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathview-profile.php
111 lines (98 loc) · 2.92 KB
/
view-profile.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
<head>
<title>Admin Dashboard | Healing Infirmary</title>
<link rel="icon" href="assets/img/mlogo.png">
</head>
<?php
session_start();
include_once('include/conn.php');
include_once('sql.php');
$_SESSION['email'];
$eamil=$_SESSION['email'];
$result = mysqli_query($conn,"SELECT * FROM admin_registration Where email='$eamil'");
if (mysqli_num_rows($result) > 0) {
$i=0;
$row = mysqli_fetch_array($result);
}
else{
echo "No result found";
}
if(strlen($_SESSION['email'])==0)
{
header('location:login.php');
}
else{
include_once('include/header.php');
include_once('include/admin-sidebar.php');
$sql = 'SELECT * FROM `users` ';
$message="";
if(isset($dbh)){
//connection check
$stmt = $dbh->prepare($sql);
$stmt->execute();
$row = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>
<main class="app-content">
<div class="app-title">
<div>
<h1><i class="fa fa-th-list"></i>User List </h1>
</div>
<ul class="app-breadcrumb breadcrumb side">
<li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i></li>
<li class="breadcrumb-item">Admin Dashboard</li>
<li class="breadcrumb-item active"><a href="#">view profile</a></li>
</ul>
</div>
<div class="row">
<div class="col-md-12">
<div class="tile">
<div class="tile-body">
<div class="table-responsive">
<table class="table table-hover table-bordered" id="sampleTable">
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Email</th>
<th>Mobile</th>
<th>Image</th>
<th align="center">Action</th>
</tr>
</thead>
<tbody>
<?php
$count = 1;
foreach ($row as $value) {
?>
<tr>
<td><?php echo $count; ?></td>
<td><?php echo $value['name']; ?></td>
<td><?php echo $value['email']; ?></td>
<td><?php echo $value['mobile']; ?></td>
<?php echo "<td><img width='100px' height='100px' src='".$value["image"]."'</td>"; ?>
<td align="center">
<a href="edit-profile.php?id=<?php echo $value['id']; ?>" class="btn btn-success">
<i class="fa fa-pencil-square" aria-hidden="true"></i>
</a>
<a href="delete-user.php?id=<?php echo $value['id']; ?>" class="btn btn-danger">
<i class="fa fa-trash" aria-hidden="true"></i>
</a>
</td>
</tr>
<?php
$count++;
}
?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</main>
<?php
include_once('include/footer.php');
include_once('include/Hfooter.php');
}
}
?>