created yable for room additional accommodation and updated function
This commit is contained in:
parent
9d0b741ed6
commit
106699e720
7 changed files with 42 additions and 13 deletions
|
@ -91,7 +91,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="reset" class="btn-cancle" data-bs-dismiss="modal">Cancle</button>
|
||||
<button type="reset" class="btn-cancel" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn-third">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -117,7 +117,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="reset" class="btn-cancle" data-bs-dismiss="modal">Cancle</button>
|
||||
<button type="reset" class="btn-cancel" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn-third">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<td>$i</td>
|
||||
<td>$row[name]</td>
|
||||
<td>
|
||||
<button type="button" onclick="remove_accomm($row[id])" class="btn-cancle">Delete</button>
|
||||
<button type="button" onclick="remove_accomm($row[id])" class="btn-cancel">Delete</button>
|
||||
</td>
|
||||
</tr>
|
||||
data;
|
||||
|
@ -56,7 +56,7 @@
|
|||
<td>$row[name]</td>
|
||||
<td>$row[detail]</td>
|
||||
<td>
|
||||
<button type="button" onclick="remove_addiAccomm($row[id])" class="btn-cancle">Delete</button>
|
||||
<button type="button" onclick="remove_addiAccomm($row[id])" class="btn-cancel">Delete</button>
|
||||
</td>
|
||||
</tr>
|
||||
data;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
$flag = 1;
|
||||
}
|
||||
$room_id = mysqli_insert_id($con);
|
||||
|
||||
$q2 = "INSERT INTO `room_accommodation`(`room_id`, `accommodation_id`) VALUES (?, ?)";
|
||||
|
||||
if($stmt = mysqli_prepare($con, $q2)){
|
||||
|
@ -29,6 +30,24 @@
|
|||
die('Query cannot be prepared - insert');
|
||||
}
|
||||
|
||||
//----->Next: create table for room additional accommodation and write function (same as accommodation)
|
||||
//room additional accommodation
|
||||
$q3 = "INSERT INTO `room_additionalAccom`(`room_id`, `additionalAccom_id`) VALUES (?, ?)";
|
||||
|
||||
if($stmt = mysqli_prepare($con, $q3)){
|
||||
foreach($additional_accomm as $a){
|
||||
mysqli_stmt_bind_param($stmt, 'ii', $room_id, $a);
|
||||
mysqli_stmt_execute($stmt);
|
||||
}
|
||||
mysqli_stmt_close($stmt);
|
||||
} else{
|
||||
$flag = 0;
|
||||
die('Query cannot be prepared - insert');
|
||||
}
|
||||
|
||||
if($flag){
|
||||
echo 1;
|
||||
} else{
|
||||
echo 0;
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -25,7 +25,7 @@
|
|||
border-radius: 3px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.btn-cancle{
|
||||
.btn-cancel{
|
||||
background-color: #EE4E4E;
|
||||
border: none;
|
||||
color: white;
|
||||
|
@ -36,7 +36,7 @@
|
|||
border-radius: 3px;
|
||||
text-decoration: none;
|
||||
}
|
||||
.btn-cancle:hover{
|
||||
.btn-cancel:hover{
|
||||
background-color: #FF8080;
|
||||
color: white;
|
||||
transition: all 0.5s ease;
|
||||
|
|
|
@ -10,6 +10,14 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Admin Dashboard-rooms | Midtown Hotel</title>
|
||||
<?php require('components/link.php') ?>
|
||||
<style>
|
||||
.custom-alert-t{
|
||||
position:fixed;
|
||||
top: 100px;
|
||||
right: 25px;
|
||||
z-index: 10000;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<?php require('components/sidebar.php')?>
|
||||
|
@ -123,7 +131,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="reset" class="btn-cancle" data-bs-dismiss="modal">Cancle</button>
|
||||
<button type="reset" class="btn-cancel" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn-third">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -187,6 +195,8 @@
|
|||
}
|
||||
xhr.send(data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" onclick="site_title.value = general_data.site_title" class="btn-cancle" data-bs-dismiss="modal">Cancle</button>
|
||||
<button type="button" onclick="site_title.value = general_data.site_title" class="btn-cancel" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn-third">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -202,7 +202,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" onclick="contact_input(contact_data)" class="btn-cancle" data-bs-dismiss="modal">Cancle</button>
|
||||
<button type="button" onclick="contact_input(contact_data)" class="btn-cancel" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn-third">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -238,7 +238,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" onclick="member_name.value='', member_img.value=''" class="btn-cancle" data-bs-dismiss="modal">Cancle</button>
|
||||
<button type="button" onclick="member_name.value='', member_img.value=''" class="btn-cancel" data-bs-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn-third">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<div class="card-body">
|
||||
<div class="text-end mb-4">
|
||||
<a href="?seen=all" class='btn-seen'>Read All</a>
|
||||
<a href="?del=all" class='btn-cancle'>Delete All</a>
|
||||
<a href="?del=all" class='btn-cancel'>Delete All</a>
|
||||
</div>
|
||||
<div class="table-responsive-md" style="height: 450px; overflow-y: scroll;">
|
||||
<table class="table table-hover border">
|
||||
|
@ -113,7 +113,7 @@
|
|||
if($row['seen'] != 1){
|
||||
$seen = "<a href='?seen=$row[sr_no]' class='btn-seen'>Read</a>";
|
||||
}
|
||||
$seen.="<a href='?del=$row[sr_no]' class='btn-cancle mx-1'>Delete</a>";
|
||||
$seen.="<a href='?del=$row[sr_no]' class='btn-cancel mx-1'>Delete</a>";
|
||||
|
||||
echo<<<query
|
||||
<tr>
|
||||
|
|
Loading…
Add table
Reference in a new issue