';
include_once ('header.php'); // Include the HTML header file.
loginCheck();
?>
Delete a Property Booking
The reservation has been deleted.";
echo '';
}
}
if (isset($_POST['selectlisting']) ) {
//process the form
$listing_id = mysqli_real_escape_string($dbcrent,trim($_POST['listing_id']));
$getdatesquery = " SELECT resid, startdate, enddate, address FROM rentsched, rentals
WHERE rentals.listing_id = $listing_id
AND rentals.listing_id = rentsched.listing_id
ORDER BY startdate
";
$getdates = mysqli_query($dbcrent, $getdatesquery) or trigger_error("Bad getdates: " . mysqli_error($dbcrent));
if ( !$getdates ) {
include 'technical.php';
include 'footer.php';
exit;
}
if (mysqli_num_rows($getdates) < 1 ) {
echo 'There are no bookings scheduled for this property.
';
echo "Back to admin";
include 'footer.php';
exit;
}
echo '';
$i = 1;
while ($row = mysqli_fetch_array($getdates)) {
// echo ''.$row['address'].' - '.$row['startdate'].' - '.$row['enddate'].'
';
if ( $i == 1 ) {
echo ''.$row['address'].' |
';
echo '| Start Date | End Date | |
';
}
echo '';
// echo '| '.$row['address'].' | ';
echo ''.$row['startdate'].' | '."\n";
echo ''.$row['enddate'].' | '."\n";
echo ' | '."\n";
echo '
'."\n";
$i++;
}
echo '
';
// echo "query:
".$update;
//exit;
// $to = 'suncoast@tropworks.com';
// $subj = 'mulligan schedule rental';
// $msg = $update;
// mail($to, $subj, $msg);
// if ($result) {
// echo "The property has been blocked out as reserved.
";
// echo "Back to admin";
// }
}
// else { // select the listing
if ( !isset($_POST['datessubmitted']) && !isset($_POST['selectlisting']) ) {
echo "Select property:
";
?>