90 $this->
widget = new \YAWK\widget();
120 $validateJsCode =
"";
124 if ($this->bookingContactName ===
"required")
142 if ($this->bookingEmail ===
"required")
162 if ($this->bookingPhone ===
"required")
163 { $validateJsCode .=
"
170 if ($this->bookingBand ===
"required")
171 { $validateJsCode .=
"
178 if ($this->bookingEventDatetime ===
"required")
179 { $validateJsCode .=
"
186 if ($this->bookingEventSoundcheck ===
"required")
187 { $validateJsCode .=
"
194 if ($this->bookingEventShowtime ===
"required")
195 { $validateJsCode .=
"
202 if ($this->bookingSoundcheckDuration ===
"required")
203 { $validateJsCode .=
"
204 soundcheckDuration: {
210 if ($this->bookingShowtimeDuration ===
"required")
211 { $validateJsCode .=
"
218 if ($this->bookingLocation ===
"required")
219 { $validateJsCode .=
"
226 if ($this->bookingLocationType ===
"required")
227 { $validateJsCode .=
"
234 if ($this->bookingCrowdAmount ===
"required")
235 { $validateJsCode .=
"
242 if ($this->bookingPaAvailable ===
"required")
243 { $validateJsCode .=
"
250 if ($this->bookingTechAvailable ===
"required")
251 { $validateJsCode .=
"
258 if ($this->bookingHotelAvailable ===
"required")
259 { $validateJsCode .=
"
266 if ($this->bookingMessage ===
"required")
267 { $validateJsCode .=
"
274 if ($this->bookingSetAmount ===
"required")
275 { $validateJsCode .=
"
284 <!-- bootstrap date-timepicker -->
285 <link type=\"text/css\" href=\"system/engines/datetimepicker/css/bootstrap-datetimepicker.min.css\" rel=\"stylesheet\">
286 <script src=\"https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js\"></script>";
288 echo
"<script type=\"text/javascript\" src=\"system/engines/datetimepicker/js/bootstrap-datetimepicker.min.js\"></script>
289 <script type=\"text/javascript\" src=\"system/engines/jquery/jquery.validate.min.js\"></script>
290 <script type=\"text/javascript\" src=\"system/widgets/booking/js/booking.js\"></script>
291 <link rel=\"stylesheet\" href=\"system/engines/jquery/timepicker/jquery.timepicker.css\">
292 <script src=\"//cdnjs.cloudflare.com/ajax/libs/timepicker/1.3.5/jquery.timepicker.min.js\"></script>";
296 echo
"<script src=\"https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/locale/de.js\"></script>
297 <script type=\"text/javascript\" src=\"system/engines/jquery/messages_de.min.js\"></script>";
302 <script type=\"text/javascript\">
303 $(document).ready(function () {
305 var bookingForm = $('#bookingForm');
306 (bookingForm).validate({
307 // initialize the plugin
311 submitHandler: function(){
312 //var data = $(form).serialize();
313 //do your ajax with the data here
316 var url = 'system/widgets/booking/js/process-booking-data.php';
317 var thankYouMessage = $('#thankYouMessage');
322 data: bookingForm.serialize(), // serializes the form's elements.
323 success: function(data)
326 $(bookingForm).hide();
327 // display thank you message
328 thankYouMessage.removeClass('hidden d-none').addClass('animated fadeIn speed6');
330 error: function (request, status, error)
333 alert('error: '+data);
334 console.log('ERROR: ajax post failed with error '+data);
337 $(bookingForm).shake();
343 $('#eventDateTime').datetimepicker({
344 format: 'YYYY-DD-MM HH:mm',
348 $('.timepicker').timepicker({
360 echo
"$this->bookingHeadline<hr>";
376 if (isset($this->bookingHeading) && (!empty($this->bookingHeading)))
379 if (isset($this->bookingIcon) && (!empty($this->bookingIcon)))
381 $this->bookingIcon =
"<i class=\"".$this->bookingIcon.
"\"></i> ";
385 if (isset($this->bookingSubtext) && (!empty($this->bookingSubtext)))
387 $this->bookingSubtext =
"<small>$this->bookingSubtext</small>";
388 $this->bookingHeadline =
"<div id=\"bookingHeading\" class=\"animated fadeIn speed2\"><h1> $this->bookingIcon".
"$this->bookingHeading ".
"$this->bookingSubtext</h1></div>";
392 $this->bookingHeadline =
"<h1 class=\"animated fadeIn speed2\">$this->bookingHeading</h1>";
397 $this->bookingHeadline =
'';
411 <div class=\"hidden d-none\" id=\"thankYouMessage\">
412 <div class=\"col-md-2\"> </div>
413 <div class=\"col-md-8 text-center\"><h2>".$lang[
'BOOKING_THANK_YOU_HEADING'].
"<br>
414 <small>".
$lang[
'BOOKING_THANK_YOU_SUBLINE'].
"</small><br><br>
415 <i class=\"fa fa-handshake-o text-muted\"></i></h2>
416 <br><hr><a href=\"".$hostname.
"\" target=\"_self\">".
$lang[
'BOOKING_BACK'].
"</a>
417 | <a href=\"booking.html\" target=\"_self\">".
$lang[
'BOOKING_AGAIN'].
"</a></div>
418 <div class=\"col-md-2\"> </div>
435 <form class=\"form\" id=\"bookingForm\" method=\"post\" action=\"\">
437 <div class=\"container-fluid\">
439 <div class=\"col-md-4 animated fadeIn speed3\">
440 <input type=\"hidden\" name=\"adminEmail\" id=\"adminEmail\" value=\"".$this->bookingAdminEmail.
"\">
441 <input type=\"hidden\" name=\"bookingHtmlEmail\" id=\"bookingHtmlEmail\" value=\"".$this->bookingHtmlEmail.
"\">";
444 if ($this->bookingContactName !==
"false")
446 if ($this->bookingContactName ===
"required")
447 { $requiredMarkup =
"*"; }
448 else { $requiredMarkup =
""; }
451 <label for=\"name\">".$lang[
'BOOKING_NAME'].$requiredMarkup.
"
452 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".
$lang[
'BOOKING_HELP_NAME'].
"\"></i>
454 <input type=\"text\" name=\"name\" id=\"name\" class=\"form-control\" placeholder=\"Name / Veranstalter\" autocomplete=\"off\">
459 if ($this->bookingEmail !==
"false")
461 if ($this->bookingEmail ===
"required")
462 { $requiredMarkup =
"*"; }
463 else { $requiredMarkup =
""; }
466 <label for=\"email\">".$lang[
'LABEL_BOOKING_EMAIL'].$requiredMarkup.
"
467 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".
$lang[
'BOOKING_HELP_EMAIL'].
"\"></i>
469 <input type=\"text\" name=\"email\" id=\"email\" class=\"form-control\" placeholder=\"[email protected]\" autocomplete=\"off\">
474 if ($this->bookingPhone !==
"false")
476 if ($this->bookingPhone ===
"required")
477 { $requiredMarkup =
"*"; }
478 else { $requiredMarkup =
""; }
481 <label for=\"phone\">".$lang[
'LABEL_BOOKING_PHONE'].$requiredMarkup.
"
482 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".
$lang[
'BOOKING_HELP_PHONE'].
"\"></i>
484 <input type=\"text\" name=\"phone\" id=\"phone\" class=\"form-control\" placeholder=\"+43 1234 12345678\" autocomplete=\"off\">
486 <div class=\"animated fadeIn speed4 delay-10s\">
487 ".
$lang[
'BOOKING_HELP_TEXT'].
"
494 <div class=\"col-md-8 animated fadeIn speed4 delay-6s\">
496 <div class=\"col-md-5\">
500 if ($this->bookingEventDatetime !==
"false")
502 if ($this->bookingEventDatetime ===
"required")
503 { $requiredMarkup =
"*"; }
504 else { $requiredMarkup =
""; }
507 <label for=\"eventDateTime\">".$lang[
'LABEL_BOOKING_EVENTDATETIME'].$requiredMarkup.
"
508 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".
$lang[
'BOOKING_HELP_DATETIME'].
"\"></i>
510 <input type=\"text\" name=\"eventDateTime\" autocomplete=\"off\" id=\"eventDateTime\" class=\"form-control\" placeholder=\"".
$lang[
'BOOKING_HELP_DATE_AND_TIME'].
"\">
515 if ($this->bookingShowtimeDuration !==
"false")
517 if ($this->bookingShowtimeDuration ===
"required")
518 { $requiredMarkup =
"*"; }
519 else { $requiredMarkup =
""; }
522 <label for=\"showtimeDuration\">".$lang[
'LABEL_BOOKING_SHOWTIME_DURATION'].$requiredMarkup.
"
523 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".
$lang[
'BOOKING_HELP_SHOWTIME_DURATION'].
"\"></i>
525 <select name=\"showtimeDuration\" id=\"showtimeDuration\" class=\"form-control\">
526 <option value=\"\">".
$lang[
'BOOKING_PLEASE_SELECT'].
"</option>
527 <option value=\"".
$lang[
'BOOKING_30MIN'].
"\">".
$lang[
'BOOKING_30MIN'].
"</option>
528 <option value=\"".
$lang[
'BOOKING_45MIN'].
"\">".
$lang[
'BOOKING_45MIN'].
"</option>
529 <option value=\"".
$lang[
'BOOKING_1H'].
"\">".
$lang[
'BOOKING_1H'].
"</option>
530 <option value=\"".
$lang[
'BOOKING_2H'].
"\">".
$lang[
'BOOKING_2H'].
"</option>
531 <option value=\"".
$lang[
'BOOKING_3H'].
"\">".
$lang[
'BOOKING_3H'].
"</option>
532 <option value=\"".
$lang[
'BOOKING_4H'].
"\">".
$lang[
'BOOKING_4H'].
"</option>
533 <option value=\"".
$lang[
'BOOKING_NOT_SPECIFIED'].
"\">".
$lang[
'BOOKING_NOT_SPECIFIED'].
"</option>
538 if ($this->bookingEventSoundcheck !==
"false")
540 if ($this->bookingEventSoundcheck ===
"required")
541 { $requiredMarkup =
"*"; }
542 else { $requiredMarkup =
""; }
545 <label for=\"eventSoundcheck\">".$lang[
'LABEL_BOOKING_SOUNDCHECK'].$requiredMarkup.
"
546 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".
$lang[
'BOOKING_HELP_SOUNDCHECK'].
"\"></i>
548 <input type=\"text\" name=\"eventSoundcheck\" autocomplete=\"off\" id=\"eventSoundcheck\" class=\"form-control timepicker\" placeholder=\"".
$lang[
'BOOKING_HELP_SELECT_TIME'].
"\">
553 if ($this->bookingSoundcheckDuration !==
"false")
555 if ($this->bookingSoundcheckDuration ===
"required")
556 { $requiredMarkup =
"*"; }
557 else { $requiredMarkup =
""; }
560 <label for=\"soundcheckDuration\">".$lang[
'LABEL_BOOKING_SOUNDCHECK_DURATION'].$requiredMarkup.
"
561 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".
$lang[
'BOOKING_HELP_SOUNDCHECK_DURATION'].
"\"></i>
563 <select name=\"soundcheckDuration\" id=\"soundcheckDuration\" class=\"form-control\">
564 <option value=\"\">".
$lang[
'BOOKING_PLEASE_SELECT'].
"</option>
565 <option value=\"".
$lang[
'BOOKING_30MIN'].
"\">".
$lang[
'BOOKING_30MIN'].
"</option>
566 <option value=\"".
$lang[
'BOOKING_45MIN'].
"\">".
$lang[
'BOOKING_45MIN'].
"</option>
567 <option value=\"".
$lang[
'BOOKING_60MIN'].
"\">".
$lang[
'BOOKING_60MIN'].
"</option>
568 <option value=\"".
$lang[
'BOOKING_NOT_SPECIFIED'].
"\">".
$lang[
'BOOKING_NOT_SPECIFIED'].
"</option>
574 if ($this->bookingEventShowtime !==
"false")
576 if ($this->bookingEventShowtime ===
"required")
577 { $requiredMarkup =
"*"; }
578 else { $requiredMarkup =
""; }
581 <label for=\"eventShowtime\">".$lang[
'LABEL_BOOKING_SHOWTIME'].$requiredMarkup.
"
582 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".
$lang[
'BOOKING_HELP_SHOWTIME'].
"\"></i>
584 <input type=\"text\" name=\"eventShowtime\" autocomplete=\"off\" id=\"eventShowtime\" class=\"form-control timepicker\" placeholder=\"".
$lang[
'BOOKING_HELP_SELECT_TIME'].
"\">
589 if ($this->bookingSetAmount !==
"false")
591 if ($this->bookingSetAmount ===
"required")
592 { $requiredMarkup =
"*"; }
593 else { $requiredMarkup =
""; }
596 <label for=\"setAmount\">".$lang[
'LABEL_BOOKING_SET_AMOUNT'].$requiredMarkup.
"
597 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".
$lang[
'BOOKING_HELP_SET_AMOUNT'].
"\"></i>
599 <select name=\"setAmount\" id=\"setAmount\" class=\"form-control\">
600 <option value=\"\">".
$lang[
'BOOKING_PLEASE_SELECT'].
"</option>
601 <option value=\"1\">1</option>
602 <option value=\"2\">2</option>
603 <option value=\"3\">3</option>
604 <option value=\"4\">4</option>
605 <option value=\"".
$lang[
'BOOKING_NOT_SPECIFIED'].
"\">".
$lang[
'BOOKING_NOT_SPECIFIED'].
"</option>
610 <div class=\"col-md-7 animated fadeIn speed4 delay-8s\">
635 if ($this->bookingLocationType !==
"false")
637 if ($this->bookingLocationType ===
"required")
638 { $requiredMarkup =
"*"; }
639 else { $requiredMarkup =
""; }
642 <label for=\"locationType\">".$lang[
'LABEL_BOOKING_LOCATION_TYPE'].$requiredMarkup.
"
643 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".
$lang[
'BOOKING_HELP_LOCATION_TYPE'].
"\"></i>
645 <select name=\"locationType\" id=\"locationType\" class=\"form-control\">
646 <option value=\"\">".
$lang[
'BOOKING_PLEASE_SELECT'].
"</option>
647 <option value=\"".
$lang[
'BOOKING_PRIVATE_EVENT'].
"\">".
$lang[
'BOOKING_PRIVATE_EVENT'].
"</option>
648 <option value=\"".
$lang[
'BOOKING_COMPANY_EVENT'].
"\">".
$lang[
'BOOKING_COMPANY_EVENT'].
"</option>
649 <option value=\"".
$lang[
'BOOKING_MARRIAGE_EVENT'].
"\">".
$lang[
'BOOKING_MARRIAGE_EVENT'].
"</option>
650 <option value=\"".
$lang[
'BOOKING_BIG_EVENT'].
"\">".
$lang[
'BOOKING_BIG_EVENT'].
"</option>
651 <option value=\"".
$lang[
'BOOKING_FESTIVAL_EVENT'].
"\">".
$lang[
'BOOKING_FESTIVAL_EVENT'].
"</option>
652 <option value=\"".
$lang[
'BOOKING_BENEFIT_EVENT'].
"\">".
$lang[
'BOOKING_BENEFIT_EVENT'].
"</option>
653 <option value=\"".
$lang[
'BOOKING_NOT_SPECIFIED'].
"\">".
$lang[
'BOOKING_NOT_SPECIFIED'].
"</option>
659 if ($this->bookingLocation !==
"false")
661 if ($this->bookingLocation ===
"required")
662 { $requiredMarkup =
"*"; }
663 else { $requiredMarkup =
""; }
666 <label for=\"location\">".$lang[
'LABEL_BOOKING_LOCATION'].$requiredMarkup.
"
667 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".
$lang[
'BOOKING_HELP_LOCATION'].
"\"></i>
669 <select name=\"location\" id=\"location\" class=\"form-control\">
670 <option value=\"\">".
$lang[
'BOOKING_PLEASE_SELECT'].
"</option>
671 <option value=\"".
$lang[
'BOOKING_INDOOR'].
"\">".
$lang[
'BOOKING_INDOOR'].
"</option>
672 <option value=\"".
$lang[
'BOOKING_OUTDOOR'].
"\">".
$lang[
'BOOKING_OUTDOOR'].
"</option>
673 <option value=\"".
$lang[
'BOOKING_NOT_SPECIFIED'].
"\">".
$lang[
'BOOKING_NOT_SPECIFIED'].
"</option>
679 if ($this->bookingCrowdAmount !==
"false")
681 if ($this->bookingCrowdAmount ===
"required")
682 { $requiredMarkup =
"*"; }
683 else { $requiredMarkup =
""; }
686 <label for=\"crowdAmount\">".$lang[
'LABEL_BOOKING_CROWD_AMOUNT'].$requiredMarkup.
"
687 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".
$lang[
'BOOKING_HELP_CROWD_AMOUNT'].
"\"></i>
689 <select name=\"crowdAmount\" id=\"crowdAmount\" class=\"form-control\">
690 <option value=\"\">".
$lang[
'BOOKING_PLEASE_SELECT'].
"</option>
691 <option value=\"".
$lang[
'BOOKING_50'].
"\">".
$lang[
'BOOKING_50'].
"</option>
692 <option value=\"".
$lang[
'BOOKING_100'].
"\">".
$lang[
'BOOKING_100'].
"</option>
693 <option value=\"".
$lang[
'BOOKING_200'].
"\">".
$lang[
'BOOKING_200'].
"</option>
694 <option value=\"".
$lang[
'BOOKING_500'].
"\">".
$lang[
'BOOKING_500'].
"</option>
695 <option value=\"".
$lang[
'BOOKING_1000'].
"\">".
$lang[
'BOOKING_1000'].
"</option>
696 <option value=\"".
$lang[
'BOOKING_BIGGER_1000'].
"\">".
$lang[
'BOOKING_BIGGER_1000'].
"</option>
697 <option value=\"".
$lang[
'BOOKING_NOT_SPECIFIED'].
"\">".
$lang[
'BOOKING_NOT_SPECIFIED'].
"</option>
703 if ($this->bookingPaAvailable !==
"false")
705 if ($this->bookingPaAvailable ===
"required")
706 { $requiredMarkup =
"*"; }
707 else { $requiredMarkup =
""; }
710 <div class=\"text-right\">
711 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".$lang[
'BOOKING_HELP_PA'].
"\"></i>
712 <label for=\"paAvailable\">".
$lang[
'LABEL_BOOKING_PA_AVAILABLE'].$requiredMarkup.
" </label>
713 <input type=\"radio\" name=\"paAvailable\" value=\"".
$lang[
'BOOKING_YES'].
"\"> ".
$lang[
'BOOKING_YES'].
"
714 <input type=\"radio\" name=\"paAvailable\" value=\"".
$lang[
'BOOKING_NO'].
"\"> ".
$lang[
'BOOKING_NO'].
"
719 if ($this->bookingTechAvailable !==
"false")
721 if ($this->bookingTechAvailable ===
"required")
722 { $requiredMarkup =
"*"; }
723 else { $requiredMarkup =
""; }
726 <div class=\"text-right\">
727 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".$lang[
'BOOKING_HELP_TECH'].
"\"></i>
728 <label for=\"techAvailable\">".
$lang[
'LABEL_BOOKING_TECH_AVAILABLE'].$requiredMarkup.
" </label>
729 <input type=\"radio\" name=\"techAvailable\" value=\"".
$lang[
'BOOKING_YES'].
"\"> ".
$lang[
'BOOKING_YES'].
"
730 <input type=\"radio\" name=\"techAvailable\" value=\"".
$lang[
'BOOKING_NO'].
"\"> ".
$lang[
'BOOKING_NO'].
"
735 if ($this->bookingHotelAvailable !==
"false")
737 if ($this->bookingHotelAvailable ===
"required")
738 { $requiredMarkup =
"*"; }
739 else { $requiredMarkup =
""; }
742 <div class=\"text-right\">
743 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".$lang[
'BOOKING_HELP_HOTEL'].
"\"></i>
744 <label for=\"hotelAvailable\">".
$lang[
'LABEL_BOOKING_HOTEL_AVAILABLE'].$requiredMarkup.
" </label>
745 <input type=\"radio\" name=\"hotelAvailable\" value=\"".
$lang[
'BOOKING_YES'].
"\"> ".
$lang[
'BOOKING_YES'].
"
746 <input type=\"radio\" name=\"hotelAvailable\" value=\"".
$lang[
'BOOKING_NO'].
"\"> ".
$lang[
'BOOKING_NO'].
"
754 if ($this->bookingMessage !==
"false")
756 if ($this->bookingMessage ===
"required")
757 { $requiredMarkup =
"*"; }
758 else { $requiredMarkup =
""; }
761 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".$lang[
'BOOKING_HELP_MSG'].
"\"></i>
762 <label for=\"message\">".
$lang[
'LABEL_BOOKING_MESSAGE'].$requiredMarkup.
"
764 <textarea name=\"message\" id=\"message\" class=\"form-control\" rows=\"4\" autocomplete=\"off\"></textarea>
769 <i class=\"fa fa-question-circle-o text-info\" data-toggle=\"tooltip\" title=\"".$lang[
'BOOKING_HELP_MAILCOPY'].
"\"></i>
770 <label for=\"mailCopy\">".
$lang[
'BOOKING_COPY'].
"
771 <input type=\"checkbox\" name=\"mailCopy\" value=\"true\" id=\"mailCopy\" aria-checked=\"true\" checked></label>
772 <button type=\"submit\" id=\"submitbutton\" class=\"btn btn-success pull-right hvr-grow\" style=\"margin-top:1%;\" contenteditable=\"false\"><i class=\"fa fa-paper-plane-o\"></i> ".
$lang[
'BOOKING_SUBMIT_BTN'].
"</button>
773 <input type=\"hidden\" name=\"sent\" value=\"1\">";
776 $html .=
"</div></div></div>
Mysqli database class; returns db connection object.
Settings class: get and set YaWK system settings.
static getSetting($db, $property)
Get and return value for property from settings database.
if(isset($_POST['save'])) $settings