'; 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 ''; echo ''; } echo ''; // echo ''; echo ''."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; $i++; } echo '

    '.$row['address'].'

    Start DateEnd Date 
    '.$row['address'].''.$row['startdate'].''.$row['enddate'].'
    '."\n"; echo ''."\n"; echo ''."\n"; echo ''."\n"; 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:

    "; ?>
    0 ) { echo ""; } ?>