Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
7032CEM/engineer-panel.php
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
221 lines (195 sloc)
9.74 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<?php | |
include('func1.php'); | |
$con=mysqli_connect("localhost","root","","myhmsdb"); | |
$doctor = $_SESSION['dname']; | |
if(isset($_GET['cancel'])) | |
{ | |
$query=mysqli_query($con,"update appointmenttb set doctorStatus='0' where ID = '".$_GET['ID']."'"); | |
if($query) | |
{ | |
echo "<script>alert('Job Completed');</script>"; | |
} | |
} | |
?> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="stylesheet" type="text/css" href="font-awesome-4.7.0/css/font-awesome.min.css"> | |
<link rel="stylesheet" href="style.css"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="vendor/fontawesome/css/font-awesome.min.css"> | |
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.png" /> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous"> | |
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> | |
<link href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans&display=swap" rel="stylesheet"> | |
<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top"> | |
<a class="navbar-brand" href="#"><i class="fa fa-user-plus" aria-hidden="true"></i>Engineer's Panel </a> | |
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation"> | |
<span class="navbar-toggler-icon"></span> | |
</button> | |
<style > | |
.btn-outline-light:hover{ | |
color: #25bef7; | |
background-color: #f8f9fa; | |
border-color: #f8f9fa; | |
} | |
</style> | |
<style > | |
.bg-primary { | |
background: -webkit-linear-gradient(left, #3931af, #00c6ff); | |
} | |
.list-group-item.active { | |
z-index: 2; | |
color: #fff; | |
background-color: #342ac1; | |
border-color: #007bff; | |
} | |
.text-primary { | |
color: #342ac1!important; | |
} | |
</style> | |
<div class="collapse navbar-collapse" id="navbarSupportedContent"> | |
<ul class="navbar-nav mr-auto"> | |
<li class="nav-item"> | |
<a class="nav-link" href="logout1.php"><i class="fa fa-sign-out" aria-hidden="true"></i>Logout</a> | |
</li> | |
<li class="nav-item"> | |
<a class="nav-link" href="#"></a> | |
</li> | |
</ul> | |
<form class="form-inline my-2 my-lg-0" method="post" action="search.php"> | |
<input class="form-control mr-sm-2" type="text" placeholder="Enter contact number" aria-label="Search" name="contact"> | |
<input type="submit" class="btn btn-outline-light" id="inputbtn" name="search_submit" value="Search"> | |
</form> | |
</div> | |
</nav> | |
</head> | |
<style type="text/css"> | |
button:hover{cursor:pointer;} | |
#inputbtn:hover{cursor:pointer;} | |
</style> | |
<body style="padding-top:50px;"> | |
<div class="container-fluid" style="margin-top:50px;"> | |
<h3 style = "margin-left: 40%; padding-bottom: 20px;font-family:'IBM Plex Sans', sans-serif;"> Welcome  <?php echo $_SESSION['dname'] ?> </h3> | |
<div class="row"> | |
<div class="col-md-4" style="max-width:18%;margin-top: 3%;"> | |
<div class="list-group" id="list-tab" role="tablist"> | |
<a class="list-group-item list-group-item-action active" href="#list-dash" role="tab" aria-controls="home" data-toggle="list">Dashboard</a> | |
<a class="list-group-item list-group-item-action" href="#list-app" id="list-app-list" role="tab" data-toggle="list" aria-controls="home">Scheduled Work</a> | |
</div><br> | |
</div> | |
<div class="col-md-8" style="margin-top: 3%;"> | |
<div class="tab-content" id="nav-tabContent" style="width: 950px;"> | |
<div class="tab-pane fade show active" id="list-dash" role="tabpanel" aria-labelledby="list-dash-list"> | |
<div class="container-fluid container-fullw bg-white" > | |
<div class="row"> | |
<div class="col-sm-4" style="left: 10%"> | |
<div class="panel panel-white no-radius text-center"> | |
<div class="panel-body"> | |
<span class="fa-stack fa-2x"> <i class="fa fa-square fa-stack-2x text-primary"></i> <i class="fa fa-list fa-stack-1x fa-inverse"></i> </span> | |
<h4 class="StepTitle" style="margin-top: 5%;"> View Work</h4> | |
<script> | |
function clickDiv(id) { | |
document.querySelector(id).click(); | |
} | |
</script> | |
<p class="links cl-effect-1"> | |
<a href="#list-app" onclick="clickDiv('#list-app-list')"> | |
Scheduled Work List | |
</a> | |
</p> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="tab-pane fade" id="list-app" role="tabpanel" aria-labelledby="list-home-list"> | |
<table class="table table-hover"> | |
<thead> | |
<tr> | |
<th scope="col">Customer ID</th> | |
<th scope="col">Work ID</th> | |
<th scope="col">First Name</th> | |
<th scope="col">Last Name</th> | |
<th scope="col">Email</th> | |
<th scope="col">Contact</th> | |
<th scope="col">Work Due Date</th> | |
<th scope="col">Work Due Time</th> | |
<th scope="col">Current Status</th> | |
<th scope="col">Action</th> | |
<th scope="col">Bill</th> | |
</tr> | |
</thead> | |
<tbody> | |
<?php | |
$con=mysqli_connect("localhost","root","","myhmsdb"); | |
global $con; | |
$dname = $_SESSION['dname']; | |
$query = "select pid,ID,fname,lname,email,contact,appdate,apptime,userStatus,doctorStatus from appointmenttb where doctor='$dname';"; | |
$result = mysqli_query($con,$query); | |
while ($row = mysqli_fetch_array($result)){ | |
?> | |
<tr> | |
<td><?php echo $row['pid'];?></td> | |
<td><?php echo $row['ID'];?></td> | |
<td><?php echo $row['fname'];?></td> | |
<td><?php echo $row['lname'];?></td> | |
<td><?php echo $row['email'];?></td> | |
<td><?php echo $row['contact'];?></td> | |
<td><?php echo $row['appdate'];?></td> | |
<td><?php echo $row['apptime'];?></td> | |
<td> | |
<?php if(($row['userStatus']==1) && ($row['doctorStatus']==1)) | |
{ | |
echo "Active"; | |
} | |
if(($row['userStatus']==0) && ($row['doctorStatus']==1)) | |
{ | |
echo "Cancelled by Customer"; | |
} | |
if(($row['userStatus']==1) && ($row['doctorStatus']==0)) | |
{ | |
echo "Completed by You"; | |
} | |
?></td> | |
<td> | |
<?php if(($row['userStatus']==1) && ($row['doctorStatus']==1)) | |
{ ?> | |
<a href="doctor-panel.php?ID=<?php echo $row['ID']?>&cancel=update" | |
onClick="return confirm('Are you sure you completed this work ?')" | |
title="Complete Work" tooltip-placement="top" tooltip="Remove"><button class="btn btn-danger">Complete</button></a> | |
<?php } else { | |
echo "Completed"; | |
} ?> | |
</td> | |
<td> | |
<?php if(($row['userStatus']==1) && ($row['doctorStatus']==1)) | |
{ ?> | |
<a href="prescribe.php?pid=<?php echo $row['pid']?>&ID=<?php echo $row['ID']?>&fname=<?php echo $row['fname']?>&lname=<?php echo $row['lname']?>&appdate=<?php echo $row['appdate']?>&apptime=<?php echo $row['apptime']?>" | |
tooltip-placement="top" tooltip="Remove" title="prescribe"> | |
<button class="btn btn-success">Output Bill</button></a> | |
<?php } else { | |
echo "-"; | |
} ?> | |
</td> | |
</tr></a> | |
<?php } ?> | |
</tbody> | |
</table> | |
<br> | |
</div> | |
</div> | |
</div> | |
</div> | |
<!-- Optional JavaScript --> | |
<!-- jQuery first, then Popper.js, then Bootstrap JS --> | |
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js" integrity="sha384-b/U6ypiBEHpOf/4+1nzFpr53nxSS+GLCkfwBdFNTxtclqqenISfwAzpKaMNFNmj4" crossorigin="anonymous"></script> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js" integrity="sha384-h0AbiXch4ZDo7tp9hKZ4TsHbi047NrKGLO3SEJAg45jXxnGIfYzk4Si90RDIqNm1" crossorigin="anonymous"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/6.10.1/sweetalert2.all.min.js"></script> | |
</body> | |
</html> |