-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmy_maid - Copy.php
84 lines (71 loc) · 2.57 KB
/
my_maid - Copy.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php include("header.php"); ?>
<?php
if (isset($_SESSION['ownerId'])) {
$id = $_SESSION['ownerId'];
$type = "Owner";
}
if (isset($_SESSION['rentId'])) {
$id = $_SESSION['rentId'];
$type = "Rent";
}
if(isset($_GET['id'])){
$id1=$_GET['id'];
$query="DELETE FROM `tblpermaid` WHERE `personal_id`=$id1";
$get=mysqli_query($conn,$query);
if($get){
echo "<script>alert('Record Successfully Deleted')</script>";
echo "<script>window.location='view_maids.php'</script>";
}
}
?>
<div id="main">
<div class="content">
<br>
<div class="container">
<h4 style="padding-left: 40%;">All Hired persons
<a href="add_maid.php"><button type="button" class="btn btn-primary float-right"> <i class="material-icons">
post_add
</i> new Entry</button></a>
<a href="view_maids.php"><button type="button" class="btn btn-primary float-right"> <i class="material-icons">
post_add
</i> Maids Details</button></a>
</h4>
<br>
<br>
<br>
<div class="row">
<?php
$query="select tbm.*,tp.* from tblmaid tbm,tblpermaid tp where tp.maid_id=tbm.maid_id and tp.owner_id=$id and tp.type='$type'";
$get=mysqli_query($conn,$query);
while($row=mysqli_fetch_array($get)){
$type=$row['maid_service'];
$name=$row['maid_name'];
$mobileno=$row['maid_contact'];
$speciality=$row['maid_speciality'];
$photo=$row['maid_photo'];
$maid_id=$row['maid_id'];
$pid=$row['personal_id'];
?>
<div class="col-md-4">
<div class="card card-profile">
<div class="card-avatar">
<img class="img" src="./images/maids/<?php echo $photo;?>" />
</div>
<div class="card-body">
<h6 class="card-category text-gray"><?php echo $type;?></h6>
<h4 class="card-title"><?php echo $name;?></h4>
<p class="card-description">
Phone Number : <?php echo $mobileno;?><br>
Speciality : <?php echo $speciality;?>
</p>
<a href="my_maid.php?id=<?php echo $pid;?>" class="btn btn-sm btn-primary btn-round">Remove to my List</a>
</div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</body>
</html>