-
Notifications
You must be signed in to change notification settings - Fork 1
/
inquiry.php
75 lines (68 loc) · 2.34 KB
/
inquiry.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
<?php include('header.php');?>
<?php
include_once('controller/connect.php');
$dbs = new database();
$db=$dbs->connection();
$inquiry = mysqli_query($db,"SELECT i.*,e.FirstName,e.LastName FROM inquiry i JOIN employee e on i.EmpId=e.EmployeeId");
if(isset($_GET['id']))
{
$id = $_GET['id'];
mysqli_query($db,"delete from inquiry where Id='$id'");
//header('location:inquiry.php');exit;
echo "<script>window.location='inquiry.php';</script>";
}
?>
<ol class="breadcrumb" style="margin: 10px 0px ! important;">
<li class="breadcrumb-item"><a href="Home.php">Home</a><i class="fa fa-angle-right"></i>Leave<i class="fa fa-angle-right"></i>Leave</li>
</ol>
<form method="POST">
<div class="validation-form" style="margin-bottom: 35px;margin-top: 10px;">
<h2>Employee Inquiry</h2>
<div class="row" style="color: white; margin-right: 0; margin-left: 0;">
<div class="col-md-1" style="background-color: red;">
<h5>ID</h5>
</div>
<div class="col-md-2" style="background-color: red;">
<h5>Date</h5>
</div>
<div class="col-md-1" style="background-color: red;">
<h5>Emp ID</h5>
</div>
<div class="col-md-2" style="background-color: red;">
<h5>Name</h5>
</div>
<div class="col-md-5" style="background-color: red;">
<h5>Query</h5>
</div>
<div class="col-md-1" style="background-color: red;">
<h5>Action</h5>
</div>
</div>
<?php $i=1; while($row = mysqli_fetch_assoc($inquiry)) { //print_r($row);exit();
$name = ucfirst($row['FirstName']." ".$row['LastName']);
?>
<div class="row" style="margin-right: 0; margin-left: 0;">
<div class="col-md-1">
<h5><?php $i=$i; echo $i; $i++;?></h5>
</div>
<div class="col-md-2">
<h5><?php echo(isset($row['Date']))?$row['Date']:"";?></h5>
</div>
<div class="col-md-1">
<h5><?php echo(isset($row['EmpId']))?$row['EmpId']:"";?></h5>
</div>
<div class="col-md-2">
<h5><?php echo(isset($name))?$name:"";?></h5>
</div>
<div class="col-md-5">
<h5><?php echo(isset($row['Message']))?$row['Message']:"";?></h5>
</div>
<div class="col-md-1">
<h5><a href="?id=<?php echo $row['Id'];?>" title="Ready"><i class="fa fa-check " aria-hidden="true"></i></a></h5>
</div>
</div><hr style="margin-bottom: 0px;margin-top: 0px;border-top: 1px solid #eee;">
<?php } ?>
</div>
<div class="clearfix"></div>
</form>
<?php include('footer.php'); ?>