-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsubmitp.php
148 lines (119 loc) · 2.88 KB
/
submitp.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
<?php
ini_set('session.cache_limiter','public');
session_cache_limiter(false);
session_start();
// If the session vars aren't set, try to set them with a cookie
if (!isset($_SESSION['username'])) {
if (isset($_COOKIE['username'])) {
$_SESSION['username'] = $_COOKIE['username'];
}
}
if((!isset($_SESSION['username'])) && (!isset($_COOKIE['username'])))
{
$home_url = 'http://' . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . '#/primary';
}
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="w3.css">
</head>
<style>
body {
background-color: #CCCCCC;
}
.sessioncolor{
color: #009688;
font-weight: bolder;
padding: 2%;
margin:2%;
}
.text{
margin:2%;
padding:2%;
}
a.pull-right {
padding: 2%;
}
</style>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">WebSiteName</a>
</div>
<div>
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#">Page 1</a></li>
<li><a href="#">Page 2</a></li>
<li><?php echo ' <a href="logout.php">Log Out</a><span class="sessioncolor">(' . $_SESSION['username'] . ')</span><br/>';
?></li>
</ul>
</div>
</div>
</nav>
<?php
$id = $_GET['id'];
$dbc = mysqli_connect('localhost','root','','healthcare')
or
die('error connecting to MySql server');
$query = "SELECT * FROM patient_file WHERE p_id='$id'";
$result = mysqli_query($dbc,$query)
or
die('Error querying to mysql server');
while ($row = mysqli_fetch_array($result)) {
echo '<br>';
/*if($row['status']=='Active')
{
if($row['comment']!="")
{
}
}
*/
?>
<div class="col-md-offset-3 col-md-6 text-center ">
<header class="w3-container w3-teal">
<h3>Patient Details</h3>
</header>
<div class="w3-container">
<table class="w3-table w3-bordered w3-striped">
<thead>
<tr>
<th>Patient Id</th>
<th>Patient Name</th>
<th>Patient Disease</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $id;?></td>
<td><?php echo $row['p_name'] ?></td>
<td><?php echo $row['disease'] ?></td>
</tr>
</tbody>
</table>
<div class="w3-row-padding w3-margin-top">
<div class="text w3-full">
<div class="w3-card-2">
<div style="padding:1%"class="text-center w3-full">
<h3>Doctor's Advice</h3>
<hr>
</div>
<div class="w3-container">
<p><?php echo $row['comment'].'<br>';?> </p>
<p>--<?php echo $row['d_name']."(". $row['ddept'].")";?></p>
</div>
</div>
</div>
</div>
<footer class="w3-container w3-teal w3-margin-top">
<p><?php echo '<a type="button" class="pull-right" href="' . 'mfiles/' . $row['sreport'] . '" target="_blank" /><h4>View File</h4></a></p>'.'<br>';?></hr ></p>
</footer><?php
?></div><?php
}
mysqli_close($dbc);
?>
</div>
</body>
</html>