-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoctor_profile.php
More file actions
105 lines (100 loc) · 4.09 KB
/
doctor_profile.php
File metadata and controls
105 lines (100 loc) · 4.09 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
<?php
if (!isset($_GET['doctor_id'])) {
header("Location: specialist.php");
exit;
}
$doctor_id = $_GET['doctor_id'];
// Mock doctor details for demonstration
$doctors = [
1 => ['name' => 'Dr. John Doe', 'info' => 'Consultant Cardiologist with 10 years of experience'],
2 => ['name' => 'Dr. Jane Smith', 'info' => 'Senior Cardiologist specializing in Interventional Cardiology'],
3 => ['name' => 'Dr. Robert Brown', 'info' => 'Expert in Pediatric Cardiology'],
4 => ['name' => 'Dr. Silva', 'info' => 'Renowned Cardiac Surgeon'],
5 => ['name' => 'Dr. Perera', 'info' => 'Specialist in Preventive Cardiology'],
];
// Fetch doctor details based on ID and checks if the doctor id exist in the array
$doctor = $doctors[$doctor_id] ?? null;
if (!$doctor) {
header("Location: specialist.php");
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MedEase - Doctor Booking</title>
<link rel="stylesheet" href="doctor_profile.css"> <!-- Retaining CSS -->
</head>
<body>
<div class="container">
<div class="profile-section">
<div class="profile-pic"></div>
<div class="doctor-info">
<h2><?php echo htmlspecialchars($doctor['name']); ?></h2>
<p><?php echo htmlspecialchars($doctor['info']); ?></p>
</div>
</div>
<div class="booking-section">
<form action="bookingform.php" method="POST">
<input type="hidden" name="doctor_id" value="<?php echo $doctor_id; ?>">
<input type="hidden" name="doctor_name" value="<?php echo htmlspecialchars($doctor['name']); ?>">
<table>
<thead>
<tr>
<th>Date</th>
<th>Time</th>
<th>Next Available Number</th>
<th>Select</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>04-July-2024</td>
<td>Thursday 8:00 pm</td>
<td>1</td>
<td>
<input type="radio" name="slot" value="04-July-2024|Thursday 8:00 pm|1" required>
</td>
<td>Available</td>
</tr>
<tr>
<td>14-July-2024</td>
<td>Thursday 8:00 pm</td>
<td>0</td>
<td>
<input type="radio" name="slot" value="14-July-2024|Thursday 8:00 pm|0" required>
</td>
<td>Available</td>
</tr>
<tr>
<td>24-July-2024</td>
<td>Thursday 8:00 pm</td>
<td>2</td>
<td>
<input type="radio" name="slot" value="24-July-2024|Thursday 8:00 pm|2" required>
</td>
<td>Available</td>
</tr>
<tr>
<td>30-July-2024</td>
<td>Thursday 8:00 pm</td>
<td>1</td>
<td>
<input type="radio" name="slot" value="30-July-2024|Thursday 8:00 pm|1" required>
</td>
<td>Available</td>
</tr>
</tbody>
</table>
<button type="submit" class="book-btn"> Book Now </button>
</form>
</div>
<div class="back-btn-section">
<button class="back-btn"><a href="specialist.php">Go Back</a></button>
</div>
</div>
</body>
</html>