Step 2 Creating Patient Module
In this module we will have following features.
- View all doctors
- View any specific doctor’s details
- Scheduleds Sessions
- View al my bookings
- Setting for patient (Edit account settings, View account setting, Delete account )
View All doctors page:
View all my bookings:
View doctor’s details:
Settings page:
Here is the code for Patient module
<?php
session_start();
if(isset($_SESSION["user"])){
if(($_SESSION["user"])=="" or $_SESSION['usertype']!='p'){
header("location: ../login.php");
}else{
$useremail=$_SESSION["user"];
}
}else{
header("location: ../login.php");
}
include("../connection.php");
$sqlmain= "select * from patient where pemail=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("s",$useremail);
$stmt->execute();
$userrow = $stmt->get_result();
$userfetch=$userrow->fetch_assoc();
$userid= $userfetch["pid"];
$username=$userfetch["pname"];
if($_POST){
if(isset($_POST["booknow"])){
$apponum=$_POST["apponum"];
$scheduleid=$_POST["scheduleid"];
$date=$_POST["date"];
$scheduleid=$_POST["scheduleid"];
$sql2="insert into appointment(pid,apponum,scheduleid,appodate) values ($userid,$apponum,$scheduleid,'$date')";
$result= $database->query($sql2);
header("location: appointment.php?action=booking-added&id=".$apponum."&titleget=none");
}
}
?>
<!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">
<link rel="stylesheet" href="https://www.w3wiki.net../css/animations.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/main.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/admin.css">
<title>Doctors</title>
<style>
.popup{
animation: transitionIn-Y-bottom 0.5s;
}
.sub-table{
animation: transitionIn-Y-bottom 0.5s;
}
</style>
</head>
<body>
<?php
session_start();
if(isset($_SESSION["user"])){
if(($_SESSION["user"])=="" or $_SESSION['usertype']!='p'){
header("location: ../login.php");
}else{
$useremail=$_SESSION["user"];
}
}else{
header("location: ../login.php");
}
include("../connection.php");
$userrow = $database->query("select * from patient where pemail='$useremail'");
$userfetch=$userrow->fetch_assoc();
$userid= $userfetch["pid"];
$username=$userfetch["pname"];
?>
<div class="container">
<div class="menu">
<table class="menu-container" border="0">
<tr>
<td style="padding:10px" colspan="2">
<table border="0" class="profile-container">
<tr>
<td width="30%" style="padding-left:20px" >
<img src="../img/user.png" alt="" width="100%" style="border-radius:50%">
</td>
<td style="padding:0px;margin:0px;">
<p class="profile-title"><?php echo substr($username,0,13) ?>..</p>
<p class="profile-subtitle"><?php echo substr($useremail,0,22) ?></p>
</td>
</tr>
<tr>
<td colspan="2">
<a href="https://www.w3wiki.net../logout.php" ><input type="button" value="Log out" class="logout-btn btn-primary-soft btn"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-home " >
<a href="https://www.w3wiki.netindex.php" class="non-style-link-menu "><div><p class="menu-text">Home</p></a></div></a>
</td>
</tr>
<tr class="menu-row">
<td class="menu-btn menu-icon-doctor menu-active menu-icon-doctor-active">
<a href="https://www.w3wiki.netdoctors.php" class="non-style-link-menu non-style-link-menu-active"><div><p class="menu-text">All Doctors</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-session">
<a href="https://www.w3wiki.netschedule.php" class="non-style-link-menu"><div><p class="menu-text">Scheduled Sessions</p></div></a>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-appoinment">
<a href="https://www.w3wiki.netappointment.php" class="non-style-link-menu"><div><p class="menu-text">My Bookings</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-settings">
<a href="https://www.w3wiki.netsettings.php" class="non-style-link-menu"><div><p class="menu-text">Settings</p></a></div>
</td>
</tr>
</table>
</div>
<div class="dash-body">
<table border="0" width="100%" style=" border-spacing: 0;margin:0;padding:0;margin-top:25px; ">
<tr >
<td width="13%">
<a href="https://www.w3wiki.netdoctors.php" ><button class="login-btn btn-primary-soft btn btn-icon-back" style="padding-top:11px;padding-bottom:11px;margin-left:20px;width:125px"><font class="tn-in-text">Back</font></button></a>
</td>
<td>
<form action="" method="post" class="header-search">
<input type="search" name="search" class="input-text header-searchbar" placeholder="Search Doctor name or Email" list="doctors">
<?php
echo '<datalist id="doctors">';
$list11 = $database->query("select docname,docemail from doctor;");
for ($y=0;$y<$list11->num_rows;$y++){
$row00=$list11->fetch_assoc();
$d=$row00["docname"];
$c=$row00["docemail"];
echo "<option value='$d'><br/>";
echo "<option value='$c'><br/>";
};
echo ' </datalist>';
?>
<input type="Submit" value="Search" class="login-btn btn-primary btn" style="padding-left: 25px;padding-right: 25px;padding-top: 10px;padding-bottom: 10px;">
</form>
</td>
<td width="15%">
<p style="font-size: 14px;color: rgb(119, 119, 119);padding: 0;margin: 0;text-align: right;">
Today's Date
</p>
<p class="heading-sub12" style="padding: 0;margin: 0;">
<?php
date_default_timezone_set('Asia/Kolkata');
$date = date('Y-m-d');
echo $date;
?>
</p>
</td>
<td width="10%">
<button class="btn-label" style="display: flex;justify-content: center;align-items: center;"><img src="../img/calendar.svg" width="100%"></button>
</td>
</tr>
<tr>
<td colspan="4" style="padding-top:10px;">
<p class="heading-main12" style="margin-left: 45px;font-size:18px;color:rgb(49, 49, 49)">All Doctors (<?php echo $list11->num_rows; ?>)</p>
</td>
</tr>
<?php
if($_POST){
$keyword=$_POST["search"];
$sqlmain= "select * from doctor where docemail='$keyword' or docname='$keyword' or docname like '$keyword%' or docname like '%$keyword' or docname like '%$keyword%'";
}else{
$sqlmain= "select * from doctor order by docid desc";
}
?>
<tr>
<td colspan="4">
<center>
<div class="abc scroll">
<table width="93%" class="sub-table scrolldown" border="0">
<thead>
<tr>
<th class="table-headin">
Doctor Name
</th>
<th class="table-headin">
Email
</th>
<th class="table-headin">
Specialties
</th>
<th class="table-headin">
Events
</tr>
</thead>
<tbody>
<?php
$result= $database->query($sqlmain);
if($result->num_rows==0){
echo '<tr>
<td colspan="4">
<br><br><br><br>
<center>
<img src="../img/notfound.svg" width="25%">
<br>
<p class="heading-main12" style="margin-left: 45px;font-size:20px;color:rgb(49, 49, 49)">We couldnt find anything related to your keywords !</p>
<a class="non-style-link" href="https://www.w3wiki.netdoctors.php"><button class="login-btn btn-primary-soft btn" style="display: flex;justify-content: center;align-items: center;margin-left:20px;"> Show all Doctors </font></button>
</a>
</center>
<br><br><br><br>
</td>
</tr>';
}
else{
for ( $x=0; $x<$result->num_rows;$x++){
$row=$result->fetch_assoc();
$docid=$row["docid"];
$name=$row["docname"];
$email=$row["docemail"];
$spe=$row["specialties"];
$spcil_res= $database->query("select sname from specialties where id='$spe'");
$spcil_array= $spcil_res->fetch_assoc();
$spcil_name=$spcil_array["sname"];
echo '<tr>
<td> '.
substr($name,0,30)
.'</td>
<td>
'.substr($email,0,20).'
</td>
<td>
'.substr($spcil_name,0,20).'
</td>
<td>
<div style="display:flex;justify-content: center;">
<a href="https://www.w3wiki.net?action=view&id='.$docid.'" class="non-style-link"><button class="btn-primary-soft btn button-icon btn-view" style="padding-left: 40px;padding-top: 12px;padding-bottom: 12px;margin-top: 10px;"><font class="tn-in-text">View</font></button></a>
<a href="https://www.w3wiki.net?action=session&id='.$docid.'&name='.$name.'" class="non-style-link"><button class="btn-primary-soft btn button-icon menu-icon-session-active" style="padding-left: 40px;padding-top: 12px;padding-bottom: 12px;margin-top: 10px;"><font class="tn-in-text">Sessions</font></button></a>
</div>
</td>
</tr>';
}
}
?>
</tbody>
</table>
</div>
</center>
</td>
</tr>
</table>
</div>
</div>
<?php
if($_GET){
$id=$_GET["id"];
$action=$_GET["action"];
if($action=='drop'){
$nameget=$_GET["name"];
echo '
<div id="popup1" class="overlay">
<div class="popup">
<center>
<h2>Are you sure?</h2>
<a class="close" href="https://www.w3wiki.netdoctors.php">×</a>
<div class="content">
You want to delete this record<br>('.substr($nameget,0,40).').
</div>
<div style="display: flex;justify-content: center;">
<a href="https://www.w3wiki.netdelete-doctor.php?id='.$id.'" class="non-style-link"><button class="btn-primary btn" style="display: flex;justify-content: center;align-items: center;margin:10px;padding:10px;"<font class="tn-in-text"> Yes </font></button></a>
<a href="https://www.w3wiki.netdoctors.php" class="non-style-link"><button class="btn-primary btn" style="display: flex;justify-content: center;align-items: center;margin:10px;padding:10px;"><font class="tn-in-text"> No </font></button></a>
</div>
</center>
</div>
</div>
';
}elseif($action=='view'){
$sqlmain = "SELECT * FROM doctor WHERE docid=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("i",$id);
$stmt->execute();
$result = $stmt->get_result();
$row = $result->fetch_assoc();
$name=$row["docname"];
$email=$row["docemail"];
$spe=$row["specialties"];
$stmt = $database->prepare("select sname from specialties where id=?");
$stmt->bind_param("s",$spe);
$stmt->execute();
$spcil_res = $stmt->get_result();
$spcil_array= $spcil_res->fetch_assoc();
$spcil_name=$spcil_array["sname"];
$nic=$row['docnic'];
$tele=$row['doctel'];
echo '
<div id="popup1" class="overlay">
<div class="popup">
<center>
<h2></h2>
<a class="close" href="https://www.w3wiki.netdoctors.php">×</a>
<div class="content">
eDoc Web App<br>
</div>
<div style="display: flex;justify-content: center;">
<table width="80%" class="sub-table scrolldown add-doc-form-container" border="0">
<tr>
<td>
<p style="padding: 0;margin: 0;text-align: left;font-size: 25px;font-weight: 500;">View Details.</p><br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="name" class="form-label">Name: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$name.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="Email" class="form-label">Email: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$email.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="nic" class="form-label">NIC: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$nic.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="Tele" class="form-label">Telephone: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$tele.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="spec" class="form-label">Specialties: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$spcil_name.'<br><br>
</td>
</tr>
<tr>
<td colspan="2">
<a href="https://www.w3wiki.netdoctors.php"><input type="button" value="OK" class="login-btn btn-primary-soft btn" ></a>
</td>
</tr>
</table>
</div>
</center>
<br><br>
</div>
</div>
';
}elseif($action=='session'){
$name=$_GET["name"];
echo '
<div id="popup1" class="overlay">
<div class="popup">
<center>
<h2>Redirect to Doctors sessions?</h2>
<a class="close" href="https://www.w3wiki.netdoctors.php">×</a>
<div class="content">
You want to view All sessions by <br>('.substr($name,0,40).').
</div>
<form action="schedule.php" method="post" style="display: flex">
<input type="hidden" name="search" value="'.$name.'">
<div style="display: flex;justify-content:center;margin-left:45%;margin-top:6%;;margin-bottom:6%;">
<input type="submit" value="Yes" class="btn-primary btn" >
</div>
</center>
</div>
</div>
';
}
}elseif($action=='edit'){
$sqlmain= "select * from doctor where docid=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("i",$id);
$stmt->execute();
$result = $stmt->get_result();
$row=$result->fetch_assoc();
$name=$row["docname"];
$email=$row["docemail"];
$spe=$row["specialties"];
$sqlmain= "select sname from specialties where id='?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("s",$spe);
$stmt->execute();
$result = $stmt->get_result();
$spcil_array= $spcil_res->fetch_assoc();
$spcil_name=$spcil_array["sname"];
$nic=$row['docnic'];
$tele=$row['doctel'];
$error_1=$_GET["error"];
$errorlist= array(
'1'=>'<label for="promter" class="form-label" style="color:rgb(255, 62, 62);text-align:center;">Already have an account for this Email address.</label>',
'2'=>'<label for="promter" class="form-label" style="color:rgb(255, 62, 62);text-align:center;">Password Conformation Error! Reconform Password</label>',
'3'=>'<label for="promter" class="form-label" style="color:rgb(255, 62, 62);text-align:center;"></label>',
'4'=>"",
'0'=>'',
);
if($error_1!='4'){
echo '
<div id="popup1" class="overlay">
<div class="popup">
<center>
<a class="close" href="https://www.w3wiki.netdoctors.php">×</a>
<div style="display: flex;justify-content: center;">
<div class="abc">
<table width="80%" class="sub-table scrolldown add-doc-form-container" border="0">
<tr>
<td class="label-td" colspan="2">'.
$errorlist[$error_1]
.'</td>
</tr>
<tr>
<td>
<p style="padding: 0;margin: 0;text-align: left;font-size: 25px;font-weight: 500;">Edit Doctor Details.</p>
Doctor ID : '.$id.' (Auto Generated)<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<form action="edit-doc.php" method="POST" class="add-new-form">
<label for="Email" class="form-label">Email: </label>
<input type="hidden" value="'.$id.'" name="id00">
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<input type="email" name="email" class="input-text" placeholder="Email Address" value="'.$email.'" required><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="name" class="form-label">Name: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<input type="text" name="name" class="input-text" placeholder="Doctor Name" value="'.$name.'" required><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="nic" class="form-label">NIC: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<input type="text" name="nic" class="input-text" placeholder="NIC Number" value="'.$nic.'" required><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="Tele" class="form-label">Telephone: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<input type="tel" name="Tele" class="input-text" placeholder="Telephone Number" value="'.$tele.'" required><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="spec" class="form-label">Choose specialties: (Current'.$spcil_name.')</label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<select name="spec" id="" class="box">';
$list11 = $database->query("select * from specialties;");
for ($y=0;$y<$list11->num_rows;$y++){
$row00=$list11->fetch_assoc();
$sn=$row00["sname"];
$id00=$row00["id"];
echo "<option value=".$id00.">$sn</option><br/>";
};
echo ' </select><br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="password" class="form-label">Password: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<input type="password" name="password" class="input-text" placeholder="Defind a Password" required><br>
</td>
</tr><tr>
<td class="label-td" colspan="2">
<label for="cpassword" class="form-label">Conform Password: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<input type="password" name="cpassword" class="input-text" placeholder="Conform Password" required><br>
</td>
</tr>
<tr>
<td colspan="2">
<input type="reset" value="Reset" class="login-btn btn-primary-soft btn" >
<input type="submit" value="Save" class="login-btn btn-primary btn">
</td>
</tr>
</form>
</tr>
</table>
</div>
</div>
</center>
<br><br>
</div>
</div>
';
}else{
echo '
<div id="popup1" class="overlay">
<div class="popup">
<center>
<br><br><br><br>
<h2>Edit Successfully!</h2>
<a class="close" href="https://www.w3wiki.netdoctors.php">×</a>
<div class="content">
</div>
<div style="display: flex;justify-content: center;">
<a href="https://www.w3wiki.netdoctors.php" class="non-style-link"><button class="btn-primary btn" style="display: flex;justify-content: center;align-items: center;margin:10px;padding:10px;"><font class="tn-in-text"> OK </font></button></a>
</div>
<br><br>
</center>
</div>
</div>
';
};
};
?>
</div>
</body>
</html>
<!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">
<link rel="stylesheet" href="https://www.w3wiki.net../css/animations.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/main.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/admin.css">
<title>Appointments</title>
<style>
.popup{
animation: transitionIn-Y-bottom 0.5s;
}
.sub-table{
animation: transitionIn-Y-bottom 0.5s;
}
</style>
</head>
<body>
<?php
session_start();
if(isset($_SESSION["user"])){
if(($_SESSION["user"])=="" or $_SESSION['usertype']!='p'){
header("location: ../login.php");
}else{
$useremail=$_SESSION["user"];
}
}else{
header("location: ../login.php");
}
include("../connection.php");
$sqlmain= "select * from patient where pemail=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("s",$useremail);
$stmt->execute();
$userrow = $stmt->get_result();
$userfetch=$userrow->fetch_assoc();
$userid= $userfetch["pid"];
$username=$userfetch["pname"];
//TODO
$sqlmain= "select appointment.appoid,schedule.scheduleid,schedule.title,doctor.docname,patient.pname,schedule.scheduledate,schedule.scheduletime,appointment.apponum,appointment.appodate from schedule inner join appointment on schedule.scheduleid=appointment.scheduleid inner join patient on patient.pid=appointment.pid inner join doctor on schedule.docid=doctor.docid where patient.pid=$userid ";
if($_POST){
if(!empty($_POST["sheduledate"])){
$sheduledate=$_POST["sheduledate"];
$sqlmain.=" and schedule.scheduledate='$sheduledate' ";
};
}
$sqlmain.="order by appointment.appodate asc";
$result= $database->query($sqlmain);
?>
<div class="container">
<div class="menu">
<table class="menu-container" border="0">
<tr>
<td style="padding:10px" colspan="2">
<table border="0" class="profile-container">
<tr>
<td width="30%" style="padding-left:20px" >
<img src="../img/user.png" alt="" width="100%" style="border-radius:50%">
</td>
<td style="padding:0px;margin:0px;">
<p class="profile-title"><?php echo substr($username,0,13) ?>..</p>
<p class="profile-subtitle"><?php echo substr($useremail,0,22) ?></p>
</td>
</tr>
<tr>
<td colspan="2">
<a href="https://www.w3wiki.net../logout.php" ><input type="button" value="Log out" class="logout-btn btn-primary-soft btn"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-home" >
<a href="https://www.w3wiki.netindex.php" class="non-style-link-menu "><div><p class="menu-text">Home</p></a></div></a>
</td>
</tr>
<tr class="menu-row">
<td class="menu-btn menu-icon-doctor">
<a href="https://www.w3wiki.netdoctors.php" class="non-style-link-menu"><div><p class="menu-text">All Doctors</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-session">
<a href="https://www.w3wiki.netschedule.php" class="non-style-link-menu"><div><p class="menu-text">Scheduled Sessions</p></div></a>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-appoinment menu-active menu-icon-appoinment-active">
<a href="https://www.w3wiki.netappointment.php" class="non-style-link-menu non-style-link-menu-active"><div><p class="menu-text">My Bookings</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-settings">
<a href="https://www.w3wiki.netsettings.php" class="non-style-link-menu"><div><p class="menu-text">Settings</p></a></div>
</td>
</tr>
</table>
</div>
<div class="dash-body">
<table border="0" width="100%" style=" border-spacing: 0;margin:0;padding:0;margin-top:25px; ">
<tr >
<td width="13%" >
<a href="https://www.w3wiki.netappointment.php" ><button class="login-btn btn-primary-soft btn btn-icon-back" style="padding-top:11px;padding-bottom:11px;margin-left:20px;width:125px"><font class="tn-in-text">Back</font></button></a>
</td>
<td>
<p style="font-size: 23px;padding-left:12px;font-weight: 600;">My Bookings history</p>
</td>
<td width="15%">
<p style="font-size: 14px;color: rgb(119, 119, 119);padding: 0;margin: 0;text-align: right;">
Today's Date
</p>
<p class="heading-sub12" style="padding: 0;margin: 0;">
<?php
date_default_timezone_set('Asia/Kolkata');
$today = date('Y-m-d');
echo $today;
?>
</p>
</td>
<td width="10%">
<button class="btn-label" style="display: flex;justify-content: center;align-items: center;"><img src="../img/calendar.svg" width="100%"></button>
</td>
</tr>
<tr>
<td colspan="4" style="padding-top:10px;width: 100%;" >
<p class="heading-main12" style="margin-left: 45px;font-size:18px;color:rgb(49, 49, 49)">My Bookings (<?php echo $result->num_rows; ?>)</p>
</td>
</tr>
<tr>
<td colspan="4" style="padding-top:0px;width: 100%;" >
<center>
<table class="filter-container" border="0" >
<tr>
<td width="10%">
</td>
<td width="5%" style="text-align: center;">
Date:
</td>
<td width="30%">
<form action="" method="post">
<input type="date" name="sheduledate" id="date" class="input-text filter-container-items" style="margin: 0;width: 95%;">
</td>
<td width="12%">
<input type="submit" name="filter" value=" Filter" class=" btn-primary-soft btn button-icon btn-filter" style="padding: 15px; margin :0;width:100%">
</form>
</td>
</tr>
</table>
</center>
</td>
</tr>
<tr>
<td colspan="4">
<center>
<div class="abc scroll">
<table width="93%" class="sub-table scrolldown" border="0" style="border:none">
<tbody>
<?php
if($result->num_rows==0){
echo '<tr>
<td colspan="7">
<br><br><br><br>
<center>
<img src="../img/notfound.svg" width="25%">
<br>
<p class="heading-main12" style="margin-left: 45px;font-size:20px;color:rgb(49, 49, 49)">We couldnt find anything related to your keywords !</p>
<a class="non-style-link" href="https://www.w3wiki.netappointment.php"><button class="login-btn btn-primary-soft btn" style="display: flex;justify-content: center;align-items: center;margin-left:20px;"> Show all Appointments </font></button>
</a>
</center>
<br><br><br><br>
</td>
</tr>';
}
else{
for ( $x=0; $x<($result->num_rows);$x++){
echo "<tr>";
for($q=0;$q<3;$q++){
$row=$result->fetch_assoc();
if (!isset($row)){
break;
};
$scheduleid=$row["scheduleid"];
$title=$row["title"];
$docname=$row["docname"];
$scheduledate=$row["scheduledate"];
$scheduletime=$row["scheduletime"];
$apponum=$row["apponum"];
$appodate=$row["appodate"];
$appoid=$row["appoid"];
if($scheduleid==""){
break;
}
echo '
<td style="width: 25%;">
<div class="dashboard-items search-items" >
<div style="width:100%;">
<div class="h3-search">
Booking Date: '.substr($appodate,0,30).'<br>
Reference Number: OC-000-'.$appoid.'
</div>
<div class="h1-search">
'.substr($title,0,21).'<br>
</div>
<div class="h3-search">
Appointment Number:<div class="h1-search">0'.$apponum.'</div>
</div>
<div class="h3-search">
'.substr($docname,0,30).'
</div>
<div class="h4-search">
Scheduled Date: '.$scheduledate.'<br>Starts: <b>@'.substr($scheduletime,0,5).'</b> (24h)
</div>
<br>
<a href="https://www.w3wiki.net?action=drop&id='.$appoid.'&title='.$title.'&doc='.$docname.'" ><button class="login-btn btn-primary-soft btn " style="padding-top:11px;padding-bottom:11px;width:100%"><font class="tn-in-text">Cancel Booking</font></button></a>
</div>
</div>
</td>';
}
echo "</tr>";
}
}
?>
</tbody>
</table>
</div>
</center>
</td>
</tr>
</table>
</div>
</div>
<?php
if($_GET){
$id=$_GET["id"];
$action=$_GET["action"];
if($action=='booking-added'){
echo '
<div id="popup1" class="overlay">
<div class="popup">
<center>
<br><br>
<h2>Booking Successfully.</h2>
<a class="close" href="https://www.w3wiki.netappointment.php">×</a>
<div class="content">
Your Appointment number is '.$id.'.<br><br>
</div>
<div style="display: flex;justify-content: center;">
<a href="https://www.w3wiki.netappointment.php" class="non-style-link"><button class="btn-primary btn" style="display: flex;justify-content: center;align-items: center;margin:10px;padding:10px;"><font class="tn-in-text"> OK </font></button></a>
<br><br><br><br>
</div>
</center>
</div>
</div>
';
}elseif($action=='drop'){
$title=$_GET["title"];
$docname=$_GET["doc"];
echo '
<div id="popup1" class="overlay">
<div class="popup">
<center>
<h2>Are you sure?</h2>
<a class="close" href="https://www.w3wiki.netappointment.php">×</a>
<div class="content">
You want to Cancel this Appointment?<br><br>
Session Name: <b>'.substr($title,0,40).'</b><br>
Doctor name : <b>'.substr($docname,0,40).'</b><br><br>
</div>
<div style="display: flex;justify-content: center;">
<a href="https://www.w3wiki.netdelete-appointment.php?id='.$id.'" class="non-style-link"><button class="btn-primary btn" style="display: flex;justify-content: center;align-items: center;margin:10px;padding:10px;"<font class="tn-in-text"> Yes </font></button></a>
<a href="https://www.w3wiki.netappointment.php" class="non-style-link"><button class="btn-primary btn" style="display: flex;justify-content: center;align-items: center;margin:10px;padding:10px;"><font class="tn-in-text"> No </font></button></a>
</div>
</center>
</div>
</div>
';
}elseif($action=='view'){
$sqlmain= "select * from doctor where docid=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("i",$id);
$stmt->execute();
$result = $stmt->get_result();
$row=$result->fetch_assoc();
$name=$row["docname"];
$email=$row["docemail"];
$spe=$row["specialties"];
$sqlmain= "select sname from specialties where id=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("s",$spe);
$stmt->execute();
$spcil_res = $stmt->get_result();
$spcil_array= $spcil_res->fetch_assoc();
$spcil_name=$spcil_array["sname"];
$nic=$row['docnic'];
$tele=$row['doctel'];
echo '
<div id="popup1" class="overlay">
<div class="popup">
<center>
<h2></h2>
<a class="close" href="https://www.w3wiki.netdoctors.php">×</a>
<div class="content">
eDoc Web App<br>
</div>
<div style="display: flex;justify-content: center;">
<table width="80%" class="sub-table scrolldown add-doc-form-container" border="0">
<tr>
<td>
<p style="padding: 0;margin: 0;text-align: left;font-size: 25px;font-weight: 500;">View Details.</p><br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="name" class="form-label">Name: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$name.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="Email" class="form-label">Email: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$email.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="nic" class="form-label">NIC: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$nic.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="Tele" class="form-label">Telephone: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$tele.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="spec" class="form-label">Specialties: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$spcil_name.'<br><br>
</td>
</tr>
<tr>
<td colspan="2">
<a href="https://www.w3wiki.netdoctors.php"><input type="button" value="OK" class="login-btn btn-primary-soft btn" ></a>
</td>
</tr>
</table>
</div>
</center>
<br><br>
</div>
</div>
';
}
}
?>
</div>
</body>
</html>
<!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">
<link rel="stylesheet" href="https://www.w3wiki.net../css/animations.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/main.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/admin.css">
<title>Sessions</title>
<style>
.popup{
animation: transitionIn-Y-bottom 0.5s;
}
.sub-table{
animation: transitionIn-Y-bottom 0.5s;
}
</style>
</head>
<body>
<?php
session_start();
if(isset($_SESSION["user"])){
if(($_SESSION["user"])=="" or $_SESSION['usertype']!='p'){
header("location: ../login.php");
}else{
$useremail=$_SESSION["user"];
}
}else{
header("location: ../login.php");
}
include("../connection.php");
$sqlmain= "select * from patient where pemail=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("s",$useremail);
$stmt->execute();
$result = $stmt->get_result();
$userfetch=$userrow->fetch_assoc();
$userid= $userfetch["pid"];
$username=$userfetch["pname"];
date_default_timezone_set('Asia/Kolkata');
$today = date('Y-m-d');
?>
<div class="container">
<div class="menu">
<table class="menu-container" border="0">
<tr>
<td style="padding:10px" colspan="2">
<table border="0" class="profile-container">
<tr>
<td width="30%" style="padding-left:20px" >
<img src="../img/user.png" alt="" width="100%" style="border-radius:50%">
</td>
<td style="padding:0px;margin:0px;">
<p class="profile-title"><?php echo substr($username,0,13) ?>..</p>
<p class="profile-subtitle"><?php echo substr($useremail,0,22) ?></p>
</td>
</tr>
<tr>
<td colspan="2">
<a href="https://www.w3wiki.net../logout.php" ><input type="button" value="Log out" class="logout-btn btn-primary-soft btn"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-home " >
<a href="https://www.w3wiki.netindex.php" class="non-style-link-menu "><div><p class="menu-text">Home</p></a></div></a>
</td>
</tr>
<tr class="menu-row">
<td class="menu-btn menu-icon-doctor">
<a href="https://www.w3wiki.netdoctors.php" class="non-style-link-menu"><div><p class="menu-text">All Doctors</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-session menu-active menu-icon-session-active">
<a href="https://www.w3wiki.netschedule.php" class="non-style-link-menu non-style-link-menu-active"><div><p class="menu-text">Scheduled Sessions</p></div></a>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-appoinment">
<a href="https://www.w3wiki.netappointment.php" class="non-style-link-menu"><div><p class="menu-text">My Bookings</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-settings">
<a href="https://www.w3wiki.netsettings.php" class="non-style-link-menu"><div><p class="menu-text">Settings</p></a></div>
</td>
</tr>
</table>
</div>
<div class="dash-body">
<table border="0" width="100%" style=" border-spacing: 0;margin:0;padding:0;margin-top:25px; ">
<tr >
<td width="13%" >
<a href="https://www.w3wiki.netschedule.php" ><button class="login-btn btn-primary-soft btn btn-icon-back" style="padding-top:11px;padding-bottom:11px;margin-left:20px;width:125px"><font class="tn-in-text">Back</font></button></a>
</td>
<td >
<form action="schedule.php" method="post" class="header-search">
<input type="search" name="search" class="input-text header-searchbar" placeholder="Search Doctor name or Email or Date (YYYY-MM-DD)" list="doctors" >
<?php
echo '<datalist id="doctors">';
$list11 = $database->query("select DISTINCT * from doctor;");
$list12 = $database->query("select DISTINCT * from schedule GROUP BY title;");
for ($y=0;$y<$list11->num_rows;$y++){
$row00=$list11->fetch_assoc();
$d=$row00["docname"];
echo "<option value='$d'><br/>";
};
for ($y=0;$y<$list12->num_rows;$y++){
$row00=$list12->fetch_assoc();
$d=$row00["title"];
echo "<option value='$d'><br/>";
};
echo ' </datalist>';
?>
<input type="Submit" value="Search" class="login-btn btn-primary btn" style="padding-left: 25px;padding-right: 25px;padding-top: 10px;padding-bottom: 10px;">
</form>
</td>
<td width="15%">
<p style="font-size: 14px;color: rgb(119, 119, 119);padding: 0;margin: 0;text-align: right;">
Today's Date
</p>
<p class="heading-sub12" style="padding: 0;margin: 0;">
<?php
echo $today;
?>
</p>
</td>
<td width="10%">
<button class="btn-label" style="display: flex;justify-content: center;align-items: center;"><img src="../img/calendar.svg" width="100%"></button>
</td>
</tr>
<tr>
<td colspan="4" style="padding-top:10px;width: 100%;" >
</td>
</tr>
<tr>
<td colspan="4">
<center>
<div class="abc scroll">
<table width="100%" class="sub-table scrolldown" border="0" style="padding: 50px;border:none">
<tbody>
<?php
if(($_GET)){
if(isset($_GET["id"])){
$id=$_GET["id"];
$sqlmain= "select * from schedule inner join doctor on schedule.docid=doctor.docid where schedule.scheduleid=? order by schedule.scheduledate desc";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("i", $id);
$stmt->execute();
$result = $stmt->get_result();
//echo $sqlmain;
$row=$result->fetch_assoc();
$scheduleid=$row["scheduleid"];
$title=$row["title"];
$docname=$row["docname"];
$docemail=$row["docemail"];
$scheduledate=$row["scheduledate"];
$scheduletime=$row["scheduletime"];
$sql2="select * from appointment where scheduleid=$id";
//echo $sql2;
$result12= $database->query($sql2);
$apponum=($result12->num_rows)+1;
echo '
<form action="booking-complete.php" method="post">
<input type="hidden" name="scheduleid" value="'.$scheduleid.'" >
<input type="hidden" name="apponum" value="'.$apponum.'" >
<input type="hidden" name="date" value="'.$today.'" >
';
echo '
<td style="width: 50%;" rowspan="2">
<div class="dashboard-items search-items" >
<div style="width:100%">
<div class="h1-search" style="font-size:25px;">
Session Details
</div><br><br>
<div class="h3-search" style="font-size:18px;line-height:30px">
Doctor name: <b>'.$docname.'</b><br>
Doctor Email: <b>'.$docemail.'</b>
</div>
<div class="h3-search" style="font-size:18px;">
</div><br>
<div class="h3-search" style="font-size:18px;">
Session Title: '.$title.'<br>
Session Scheduled Date: '.$scheduledate.'<br>
Session Starts : '.$scheduletime.'<br>
Channeling fee : <b>LKR.2 000.00</b>
</div>
<br>
</div>
</div>
</td>
<td style="width: 25%;">
<div class="dashboard-items search-items" >
<div style="width:100%;padding-top: 15px;padding-bottom: 15px;">
<div class="h1-search" style="font-size:20px;line-height: 35px;margin-left:8px;text-align:center;">
Your Appointment Number
</div>
<center>
<div class=" dashboard-icons" style="margin-left: 0px;width:90%;font-size:70px;font-weight:800;text-align:center;color:var(--btnnictext);background-color: var(--btnice)">'.$apponum.'</div>
</center>
</div><br>
<br>
<br>
</div>
</div>
</td>
</tr>
<tr>
<td>
<input type="Submit" class="login-btn btn-primary btn btn-book" style="margin-left:10px;padding-left: 25px;padding-right: 25px;padding-top: 10px;padding-bottom: 10px;width:95%;text-align: center;" value="Book now" name="booknow"></button>
</form>
</td>
</tr>
';
}
}
?>
</tbody>
</table>
</div>
</center>
</td>
</tr>
</table>
</div>
</div>
</div>
</body>
</html>
<?php
session_start();
if(isset($_SESSION["user"])){
if(($_SESSION["user"])=="" or $_SESSION['usertype']!='p'){
header("location: ../login.php");
}else{
$useremail=$_SESSION["user"];
}
}else{
header("location: ../login.php");
}
include("../connection.php");
$sqlmain= "select * from patient where pemail=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("s",$useremail);
$stmt->execute();
$userrow = $stmt->get_result();
$userfetch=$userrow->fetch_assoc();
$userid= $userfetch["pid"];
$username=$userfetch["pname"];
if($_GET){
include("../connection.php");
$id=$_GET["id"];
$sqlmain= "select * from patient where pid=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("i",$id);
$stmt->execute();
$result001 = $stmt->get_result();
$email=($result001->fetch_assoc())["pemail"];
$sqlmain= "delete from webuser where email=?;";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("s",$email);
$stmt->execute();
$result = $stmt->get_result();
$sqlmain= "delete from patient where pemail=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("s",$email);
$stmt->execute();
$result = $stmt->get_result();
header("location: ../logout.php");
}
?>
<?php
session_start();
if(isset($_SESSION["user"])){
if(($_SESSION["user"])=="" or $_SESSION['usertype']!='a'){
header("location: ../login.php");
}
}else{
header("location: ../login.php");
}
if($_GET){
include("../connection.php");
$id=$_GET["id"];
$sql= $database->query("delete from appointment where appoid='$id';");
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("i",$id);
$stmt->execute();
header("location: appointment.php");
}
?>
<?php
include("../connection.php");
if($_POST){
$result= $database->query("select * from webuser");
$name=$_POST['name'];
$nic=$_POST['nic'];
$oldemail=$_POST["oldemail"];
$address=$_POST['address'];
$email=$_POST['email'];
$tele=$_POST['Tele'];
$password=$_POST['password'];
$cpassword=$_POST['cpassword'];
$id=$_POST['id00'];
if ($password==$cpassword){
$error='3';
$sqlmain= "select patient.pid from patient inner join webuser on patient.pemail=webuser.email where webuser.email=?;";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("s",$email);
$stmt->execute();
$result = $stmt->get_result();
if($result->num_rows==1){
$id2=$result->fetch_assoc()["pid"];
}else{
$id2=$id;
}
if($id2!=$id){
$error='1';
}else{
$sql1="update patient set pemail='$email',pname='$name',ppassword='$password',pnic='$nic',ptel='$tele',paddress='$address' where pid=$id ;";
$database->query($sql1);
echo $sql1;
$sql1="update webuser set email='$email' where email='$oldemail' ;";
$database->query($sql1);
echo $sql1;
$error= '4';
}
}else{
$error='2';
}
}else{
$error='3';
}
header("location: settings.php?action=edit&error=".$error."&id=".$id);
?>
</body>
</html>
<!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">
<link rel="stylesheet" href="https://www.w3wiki.net../css/animations.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/main.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/admin.css">
<title>Dashboard</title>
<style>
.dashbord-tables{
animation: transitionIn-Y-over 0.5s;
}
.filter-container{
animation: transitionIn-Y-bottom 0.5s;
}
.sub-table,.anime{
animation: transitionIn-Y-bottom 0.5s;
}
</style>
</head>
<body>
<?php
session_start();
if(isset($_SESSION["user"])){
if(($_SESSION["user"])=="" or $_SESSION['usertype']!='p'){
header("location: ../login.php");
}else{
$useremail=$_SESSION["user"];
}
}else{
header("location: ../login.php");
}
include("../connection.php");
$sqlmain= "select * from patient where pemail=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("s",$useremail);
$stmt->execute();
$userrow = $stmt->get_result();
$userfetch=$userrow->fetch_assoc();
$userid= $userfetch["pid"];
$username=$userfetch["pname"];
?>
<div class="container">
<div class="menu">
<table class="menu-container" border="0">
<tr>
<td style="padding:10px" colspan="2">
<table border="0" class="profile-container">
<tr>
<td width="30%" style="padding-left:20px" >
<img src="../img/user.png" alt="" width="100%" style="border-radius:50%">
</td>
<td style="padding:0px;margin:0px;">
<p class="profile-title"><?php echo substr($username,0,13) ?>..</p>
<p class="profile-subtitle"><?php echo substr($useremail,0,22) ?></p>
</td>
</tr>
<tr>
<td colspan="2">
<a href="https://www.w3wiki.net../logout.php" ><input type="button" value="Log out" class="logout-btn btn-primary-soft btn"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-home menu-active menu-icon-home-active" >
<a href="https://www.w3wiki.netindex.php" class="non-style-link-menu non-style-link-menu-active"><div><p class="menu-text">Home</p></a></div></a>
</td>
</tr>
<tr class="menu-row">
<td class="menu-btn menu-icon-doctor">
<a href="https://www.w3wiki.netdoctors.php" class="non-style-link-menu"><div><p class="menu-text">All Doctors</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-session">
<a href="https://www.w3wiki.netschedule.php" class="non-style-link-menu"><div><p class="menu-text">Scheduled Sessions</p></div></a>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-appoinment">
<a href="https://www.w3wiki.netappointment.php" class="non-style-link-menu"><div><p class="menu-text">My Bookings</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-settings">
<a href="https://www.w3wiki.netsettings.php" class="non-style-link-menu"><div><p class="menu-text">Settings</p></a></div>
</td>
</tr>
</table>
</div>
<div class="dash-body" style="margin-top: 15px">
<table border="0" width="100%" style=" border-spacing: 0;margin:0;padding:0;" >
<tr >
<td colspan="1" class="nav-bar" >
<p style="font-size: 23px;padding-left:12px;font-weight: 600;margin-left:20px;">Home</p>
</td>
<td width="25%">
</td>
<td width="15%">
<p style="font-size: 14px;color: rgb(119, 119, 119);padding: 0;margin: 0;text-align: right;">
Today's Date
</p>
<p class="heading-sub12" style="padding: 0;margin: 0;">
<?php
date_default_timezone_set('Asia/Kolkata');
$today = date('Y-m-d');
echo $today;
$patientrow = $database->query("select * from patient;");
$doctorrow = $database->query("select * from doctor;");
$appointmentrow = $database->query("select * from appointment where appodate>='$today';");
$schedulerow = $database->query("select * from schedule where scheduledate='$today';");
?>
</p>
</td>
<td width="10%">
<button class="btn-label" style="display: flex;justify-content: center;align-items: center;"><img src="../img/calendar.svg" width="100%"></button>
</td>
</tr>
<tr>
<td colspan="4" >
<center>
<table class="filter-container doctor-header patient-header" style="border: none;width:95%" border="0" >
<tr>
<td >
<h3>Welcome!</h3>
<h1><?php echo $username ?>.</h1>
<p>Haven't any idea about doctors? no problem let's jumping to
<a href="https://www.w3wiki.netdoctors.php" class="non-style-link"><b>"All Doctors"</b></a> section or
<a href="https://www.w3wiki.netschedule.php" class="non-style-link"><b>"Sessions"</b> </a><br>
Track your past and future appointments history.<br>Also find out the expected arrival time of your doctor or medical consultant.<br><br>
</p>
<h3>Channel a Doctor Here</h3>
<form action="schedule.php" method="post" style="display: flex">
<input type="search" name="search" class="input-text " placeholder="Search Doctor and We will Find The Session Available" list="doctors" style="width:45%;">
<?php
echo '<datalist id="doctors">';
$list11 = $database->query("select docname,docemail from doctor;");
for ($y=0;$y<$list11->num_rows;$y++){
$row00=$list11->fetch_assoc();
$d=$row00["docname"];
echo "<option value='$d'><br/>";
};
echo ' </datalist>';
?>
<input type="Submit" value="Search" class="login-btn btn-primary btn" style="padding-left: 25px;padding-right: 25px;padding-top: 10px;padding-bottom: 10px;">
<br>
<br>
</td>
</tr>
</table>
</center>
</td>
</tr>
<tr>
<td colspan="4">
<table border="0" width="100%"">
<tr>
<td width="50%">
<center>
<table class="filter-container" style="border: none;" border="0">
<tr>
<td colspan="4">
<p style="font-size: 20px;font-weight:600;padding-left: 12px;">Status</p>
</td>
</tr>
<tr>
<td style="width: 25%;">
<div class="dashboard-items" style="padding:20px;margin:auto;width:95%;display: flex">
<div>
<div class="h1-dashboard">
<?php echo $doctorrow->num_rows ?>
</div><br>
<div class="h3-dashboard">
All Doctors
</div>
</div>
<div class="btn-icon-back dashboard-icons" style="background-image: url('../img/icons/doctors-hover.svg');"></div>
</div>
</td>
<td style="width: 25%;">
<div class="dashboard-items" style="padding:20px;margin:auto;width:95%;display: flex;">
<div>
<div class="h1-dashboard">
<?php echo $patientrow->num_rows ?>
</div><br>
<div class="h3-dashboard">
All Patients
</div>
</div>
<div class="btn-icon-back dashboard-icons" style="background-image: url('../img/icons/patients-hover.svg');"></div>
</div>
</td>
</tr>
<tr>
<td style="width: 25%;">
<div class="dashboard-items" style="padding:20px;margin:auto;width:95%;display: flex; ">
<div>
<div class="h1-dashboard" >
<?php echo $appointmentrow ->num_rows ?>
</div><br>
<div class="h3-dashboard" >
NewBooking
</div>
</div>
<div class="btn-icon-back dashboard-icons" style="margin-left: 0px;background-image: url('../img/icons/book-hover.svg');"></div>
</div>
</td>
<td style="width: 25%;">
<div class="dashboard-items" style="padding:20px;margin:auto;width:95%;display: flex;padding-top:21px;padding-bottom:21px;">
<div>
<div class="h1-dashboard">
<?php echo $schedulerow ->num_rows ?>
</div><br>
<div class="h3-dashboard" style="font-size: 15px">
Today Sessions
</div>
</div>
<div class="btn-icon-back dashboard-icons" style="background-image: url('../img/icons/session-iceblue.svg');"></div>
</div>
</td>
</tr>
</table>
</center>
</td>
<td>
<p style="font-size: 20px;font-weight:600;padding-left: 40px;" class="anime">Your Upcoming Booking</p>
<center>
<div class="abc scroll" style="height: 250px;padding: 0;margin: 0;">
<table width="85%" class="sub-table scrolldown" border="0" >
<thead>
<tr>
<th class="table-headin">
Appoint. Number
</th>
<th class="table-headin">
Session Title
</th>
<th class="table-headin">
Doctor
</th>
<th class="table-headin">
Sheduled Date & Time
</th>
</tr>
</thead>
<tbody>
<?php
$nextweek=date("Y-m-d",strtotime("+1 week"));
$sqlmain= "select * from schedule inner join appointment on schedule.scheduleid=appointment.scheduleid inner join patient on patient.pid=appointment.pid inner join doctor on schedule.docid=doctor.docid where patient.pid=$userid and schedule.scheduledate>='$today' order by schedule.scheduledate asc";
//echo $sqlmain;
$result= $database->query($sqlmain);
if($result->num_rows==0){
echo '<tr>
<td colspan="4">
<br><br><br><br>
<center>
<img src="../img/notfound.svg" width="25%">
<br>
<p class="heading-main12" style="margin-left: 45px;font-size:20px;color:rgb(49, 49, 49)">Nothing to show here!</p>
<a class="non-style-link" href="https://www.w3wiki.netschedule.php"><button class="login-btn btn-primary-soft btn" style="display: flex;justify-content: center;align-items: center;margin-left:20px;"> Channel a Doctor </font></button>
</a>
</center>
<br><br><br><br>
</td>
</tr>';
}
else{
for ( $x=0; $x<$result->num_rows;$x++){
$row=$result->fetch_assoc();
$scheduleid=$row["scheduleid"];
$title=$row["title"];
$apponum=$row["apponum"];
$docname=$row["docname"];
$scheduledate=$row["scheduledate"];
$scheduletime=$row["scheduletime"];
echo '<tr>
<td style="padding:30px;font-size:25px;font-weight:700;"> '.
$apponum
.'</td>
<td style="padding:20px;"> '.
substr($title,0,30)
.'</td>
<td>
'.substr($docname,0,20).'
</td>
<td style="text-align:center;">
'.substr($scheduledate,0,10).' '.substr($scheduletime,0,5).'
</td>
</tr>';
}
}
?>
</tbody>
</table>
</div>
</center>
</td>
</tr>
</table>
</td>
<tr>
</table>
</div>
</div>
</body>
</html>
<!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">
<link rel="stylesheet" href="https://www.w3wiki.net../css/animations.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/main.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/admin.css">
<title>Patients</title>
<style>
.popup{
animation: transitionIn-Y-bottom 0.5s;
}
.sub-table{
animation: transitionIn-Y-bottom 0.5s;
}
</style>
</head>
<body>
<?php
session_start();
if(isset($_SESSION["user"])){
if(($_SESSION["user"])=="" or $_SESSION['usertype']!='d'){
header("location: ../login.php");
}else{
$useremail=$_SESSION["user"];
}
}else{
header("location: ../login.php");
}
include("../connection.php");
$sqlmain= "select * from doctor where docemail=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("s",$useremail);
$stmt->execute();
$userrow = $stmt->get_result();
$userfetch=$userrow->fetch_assoc();
$userid= $userfetch["docid"];
$username=$userfetch["docname"];
?>
<div class="container">
<div class="menu">
<table class="menu-container" border="0">
<tr>
<td style="padding:10px" colspan="2">
<table border="0" class="profile-container">
<tr>
<td width="30%" style="padding-left:20px" >
<img src="../img/user.png" alt="" width="100%" style="border-radius:50%">
</td>
<td style="padding:0px;margin:0px;">
<p class="profile-title"><?php echo substr($username,0,13) ?>..</p>
<p class="profile-subtitle"><?php echo substr($useremail,0,22) ?></p>
</td>
</tr>
<tr>
<td colspan="2">
<a href="https://www.w3wiki.net../logout.php" ><input type="button" value="Log out" class="logout-btn btn-primary-soft btn"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-dashbord" >
<a href="https://www.w3wiki.netindex.php" class="non-style-link-menu "><div><p class="menu-text">Dashboard</p></a></div></a>
</td>
</tr>
<tr class="menu-row">
<td class="menu-btn menu-icon-appoinment">
<a href="https://www.w3wiki.netappointment.php" class="non-style-link-menu"><div><p class="menu-text">My Appointments</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-session">
<a href="https://www.w3wiki.netschedule.php" class="non-style-link-menu"><div><p class="menu-text">My Sessions</p></div></a>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-patient menu-active menu-icon-patient-active">
<a href="https://www.w3wiki.netpatient.php" class="non-style-link-menu non-style-link-menu-active"><div><p class="menu-text">My Patients</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-settings ">
<a href="https://www.w3wiki.netsettings.php" class="non-style-link-menu"><div><p class="menu-text">Settings</p></a></div>
</td>
</tr>
</table>
</div>
<?php
$selecttype="My";
$current="My patients Only";
if($_POST){
if(isset($_POST["search"])){
$keyword=$_POST["search12"];
/*TODO: make and understand */
$sqlmain= "select * from patient where pemail='$keyword' or pname='$keyword' or pname like '$keyword%' or pname like '%$keyword' or pname like '%$keyword%' ";
$selecttype="my";
}
if(isset($_POST["filter"])){
if($_POST["showonly"]=='all'){
$sqlmain= "select * from patient";
$selecttype="All";
$current="All patients";
}else{
$sqlmain= "select * from appointment inner join patient on patient.pid=appointment.pid inner join schedule on schedule.scheduleid=appointment.scheduleid where schedule.docid=$userid;";
$selecttype="My";
$current="My patients Only";
}
}
}else{
$sqlmain= "select * from appointment inner join patient on patient.pid=appointment.pid inner join schedule on schedule.scheduleid=appointment.scheduleid where schedule.docid=$userid;";
$selecttype="My";
}
?>
<div class="dash-body">
<table border="0" width="100%" style=" border-spacing: 0;margin:0;padding:0;margin-top:25px; ">
<tr >
<td width="13%">
<a href="https://www.w3wiki.netpatient.php" ><button class="login-btn btn-primary-soft btn btn-icon-back" style="padding-top:11px;padding-bottom:11px;margin-left:20px;width:125px"><font class="tn-in-text">Back</font></button></a>
</td>
<td>
<form action="" method="post" class="header-search">
<input type="search" name="search12" class="input-text header-searchbar" placeholder="Search Patient name or Email" list="patient">
<?php
echo '<datalist id="patient">';
$list11 = $database->query($sqlmain);
//$list12= $database->query("select * from appointment inner join patient on patient.pid=appointment.pid inner join schedule on schedule.scheduleid=appointment.scheduleid where schedule.docid=1;");
for ($y=0;$y<$list11->num_rows;$y++){
$row00=$list11->fetch_assoc();
$d=$row00["pname"];
$c=$row00["pemail"];
echo "<option value='$d'><br/>";
echo "<option value='$c'><br/>";
};
echo ' </datalist>';
?>
<input type="Submit" value="Search" name="search" class="login-btn btn-primary btn" style="padding-left: 25px;padding-right: 25px;padding-top: 10px;padding-bottom: 10px;">
</form>
</td>
<td width="15%">
<p style="font-size: 14px;color: rgb(119, 119, 119);padding: 0;margin: 0;text-align: right;">
Today's Date
</p>
<p class="heading-sub12" style="padding: 0;margin: 0;">
<?php
date_default_timezone_set('Asia/Kolkata');
$date = date('Y-m-d');
echo $date;
?>
</p>
</td>
<td width="10%">
<button class="btn-label" style="display: flex;justify-content: center;align-items: center;"><img src="../img/calendar.svg" width="100%"></button>
</td>
</tr>
<tr>
<td colspan="4" style="padding-top:10px;">
<p class="heading-main12" style="margin-left: 45px;font-size:18px;color:rgb(49, 49, 49)"><?php echo $selecttype." Patients (".$list11->num_rows.")"; ?></p>
</td>
</tr>
<tr>
<td colspan="4" style="padding-top:0px;width: 100%;" >
<center>
<table class="filter-container" border="0" >
<form action="" method="post">
<td style="text-align: right;">
Show Details About :
</td>
<td width="30%">
<select name="showonly" id="" class="box filter-container-items" style="width:90% ;height: 37px;margin: 0;" >
<option value="" disabled selected hidden><?php echo $current ?></option><br/>
<option value="my">My Patients Only</option><br/>
<option value="all">All Patients</option><br/>
</select>
</td>
<td width="12%">
<input type="submit" name="filter" value=" Filter" class=" btn-primary-soft btn button-icon btn-filter" style="padding: 15px; margin :0;width:100%">
</form>
</td>
</tr>
</table>
</center>
</td>
</tr>
<tr>
<td colspan="4">
<center>
<div class="abc scroll">
<table width="93%" class="sub-table scrolldown" style="border-spacing:0;">
<thead>
<tr>
<th class="table-headin">
Name
</th>
<th class="table-headin">
NIC
</th>
<th class="table-headin">
Telephone
</th>
<th class="table-headin">
Email
</th>
<th class="table-headin">
Date of Birth
</th>
<th class="table-headin">
Events
</tr>
</thead>
<tbody>
<?php
$result= $database->query($sqlmain);
//echo $sqlmain;
if($result->num_rows==0){
echo '<tr>
<td colspan="4">
<br><br><br><br>
<center>
<img src="../img/notfound.svg" width="25%">
<br>
<p class="heading-main12" style="margin-left: 45px;font-size:20px;color:rgb(49, 49, 49)">We couldnt find anything related to your keywords !</p>
<a class="non-style-link" href="https://www.w3wiki.netpatient.php"><button class="login-btn btn-primary-soft btn" style="display: flex;justify-content: center;align-items: center;margin-left:20px;"> Show all Patients </font></button>
</a>
</center>
<br><br><br><br>
</td>
</tr>';
}
else{
for ( $x=0; $x<$result->num_rows;$x++){
$row=$result->fetch_assoc();
$pid=$row["pid"];
$name=$row["pname"];
$email=$row["pemail"];
$nic=$row["pnic"];
$dob=$row["pdob"];
$tel=$row["ptel"];
echo '<tr>
<td> '.
substr($name,0,35)
.'</td>
<td>
'.substr($nic,0,12).'
</td>
<td>
'.substr($tel,0,10).'
</td>
<td>
'.substr($email,0,20).'
</td>
<td>
'.substr($dob,0,10).'
</td>
<td >
<div style="display:flex;justify-content: center;">
<a href="https://www.w3wiki.net?action=view&id='.$pid.'" class="non-style-link"><button class="btn-primary-soft btn button-icon btn-view" style="padding-left: 40px;padding-top: 12px;padding-bottom: 12px;margin-top: 10px;"><font class="tn-in-text">View</font></button></a>
</div>
</td>
</tr>';
}
}
?>
</tbody>
</table>
</div>
</center>
</td>
</tr>
</table>
</div>
</div>
<?php
if($_GET){
$id=$_GET["id"];
$action=$_GET["action"];
$sqlmain= "select * from patient where pid=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("i",$id);
$stmt->execute();
$result = $stmt->get_result();
$row=$result->fetch_assoc();
$name=$row["pname"];
$email=$row["pemail"];
$nic=$row["pnic"];
$dob=$row["pdob"];
$tele=$row["ptel"];
$address=$row["paddress"];
echo '
<div id="popup1" class="overlay">
<div class="popup">
<center>
<a class="close" href="https://www.w3wiki.netpatient.php">×</a>
<div class="content">
</div>
<div style="display: flex;justify-content: center;">
<table width="80%" class="sub-table scrolldown add-doc-form-container" border="0">
<tr>
<td>
<p style="padding: 0;margin: 0;text-align: left;font-size: 25px;font-weight: 500;">View Details.</p><br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="name" class="form-label">Patient ID: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
P-'.$id.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="name" class="form-label">Name: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$name.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="Email" class="form-label">Email: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$email.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="nic" class="form-label">NIC: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$nic.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="Tele" class="form-label">Telephone: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$tele.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="spec" class="form-label">Address: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$address.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="name" class="form-label">Date of Birth: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$dob.'<br><br>
</td>
</tr>
<tr>
<td colspan="2">
<a href="https://www.w3wiki.netpatient.php"><input type="button" value="OK" class="login-btn btn-primary-soft btn" ></a>
</td>
</tr>
</table>
</div>
</center>
<br><br>
</div>
</div>
';
};
?>
</div>
</body>
</html>
<!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">
<link rel="stylesheet" href="https://www.w3wiki.net../css/animations.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/main.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/admin.css">
<title>Sessions</title>
<style>
.popup{
animation: transitionIn-Y-bottom 0.5s;
}
.sub-table{
animation: transitionIn-Y-bottom 0.5s;
}
</style>
</head>
<body>
<?php
session_start();
if(isset($_SESSION["user"])){
if(($_SESSION["user"])=="" or $_SESSION['usertype']!='p'){
header("location: ../login.php");
}else{
$useremail=$_SESSION["user"];
}
}else{
header("location: ../login.php");
}
include("../connection.php");
$sqlmain= "select * from patient where pemail=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("s",$useremail);
$stmt->execute();
$result = $stmt->get_result();
$userfetch=$userrow->fetch_assoc();
$userid= $userfetch["pid"];
$username=$userfetch["pname"];
date_default_timezone_set('Asia/Kolkata');
$today = date('Y-m-d');
?>
<div class="container">
<div class="menu">
<table class="menu-container" border="0">
<tr>
<td style="padding:10px" colspan="2">
<table border="0" class="profile-container">
<tr>
<td width="30%" style="padding-left:20px" >
<img src="../img/user.png" alt="" width="100%" style="border-radius:50%">
</td>
<td style="padding:0px;margin:0px;">
<p class="profile-title"><?php echo substr($username,0,13) ?>..</p>
<p class="profile-subtitle"><?php echo substr($useremail,0,22) ?></p>
</td>
</tr>
<tr>
<td colspan="2">
<a href="https://www.w3wiki.net../logout.php" ><input type="button" value="Log out" class="logout-btn btn-primary-soft btn"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-home " >
<a href="https://www.w3wiki.netindex.php" class="non-style-link-menu "><div><p class="menu-text">Home</p></a></div></a>
</td>
</tr>
<tr class="menu-row">
<td class="menu-btn menu-icon-doctor">
<a href="https://www.w3wiki.netdoctors.php" class="non-style-link-menu"><div><p class="menu-text">All Doctors</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-session menu-active menu-icon-session-active">
<a href="https://www.w3wiki.netschedule.php" class="non-style-link-menu non-style-link-menu-active"><div><p class="menu-text">Scheduled Sessions</p></div></a>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-appoinment">
<a href="https://www.w3wiki.netappointment.php" class="non-style-link-menu"><div><p class="menu-text">My Bookings</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-settings">
<a href="https://www.w3wiki.netsettings.php" class="non-style-link-menu"><div><p class="menu-text">Settings</p></a></div>
</td>
</tr>
</table>
</div>
<?php
$sqlmain= "select * from schedule inner join doctor on schedule.docid=doctor.docid where schedule.scheduledate>='$today' order by schedule.scheduledate asc";
$sqlpt1="";
$insertkey="";
$q='';
$searchtype="All";
if($_POST){
//print_r($_POST);
if(!empty($_POST["search"])){
$keyword=$_POST["search"];
$sqlmain= "select * from schedule inner join doctor on schedule.docid=doctor.docid where schedule.scheduledate>='$today' and (doctor.docname='$keyword' or doctor.docname like '$keyword%' or doctor.docname like '%$keyword' or doctor.docname like '%$keyword%' or schedule.title='$keyword' or schedule.title like '$keyword%' or schedule.title like '%$keyword' or schedule.title like '%$keyword%' or schedule.scheduledate like '$keyword%' or schedule.scheduledate like '%$keyword' or schedule.scheduledate like '%$keyword%' or schedule.scheduledate='$keyword' ) order by schedule.scheduledate asc";
$insertkey=$keyword;
$searchtype="Search Result : ";
$q='"';
}
}
$result= $database->query($sqlmain)
?>
<div class="dash-body">
<table border="0" width="100%" style=" border-spacing: 0;margin:0;padding:0;margin-top:25px; ">
<tr >
<td width="13%" >
<a href="https://www.w3wiki.netschedule.php" ><button class="login-btn btn-primary-soft btn btn-icon-back" style="padding-top:11px;padding-bottom:11px;margin-left:20px;width:125px"><font class="tn-in-text">Back</font></button></a>
</td>
<td >
<form action="" method="post" class="header-search">
<input type="search" name="search" class="input-text header-searchbar" placeholder="Search Doctor name or Email or Date (YYYY-MM-DD)" list="doctors" value="<?php echo $insertkey ?>">
<?php
echo '<datalist id="doctors">';
$list11 = $database->query("select DISTINCT * from doctor;");
$list12 = $database->query("select DISTINCT * from schedule GROUP BY title;");
for ($y=0;$y<$list11->num_rows;$y++){
$row00=$list11->fetch_assoc();
$d=$row00["docname"];
echo "<option value='$d'><br/>";
};
for ($y=0;$y<$list12->num_rows;$y++){
$row00=$list12->fetch_assoc();
$d=$row00["title"];
echo "<option value='$d'><br/>";
};
echo ' </datalist>';
?>
<input type="Submit" value="Search" class="login-btn btn-primary btn" style="padding-left: 25px;padding-right: 25px;padding-top: 10px;padding-bottom: 10px;">
</form>
</td>
<td width="15%">
<p style="font-size: 14px;color: rgb(119, 119, 119);padding: 0;margin: 0;text-align: right;">
Today's Date
</p>
<p class="heading-sub12" style="padding: 0;margin: 0;">
<?php
echo $today;
?>
</p>
</td>
<td width="10%">
<button class="btn-label" style="display: flex;justify-content: center;align-items: center;"><img src="../img/calendar.svg" width="100%"></button>
</td>
</tr>
<tr>
<td colspan="4" style="padding-top:10px;width: 100%;" >
<p class="heading-main12" style="margin-left: 45px;font-size:18px;color:rgb(49, 49, 49)"><?php echo $searchtype." Sessions"."(".$result->num_rows.")"; ?> </p>
<p class="heading-main12" style="margin-left: 45px;font-size:22px;color:rgb(49, 49, 49)"><?php echo $q.$insertkey.$q ; ?> </p>
</td>
</tr>
<tr>
<td colspan="4">
<center>
<div class="abc scroll">
<table width="100%" class="sub-table scrolldown" border="0" style="padding: 50px;border:none">
<tbody>
<?php
if($result->num_rows==0){
echo '<tr>
<td colspan="4">
<br><br><br><br>
<center>
<img src="../img/notfound.svg" width="25%">
<br>
<p class="heading-main12" style="margin-left: 45px;font-size:20px;color:rgb(49, 49, 49)">We couldnt find anything related to your keywords !</p>
<a class="non-style-link" href="https://www.w3wiki.netschedule.php"><button class="login-btn btn-primary-soft btn" style="display: flex;justify-content: center;align-items: center;margin-left:20px;"> Show all Sessions </font></button>
</a>
</center>
<br><br><br><br>
</td>
</tr>';
}
else{
//echo $result->num_rows;
for ( $x=0; $x<($result->num_rows);$x++){
echo "<tr>";
for($q=0;$q<3;$q++){
$row=$result->fetch_assoc();
if (!isset($row)){
break;
};
$scheduleid=$row["scheduleid"];
$title=$row["title"];
$docname=$row["docname"];
$scheduledate=$row["scheduledate"];
$scheduletime=$row["scheduletime"];
if($scheduleid==""){
break;
}
echo '
<td style="width: 25%;">
<div class="dashboard-items search-items" >
<div style="width:100%">
<div class="h1-search">
'.substr($title,0,21).'
</div><br>
<div class="h3-search">
'.substr($docname,0,30).'
</div>
<div class="h4-search">
'.$scheduledate.'<br>Starts: <b>@'.substr($scheduletime,0,5).'</b> (24h)
</div>
<br>
<a href="https://www.w3wiki.netbooking.php?id='.$scheduleid.'" ><button class="login-btn btn-primary-soft btn " style="padding-top:11px;padding-bottom:11px;width:100%"><font class="tn-in-text">Book Now</font></button></a>
</div>
</div>
</td>';
}
echo "</tr>";
}
}
?>
</tbody>
</table>
</div>
</center>
</td>
</tr>
</table>
</div>
</div>
</div>
</body>
</html>
<!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">
<link rel="stylesheet" href="https://www.w3wiki.net../css/animations.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/main.css">
<link rel="stylesheet" href="https://www.w3wiki.net../css/admin.css">
<title>Settings</title>
<style>
.dashbord-tables{
animation: transitionIn-Y-over 0.5s;
}
.filter-container{
animation: transitionIn-X 0.5s;
}
.sub-table{
animation: transitionIn-Y-bottom 0.5s;
}
</style>
</head>
<body>
<?php
session_start();
if(isset($_SESSION["user"])){
if(($_SESSION["user"])=="" or $_SESSION['usertype']!='p'){
header("location: ../login.php");
}else{
$useremail=$_SESSION["user"];
}
}else{
header("location: ../login.php");
}
include("../connection.php");
$sqlmain= "select * from patient where pemail=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("s",$useremail);
$stmt->execute();
$result = $stmt->get_result();
$userfetch=$result->fetch_assoc();
$userid= $userfetch["pid"];
$username=$userfetch["pname"];
?>
<div class="container">
<div class="menu">
<table class="menu-container" border="0">
<tr>
<td style="padding:10px" colspan="2">
<table border="0" class="profile-container">
<tr>
<td width="30%" style="padding-left:20px" >
<img src="../img/user.png" alt="" width="100%" style="border-radius:50%">
</td>
<td style="padding:0px;margin:0px;">
<p class="profile-title"><?php echo substr($username,0,13) ?>..</p>
<p class="profile-subtitle"><?php echo substr($useremail,0,22) ?></p>
</td>
</tr>
<tr>
<td colspan="2">
<a href="https://www.w3wiki.net../logout.php" ><input type="button" value="Log out" class="logout-btn btn-primary-soft btn"></a>
</td>
</tr>
</table>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-home " >
<a href="https://www.w3wiki.netindex.php" class="non-style-link-menu "><div><p class="menu-text">Home</p></a></div></a>
</td>
</tr>
<tr class="menu-row">
<td class="menu-btn menu-icon-doctor">
<a href="https://www.w3wiki.netdoctors.php" class="non-style-link-menu"><div><p class="menu-text">All Doctors</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-session">
<a href="https://www.w3wiki.netschedule.php" class="non-style-link-menu"><div><p class="menu-text">Scheduled Sessions</p></div></a>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-appoinment">
<a href="https://www.w3wiki.netappointment.php" class="non-style-link-menu"><div><p class="menu-text">My Bookings</p></a></div>
</td>
</tr>
<tr class="menu-row" >
<td class="menu-btn menu-icon-settings menu-active menu-icon-settings-active">
<a href="https://www.w3wiki.netsettings.php" class="non-style-link-menu non-style-link-menu-active"><div><p class="menu-text">Settings</p></a></div>
</td>
</tr>
</table>
</div>
<div class="dash-body" style="margin-top: 15px">
<table border="0" width="100%" style=" border-spacing: 0;margin:0;padding:0;" >
<tr >
<td width="13%" >
<a href="https://www.w3wiki.netsettings.php" ><button class="login-btn btn-primary-soft btn btn-icon-back" style="padding-top:11px;padding-bottom:11px;margin-left:20px;width:125px"><font class="tn-in-text">Back</font></button></a>
</td>
<td>
<p style="font-size: 23px;padding-left:12px;font-weight: 600;">Settings</p>
</td>
<td width="15%">
<p style="font-size: 14px;color: rgb(119, 119, 119);padding: 0;margin: 0;text-align: right;">
Today's Date
</p>
<p class="heading-sub12" style="padding: 0;margin: 0;">
<?php
date_default_timezone_set('Asia/Kolkata');
$today = date('Y-m-d');
echo $today;
$patientrow = $database->query("select * from patient;");
$doctorrow = $database->query("select * from doctor;");
$appointmentrow = $database->query("select * from appointment where appodate>='$today';");
$schedulerow = $database->query("select * from schedule where scheduledate='$today';");
?>
</p>
</td>
<td width="10%">
<button class="btn-label" style="display: flex;justify-content: center;align-items: center;"><img src="../img/calendar.svg" width="100%"></button>
</td>
</tr>
<tr>
<td colspan="4">
<center>
<table class="filter-container" style="border: none;" border="0">
<tr>
<td colspan="4">
<p style="font-size: 20px"> </p>
</td>
</tr>
<tr>
<td style="width: 25%;">
<a href="https://www.w3wiki.net?action=edit&id=<?php echo $userid ?>&error=0" class="non-style-link">
<div class="dashboard-items setting-tabs" style="padding:20px;margin:auto;width:95%;display: flex">
<div class="btn-icon-back dashboard-icons-setting" style="background-image: url('../img/icons/doctors-hover.svg');"></div>
<div>
<div class="h1-dashboard">
Account Settings
</div><br>
<div class="h3-dashboard" style="font-size: 15px;">
Edit your Account Details & Change Password
</div>
</div>
</div>
</a>
</td>
</tr>
<tr>
<td colspan="4">
<p style="font-size: 5px"> </p>
</td>
</tr>
<tr>
<td style="width: 25%;">
<a href="https://www.w3wiki.net?action=view&id=<?php echo $userid ?>" class="non-style-link">
<div class="dashboard-items setting-tabs" style="padding:20px;margin:auto;width:95%;display: flex;">
<div class="btn-icon-back dashboard-icons-setting " style="background-image: url('../img/icons/view-iceblue.svg');"></div>
<div>
<div class="h1-dashboard" >
View Account Details
</div><br>
<div class="h3-dashboard" style="font-size: 15px;">
View Personal information About Your Account
</div>
</div>
</div>
</a>
</td>
</tr>
<tr>
<td colspan="4">
<p style="font-size: 5px"> </p>
</td>
</tr>
<tr>
<td style="width: 25%;">
<a href="https://www.w3wiki.net?action=drop&id=<?php echo $userid.'&name='.$username ?>" class="non-style-link">
<div class="dashboard-items setting-tabs" style="padding:20px;margin:auto;width:95%;display: flex;">
<div class="btn-icon-back dashboard-icons-setting" style="background-image: url('../img/icons/patients-hover.svg');"></div>
<div>
<div class="h1-dashboard" style="color: #ff5050;">
Delete Account
</div><br>
<div class="h3-dashboard" style="font-size: 15px;">
Will Permanently Remove your Account
</div>
</div>
</div>
</a>
</td>
</tr>
</table>
</center>
</td>
</tr>
</table>
</div>
</div>
<?php
if($_GET){
$id=$_GET["id"];
$action=$_GET["action"];
if($action=='drop'){
$nameget=$_GET["name"];
echo '
<div id="popup1" class="overlay">
<div class="popup">
<center>
<h2>Are you sure?</h2>
<a class="close" href="https://www.w3wiki.netsettings.php">×</a>
<div class="content">
You want to delete Your Account<br>('.substr($nameget,0,40).').
</div>
<div style="display: flex;justify-content: center;">
<a href="https://www.w3wiki.netdelete-account.php?id='.$id.'" class="non-style-link"><button class="btn-primary btn" style="display: flex;justify-content: center;align-items: center;margin:10px;padding:10px;"<font class="tn-in-text"> Yes </font></button></a>
<a href="https://www.w3wiki.netsettings.php" class="non-style-link"><button class="btn-primary btn" style="display: flex;justify-content: center;align-items: center;margin:10px;padding:10px;"><font class="tn-in-text"> No </font></button></a>
</div>
</center>
</div>
</div>
';
}elseif($action=='view'){
$sqlmain= "select * from patient where pid=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("i", $id);
$stmt->execute();
$result = $stmt->get_result();
$row=$result->fetch_assoc();
$name=$row["pname"];
$email=$row["pemail"];
$address=$row["paddress"];
$dob=$row["pdob"];
$nic=$row['pnic'];
$tele=$row['ptel'];
echo '
<div id="popup1" class="overlay">
<div class="popup">
<center>
<h2></h2>
<a class="close" href="https://www.w3wiki.netsettings.php">×</a>
<div class="content">
eDoc Web App<br>
</div>
<div style="display: flex;justify-content: center;">
<table width="80%" class="sub-table scrolldown add-doc-form-container" border="0">
<tr>
<td>
<p style="padding: 0;margin: 0;text-align: left;font-size: 25px;font-weight: 500;">View Details.</p><br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="name" class="form-label">Name: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$name.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="Email" class="form-label">Email: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$email.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="nic" class="form-label">NIC: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$nic.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="Tele" class="form-label">Telephone: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$tele.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="spec" class="form-label">Address: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$address.'<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="spec" class="form-label">Date of Birth: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
'.$dob.'<br><br>
</td>
</tr>
<tr>
<td colspan="2">
<a href="https://www.w3wiki.netsettings.php"><input type="button" value="OK" class="login-btn btn-primary-soft btn" ></a>
</td>
</tr>
</table>
</div>
</center>
<br><br>
</div>
</div>
';
}elseif($action=='edit'){
$sqlmain= "select * from patient where pid=?";
$stmt = $database->prepare($sqlmain);
$stmt->bind_param("i", $id);
$stmt->execute();
$result = $stmt->get_result();
$row=$result->fetch_assoc();
$name=$row["pname"];
$email=$row["pemail"];
$address=$row["paddress"];
$nic=$row['pnic'];
$tele=$row['ptel'];
$error_1=$_GET["error"];
$errorlist= array(
'1'=>'<label for="promter" class="form-label" style="color:rgb(255, 62, 62);text-align:center;">Already have an account for this Email address.</label>',
'2'=>'<label for="promter" class="form-label" style="color:rgb(255, 62, 62);text-align:center;">Password Conformation Error! Reconform Password</label>',
'3'=>'<label for="promter" class="form-label" style="color:rgb(255, 62, 62);text-align:center;"></label>',
'4'=>"",
'0'=>'',
);
if($error_1!='4'){
echo '
<div id="popup1" class="overlay">
<div class="popup">
<center>
<a class="close" href="https://www.w3wiki.netsettings.php">×</a>
<div style="display: flex;justify-content: center;">
<div class="abc">
<table width="80%" class="sub-table scrolldown add-doc-form-container" border="0">
<tr>
<td class="label-td" colspan="2">'.
$errorlist[$error_1]
.'</td>
</tr>
<tr>
<td>
<p style="padding: 0;margin: 0;text-align: left;font-size: 25px;font-weight: 500;">Edit User Account Details.</p>
User ID : '.$id.' (Auto Generated)<br><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<form action="edit-user.php" method="POST" class="add-new-form">
<label for="Email" class="form-label">Email: </label>
<input type="hidden" value="'.$id.'" name="id00">
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<input type="hidden" name="oldemail" value="'.$email.'" >
<input type="email" name="email" class="input-text" placeholder="Email Address" value="'.$email.'" required><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="name" class="form-label">Name: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<input type="text" name="name" class="input-text" placeholder="Doctor Name" value="'.$name.'" required><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="nic" class="form-label">NIC: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<input type="text" name="nic" class="input-text" placeholder="NIC Number" value="'.$nic.'" required><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="Tele" class="form-label">Telephone: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<input type="tel" name="Tele" class="input-text" placeholder="Telephone Number" value="'.$tele.'" required><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="spec" class="form-label">Address</label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<input type="text" name="address" class="input-text" placeholder="Address" value="'.$address.'" required><br>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<label for="password" class="form-label">Password: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<input type="password" name="password" class="input-text" placeholder="Defind a Password" required><br>
</td>
</tr><tr>
<td class="label-td" colspan="2">
<label for="cpassword" class="form-label">Conform Password: </label>
</td>
</tr>
<tr>
<td class="label-td" colspan="2">
<input type="password" name="cpassword" class="input-text" placeholder="Conform Password" required><br>
</td>
</tr>
<tr>
<td colspan="2">
<input type="reset" value="Reset" class="login-btn btn-primary-soft btn" >
<input type="submit" value="Save" class="login-btn btn-primary btn">
</td>
</tr>
</form>
</tr>
</table>
</div>
</div>
</center>
<br><br>
</div>
</div>
';
}else{
echo '
<div id="popup1" class="overlay">
<div class="popup">
<center>
<br><br><br><br>
<h2>Edit Successfully!</h2>
<a class="close" href="https://www.w3wiki.netsettings.php">×</a>
<div class="content">
If You change your email also Please logout and login again with your new email
</div>
<div style="display: flex;justify-content: center;">
<a href="https://www.w3wiki.netsettings.php" class="non-style-link"><button class="btn-primary btn" style="display: flex;justify-content: center;align-items: center;margin:10px;padding:10px;"><font class="tn-in-text"> OK </font></button></a>
<a href="https://www.w3wiki.net../logout.php" class="non-style-link"><button class="btn-primary-soft btn" style="display: flex;justify-content: center;align-items: center;margin:10px;padding:10px;"><font class="tn-in-text"> Log out </font></button></a>
</div>
<br><br>
</center>
</div>
</div>
';
}; }
}
?>
</body>
</html>
Hospital Management System Project in Software Development
Hospital Management System (HMS) is one of the most common software development projects. In this article, we will make the Hospital Management System software development project, from scratch, for final-year students. We will cover all the steps you must do while developing this project.
Table of Content
- Step 1- Team Formation Phase: Creating a Dynamic Team
- Step 2- Topic Selection
- Step 3- Project Synopsys for Hospital Management System
- Step 4- Requirement Gathering (Creating SRS for Hospital Management System)
- Software Requirement Specification (SRS) Document | Hospital Management System
- 4.1 SRS (Hospital Management System) | Introduction:
- 4.2 SRS (Hospital Management System) | Overall Description:
- 4.2.3 Class Diagram of Library Management System:
- 4.3 SRS (Hospital Management System) | Designing Hospital Management System:
- 4.3.1 Use case Diagram for Hospital Management System:
- 4.3.2 ER Model of Hospital Management System:
- 4.3.3 Data Flow Diagram of Hospital Management System
- 4.3.4 Sequence Diagram of Hospital Management System
- 4.3.5 Activity Diagram of Hospital Management System
- 4.4 Functional Requirements | SRS (Hospital Management System)
- 4.5 Non Functional Requirements | SRS (Hospital Management System)
- 5. Coding or Implementation of Hospital Mangement System
- 5.1 Implementing Hospital Management System | Environment Creation:
- 5.2 Implementing Hospital Mangement System | Database Creation:
- 5.3 Implementing Hospital Mangement System | Frontend and Backend Development:
- 5.3.1 Step 1: Creation of Login & Signup page Module:
- 5.3.2 Step 2: Creating Patient Module:
- 5.3.3 Step 3: Creating Doctors Module:
- 5.3.4 Step 4: Creating Admin module
- Step 6- Testing Hospital Management System
- Step 7- Creating Project Presentation on Hospital Management System:
- Check Out Some Other CS Relate Projects down below:
Project Development is a multiphase process in which every process is equally important. Here in this post, we are also going to develop our Hospital Management System Project in multiple phases, such as:
- Team Formation
- Topic Selection
- Creating Project Synopsys
- Requirement Gathering
- Coding or Implementation
- Testing
- Project Presentation
Let us look into the steps one by one.