public function res_admin_delete_booking_callback()
 {
     // Check if user is logged in or die
     Resource_Booking_Ajax_Common::check_if_user_logged_in_or_die();
     // Check if user is a labmanager or die
     Resource_Booking_Ajax_Common::check_if_labmanager_or_die();
     // If here, user is labmanager (hopefully)
     $booking_id = isset($_POST['id']) ? intval($_POST['id'], 10) : 0;
     $resource_id = isset($_POST['resource_id']) ? intval($_POST['resource_id'], 10) : 0;
     $start = isset($_POST['start']) ? $_POST['start'] : null;
     $end = isset($_POST['end']) ? $_POST['end'] : null;
     //Check if resource exists
     $resource_info = Resource_Booking_Ajax_Common::get_resource_info_or_die($this->rb_db, $resource_id, "array");
     // Check if valid dates && valid interval
     Resource_Booking_Ajax_Common::check_if_valid_start_end_i_u_d_or_die($start, $end, $resource_info);
     // Validation done - good to delete data
     // Delete the booking
     $booking = $this->rb_db->delete_booking($booking_id, $resource_id, null);
     if (false === $booking) {
         // And die
         wp_send_json_error(array("message" => "Could not delete the reservation!"));
     } else {
         $response = new stdClass();
         $response->success = true;
         $response->booking = array("id" => $booking_id);
         echo json_encode($response);
         wp_die();
         // this is required to terminate immediately and return a proper response
     }
 }