From: Steve Sutton Date: Tue, 17 Nov 2015 18:09:18 +0000 (-0500) Subject: Update the reservation form for Location X-Git-Tag: v1.0.0^2~2 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=b8a0a02e6a6c974d01309d81357bfa90ab4d2d55;p=WP-Themes%2Fbpla.git Update the reservation form for Location Also I'm adding some filtering here. --- diff --git a/header.php b/header.php index 20d26b6..7c056a5 100644 --- a/header.php +++ b/header.php @@ -51,7 +51,12 @@
diff --git a/page-150.php b/page-150.php index 7ba31e3..3a5b125 100644 --- a/page-150.php +++ b/page-150.php @@ -19,20 +19,39 @@

- - - - - - + array( + 'filter' => FILTER_VALIDATE_REGEXP, + 'options' => array( + 'regexp' => '%[0-9]{2}/[0-9]{2}/[0-9]{4}%' + ) + ), + 'DepartureDate' => array( + 'filter' => FILTER_VALIDATE_REGEXP, + 'options' => array( + 'regexp' => '%[0-9]{2}/[0-9]{2}/[0-9]{4}%' + ) + ), + 'Occupancy' => FILTER_VALIDATE_INT, + 'Location' => array( + 'filter' => FILTER_SANITIZE_STRING, + 'flags' => FILTER_FLAG_NO_ENCODE_QUOTES + ), + ) + ); + $location = urlencode($formData['Location']); + $arrival = urlencode($formData['ArrivalDate']); + $departure = urlencode($formData['DepartureDate']); + $occupancy = urlencode($formData['Occupancy']); + if ($arrival == NULL || $departure == NULL || $occupancy == NULL){ + $arrival = urlencode(date("m/d/Y", strtotime("+2 days"))); + $departure = urlencode(date("m/d/Y", strtotime($arrival. ' +2 days'))); + $occupancy = urlencode(1); + } + $iframeSrc = "https://weblink.instantsoftware.com/search/1134?ArrivalDate={$arrival}&DepartureDate={$departure}&Occupancy={$occupancy}&Location={$location}";?> +
diff --git a/parts/off-canvas-menu.php b/parts/off-canvas-menu.php index 8b35ff2..4a495f8 100644 --- a/parts/off-canvas-menu.php +++ b/parts/off-canvas-menu.php @@ -21,7 +21,12 @@