-
Notifications
You must be signed in to change notification settings - Fork 0
/
update.php
180 lines (130 loc) · 5.54 KB
/
update.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
<?php
session_start();
//include funtion.php file
require('function.php');
$con = con();
//here check, where "session with user_id" is set or not
if(isset($_SESSION['user_id'])){
$id=$_SESSION['user_id'];
}
else
{
//if session is not set then control goes to homepage
header("location:http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/index.php");
exit();
}
//$user = $_POST["user_id"];
$userid = $_SESSION['user_id'];
//QUERY TO FIND THE DETAILS ABOUT THE LOGGED-IN USER
$query = "SELECT * FROM doctors";
$result = $con->query($query);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" href="favicon.ico">
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body {
font-family: Calibri;
}
h3
{
font-weight: 300;
font-size: 4em;
color: #fff;
background-color: #EAECEE;
padding: 10px 0 20px 10px;
margin-bottom: 50px;
}
h2 {
font-weight: 300;
font-size: 4em;
color: #fff;
background-color: #071d36;
padding: 10px 0 20px 10px;
margin-bottom: 1px;
border-left: 6px solid red;
}
.mySlides {display:none;}
</style>
<title>Health center</title>
<meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="./assets/css/bootstrap.min.css">
<link href="./assets/css/font-awesome.css" rel="stylesheet">
<link href="./assets/css/blog_page.css" rel="stylesheet">
<link href="./assets/fonts/font.css" rel="stylesheet">
<link href="./assets/css/index.css" rel="stylesheet">
<link href="themes/1/js-image-slider.css" rel="stylesheet" type="text/css" />
<script src="themes/1/js-image-slider.js" type="text/javascript"></script>
<link href="generic.css" rel="stylesheet" type="text/css" />
<script src="./assets/js/jquery.min.js"></script>
<script src="./assets/js/jquery.min1.js"></script>
<script src="./assets/js/bootstrap.min.js"></script>
</head>
<body style="background-image:url(back/10.jpg) ;background-repeat:no-repeat;background-attachment: fixed;">
<div style="background-color:none;">
<!-- Static navbar -->
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"><?php echo "MNNIT Health Center" ;?></a>
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav">
<li class="active"><a href="add.php">Add Doctor</a></li>
<li class="active" data-toggle="modal" data-target="#add_blog_modal"><a href="Delete.php">Delete Doctor</a></li>
<li class="active"><a href="update.php">Update Doctor</a></li>
<li class="active"><a href="paitent.php">See patient</a></li>
<li class="active"><a href="logout.php">Logout</a></li>
</ul>
<div>
</div>
</nav>
<br><br>
<!-- End-->
<div class="col-sm-12" >
<h2 style="opacity: 0.8;"><marquee><label align="center" style="color:#FFFFFF;opacity:1px;">ADMIN <?php echo " \"$userid\"";?> CAN YOU SURE TO UPDATE DATA ?</label></marquee></h2>
<hr>
<br><br><br><br>
<div class="container">
<div class="col-sm-12" >
<div style="color:#red ;background-color:#071d36;opacity: 0.9; ">
<?php
$a=0;
echo "<table class='table' border='1' align='center'>";
echo "<caption style='color:#D7DA0F '> Availebel Doctors</capiton>";
echo "<tr style=' border-left: 6px solid red;color:#D7DA0F' align='center'><th>Name</th><th>Phone Number</th><th>Email</th><th>Address</th><th>Speciliest</th><th>Delete</th></tr>";
while($row=$result->fetch_array())
{
$a=1;
echo "<tr style=' border-left: 6px solid red; color:#D7DA0F' align='center'><form action='update_step.php' method='post'><td>Dr. $row[2] $row[3] $row[4]</td><td>$row[6]</td><td>$row[5]</td><td>$row[7]<br>$row[8]<br>$row[9]</td><td>$row[10]</td>
<td> <div class='col-sm-12 controls'>
<input type='text' value='$row[0]' style='display:none' name='id'><input type='submit' id='btn-login' action='book.php' class='btn btn-success' value='Update Doctor Field'></a>
</div></td></form></tr>";
}
echo "</table>";
if($a==0)
echo "<div align='center' class='col-sm-12 controls' style='color:#D7DA0F ;background-color:#071d36;opacity: 0.8; '><b>No Doctor Availebel</b></div>";
?>
</div>
</div>
</div>
<br><br>
<br><br><br><br>
<br><br><br><br>
<footer class="container-fluid">
<div style="text-align:center;padding:1%;font-weight:bold">
devloped By Choubeyji © 2018
</div>
</footer>
</body>
</html>