-
Notifications
You must be signed in to change notification settings - Fork 0
/
allpatients.php
92 lines (88 loc) · 4.39 KB
/
allpatients.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
<?php
session_start();
$login = false;
if(isset($_SESSION["hms_login"])){
if(!$_SESSION["hms_admin"]){
header("location: alldoctors.php");
}
global $login;
$login = true;
}else{
header("location: login.php?next=".urlencode($_SERVER["HTTP_REFERER"]));
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>About HOSPITAL MANAGEMENT SYSTEM</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head>
<body class="pt-4">
<nav class="navbar navbar-expand-lg p-3 fixed-top navbar-light bg-white shadow-sm" >
<a class="navbar-brand h5" href="#">HOSPITAL MANAGEMENT SYSTEM</b>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarTogglerDemo02">
<ul class="navbar-nav ml-auto mr-0 mt-2 mt-lg-0">
<li class="nav-item"><a class="nav-link m-1" style="color: #000;text-decoration:none" href="home.php">HOME</a></li>
<li class="nav-item"><a class="nav-link m-1" style="color: #000;text-decoration:none" href="about.php">ABOUT</a></li>
<li class="nav-item"><a class="nav-link m-1" style="color: #000;text-decoration:none" href="alldoctors.php">ALL_DOCTORS</a></li>
<?php
if($login):
?>
<li class="nav-item"><a class="nav-link m-1" style="color: #000;text-decoration:none" href="dashboard.php">DASHBOARD</a></li>
<li class="nav-item"><a class="nav-link m-1" style="color: #000;text-decoration:none" href="logout.php">LOGOUT</a></li>
<?php else: ?>
<li class="nav-item"><a class="nav-link m-1" style="color: #000;text-decoration:none" href="register.php">REGISTER</a></li>
<li class="nav-item"><a class="nav-link m-1" style="color: #000;text-decoration:none" href="login.php">LOGIN</a></li>
<?php endif ?>
</ul>
</div>
</nav>
<br>
<main class="container p-2 pt-4 mt-4">
<div class="h3 text-primary py-3">All Patients:</div>
<table class="table">
<thead class="thead-dark">
<tr>
<th scope="col">First Name</th>
<th scope="col">Last Name</th>
<th scope="col">Email</th>
<th scope="col">Phone</th>
<th scope="col">Gender</th>
</tr>
</thead>
<tbody>
<?php
require("conn.php");
$q = "SELECT * FROM users WHERE type=''";
$res = $con->query($q);
if(mysqli_num_rows($res)>=1){
while($row=mysqli_fetch_array($res)){
echo '<tr>';
echo '<th>'.$row["fname"].'</th>';
echo '<td>'.$row["lname"].'</td>';
echo '<td>'.$row["email"].'</td>';
echo '<td>'.$row["phone"].'</td>';
echo '<td>'.$row["gender"].'</td>';
echo '</tr>';
}
}
?>
</tbody>
</table>
</main>
<footer class="container">
<p class="float-right"><a href="#">Back to top</a></p>
<p>© 2017-2018 Company, Inc. · <a href="#">Privacy</a> · <a href="#">Terms</a></p>
</footer>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
</body>
</html>