forked from Webdev-ment/IA_project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.php
199 lines (168 loc) · 8.3 KB
/
home.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
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
194
195
196
197
198
199
<?php
session_start();
if($_SERVER["REQUEST_METHOD"] == "GET") {
//User tries to access page without logging in. Send them back to index.php
if(!isset($_SESSION["USER"])) header("Location: index.php");
}
//require_once ("PatientModel.php");
?>
<!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>View Record</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link rel="stylesheet" href="stylesheet.css">
</head>
<nav class=" navi navbar navbar-expand-sm sticky-top" >
<div class="">
<a class="navbar-brand" href="./index.php">
<img src="./EMR_S.png" alt="" width="200px" height="50px">
</a>
</div>
<ul class="navbar-nav" style="font-weight:bold;">
<li class="nav-item active">
<a class="nav-link" href="./index.php" >Home</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="./registration.php">Register</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="./profile.php">Profile</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="./logout.php">Log Out</a>
</li>
<li class="nav-item dropdown active">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Patients
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="./AddPatientInfo"><b>Create Patient Records</b></a>
<a class="dropdown-item" href="./viewPatientInfo"><b>View Patient Records</b></a>
<a class="dropdown-item" href="#"><b>Edit Patient Record</b></a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#" style="color: red;"><b>Delete Patient Records</b></a>
</div>
</li>
</ul>
</nav>
<body class="bg-light" >
<h1><center>Patients Records</center></h1>
<hr>
<br>
<?php
// $Object = new PatientModel();
// $Object->get_all_Patients();
?>
<div class="container-sm mx-auto" style="width: 400px;">
<div class="card text-warning bg-dark">
<div class="card-header">
<h5 class="card-title">Delete Patient Record</h5>
</div>
<div class="card-body">
<!-- <h5 class="card-title">Delete Patient Record</h5> -->
<form action="PatientController.php" method="POST">
<input type="text" name="delete_ID" placeholder="Enter ID of Patient to be deleted">
<!-- <input type="submit" name="delete" value="Delete"> -->
</form>
<button type="submit" name="delete" value="Delete" class="btn btn-danger">Delete</button>
</div>
</div>
</div>
<br><br>
<div class="container-sm mx-auto " style="width: 1000px; ">
<div class="card border border-success ">
<div class="card-header">
<h5 class="card-title">Edit Patient Record</h5>
</div>
<div class="card-body mt-0">
<!-- <h5 class="card-title">Delete Patient Record</h5> -->
<form action="PatientController.php" method="POST">
<div class="form-group row">
<div class="col-sm-4">
<label for=""><b>ID</b></label>
<input type="text" name="edit_ID" placeholder="Eg. 0 ">
</div>
<div class="col-sm-4">
<label for="fname"><b>First Name</b></label>
<input type="text" name="edit_fname" placeholder="Eg. Mary">
</div>
<div class="col-sm-4">
<label for="lname"><b>Last Name</b></label>
<input type="text" name="edit_lname" placeholder="Eg. Doe">
</div>
<div class="col-sm-4">
<label for="gender"><b>Gender</b></label>
<input type="text" name="edit_gender" placeholder="Eg. Female"></input>
</div>
<div class="col-sm-4">
<label for="dob"><b>Date of Birth</b></label> <br>
<input type="date" name="edit_dob" placeholder="Eg. 02/12/2008"><!-- Format: YYYY-MM-DD --></input>
</div>
<div class="col-sm-4">
<label for="age"><b>Age</b></label>
<input type="text" name="edit_age" placeholder="Eg. 12"></input>
</div>
<div class="col-sm-4">
<label for="address"><b>Address</b></label>
<input type="text" name="edit_address" placeholder="Eg. 12 Rose Street"></input>
</div>
<div class="col-sm-4">
<label for="email"><b>Email Address</b></label>
<input type="text" name="edit_email" id="" placeholder="Eg. sasha123@gmail.com"></input>
</div>
<div class="col-sm-4">
<label for="phone"><b>Phone</b></label>
<input type="text" name="edit_phone" placeholder="Eg. 1876-222-3333"></input>
</div>
<div class="col-sm-12">
<label for="affiction"><b>Affliction</b></label>
<input type="text" name="edit_affliction" placeholder="Eg. Fractured Bones, High Fever"></input>
</div>
</div>
<!-- <button type="submit" name="" value="" class="btn btn-success">Update</button> -->
<!-- ID: <input type="text" name="edit_ID" placeholder="Enter ID of Patient to be edited">
First Name: <input type="text" name="edit_fname">
Last Name: <input type="text" name="edit_lname">
Gender: <input type="text" name="edit_gender">
Date of Birth: <input type="date" name="edit_dob">
Age: <input type="text" name="edit_age">
Address: <input type="text" name="edit_address">
Email: <input type="text" name="edit_email">
Phone: <input type="text" name="edit_phone">
Affliction: <input type="text" name="edit_affliction"> -->
</form>
<button type="submit" name="" value="" class="btn btn-success">Update</button>
</div>
</div>
</div>
<br><br>
<!-- <h3>Delete Patient Record</h3>
<form action="PatientController.php" method="POST">
<input type="text" name="delete_ID" placeholder="Enter ID of Patient to be deleted">
<input type="submit" name="delete" value="Delete">
</form> -->
<!-- <h3>Edit Patient Record</h3>
<form action="PatientController.php" method="POST">
ID: <input type="text" name="edit_ID" placeholder="Enter ID of Patient to be edited">
First Name: <input type="text" name="edit_fname">
Last Name: <input type="text" name="edit_lname">
Gender: <input type="text" name="edit_gender">
Date of Birth: <input type="date" name="edit_dob">
Age: <input type="text" name="edit_age">
Address: <input type="text" name="edit_address">
Email: <input type="text" name="edit_email">
Phone: <input type="text" name="edit_phone">
Affliction: <input type="text" name="edit_affliction"> -->
</body>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</html>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
<link rel="stylesheet" href="style.css">
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>