$dateformat, 'firstday' => getAbcSetting("firstdayofweek"))); wp_localize_script( 'abc-ajax', 'ajax_abc_booking_showBookingForm', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ))); wp_enqueue_style('abc-datepicker', $abcUrl.'/frontend/css/jquery-ui.min.css'); $abcFromValue = ''; $abcToValue = ''; $abcPostTrigger = 0; $bookingFormResult = ''; if(isset($_POST['abc-from']) && isset($_POST['abc-to']) && abc_booking_formatDateToDB($_POST['abc-from']) >= date('Y-m-d') && DateTime::createFromFormat(getAbcSetting("dateformat"), $_POST['abc-from']) !== false){ // Checking for POST variables (via single calendar) $abcFromValue = sanitize_text_field($_POST['abc-from']); $abcToValue = sanitize_text_field($_POST['abc-to']); }elseif(isset($_COOKIE['abc-from']) && isset($_COOKIE['abc-to']) && abc_booking_formatDateToDB($_COOKIE['abc-from']) >= date('Y-m-d') AND DateTime::createFromFormat(getAbcSetting("dateformat"), $_COOKIE['abc-from']) !== false){ // Checking for cookies and checking if "from date" is in the past $abcFromValue = sanitize_text_field($_COOKIE['abc-from']); $abcToValue = sanitize_text_field($_COOKIE['abc-to']); } if(isset($_POST['abc-trigger']) && $_POST['abc-trigger'] == 1){ $abcPostTrigger = 1; } $abcPersonValue = 1; if(isset($_COOKIE['abc-persons'])){ // Checking for cookies $abcPersonValue = intval($_COOKIE['abc-persons']); } $optionPersons = ''; for( $i = 1; $i <= 8; $i++) { $optionPersons .= '