Compare commits
3 commits
master
...
31e616c189
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31e616c189 | ||
|
|
80c1feb31f | ||
|
|
0122185119 |
49 changed files with 29999 additions and 4275 deletions
|
|
@ -118,7 +118,7 @@
|
|||
<div class="home-message text-center small">
|
||||
<div class="home-info-box">
|
||||
<div id="eKomiSeal_default" class="eKomi-header" style="padding-top: 5px;padding-left: 2px;">
|
||||
<img class="lozad" border="0" src="{{ asset('images/dummy.png') }}" data-src="/bundles/app/images/logo-qualitaet-22.png" alt="Top Kundenservice" height="78">
|
||||
<img class="lozad" border="0" src="{{ asset('images/dummy.png') }}" data-src="/bundles/app/images/logo-qualitaet.png" alt="Top Kundenservice" height="78">
|
||||
</div>
|
||||
<ul class="c4">
|
||||
<li>Spezialist für Kulturreisen </li>
|
||||
|
|
|
|||
|
|
@ -88,6 +88,17 @@
|
|||
|
||||
gtag('config', 'G-Y1Y779PDME');
|
||||
</script>
|
||||
<script>
|
||||
(function (c, s, q, u, a, r, e) {
|
||||
c.hj=c.hj||function(){(c.hj.q=c.hj.q||[]).push(arguments)};
|
||||
c._hjSettings = { hjid: a };
|
||||
r = s.getElementsByTagName('head')[0];
|
||||
e = s.createElement('script');
|
||||
e.async = true;
|
||||
e.src = q + c._hjSettings.hjid + u;
|
||||
r.appendChild(e);
|
||||
})(window, document, 'https://static.hj.contentsquare.net/c/csq-', '.js', 5350061);
|
||||
</script>
|
||||
|
||||
{% block stylesheets %}
|
||||
{% endblock stylesheets %}
|
||||
|
|
@ -99,7 +110,12 @@
|
|||
|
||||
</head>
|
||||
<style>
|
||||
|
||||
@media (min-width: 992px) and (max-width: 1200px ) {
|
||||
.topMain.nav-pills>li>a {
|
||||
padding: .5rem .8rem;
|
||||
margin-right: .4rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<body class="no-js">
|
||||
<div id="wrapper">
|
||||
|
|
@ -116,7 +132,7 @@
|
|||
<div class="home-message text-center small">
|
||||
<div class="home-info-box">
|
||||
<div id="eKomiSeal_default" class="eKomi-header" style="padding-top: 5px;padding-left: 2px;">
|
||||
<img class="lozad" border="0" src="{{ asset('images/dummy.png') }}" data-src="{{ asset('images/logo-qualitaet-22.png') }}" alt="Top Kundenservice" height="78">
|
||||
<img class="lozad" border="0" src="{{ asset('images/dummy.png') }}" data-src="{{ asset('images/logo-qualitaet.png') }}" alt="Top Kundenservice" height="78">
|
||||
</div>
|
||||
<ul class="c4">
|
||||
<li>Spezialist für Kulturreisen </li>
|
||||
|
|
@ -164,14 +180,7 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<div class="clearfix" style="margin-bottom: 10px; margin-top: 0;">
|
||||
<div id="auorg-bg">
|
||||
<a href="https://www.ausgezeichnet.org" target="_blank" title="Unabhängige Bewertungen, Kundenbewertungen und Gütesiegel von AUSGEZEICHNET.ORG" class="auorg-br">
|
||||
<span style="font-size:8px;font-weight:normal;text-transform:uppercase;">AUSGEZEICHNET.ORG</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div><!-- end row -->
|
||||
|
||||
|
|
@ -184,7 +193,7 @@
|
|||
{{ render(controller('AppBundle:Component:footer')) }}
|
||||
|
||||
|
||||
<a class="js-go-to u-go-to-v1 animated" href="#!" data-type="fixed" data-offset-top="400" data-show-effect="zoomIn" data-hide-effect="zoomOut" data-position='{"bottom": 15, "right": 15 }'>
|
||||
<a class="js-go-to u-go-to-v1 animated" href="#!" data-type="fixed" data-offset-top="400" data-show-effect="zoomIn" data-hide-effect="zoomOut" data-position='{"bottom": 65, "left": 12 }'>
|
||||
<i class="icon-up-open-big"></i>
|
||||
</a>
|
||||
</div><!-- end wrapper -->
|
||||
|
|
@ -206,7 +215,6 @@
|
|||
});
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" src="https://siegel.ausgezeichnet.org/widgets/js/55b648290cf257aef3483d90/widget.js" data-cookieconsent="marketing"></script><!-- Ausgezeichnet.org-Siegel: End -->
|
||||
|
||||
{% endblock javascripts %}
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -39,12 +39,12 @@
|
|||
<footer class="footer clearfix">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||
<div class="col-md-5 col-sm-6 col-xs-12">
|
||||
<p class="hl4">Ihre Vorteile bei STERN TOURS</p>
|
||||
<p>Unsere Produktauswahl ist vielfältig. Neben dem Pauschaltourismus und Jugendreisen sind wir auf individuelle Kulturreisen spezialisiert.</p>
|
||||
<p>Unsere Produktauswahl ist vielfältig. Neben dem Pauschaltourismus sind wir auf individuelle Kulturreisen spezialisiert.</p>
|
||||
|
||||
|
||||
<img class="left-img lozad" src="{{ asset('/images/dummy.png') }}" data-src="{{ asset('/images/STERN_22-Jahre.png') }}" alt="Stern Tours 20 Jahre">
|
||||
<img class="left-img lozad" src="{{ asset('/images/dummy.png') }}" data-src="{{ asset('/images/STERN_1998.png') }}" alt="Stern Tours seit 1998">
|
||||
<ul class="c4">
|
||||
<li>Spezialist seit 1998</li>
|
||||
<li>Top Service</li>
|
||||
|
|
@ -53,20 +53,25 @@
|
|||
</ul>
|
||||
</div><!-- end col -->
|
||||
|
||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||
<div class="col-md-7 col-sm-6 col-xs-12">
|
||||
<div class="row">
|
||||
<div class="col-md-6" style="margin-bottom: 1rem;">
|
||||
<div class="col-md-6 col-xs-12" style="margin-bottom: 1rem;">
|
||||
<p class="hl4">Reiseversicherung</p>
|
||||
{% image '@AppBundle/Resources/public/images/logos/rundv.png' %}
|
||||
<img class="img-responsive lozad" src="{{ asset('/images/dummy.png') }}" data-src="{{ asset_url }}" alt="R + V">
|
||||
{% endimage %}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<p class="hl4">Sicherheit</p>
|
||||
{% image '@AppBundle/Resources/public/images/logos/ssl.png' %}
|
||||
<img class="left-img lozad" src="{{ asset('/images/dummy.png') }}" data-src="{{ asset_url }}" alt="SSL" style="margin-top: 0.3rem;">
|
||||
{% endimage %}
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-xs-12">
|
||||
<div style="padding: 20px 0 0 0;"> </div>
|
||||
<a href="/ueber-uns#atmosfair"><img class="img-responsive lozad" src="{{ asset('/images/dummy.png') }}" style="max-width: 300px;" data-src="/docs/images/logo_atmosfair_blue.png" alt="atmosfair"></a>
|
||||
<div style="padding: 20px 0 0 0;"> </div>
|
||||
<a href="/ueber-uns#atmosfair" style="color: #fff; text-decoration: none; font-size: 1.2rem;">> mehr erfahren</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -92,4 +97,10 @@
|
|||
</div><!-- end col -->
|
||||
</div><!-- end row -->
|
||||
</div><!-- end container -->
|
||||
</div><!-- end copyrights -->
|
||||
</div><!-- end copyrights -->
|
||||
|
||||
|
||||
|
||||
<!-- Ausgezeichnet.org-Dynamic-Seal: Begin -->
|
||||
<div class="auorgDynamicSeal" auorg-data-type="rounded"></div>
|
||||
<script src="https://siegel.ausgezeichnet.org/widgets/55b648290cf257aef3483d90/dynamic-seal.js?lang=de_DE" defer> </script> <!-- Ausgezeichnet.org-Dynamic-Seal: End -->
|
||||
|
|
@ -187,7 +187,7 @@
|
|||
{# @var nav_page \AppBundle\Entity\Page #}
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" href="{{ nav_page.urlPath }}">
|
||||
<i class="fa fa-star"></i> {{ nav_page.title|replace({'Reisen': ''}) }} <span class="hidden-md">Reisen</span>
|
||||
<i class="fa fa-star"></i> {{ nav_page.title|replace({'Reisen': ''}) }} <span class="hidden-md hidden-lg">Reisen</span>
|
||||
</a>
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
|
|
@ -278,12 +278,17 @@
|
|||
<li role="menuitem" itemprop="name">
|
||||
<a itemprop="url" href="/tuerkei-reisen" title="Türkei Reisen"><i class="fa fa-star"></i> Türkei Reisen </a>
|
||||
</li>
|
||||
<li role="menuitem" itemprop="name">
|
||||
<a itemprop="url" href="/israel-reisen" title="Israel Reisen"><i class="fa fa-star"></i> Israel Reisen </a>
|
||||
</li>
|
||||
<!--
|
||||
<li role="menuitem" itemprop="name">
|
||||
<a itemprop="url" href="/usbekistan-reisen" title="Usbekistan Reisen"><i class="fa fa-star"></i> Usbekistan Reisen </a>
|
||||
</li>
|
||||
<li role="menuitem" itemprop="name">
|
||||
<a itemprop="url" href="/marokko-urlaub" title="Marokko Reisen"><i class="fa fa-star"></i> Marokko Reisen</a>
|
||||
</li>
|
||||
-->
|
||||
<li class="divider"></li>
|
||||
|
||||
<li role="menuitem" itemprop="name">
|
||||
|
|
@ -305,6 +310,11 @@
|
|||
<i class="fa fa-book"></i> Reisemagazin
|
||||
</a>
|
||||
</li>
|
||||
<li role="menuitem" itemprop="name">
|
||||
<a itemprop="url" href="/reisenews" title="Reisenews">
|
||||
<i class="fa fa-newspaper-o"></i> Reisenews
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<div class="home-message text-center">
|
||||
<div class="home-info-box">
|
||||
<div id="eKomiSeal_default" class="eKomi-header" style="padding-top: 5px;padding-left: 2px;">
|
||||
<img class="lozad" border="0" src="{{ asset('images/dummy.png') }}" data-src="/bundles/app/images/logo-qualitaet-22.png" alt="Top Kundenservice" height="78">
|
||||
<img class="lozad" border="0" src="{{ asset('images/dummy.png') }}" data-src="/bundles/app/images/logo-qualitaet.png" alt="Top Kundenservice" height="78">
|
||||
</div>
|
||||
<ul class="c4">
|
||||
<li>Spezialist für Kulturreisen </li>
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<div class="home-message text-center">
|
||||
<div class="home-info-box">
|
||||
<div id="eKomiSeal_default" class="eKomi-header" style="padding-top: 5px;padding-left: 2px;">
|
||||
<img class="lozad" border="0" src="{{ asset('images/dummy.png') }}" data-src="{{ asset('images/logo-qualitaet-22.png') }}" alt="Top Kundenservice" height="78">
|
||||
<img class="lozad" border="0" src="{{ asset('images/dummy.png') }}" data-src="{{ asset('images/logo-qualitaet.png') }}" alt="Top Kundenservice" height="78">
|
||||
</div>
|
||||
<ul class="c4">
|
||||
<li>Spezialist für Kulturreisen </li>
|
||||
|
|
|
|||
|
|
@ -1,32 +1,37 @@
|
|||
{# @var child_page \AppBundle\Entity\Page #}
|
||||
<div class="col-md-4 col-sm-6">
|
||||
<div class="travel-wrapper get-box-link">
|
||||
<div class="item text-left">
|
||||
<div class="item-img">
|
||||
<div class="lb">
|
||||
{% if child_page.boxStar is not empty %}
|
||||
<div class="cstar_left">{{ child_page.boxStar|raw }}</div>
|
||||
{% endif %}
|
||||
{% if child_page.travelProgram is not empty and child_page.travelProgram.lowestPrice > 0 %}
|
||||
<div class="cprice">ab {{ child_page.travelProgram.lowestPrice|number_format }} € p.P.</div>
|
||||
{% endif %}
|
||||
{% if child_page.boxDiscount is not empty %}
|
||||
<div class="cdiscount">{{ child_page.boxDiscount|raw }}</div>
|
||||
{% endif %}
|
||||
{% if child_page.model == 'feedback'%}
|
||||
<div class="cdiscount">{{ child_page.date|date }}</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
<div class="item text-left">
|
||||
<div class="item-img">
|
||||
<div class="lb">
|
||||
{% if child_page.boxStar is not empty %}
|
||||
<div class="cstar_left">{{ child_page.boxStar|raw }}</div>
|
||||
{% endif %}
|
||||
{% if child_page.travelProgram is not empty and child_page.travelProgram.lowestPrice > 0 %}
|
||||
<div class="cprice">ab {{ child_page.travelProgram.lowestPrice|number_format }} € p.P.</div>
|
||||
{% endif %}
|
||||
{% if child_page.boxDiscount is not empty %}
|
||||
<div class="cdiscount">{{ child_page.boxDiscount|raw }}</div>
|
||||
{% endif %}
|
||||
{% if child_page.model == 'feedback'%}
|
||||
<div class="cdiscount">{{ child_page.date|date }}</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% include 'default/components/pageBoxImage.html.twig' with {page: child_page} %}
|
||||
</div>
|
||||
{% include 'default/components/pageBoxImage.html.twig' with {page: child_page} %}
|
||||
|
||||
<div class="box_mid">
|
||||
<div class="hl5">{{ child_page.title }}</div>
|
||||
|
||||
<p>{{ child_page.description }}</p>
|
||||
</div>
|
||||
<a class="item-button is-box-link dobble_line" href="{{ child_page.urlPath }}" title="{{ child_page.title }}">
|
||||
<span>{{ child_page.title }}</span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="box_mid">
|
||||
<div class="hl5">{{ child_page.title }}</div>
|
||||
<p>{{ child_page.boxBody ?? child_page.description }}</p>
|
||||
</div>
|
||||
<a class="item-button is-box-link dobble_line" href="{{ child_page.urlPath }}" title="{{ child_page.title }}">
|
||||
<span>{{ child_page.title }}</span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,27 @@
|
|||
{% if page.boxImageUrl is not empty %}
|
||||
{% set image_url = page.boxImageUrl %}
|
||||
{% set image_alt = page.travelProgram.title|default(page.title) %}
|
||||
{% elseif page.travelProgram is not empty and page.travelProgram.previewImage is not empty %}
|
||||
{% set image_url = 'uploads/travel_program/' ~ page.travelProgram.previewImage.fileNameWithExtension %}
|
||||
{% set image_alt = page.title %}
|
||||
{% elseif page.fewoLodging is not empty and page.fewoLodging.images is not empty and page.fewoLodging.images[0] is not empty %}
|
||||
{% set image_url = '_uploads/images/' ~ page.fewoLodging.images[0].file %}
|
||||
{% set image_alt = page.title %}
|
||||
{% if page.boxBody is not empty and page.boxBodyImage %}
|
||||
{% set image_url = page.boxBodyImage['thumb_url'] %}
|
||||
{% set image_alt = page.boxBodyImage['title'] %}
|
||||
<div class="img-background lozad" data-real-url="{{ box_image_url }}" data-background-image="{{ image_url }}" style="background-image:url({{ asset('images/placeholder-image.png') }});"></div>
|
||||
{% else %}
|
||||
{% set image_url = asset('/bundles/app/images/no-picture.png')%}
|
||||
{% set image_alt = 'Kein Vorschaubild vorhanden' %}
|
||||
{% endif %}
|
||||
<div class="img-background lozad" data-background-image="{{ image(image_url|trim('/')).cropResize(360).guess(70) }}" style="background-image:url({{ asset('images/placeholder-image.png') }})"></div>
|
||||
<noscript>
|
||||
<img width="234" data-url="{{ image_url }}" height="180" src="{{ image(image_url|trim('/')).cropResize(360).guess(70) }}" class="img-responsiv img-responsiv-item" style="">
|
||||
</noscript>
|
||||
{% if page.boxImageUrl is not empty %}
|
||||
{% set image_url = page.boxImageUrl %}
|
||||
{% set image_alt = page.travelProgram.title|default(page.title) %}
|
||||
{% elseif page.travelProgram is not empty and page.travelProgram.previewImage is not empty %}
|
||||
{% set image_url = 'uploads/travel_program/' ~ page.travelProgram.previewImage.fileNameWithExtension %}
|
||||
{% set image_alt = page.title %}
|
||||
{% elseif page.fewoLodging is not empty and page.fewoLodging.images is not empty and page.fewoLodging.images[0] is not empty %}
|
||||
{% set image_url = '_uploads/images/' ~ page.fewoLodging.images[0].file %}
|
||||
{% set image_alt = page.title %}
|
||||
{% elseif page.boxBody is not empty and page.boxBodyImage %}
|
||||
{% set image_url = page.boxBodyImage['thumb_url'] %}
|
||||
{% set image_alt = page.boxBodyImage['title'] %}
|
||||
{% else %}
|
||||
{% set image_url = asset('/bundles/app/images/no-picture.png')%}
|
||||
{% set image_alt = 'Kein Vorschaubild vorhanden' %}
|
||||
{% endif %}
|
||||
|
||||
<div class="img-background lozad" data-background-image="{{ image(image_url|trim('/')).cropResize(360).guess(70) }}" style="background-image:url({{ asset('images/placeholder-image.png') }})"></div>
|
||||
<noscript>
|
||||
<img width="234" data-url="{{ image_url }}" height="180" src="{{ image(image_url|trim('/')).cropResize(360).guess(70) }}" class="img-responsiv img-responsiv-item" style="">
|
||||
</noscript>
|
||||
{% endif %}
|
||||
|
|
@ -7,5 +7,6 @@
|
|||
travel_guide_sidebar_widget_block: block('travel_guide_sidebar_widget') ?? null,
|
||||
travel_magazine_sidebar_widget_block: block('travel_magazine_sidebar_widget') ?? null,
|
||||
offers_sidebar_widget_block: block('offers_sidebar_widget') ?? null,
|
||||
news_sidebar_widget_block: block('news_sidebar_widget') ?? null,
|
||||
feedbacks_sidebar_widget_block: block('feedbacks_sidebar_widget') ?? null,
|
||||
} %}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
<div class="box-slider">
|
||||
{% for page in pages %}
|
||||
|
||||
<div class="travel-wrapper slide{{ loop.first ? ' active' }}">
|
||||
|
||||
<a href="{{ page.urlPath|default('javascript:void(0);') }}" class="item text-center">
|
||||
|
|
@ -17,21 +16,22 @@
|
|||
</div>
|
||||
|
||||
<div class="box_mid">
|
||||
<div class="hl5">{{ page.title }}</div>
|
||||
|
||||
<p>{{ page.boxBody ?? page.description }}</p>
|
||||
|
||||
{% if target_widget == 'news-widget' and page.date is not empty %}
|
||||
<div class="text-muted text-center">Vom: {{ page.date|date('d.m.Y') }}</div>
|
||||
{% endif %}
|
||||
<div class="hl5">{{ page.title }} </div>
|
||||
<p>{{ page.description }}</p>
|
||||
{% if page.travelProgram is not empty and page.travelProgram.lowestPrice > 0 %}
|
||||
<div class="price">
|
||||
Für {{ page.travelProgram.lowestPrice|number_format }},- € p.P.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div><!-- end travel-wrapper -->
|
||||
{% endfor %}
|
||||
|
||||
<div class="item-switch clearfix">
|
||||
<a href="javascript:void(0);" class="item-button-prev">zurück</a>
|
||||
<a href="javascript:void(0);" class="item-button-next">weiter</a>
|
||||
|
|
|
|||
|
|
@ -10,8 +10,12 @@
|
|||
|
||||
{% for slide in slides %}
|
||||
<a href="{{ slide.urlPath|default('javascript:void(0);') }}" class="slide{{ loop.first ? ' active' }}">
|
||||
<div class="hl5">{{ slide.title }}</div>
|
||||
<p>{{ slide.boxBody|default(slide.description) }}</p>
|
||||
|
||||
|
||||
<div class="box_mid">
|
||||
<div class="hl5">{{ slide.title }}</div>
|
||||
<p>{{ slide.description }}</p>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
|||
|
|
@ -71,30 +71,18 @@ Nr., Zimmertyp, Geschlecht, Vorname, Nachname, Geburtsdatum
|
|||
{% set travelerIndex = 0 %}
|
||||
{% set travelerCollection = booking_request.travelers|slice(0, (booking_request.travelerCount + booking_request.childrenCount)) %}
|
||||
{% for room in booking_request.occupiedRooms %}
|
||||
{% if(room.type == 1) %}
|
||||
{{ loop.index }}. Einzelzimmer Erwachsener, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{% if room.type == 1 %}
|
||||
{{ loop.index }}. Einzelzimmer Erwachsener, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName }}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{% set travelerIndex = travelerIndex + 1 %}
|
||||
{% if(room.child == 1) %}
|
||||
{{ loop.index }}. Einzelzimmer Kind, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{% set travelerIndex = travelerIndex + 1 %}
|
||||
{% endif %}
|
||||
{% elseif (room.type == 2) %}
|
||||
{{ loop.index }}. Doppelzimmer Erwachsener, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{{ loop.index }}. Doppelzimmer Erwachsener, {{ travelerCollection[travelerIndex+1].sexName }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName -}}, {{ travelerCollection[travelerIndex+1].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{{ loop.index }}. Doppelzimmer Erwachsener, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName }}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{{ loop.index }}. Doppelzimmer Erwachsener, {{ travelerCollection[travelerIndex+1].sexName }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName }}, {{ travelerCollection[travelerIndex+1].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{% set travelerIndex = travelerIndex + 2 %}
|
||||
{% if(room.child == 1) %}
|
||||
{{ loop.index }}. Doppelzimmer Kind, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{% set travelerIndex = travelerIndex + 1 %}
|
||||
{% endif %}
|
||||
{% elseif (room.type == 3) %}
|
||||
{{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex+1].sexName }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName -}}, {{ travelerCollection[travelerIndex+1].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex+2].sexName }}, {{ travelerCollection[travelerIndex+2].firstName }}, {{ travelerCollection[travelerIndex+2].lastName -}}, {{ travelerCollection[travelerIndex+2].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName }}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex+1].sexName }}, {{ travelerCollection[travelerIndex+1].firstName }}, {{ travelerCollection[travelerIndex+1].lastName }}, {{ travelerCollection[travelerIndex+1].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{{ loop.index }}. Dreibettzimmer Erwachsener, {{ travelerCollection[travelerIndex+2].sexName }}, {{ travelerCollection[travelerIndex+2].firstName }}, {{ travelerCollection[travelerIndex+2].lastName }}, {{ travelerCollection[travelerIndex+2].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{% set travelerIndex = travelerIndex + 3 %}
|
||||
{% if(room.child == 1) %}
|
||||
{{ loop.index }}. Dreibettzimmer Kind, {{ travelerCollection[travelerIndex].sexName }}, {{ travelerCollection[travelerIndex].firstName }}, {{ travelerCollection[travelerIndex].lastName -}}, {{ travelerCollection[travelerIndex].birthDate }}, {{ travelerCollection[travelerIndex].nationalityName(nationalities) }}
|
||||
{% set travelerIndex = travelerIndex + 1 %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,21 +26,37 @@
|
|||
|
||||
<form class="st-booking-form" method="post" data-toggle="validator">
|
||||
|
||||
|
||||
<div class="alert alert-danger hide" id="form-alert-error" style="margin-bottom:10px; padding: 10px 15px;">
|
||||
Das Buchungsformular wurde nicht abgeschickt, da noch nicht alle Pflichtfelder ausgefüllt wurden.<br>
|
||||
Bitte pürfen Sie Ihre Eingaben und versuchen Sie es erneut.
|
||||
</div>
|
||||
|
||||
{% if errors %}
|
||||
<div class="alert alert-danger" id="form-alert-form-errors" style="margin-bottom:10px; padding: 10px 15px;">
|
||||
<ul style="list-style: none;">
|
||||
{% for error in errors %}
|
||||
<li>{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{#
|
||||
{{ form_errors(form) }}
|
||||
{% spaceless %}
|
||||
{% if not form.vars.valid %}
|
||||
|
||||
<ul>
|
||||
<div class="alert alert-danger" style="margin-bottom:10px; padding: 10px 15px;">
|
||||
<ul style="list-style: none;">
|
||||
{% for error in form.vars.errors.form.getErrors(true) %}
|
||||
<li>{{ error.message }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endspaceless %}
|
||||
|
||||
{{ form_errors(form.email) }}
|
||||
#}
|
||||
|
||||
<div id="message"></div>
|
||||
|
||||
|
|
@ -275,7 +291,6 @@
|
|||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -346,6 +361,7 @@
|
|||
|
||||
<div class="form-box">
|
||||
<div class="">
|
||||
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<h5>Reiseprogramm mit Anzeige der Reisetage</h5>
|
||||
</div>
|
||||
|
|
@ -385,7 +401,7 @@
|
|||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#accordion_pd" href="#collapse_pd" aria-expanded="true">
|
||||
<h3><span>Reiseablauf mit Reisetagen einblenden</span><i class="indicator pull-right icon-plus"></i></h3>
|
||||
</a>
|
||||
<div id="collapse_pd" class="panel-collapse collapse" aria-expanded="true" style="">
|
||||
<div id="collapse_pd" class="panel-collapse collapse" aria-expanded="true">
|
||||
<div class="panel-body">
|
||||
{% for travel_program_date in travel_program_dates if travel_program_date.count > 0 %}
|
||||
{% if travel_program_dates|length != travel_program_date.count +1 %}
|
||||
|
|
@ -425,6 +441,8 @@
|
|||
</div><!-- accordion -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-box">
|
||||
<div class="">
|
||||
|
|
@ -485,6 +503,7 @@
|
|||
|
||||
<div class="form-group col-md-12 col-sm-12 col-xs-12">
|
||||
{{ form_field_pho(form.salutation, 'Anrede', {'label_attr': {class: 'sr-only'}}) }}
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6 col-sm-6 col-xs-12">
|
||||
|
|
@ -598,12 +617,12 @@
|
|||
{#{{ dump(room.vars.value.roomType) }}#}
|
||||
{% set currentIndex = currentIndex + 1 %}
|
||||
|
||||
<div class="row st-traveler st-traveler-{{ currentIndex }}"
|
||||
<div class="st-traveler st-traveler-{{ currentIndex }}"
|
||||
data-st-traveler-index="{{ currentIndex }}"
|
||||
data-room-index="{{ loop.parent.loop.index }}"
|
||||
data-room-type="{{ room.vars.value.type }}"
|
||||
style="display: ; border-bottom:2px solid #ffc926; margin-bottom: 20px; padding-bottom: 10px;">
|
||||
data-room-type="{{ room.vars.value.type }}">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 col-sm-12 col-xs-12" style="margin-bottom:10px; padding-bottom:10px; border-bottom:1px solid #fff;">
|
||||
<button class="btn btn-primary btn-sm border-radius st-traveller-index" type="button">
|
||||
{% set roomType = "" %}
|
||||
|
|
@ -624,12 +643,10 @@
|
|||
</div>
|
||||
|
||||
|
||||
<div class="col-md-3 col-sm-12 col-xs-12">
|
||||
<div class="col-md-4 col-sm-12 col-xs-12">
|
||||
<div class="form-group" style="margin-top:0px;">
|
||||
<div class="">
|
||||
{{ form_field_pho(traveler.sex, 'Geschlecht', {
|
||||
required: false
|
||||
}) }}
|
||||
{{ form_field_pho(traveler.sex, 'Geschlecht', { required: true }) }}
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
|
|
@ -643,8 +660,8 @@
|
|||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 col-sm-12 col-xs-12">
|
||||
|
||||
<div class="col-md-4 col-sm-12 col-xs-12">
|
||||
<div class="form-group">
|
||||
<div class="">
|
||||
{{ form_field_pho(traveler.lastName, 'Nachname') }}
|
||||
|
|
@ -652,24 +669,27 @@
|
|||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-offset-3 col-md-4 col-sm-12 col-xs-12">
|
||||
<div class="form-group" style="margin-top:0px;">
|
||||
<div class="nationality_select" data-toggle="#nationality_entry_{{ currentIndex }}">
|
||||
{{ form_field_pho(traveler.nationality, 'Nationalität') }}
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-offset-4 col-md-4 col-sm-6 col-xs-12">
|
||||
<div class="form-group" style="margin-top:0px;">
|
||||
<div class="nationality_select" data-toggle="#nationality_entry_{{ currentIndex }}">
|
||||
{{ form_field_pho(traveler.nationality, 'Nationalität') }}
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-5 col-sm-12 col-xs-12">
|
||||
<div class="form-group">
|
||||
<div class="">
|
||||
{{ form_field_pho(traveler.birthDate, 'Geburtsdatum (04.01.1964)') }}
|
||||
</div>
|
||||
<div class="col-md-4 col-sm-6 col-xs-12">
|
||||
<div class="form-group">
|
||||
<div class="">
|
||||
{{ form_field_pho(traveler.birthDate, 'Geburtsdatum (04.01.1964)') }}
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
<div class="help-block with-errors"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="display: block; border-top:2px solid #ffc926; margin-top: 20px; padding-top: 10px;">
|
||||
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
|
||||
|
|
@ -701,9 +721,8 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div> <!-- row -->
|
||||
|
||||
</div> <!-- st traveler -->
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
content: '-';
|
||||
}
|
||||
</style>
|
||||
<section class="clearfix">
|
||||
<section class="clearfix" id="bookingConfirmationSent">
|
||||
|
||||
<div class="content-copy">
|
||||
|
||||
|
|
@ -169,10 +169,6 @@
|
|||
<td>Nachname</td>
|
||||
<td>{{ booking.lastName }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Vorname</td>
|
||||
<td>{{ booking.firstName }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Straße, Hausnummer</td>
|
||||
<td>{{ booking.street }}</td>
|
||||
|
|
@ -184,10 +180,6 @@
|
|||
<tr>
|
||||
<td>Ort</td>
|
||||
<td>{{ booking.city }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Land</td>
|
||||
<td>{{ booking.countryId }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Telefon tagsüber</td>
|
||||
|
|
@ -255,7 +247,7 @@
|
|||
<td style="text-align: left;">{{ travelerCollection[travelerIndex].firstName }}</td>
|
||||
<td style="text-align: left;">{{ travelerCollection[travelerIndex].lastName -}}</td>
|
||||
<td style="text-align: left;">{{ travelerCollection[travelerIndex].birthDate }}</td>
|
||||
<td style="text-align: left;">{{ travelerCollection[travelerIndex].nationalityName(nationalities) }}</td
|
||||
<td style="text-align: left;">{{ travelerCollection[travelerIndex].nationalityName(nationalities) }}</td>
|
||||
</tr>
|
||||
{% set travelerIndex = travelerIndex + 1 %}
|
||||
{% endif %}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,14 @@
|
|||
|
||||
{% block body %}
|
||||
<section class="clearfix">
|
||||
|
||||
{% if page.model == "news" %}
|
||||
{% if page.date is not empty %}
|
||||
<div class="text-muted text-left mb-3">News vom: {{ page.date|date('d.m.Y') }}</div>
|
||||
{% endif %}
|
||||
<h1>{{ page.title }}</h1>
|
||||
|
||||
{% endif %}
|
||||
{{ page.content|raw|keywords|lozad }}
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
|
@ -107,7 +107,7 @@
|
|||
|
||||
{% if(api.faqs is defined) %}
|
||||
<section class="stern-faq" itemscope itemtype="https://schema.org/FAQPage">
|
||||
<h2 class="h3 h3l">Häufige Fragen zu Urlaubsreisen in Ägypten</h2>
|
||||
<h2 class="h3 h3l">Häufige Fragen (FAQ)</h2>
|
||||
<div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
|
||||
{% for faq in api.faqs %}
|
||||
<div class="panel panel-default" itemscope itemprop="mainEntity" itemtype="https://schema.org/Question">
|
||||
|
|
@ -146,11 +146,14 @@
|
|||
<div class="item-img item-absolute">
|
||||
<div class="img-background lozad" data-real-url="{{ child_page.box_image_url }}" data-background-image="{{ child_page.box_image_url }}" style="background-image:url({{ asset('images/placeholder-image.png') }});"></div>
|
||||
</div>
|
||||
<div class="box_mid">
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="box_mid">
|
||||
<div class="hl5">{{ child_page.name }} </div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="box_mid">
|
||||
|
||||
<div class="hl5">{{ child_page.name }}</div>
|
||||
</div>
|
||||
{# #}
|
||||
<a class="item-button is-box-link dobble_line" href="{{ child_page.url }}" title="{{ child_page.name }}">
|
||||
<span>{{ child_page.name }}</span>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
{% endif %}
|
||||
<div class="box_mid">
|
||||
<div class="hl5">{{ child_page.title }}</div>
|
||||
<p>{{ child_page.boxBody ?? child_page.description }}</p>1
|
||||
<p>{{ child_page.boxBody ?? child_page.description }}</p>
|
||||
</div>
|
||||
<a class="item-button is-box-link dobble_line" href="{{ child_page.urlPath }}" title="{{ child_page.title }}">
|
||||
<span>{{ child_page.title }}</span>
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@
|
|||
{% set has_three_bed_room = (travel_program.travelDates|first).prices[5] is defined %}
|
||||
{% set has_double_bed_room = (travel_program.travelDates|first).prices[3] is defined %}
|
||||
{% set has_singel_bed_room = (travel_program.travelDates|first).prices[1] is defined %}
|
||||
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -70,12 +70,15 @@
|
|||
<div class="col-md-6 col-sm-6 col-xs-12">{{ form_field_pho(contact_form.zipCode, 'Postleitzahl') }}</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-12">{{ form_field_pho(contact_form.city, 'Ort') }}</div>
|
||||
<div class="form-group col-md-12 col-sm-12 col-xs-12">{{ form_field_pho(contact_form.nation) }}</div>
|
||||
<div class="form-group col-md-6 col-sm-6 col-xs-12">
|
||||
{{ form_field_pho(contact_form.phone, 'Telefon tagsüber') }}
|
||||
<div class="form-group col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="required">
|
||||
{{ form_field_pho(contact_form.phone, 'Telefon (Pflichtfeld)') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-6 col-xs-12">{{ form_field_pho(contact_form.mobilePhone, 'Telefon mobil') }}</div>
|
||||
<div class="form-group col-md-12 col-sm-12 col-xs-12">
|
||||
<div class="required">
|
||||
{{ form_field_pho(contact_form.email, 'E-Mail-Adresse') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group col-md-12 col-sm-12 col-xs-12">
|
||||
{{ form_field_pho(contact_form.travelerCount) }}
|
||||
|
|
@ -114,28 +117,21 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
|
||||
{% if re_error != "" %}
|
||||
<div class="alert alert-danger" style="margin-bottom: 0px;padding: 10px 15px;">
|
||||
{{ re_error }}
|
||||
</div>
|
||||
<br>
|
||||
{% endif %}
|
||||
|
||||
<div class="g-recaptcha" data-sitekey="6LfjBm8UAAAAAIN68ozw90OctADqjXSv7O-E_epJ"></div>
|
||||
|
||||
<br clear="all">
|
||||
</div>
|
||||
<div class="col-md-12 col-sm-12 col-xs-12">
|
||||
<button type="submit" value="SEND" id="submit" class="aligncenter btn btn-primary btn-lg border-radius">Anfrage absenden</button>
|
||||
</div>
|
||||
</div><!-- end form-box -->
|
||||
|
||||
{{ form_rest(contact_form) }}
|
||||
</form>
|
||||
|
||||
</div><!-- end contact-form -->
|
||||
|
||||
|
||||
</section>
|
||||
{% endblock body %}
|
||||
|
|
@ -3,9 +3,11 @@
|
|||
{% block canonical_tag %}{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Vielen Dank, wir haben Ihre Anfrage erhalten!</h1>
|
||||
<section class="clearfix" id="contactConfirmationSent">
|
||||
<h1>Vielen Dank, wir haben Ihre Anfrage erhalten!</h1>
|
||||
|
||||
<p>
|
||||
<a href="/">Zurück zur Startseite</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href="/">Zurück zur Startseite</a>
|
||||
</p>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
{% block body %}
|
||||
|
||||
<section class="clearfix">
|
||||
<section class="clearfix" id="fewoBookingConfirmationSent">
|
||||
|
||||
<div class="content-copy">
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ monolog:
|
|||
type: fingers_crossed
|
||||
action_level: error
|
||||
handler: nested
|
||||
excluded_404s: [ ]
|
||||
nested:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
app:
|
||||
resource: "@AppBundle/Controller/"
|
||||
type: annotation
|
||||
route2:
|
||||
path: /testpage
|
||||
defaults: { _controller: 'AppBundle:Default:testpage' }
|
||||
route1:
|
||||
path: /{req}
|
||||
defaults: { _controller: 'AppBundle:Default:default' }
|
||||
|
|
|
|||
|
|
@ -479,10 +479,14 @@ class AdminController extends Controller
|
|||
)
|
||||
);
|
||||
|
||||
$mailto = 'stern@stern-tours.de';
|
||||
if(Util::isLocal()) {
|
||||
$mailto = 'kevin.adametz@me.com';
|
||||
}
|
||||
$this->get('mailer')->send(\Swift_Message::newInstance()
|
||||
->setSubject('FEWO-BUCHUNG: '. $lodging->getName())//$travelProgram->getTitle() .'('. $travelDate->getName() .')') //TODO !!! allein hierfür braucht man mehr infos in $fewoBookingRequest
|
||||
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
||||
->setTo('stern@stern-tours.de')
|
||||
->setTo($mailto)
|
||||
->setBody(
|
||||
$this->renderView('default/email/fewoBookingServiceEmail.txt.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
|
|
|
|||
|
|
@ -149,6 +149,8 @@ class BookingController extends Controller
|
|||
|
||||
$htmlSummary = [];
|
||||
$bookingPriceInfo = [];
|
||||
$errors = [];
|
||||
|
||||
$totalPrice = $this->calculatePrice($travelDate, $bookingRequest, $travelProgram->getCategory()->getId(), $travelProgram->getDepositPercent(), $htmlSummary, $bookingPriceInfo);
|
||||
|
||||
if ($action == '/buchen')
|
||||
|
|
@ -156,25 +158,36 @@ class BookingController extends Controller
|
|||
$breadcrumbEntries = Util::createBreadcrumb($travelProgramPage);
|
||||
$breadcrumbEntries[] = new BreadcrumbEntry('Buchen');
|
||||
|
||||
if ($request->getMethod() === 'POST' && $form->isValid())
|
||||
if ($request->getMethod() == 'POST')
|
||||
{
|
||||
$errors = array();
|
||||
foreach ($form as $fieldName => $formField) {
|
||||
foreach ($formField->getErrors(true) as $error) {
|
||||
$errors[$fieldName] = $error->getMessage();
|
||||
}
|
||||
}
|
||||
if(!$bookingRequest->checkIsRoomSelected()){
|
||||
$errors['room'] = 'Bitte wählen Sie mindestens ein Zimmer aus.';
|
||||
}
|
||||
}
|
||||
|
||||
if ($request->getMethod() === 'POST' && $form->isValid() && count($errors) == 0)
|
||||
{
|
||||
|
||||
$booking = $this->getDoctrine()->getRepository('AppBundle:TravelBooking')->createFromBookingRequest(
|
||||
$bookingRequest, $travelDate, $bookingPriceInfo);
|
||||
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
$em->persist($booking);
|
||||
$em->flush();
|
||||
|
||||
|
||||
$ret = Util::loadFromApi('booking/import', ['travel_booking_id' => $booking->getId()]);
|
||||
$error_crm = 'CRM Fehler: | interne travel_booking ID: '.$booking->getId();
|
||||
|
||||
|
||||
/*var_dump($bookingRequest->getTravelerCount());
|
||||
var_dump($bookingRequest->getChildrenCount());
|
||||
var_dump($bookingRequest->getTravelers());
|
||||
var_dump($bookingRequest->getOccupiedRooms());
|
||||
die();*/
|
||||
$this->get('mailer')->send(\Swift_Message::newInstance()
|
||||
->setSubject('Ihr Buchungsauftrag bei STERN TOURS')
|
||||
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
||||
|
|
@ -194,10 +207,14 @@ class BookingController extends Controller
|
|||
)
|
||||
);
|
||||
|
||||
$mailto = 'stern@stern-tours.de';
|
||||
if(Util::isLocal()) {
|
||||
$mailto = 'kevin.adametz@me.com';
|
||||
}
|
||||
$this->get('mailer')->send(\Swift_Message::newInstance()
|
||||
->setSubject('BUCHUNG: '. $travelProgram->getTitle() .'('. $travelDate->getName() .')')
|
||||
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
||||
->setTo("stern@stern-tours.de")
|
||||
->setTo($mailto)
|
||||
->setBody(
|
||||
$this->renderView('default/email/bookingServiceEmail.txt.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
|
|
@ -263,6 +280,7 @@ class BookingController extends Controller
|
|||
'total_price' => $totalPrice,
|
||||
'nationalities' => $nationalities,
|
||||
'booking_price_info' => $bookingPriceInfo,
|
||||
'errors' => count($errors) ? $errors : null,
|
||||
'mediator_terms_filename' => $travelProgram->getIsMediated()
|
||||
? $this->getDoctrine()->getRepository('AppBundle:TravelOrganizer')->find(1)->getFileName()
|
||||
: null
|
||||
|
|
|
|||
|
|
@ -27,17 +27,18 @@ class ComponentController extends Controller
|
|||
}
|
||||
|
||||
|
||||
public function getHeaderContent(){
|
||||
public function getHeaderContent()
|
||||
{
|
||||
|
||||
if(!$this->headerContent){
|
||||
$this->headerContent = Util::loadFromApi('cms/header/info', ['url'=>""]);
|
||||
if (!$this->headerContent) {
|
||||
$this->headerContent = Util::loadFromApi('cms/header/info', ['url' => ""]);
|
||||
}
|
||||
return $this->headerContent;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getHeaderTravelProgram($page){
|
||||
public function getHeaderTravelProgram($page)
|
||||
{
|
||||
$programmes = [
|
||||
'aegypten-reisen' => 1,
|
||||
'israel-reisen' => 22,
|
||||
|
|
@ -45,33 +46,33 @@ class ComponentController extends Controller
|
|||
'oman-reisen' => 194
|
||||
];
|
||||
$p_id = null;
|
||||
foreach($programmes as $key=>$id){
|
||||
if(strpos($_SERVER['REQUEST_URI'], $key) !== false){
|
||||
foreach ($programmes as $key => $id) {
|
||||
if (strpos($_SERVER['REQUEST_URI'], $key) !== false) {
|
||||
$p_id = $id;
|
||||
}
|
||||
}
|
||||
if($p_id === null){
|
||||
if($page){
|
||||
$p_id = $page->getId()%2 ? 1 : 22;
|
||||
if ($p_id === null) {
|
||||
if ($page) {
|
||||
$p_id = $page->getId() % 2 ? 1 : 22;
|
||||
}
|
||||
$p_id = 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$em = $this->getEntityManager();
|
||||
// $em->flush();
|
||||
// $em->flush();
|
||||
$TravelProgramRepo = $em->getRepository('AppBundle:TravelProgram');
|
||||
$TravelProgram = $TravelProgramRepo->find($p_id);
|
||||
$TravelProgram = $TravelProgramRepo->find($p_id);
|
||||
$em->getRepository('AppBundle:TravelPeriod')->getTrueTravelPeriods($TravelProgram, false, 1, 'start_week');
|
||||
|
||||
/*foreach($TravelProgram->getTravelDates('header') as $travelDate){
|
||||
var_dump($travelDate->getStart()->format("d.m.Y"));
|
||||
echo "<br>";
|
||||
}*/
|
||||
// $em->persist($TravelProgram);
|
||||
// $em->flush();
|
||||
// $em->persist($TravelProgram);
|
||||
// $em->flush();
|
||||
|
||||
|
||||
|
||||
|
||||
return $TravelProgram;
|
||||
}
|
||||
|
|
@ -83,16 +84,16 @@ class ComponentController extends Controller
|
|||
$header_travel_program = $this->getHeaderTravelProgram($page);
|
||||
|
||||
$local = [];
|
||||
foreach ($content->local as $key=>$value){
|
||||
foreach ($content->local as $key => $value) {
|
||||
$local[$key] = $value;
|
||||
}
|
||||
|
||||
$phone = [];
|
||||
foreach ($content->phone as $key=>$value){
|
||||
foreach ($content->phone as $key => $value) {
|
||||
$phone[$key] = $value;
|
||||
}
|
||||
return $this->render('default/components/header.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir') . '/..') . DIRECTORY_SEPARATOR,
|
||||
'nav_pages' => $navPages,
|
||||
'content' => $content,
|
||||
'local' => $local,
|
||||
|
|
@ -114,8 +115,8 @@ class ComponentController extends Controller
|
|||
public function breadcrumbAction(Page $page)
|
||||
{
|
||||
return $this->render('default/components/breadcrumb.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'breadcrumb_entries' => Util::createBreadcrumb($page),
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir') . '/..') . DIRECTORY_SEPARATOR,
|
||||
'breadcrumb_entries' => Util::createBreadcrumb($page),
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
@ -124,57 +125,45 @@ class ComponentController extends Controller
|
|||
{
|
||||
|
||||
return $this->render('default/components/sidebar/navSidebarApiWidgetInner.html.twig', [
|
||||
'api'=>$api,
|
||||
'api' => $api,
|
||||
'title' => "Reiseführer",
|
||||
]);
|
||||
}
|
||||
|
||||
public function navSidebarWidgetAction(Page $page, $title = 'Reiseprogramme')
|
||||
{
|
||||
if(!empty($page->getTitle())){
|
||||
if (!empty($page->getTitle())) {
|
||||
$title = $page->getTitle();
|
||||
}
|
||||
$pageRepo = $this->getEntityManager()->getRepository('AppBundle:Page');
|
||||
$view = [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir') . '/..') . DIRECTORY_SEPARATOR,
|
||||
'page' => $page,
|
||||
'slider_title' => $title,
|
||||
|
||||
];
|
||||
|
||||
if ($page->getHasChildren())
|
||||
{
|
||||
if ($page->getLvl() == 0)
|
||||
{
|
||||
if ($page->getHasChildren()) {
|
||||
if ($page->getLvl() == 0) {
|
||||
$view['nav_pages'] = $page->getChildren();
|
||||
|
||||
$view['nav_child_pages'] = [];
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$view['nav_pages'] = $pageRepo->getSiblings($page);
|
||||
$view['nav_child_pages'] = $page->getChildren();
|
||||
}
|
||||
$view['nav_open_node'] = $page;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$parent = $page->getParent();
|
||||
if ($parent)
|
||||
{
|
||||
if ($parent) {
|
||||
$view['nav_pages'] = $pageRepo->getSiblings($parent);
|
||||
if (empty($view['nav_pages']))
|
||||
{
|
||||
if (empty($view['nav_pages'])) {
|
||||
$view['nav_pages'] = $pageRepo->getSiblings($page);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$view['nav_child_pages'] = $pageRepo->getSiblings($page);
|
||||
}
|
||||
$view['nav_open_node'] = $parent;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$view['nav_pages'] = $pageRepo->getSiblings($page);
|
||||
$view['nav_child_pages'] = [];
|
||||
$view['nav_open_node'] = null;
|
||||
|
|
@ -189,7 +178,7 @@ class ComponentController extends Controller
|
|||
$combinedDestination = null;
|
||||
$destination = null;
|
||||
//todo need Country by name
|
||||
if(isset($api->country_id)){
|
||||
if (isset($api->country_id)) {
|
||||
$repo = $this->getEntityManager()->getRepository('AppBundle:TravelCountry');
|
||||
$destination = $repo->find($api->country_id);
|
||||
}
|
||||
|
|
@ -198,17 +187,17 @@ class ComponentController extends Controller
|
|||
$search_request_e = Util::getMySession('search_request_e');
|
||||
$search_request_c = Util::getMySession('search_request_c');
|
||||
|
||||
if($search_request_b){
|
||||
if ($search_request_b) {
|
||||
$timestap_b = strtotime($search_request_b);
|
||||
$search_request_b = new \DateTime();
|
||||
$search_request_b->setTimestamp($timestap_b);
|
||||
}
|
||||
if($search_request_e){
|
||||
if ($search_request_e) {
|
||||
$timestap_e = strtotime($search_request_e);
|
||||
$search_request_e = new \DateTime();
|
||||
$search_request_e->setTimestamp($timestap_e);
|
||||
}
|
||||
|
||||
|
||||
/*if($search_request_c){
|
||||
$repo = $this->getEntityManager()->getRepository('AppBundle:TravelCountry');
|
||||
$destination = $repo->find($search_request_c);
|
||||
|
|
@ -217,48 +206,43 @@ class ComponentController extends Controller
|
|||
return $this->render('default/components/sidebar/searchSidebarWidgetInner.html.twig', [
|
||||
'slider_title' => "suche",
|
||||
'search_form' => $this->createForm(SearchRequestType::class, [
|
||||
'c' =>$destination,
|
||||
'c' => $destination,
|
||||
'b' => $search_request_b ? $search_request_b : null,
|
||||
'e' => $search_request_e ? $search_request_e : null,
|
||||
'c2' => $combinedDestination,
|
||||
])->createView()
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function searchSidebarWidgetAction(Page $page, $title = 'Suche')
|
||||
{
|
||||
$combinedDestination = null;
|
||||
if ($page->getTravelProgram())
|
||||
{
|
||||
if ($page->getTravelProgram()) {
|
||||
$countries = $page->getTravelProgram()->getCountries();
|
||||
$destination = $countries->first();
|
||||
if (count($countries) > 1)
|
||||
{
|
||||
if (count($countries) > 1) {
|
||||
$combinedDestination = $countries[1];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
$destination = $page->getCountry();
|
||||
}
|
||||
|
||||
|
||||
$search_request_b = Util::getMySession('search_request_b');
|
||||
$search_request_e = Util::getMySession('search_request_e');
|
||||
$search_request_c = Util::getMySession('search_request_c');
|
||||
|
||||
if($search_request_b){
|
||||
if ($search_request_b) {
|
||||
$timestap_b = strtotime($search_request_b);
|
||||
$search_request_b = new \DateTime();
|
||||
$search_request_b->setTimestamp($timestap_b);
|
||||
}
|
||||
if($search_request_e){
|
||||
if ($search_request_e) {
|
||||
$timestap_e = strtotime($search_request_e);
|
||||
$search_request_e = new \DateTime();
|
||||
$search_request_e->setTimestamp($timestap_e);
|
||||
}
|
||||
|
||||
|
||||
/*if($search_request_c){
|
||||
$repo = $this->getEntityManager()->getRepository('AppBundle:TravelCountry');
|
||||
$destination = $repo->find($search_request_c);
|
||||
|
|
@ -279,11 +263,10 @@ class ComponentController extends Controller
|
|||
$repo = $this->getEntityManager()->getRepository('AppBundle:Page');
|
||||
$rootPage = $repo->find(13);
|
||||
$pages = $repo->getChildrenQueryBuilder($rootPage)
|
||||
->andWhere('IDENTITY(node.country) = '. $country->getId())
|
||||
->andWhere('IDENTITY(node.country) = ' . $country->getId())
|
||||
->andWhere('node.status > 0')
|
||||
->getQuery()
|
||||
->execute()
|
||||
;
|
||||
->execute();
|
||||
return $this->render('default/components/sidebar/pageSliderSidebarWidget.html.twig', [
|
||||
'slider_title' => $title,
|
||||
'target_widget' => 'travel-leader-widget',
|
||||
|
|
@ -296,11 +279,10 @@ class ComponentController extends Controller
|
|||
$repo = $this->getEntityManager()->getRepository('AppBundle:Page');
|
||||
$rootPage = $repo->find(2803);
|
||||
$pages = $repo->getChildrenQueryBuilder($rootPage)
|
||||
->andWhere('IDENTITY(node.country) = '. $country->getId())
|
||||
->andWhere('IDENTITY(node.country) = ' . $country->getId())
|
||||
->andWhere('node.status > 0')
|
||||
->getQuery()
|
||||
->execute()
|
||||
;
|
||||
->execute();
|
||||
return $this->render('default/components/sidebar/pageSliderSidebarWidget.html.twig', [
|
||||
'slider_title' => $title,
|
||||
'target_widget' => 'travel-magazine-widget',
|
||||
|
|
@ -329,68 +311,80 @@ class ComponentController extends Controller
|
|||
$repo = $this->getDoctrine()->getRepository('AppBundle:Page');
|
||||
return $country === null
|
||||
? $repo->findOffers()
|
||||
: $repo->findWithTravelProgramsOfCountry($country)
|
||||
;
|
||||
: $repo->findWithTravelProgramsOfCountry($country);
|
||||
}
|
||||
|
||||
public function feedbacksSidebarWidgetAction(TravelCountry $country, $title = 'Kundenfeedback')
|
||||
{
|
||||
return $this->render(':default/components/sidebar:textSliderSidebarWidget.html.twig', [
|
||||
return $this->render(':default/components/sidebar:pageSliderSidebarWidget.html.twig', [
|
||||
'slider_title' => $title,
|
||||
'target_widget' => 'feedback-widget',
|
||||
'slides' => $this->getDoctrine()->getRepository('AppBundle:Page')->findFeedbacks(
|
||||
$country->getFeedbackPage()->getId()),
|
||||
'pages' => $this->getDoctrine()->getRepository('AppBundle:Page')->findFeedbacks(
|
||||
$country->getFeedbackPage()->getId()
|
||||
),
|
||||
'theme' => 'gray-box',
|
||||
]);
|
||||
}
|
||||
|
||||
public function makeSidebarWidgetAction($site_loading = 'default', Page $page = null, $api=null, $search_form = null){
|
||||
public function newsSidebarWidgetAction($title = 'News')
|
||||
{
|
||||
$repo = $this->getEntityManager()->getRepository('AppBundle:Page');
|
||||
$rootPage = $repo->find(3153);
|
||||
|
||||
return $this->render(':default/components/sidebar:pageSliderSidebarWidget.html.twig', [
|
||||
'slider_title' => $title,
|
||||
'target_widget' => 'news-widget',
|
||||
'pages' => $this->getDoctrine()->getRepository('AppBundle:Page')->findFeedbacks($rootPage->getId()),
|
||||
'theme' => 'gray-box',
|
||||
]);
|
||||
}
|
||||
|
||||
public function makeSidebarWidgetAction($site_loading = 'default', Page $page = null, $api = null, $search_form = null)
|
||||
{
|
||||
|
||||
$show_seal_of_approval = false;
|
||||
//default
|
||||
switch ($site_loading){
|
||||
case 'home' :
|
||||
switch ($site_loading) {
|
||||
case 'home':
|
||||
$site = 'home';
|
||||
break;
|
||||
case 'search' :
|
||||
break;
|
||||
case 'search':
|
||||
$site = 'search';
|
||||
break;
|
||||
case 'default' :
|
||||
case 'default':
|
||||
$site = 'default';
|
||||
break;
|
||||
case 'overview' :
|
||||
case 'overview':
|
||||
$site = 'overview';
|
||||
break;
|
||||
case 'program' :
|
||||
case 'program':
|
||||
$site = 'program';
|
||||
break;
|
||||
case 'booking' :
|
||||
case 'booking':
|
||||
$site = 'booking';
|
||||
$show_seal_of_approval = true;
|
||||
break;
|
||||
case 'bookingconfirm' :
|
||||
case 'bookingconfirm':
|
||||
$site = 'bookingconfirm';
|
||||
$show_seal_of_approval = true;
|
||||
break;
|
||||
default :
|
||||
default:
|
||||
$site = 'default';
|
||||
break;
|
||||
break;
|
||||
}
|
||||
$sidebarRepo = $this->getEntityManager()->getRepository('AppBundle:SidebarWidget');
|
||||
$widgets = $sidebarRepo->findWidgetsBy($site);
|
||||
|
||||
$vars = [ 'page' => $page,
|
||||
$vars = [
|
||||
'page' => $page,
|
||||
'api' => $api,
|
||||
'site_loading' => $site_loading,
|
||||
'widgets' => $widgets,
|
||||
'show_seal_of_approval' => $show_seal_of_approval,
|
||||
'loop_half' => ceil(count($widgets) / 2)
|
||||
];
|
||||
if($search_form != null){
|
||||
if ($search_form != null) {
|
||||
$vars['search_form'] = $search_form;
|
||||
}
|
||||
return $this->render(':default/components/sidebar:sidebar.html.twig', $vars);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ use AppBundle\Form\ContactRequestType;
|
|||
use AppBundle\Form\SearchRequestType;
|
||||
use AppBundle\Form\TtSearchRequestType;
|
||||
use AppBundle\Util;
|
||||
use Doctrine\Common\Util\Debug;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Gedmo\Tree\TreeListener;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
|
|
@ -50,7 +51,7 @@ class DefaultController extends Controller
|
|||
$search_request_e = new \DateTime();
|
||||
$search_request_e->setTimestamp($timestap_e);
|
||||
}
|
||||
|
||||
|
||||
if($search_request_c){
|
||||
$repo = $this->getEntityManager()->getRepository('AppBundle:TravelCountry');
|
||||
$search_request_c = $repo->find($search_request_c);
|
||||
|
|
@ -73,6 +74,140 @@ class DefaultController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/dev/seite/startseite")
|
||||
*/
|
||||
public function devHomepageAction()
|
||||
{
|
||||
$search_request_b = Util::getMySession('search_request_b');
|
||||
$search_request_e = Util::getMySession('search_request_e');
|
||||
$search_request_c = Util::getMySession('search_request_c');
|
||||
|
||||
if($search_request_b){
|
||||
$timestap_b = strtotime($search_request_b);
|
||||
$search_request_b = new \DateTime();
|
||||
$search_request_b->setTimestamp($timestap_b);
|
||||
}
|
||||
if($search_request_e){
|
||||
$timestap_e = strtotime($search_request_e);
|
||||
$search_request_e = new \DateTime();
|
||||
$search_request_e->setTimestamp($timestap_e);
|
||||
}
|
||||
|
||||
if($search_request_c){
|
||||
$repo = $this->getEntityManager()->getRepository('AppBundle:TravelCountry');
|
||||
$search_request_c = $repo->find($search_request_c);
|
||||
}
|
||||
|
||||
$pageRepo = $this->getEntityManager()->getRepository('AppBundle:Page');
|
||||
$fewoLodgings = [];
|
||||
$lodgingGroups = $this->getEntityManager()->getRepository('AppBundle:FewoLodgingGroup')->findAll();
|
||||
foreach ($lodgingGroups as $lodgingGroup) {
|
||||
foreach ($lodgingGroup->getLodgings() as $lodging) {
|
||||
$fewoLodgings[] = $lodging;
|
||||
if (count($fewoLodgings) >= 3) {
|
||||
break 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $this->render('default/pages/dev/home.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'site_loading' => 'home',
|
||||
'show_search_sidebar_widget' => false,
|
||||
'show_offers_sidebar_widget' => false,
|
||||
'search_form' => $this->createForm(SearchRequestType::class, [
|
||||
'c' => $search_request_c ? $search_request_c : null,
|
||||
'b' => $search_request_b ? $search_request_b : null,
|
||||
'e' => $search_request_e ? $search_request_e : null,
|
||||
])->createView(),
|
||||
'tt_search_form' => $this->createForm(TtSearchRequestType::class)->createView(),
|
||||
'homepage_offer_pages' => $pageRepo->findHomepageOffers(),
|
||||
'country_pages' => $pageRepo->findHomepageCountryPages(),
|
||||
'fewo_lodgings' => $fewoLodgings,
|
||||
]);
|
||||
}
|
||||
|
||||
public function about()
|
||||
{
|
||||
die("asd");
|
||||
$search_request_b = Util::getMySession('search_request_b');
|
||||
$search_request_e = Util::getMySession('search_request_e');
|
||||
$search_request_c = Util::getMySession('search_request_c');
|
||||
|
||||
if($search_request_b){
|
||||
$timestap_b = strtotime($search_request_b);
|
||||
$search_request_b = new \DateTime();
|
||||
$search_request_b->setTimestamp($timestap_b);
|
||||
}
|
||||
if($search_request_e){
|
||||
$timestap_e = strtotime($search_request_e);
|
||||
$search_request_e = new \DateTime();
|
||||
$search_request_e->setTimestamp($timestap_e);
|
||||
}
|
||||
|
||||
if($search_request_c){
|
||||
$repo = $this->getEntityManager()->getRepository('AppBundle:TravelCountry');
|
||||
$search_request_c = $repo->find($search_request_c);
|
||||
}
|
||||
|
||||
|
||||
return $this->render('default/pages/about.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'site_loading' => 'home',
|
||||
'canonical_url' => Util::getBaseUrl(),
|
||||
'show_search_sidebar_widget' => false,
|
||||
'show_offers_sidebar_widget' => false,
|
||||
'search_form' => $this->createForm(SearchRequestType::class, [
|
||||
'c' => $search_request_c ? $search_request_c : null,
|
||||
'b' => $search_request_b ? $search_request_b : null,
|
||||
'e' => $search_request_e ? $search_request_e : null,
|
||||
])->createView(),
|
||||
'tt_search_form' => $this->createForm(TtSearchRequestType::class)->createView(),
|
||||
'country_pages' => $this->getEntityManager()->getRepository('AppBundle:Page')->findCountryPages(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function testpageAction()
|
||||
{
|
||||
|
||||
$search_request_b = Util::getMySession('search_request_b');
|
||||
$search_request_e = Util::getMySession('search_request_e');
|
||||
$search_request_c = Util::getMySession('search_request_c');
|
||||
|
||||
if($search_request_b){
|
||||
$timestap_b = strtotime($search_request_b);
|
||||
$search_request_b = new \DateTime();
|
||||
$search_request_b->setTimestamp($timestap_b);
|
||||
}
|
||||
if($search_request_e){
|
||||
$timestap_e = strtotime($search_request_e);
|
||||
$search_request_e = new \DateTime();
|
||||
$search_request_e->setTimestamp($timestap_e);
|
||||
}
|
||||
|
||||
if($search_request_c){
|
||||
$repo = $this->getEntityManager()->getRepository('AppBundle:TravelCountry');
|
||||
$search_request_c = $repo->find($search_request_c);
|
||||
}
|
||||
|
||||
|
||||
return $this->render('default/pages/testpage.html.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
'site_loading' => 'home',
|
||||
'canonical_url' => Util::getBaseUrl(),
|
||||
'show_search_sidebar_widget' => false,
|
||||
'show_offers_sidebar_widget' => false,
|
||||
'search_form' => $this->createForm(SearchRequestType::class, [
|
||||
'c' => $search_request_c ? $search_request_c : null,
|
||||
'b' => $search_request_b ? $search_request_b : null,
|
||||
'e' => $search_request_e ? $search_request_e : null,
|
||||
])->createView(),
|
||||
'tt_search_form' => $this->createForm(TtSearchRequestType::class)->createView(),
|
||||
'country_pages' => $this->getEntityManager()->getRepository('AppBundle:Page')->findCountryPages(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/suche")
|
||||
*/
|
||||
|
|
@ -366,20 +501,21 @@ class DefaultController extends Controller
|
|||
{
|
||||
$error = false;
|
||||
|
||||
if(empty($request->get('g-recaptcha-response'))){
|
||||
$re_error = 'Bitte lösen Sie das reCAPTCHA.';
|
||||
$error = true;
|
||||
}
|
||||
//your site secret key
|
||||
$secret = '6LfjBm8UAAAAANKNzGhSiMaoEg9mUswlaZkOHgI4';
|
||||
//get verify response data
|
||||
$verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secret.'&response='.$request->get('g-recaptcha-response'));
|
||||
$responseData = json_decode($verifyResponse);
|
||||
|
||||
|
||||
if($responseData->success != true ){
|
||||
$re_error = 'Bitte lösen Sie das reCAPTCHA';
|
||||
if(!Util::isLocal()) {
|
||||
if(empty($request->get('g-recaptcha-response'))){
|
||||
$re_error = 'Bitte lösen Sie das reCAPTCHA.';
|
||||
$error = true;
|
||||
}
|
||||
//your site secret key
|
||||
$secret = '6LfjBm8UAAAAANKNzGhSiMaoEg9mUswlaZkOHgI4';
|
||||
//get verify response data
|
||||
$verifyResponse = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret='.$secret.'&response='.$request->get('g-recaptcha-response'));
|
||||
$responseData = json_decode($verifyResponse);
|
||||
|
||||
if($responseData->success != true ){
|
||||
$re_error = 'Bitte lösen Sie das reCAPTCHA';
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -390,13 +526,16 @@ class DefaultController extends Controller
|
|||
/** @var ContactRequest $contactRequest */
|
||||
$contactRequest = $form->getData();
|
||||
|
||||
$mailto = 'stern@stern-tours.de';
|
||||
if(Util::isLocal()) {
|
||||
$mailto = 'kevin.adametz@me.com';
|
||||
}
|
||||
$ret = $this->get('app.contact_exporter')->v3process($contactRequest);
|
||||
$error_crm = 'CRM Fehler';
|
||||
|
||||
$this->get('mailer')->send(\Swift_Message::newInstance()
|
||||
->setSubject('Kontaktformular (stern-tours.de)')
|
||||
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
||||
->setTo('stern@stern-tours.de')
|
||||
->setTo($mailto)
|
||||
->setBody(
|
||||
$this->renderView('default/email/contactServiceEmail.txt.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir').'/..').DIRECTORY_SEPARATOR,
|
||||
|
|
|
|||
|
|
@ -192,6 +192,9 @@ class FewoBookingController extends Controller
|
|||
$fromDate = $request->query->get('fd');
|
||||
$priceId = $request->query->get('pnr');
|
||||
$price = $fewoPriceRepo->find($priceId);
|
||||
if(!$price){
|
||||
throw new \Exception('Price not found');
|
||||
}
|
||||
$season = $price->getSeason();
|
||||
$minimumStay = $season->getMinimumStay();
|
||||
|
||||
|
|
@ -299,12 +302,14 @@ class FewoBookingController extends Controller
|
|||
)
|
||||
);
|
||||
|
||||
|
||||
$mailto = 'stern@stern-tours.de';
|
||||
if(Util::isLocal()) {
|
||||
$mailto = 'kevin.adametz@me.com';
|
||||
}
|
||||
$this->get('mailer')->send(\Swift_Message::newInstance()
|
||||
->setSubject('FEWO-BUCHUNG: ' . $lodging->getName())
|
||||
->setFrom('stern@stern-tours.de', 'STERN TOURS')
|
||||
->setTo('stern@stern-tours.de')
|
||||
//->setTo('kevin@adametz.media')
|
||||
->setTo($mailto)
|
||||
->setBody(
|
||||
$this->renderView('default/email/fewoBookingServiceEmail.txt.twig', [
|
||||
'base_dir' => realpath($this->getParameter('kernel.root_dir') . '/..') . DIRECTORY_SEPARATOR,
|
||||
|
|
|
|||
|
|
@ -965,4 +965,28 @@ class BookingRequest
|
|||
{
|
||||
//$context->
|
||||
}
|
||||
|
||||
public function checkIsRoomSelected(){
|
||||
|
||||
|
||||
if($this->singleRoomCount > 0){
|
||||
return true;
|
||||
}
|
||||
if($this->doubleRoomCount > 0){
|
||||
return true;
|
||||
}
|
||||
if($this->tripleRoomCount > 0){
|
||||
return true;
|
||||
}
|
||||
if($this->singleRoomChildCount > 0){
|
||||
return true;
|
||||
}
|
||||
if($this->doubleRoomChildCount > 0){
|
||||
return true;
|
||||
}
|
||||
if($this->tripleRoomChildCount > 0){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -1286,6 +1286,22 @@ class Page
|
|||
return $this;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Get boxBody / Image USED for Box Image by v3 CMS
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getBoxBodyImage()
|
||||
{
|
||||
if($this->boxBody != ""){
|
||||
$boxBodyImage = json_decode($this->boxBody, true);
|
||||
return $boxBodyImage;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get boxBody
|
||||
*
|
||||
|
|
|
|||
|
|
@ -32,12 +32,11 @@ class PageRepository extends NestedTreeRepository
|
|||
->getQuery()
|
||||
->execute();
|
||||
/** @var Page $childPage */
|
||||
foreach ($pages as &$childPage)
|
||||
{
|
||||
if ($childPage->getTravelProgram())
|
||||
{
|
||||
foreach ($pages as &$childPage) {
|
||||
if ($childPage->getTravelProgram()) {
|
||||
$this->getEntityManager()->getRepository('AppBundle:TravelPeriod')->getTrueTravelPeriods(
|
||||
$childPage->getTravelProgram());
|
||||
$childPage->getTravelProgram()
|
||||
);
|
||||
}
|
||||
}
|
||||
return $pages;
|
||||
|
|
@ -48,12 +47,12 @@ class PageRepository extends NestedTreeRepository
|
|||
return $this->createQueryBuilder('node')
|
||||
->innerJoin('node.travelProgram', 'tp')
|
||||
->innerJoin('tp.countries', 'c')
|
||||
->where('c.id = '. $country->getId())
|
||||
->where('c.id = ' . $country->getId())
|
||||
->andWhere('node.status = 1')
|
||||
->andWhere('tp.status = 1')
|
||||
->getQuery()
|
||||
->execute()
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -63,27 +62,149 @@ class PageRepository extends NestedTreeRepository
|
|||
{
|
||||
$ret = [];
|
||||
$countries = $this->getEntityManager()->getRepository('AppBundle:TravelCountry')->findAll();
|
||||
foreach ($countries as $country)
|
||||
{
|
||||
$ret = array_merge($ret, $this->createQueryBuilder('node')
|
||||
->innerJoin('node.travelProgram', 'tp')
|
||||
->addSelect('tp')
|
||||
->innerJoin('tp.countries', 'c')
|
||||
->where('c.id = '. $country->getId())
|
||||
->andWhere('node.status = 1')
|
||||
->andWhere('tp.status = 1')
|
||||
->orderBy('node.order')
|
||||
->addOrderBy('tp.position')
|
||||
->addOrderBy('node.title')
|
||||
->setMaxResults(3)
|
||||
->getQuery()
|
||||
->execute()
|
||||
foreach ($countries as $country) {
|
||||
$ret = array_merge(
|
||||
$ret,
|
||||
$this->createQueryBuilder('node')
|
||||
->innerJoin('node.travelProgram', 'tp')
|
||||
->addSelect('tp')
|
||||
->innerJoin('tp.countries', 'c')
|
||||
->where('c.id = ' . $country->getId())
|
||||
->andWhere('node.status = 1')
|
||||
->andWhere('tp.status = 1')
|
||||
->orderBy('node.order')
|
||||
->addOrderBy('tp.position')
|
||||
->addOrderBy('node.title')
|
||||
->setMaxResults(3)
|
||||
->getQuery()
|
||||
->execute()
|
||||
);
|
||||
}
|
||||
shuffle($ret);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* Curated offer selection for the start page test version.
|
||||
*
|
||||
* The existing findOffers() intentionally shuffles results. For the crisis
|
||||
* communication start page we need a stable order with currently sellable
|
||||
* destinations first.
|
||||
*
|
||||
* @param int $limit
|
||||
* @return Page[]
|
||||
*/
|
||||
public function findHomepageOffers($limit = 12)
|
||||
{
|
||||
$pages = $this->createQueryBuilder('node')
|
||||
->distinct()
|
||||
->innerJoin('node.travelProgram', 'tp')
|
||||
->addSelect('tp')
|
||||
->innerJoin('tp.countries', 'c')
|
||||
->addSelect('c')
|
||||
->where('node.status = 1')
|
||||
->andWhere('tp.status = 1')
|
||||
->orderBy('node.order')
|
||||
->addOrderBy('tp.position')
|
||||
->addOrderBy('node.title')
|
||||
->getQuery()
|
||||
->execute();
|
||||
|
||||
$pages = array_values(array_filter($pages, function (Page $page) {
|
||||
return $this->getHomepagePriority($page) <= 4;
|
||||
}));
|
||||
|
||||
usort($pages, function (Page $a, Page $b) {
|
||||
$priorityA = $this->getHomepagePriority($a);
|
||||
$priorityB = $this->getHomepagePriority($b);
|
||||
|
||||
if ($priorityA !== $priorityB) {
|
||||
return $priorityA - $priorityB;
|
||||
}
|
||||
|
||||
$orderA = $a->getOrder() ?: 9999;
|
||||
$orderB = $b->getOrder() ?: 9999;
|
||||
if ($orderA !== $orderB) {
|
||||
return $orderA - $orderB;
|
||||
}
|
||||
|
||||
return strcasecmp($a->getTitle(), $b->getTitle());
|
||||
});
|
||||
|
||||
return array_slice($pages, 0, $limit);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Page[]
|
||||
*/
|
||||
public function findHomepageCountryPages()
|
||||
{
|
||||
$pages = $this->findCountryPages();
|
||||
|
||||
usort($pages, function (Page $a, Page $b) {
|
||||
$priorityA = $this->getHomepagePriority($a);
|
||||
$priorityB = $this->getHomepagePriority($b);
|
||||
|
||||
if ($priorityA !== $priorityB) {
|
||||
return $priorityA - $priorityB;
|
||||
}
|
||||
|
||||
return strcasecmp($a->getTitle(), $b->getTitle());
|
||||
});
|
||||
|
||||
return $pages;
|
||||
}
|
||||
|
||||
private function getHomepagePriority(Page $page)
|
||||
{
|
||||
$haystack = $this->buildHomepageSortHaystack($page);
|
||||
|
||||
$priorities = [
|
||||
0 => ['aegypt', 'agypt', 'egypt'],
|
||||
1 => ['marokko'],
|
||||
2 => ['usbek', 'uzbek'],
|
||||
3 => ['oman'],
|
||||
4 => ['jordan'],
|
||||
6 => ['israel'],
|
||||
7 => ['tuerkei', 'turkei'],
|
||||
8 => ['iran'],
|
||||
];
|
||||
|
||||
foreach ($priorities as $priority => $needles) {
|
||||
foreach ($needles as $needle) {
|
||||
if (strpos($haystack, $needle) !== false) {
|
||||
return $priority;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 99;
|
||||
}
|
||||
|
||||
private function buildHomepageSortHaystack(Page $page)
|
||||
{
|
||||
$parts = [
|
||||
$page->getSlug(),
|
||||
$page->getTitle(),
|
||||
$page->getTitleShort(),
|
||||
$page->getRealUrlPath(),
|
||||
];
|
||||
|
||||
if ($page->getCountry()) {
|
||||
$parts[] = $page->getCountry()->getName();
|
||||
$parts[] = $page->getCountry()->getSlug();
|
||||
}
|
||||
|
||||
if ($page->getTravelProgram()) {
|
||||
foreach ($page->getTravelProgram()->getCountries() as $country) {
|
||||
$parts[] = $country->getName();
|
||||
$parts[] = $country->getSlug();
|
||||
}
|
||||
}
|
||||
|
||||
return strtolower(implode(' ', array_filter($parts)));
|
||||
}
|
||||
|
||||
public function findCountryPages()
|
||||
{
|
||||
return $this->createQueryBuilder('node')
|
||||
|
|
@ -91,10 +212,11 @@ class PageRepository extends NestedTreeRepository
|
|||
->where('node.status > 0')
|
||||
->andWhere('node.template = \'overview\'')
|
||||
->andWhere('node.lvl = 0')
|
||||
->orderBy('node.lft,node.title')
|
||||
->andWhere('node.order > 0')
|
||||
->orderBy('node.order,node.title')
|
||||
->getQuery()
|
||||
->execute()
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
public function findTopCountryNavPages()
|
||||
|
|
@ -107,10 +229,10 @@ class PageRepository extends NestedTreeRepository
|
|||
->andWhere('node.template = \'overview\'')
|
||||
->andWhere('node.lvl = 0')
|
||||
->andWhere('node.order > 0')
|
||||
->orderBy('node.order,node.title, childPage.lft, childPage.title')
|
||||
->orderBy('node.order,node.title, childPage.order, childPage.title')
|
||||
->getQuery()
|
||||
->execute()
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
public function findFeedbacks($rootPageId)
|
||||
|
|
@ -123,7 +245,7 @@ class PageRepository extends NestedTreeRepository
|
|||
->orderBy('node.order')
|
||||
->getQuery()
|
||||
->execute()
|
||||
;
|
||||
;
|
||||
}
|
||||
|
||||
public function findParentsWithShowNav($rootPageId)
|
||||
|
|
@ -138,15 +260,12 @@ class PageRepository extends NestedTreeRepository
|
|||
->andWhere('tp.status > 0')
|
||||
->orderBy('node.order')
|
||||
->getQuery()
|
||||
->execute()
|
||||
;
|
||||
->execute();
|
||||
|
||||
foreach ($pages as &$childPage)
|
||||
{
|
||||
if ($childPage->getTravelProgram())
|
||||
{
|
||||
// var_dump($childPage->getTravelProgram()->getId());
|
||||
// $this->getEntityManager()->getRepository('AppBundle:TravelPeriod')->getTrueTravelPeriods($childPage->getTravelProgram());
|
||||
foreach ($pages as &$childPage) {
|
||||
if ($childPage->getTravelProgram()) {
|
||||
// var_dump($childPage->getTravelProgram()->getId());
|
||||
// $this->getEntityManager()->getRepository('AppBundle:TravelPeriod')->getTrueTravelPeriods($childPage->getTravelProgram());
|
||||
}
|
||||
}
|
||||
return $pages;
|
||||
|
|
@ -160,23 +279,19 @@ class PageRepository extends NestedTreeRepository
|
|||
public function getSiblings(Page $page)
|
||||
{
|
||||
$parent = $page->getParent();
|
||||
if (!$parent)
|
||||
{
|
||||
if (!$parent) {
|
||||
// On purpose, we don't treat root pages as if they were siblings
|
||||
return [];
|
||||
}
|
||||
$siblings = $parent->getChildren();
|
||||
foreach ($siblings as &$sibling)
|
||||
{
|
||||
foreach ($siblings as &$sibling) {
|
||||
$sibling->setParent($parent);
|
||||
}
|
||||
|
||||
// Da diese Methode nur für die Navigation verwendet wird, kann man hier vorfiltern
|
||||
$filteredSiblings = [];
|
||||
foreach ($siblings as &$sibling)
|
||||
{
|
||||
if($sibling->getStatus() == 1 && $sibling->getShowInNavi() == 1)
|
||||
{
|
||||
foreach ($siblings as &$sibling) {
|
||||
if ($sibling->getStatus() == 1 && $sibling->getShowInNavi() == 1) {
|
||||
$filteredSiblings[] = $sibling;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -900,7 +900,7 @@ class TravelProgram
|
|||
$v = explode(':', $val);
|
||||
$int = (int) filter_var($v[0], FILTER_SANITIZE_NUMBER_INT);
|
||||
if($int) {
|
||||
$lines[$int] = array('count'=> $count, 'day' => trim($v[1]), 'date' => $startDate->format('d.m.Y'));
|
||||
$lines[$int] = array('count'=> $count, 'day' => strip_tags(trim($v[1])), 'date' => $startDate->format('d.m.Y'));
|
||||
$startDate->modify('+1 day');
|
||||
$count++;
|
||||
}
|
||||
|
|
@ -921,7 +921,7 @@ class TravelProgram
|
|||
$v = explode(':', $val);
|
||||
$int = (int) filter_var($v[0], FILTER_SANITIZE_NUMBER_INT);
|
||||
if($int && isset($lines[$int])) {
|
||||
$lines[$int]['night'] = trim($v[1]);
|
||||
$lines[$int]['night'] = strip_tags(trim($v[1]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class Traveler
|
|||
|
||||
|
||||
|
||||
private $NATIONALITIES = [];
|
||||
private $nationalities = [];
|
||||
|
||||
/**
|
||||
* @Assert\NotNull
|
||||
|
|
@ -188,18 +188,18 @@ class Traveler
|
|||
*/
|
||||
public function getNationalityName($nat)
|
||||
{
|
||||
if(!count($this->NATIONALITIES)){
|
||||
if(!count($this->nationalities)){
|
||||
foreach ($nat as $na){
|
||||
$this->NATIONALITIES[$na['id']] = $na['name'];
|
||||
$this->nationalities[$na['id']] = $na['name'];
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($this->NATIONALITIES[$this->nationality])){
|
||||
return $this->NATIONALITIES[$this->nationality];
|
||||
if(isset($this->nationalities[$this->nationality])){
|
||||
return $this->nationalities[$this->nationality];
|
||||
}
|
||||
/*
|
||||
if(isset($this->NATIONALITIES[$this->nationality])){
|
||||
return $this->NATIONALITIES[$this->nationality];
|
||||
if(isset($this->nationalities[$this->nationality])){
|
||||
return $this->nationalities[$this->nationality];
|
||||
}*/
|
||||
return $this->nationality;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,14 +97,17 @@ class ContactSternToursCrmExporter extends SternToursCrmExporter
|
|||
$resp = $this->httpPostAPIv3('lead/create_lead', $data);
|
||||
if (!$resp)
|
||||
{
|
||||
$this->warn('Failed retrieving newly created new draft object', $data);
|
||||
$this->warn('Failed retrieving newly created new lead object', $data);
|
||||
return null;
|
||||
}
|
||||
if(!isset($resp->lead_id)){
|
||||
$this->warn('Failed retrieving newly created new lead object', $data);
|
||||
}
|
||||
return $resp;
|
||||
}
|
||||
|
||||
|
||||
private function warn($msg, $data = null, $level = Logger::WARNING)
|
||||
private function warn($msg, $data = null, $level = Logger::ERROR)
|
||||
{
|
||||
$this->logger->log($level, 'ContactSternToursCrmExporter: '. $msg);
|
||||
$this->logger->log($level, '*** Date: '. (new \DateTime())->format('d.m.Y'));
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ abstract class SternToursCrmExporter
|
|||
//auto
|
||||
|
||||
|
||||
const API_URL_LOCAL = 'http://cms-stern-tours.test/api';
|
||||
const API_v3_URL_LOCAL = 'http://mein.sterntours.test/';
|
||||
const API_URL_LOCAL = 'https://cms-stern-tours.test/api';
|
||||
const API_v3_URL_LOCAL = 'https://mein.sterntours.test/';
|
||||
|
||||
const API_URL = 'https://cms.stern-tours.net/api';
|
||||
const API_v3_URL = 'https://mein.sterntours.de/';
|
||||
|
|
@ -52,7 +52,7 @@ abstract class SternToursCrmExporter
|
|||
protected final function httpPost($context, $postData = [], $isContextFullUrl = false)
|
||||
{
|
||||
$baseUrl = self::API_URL;
|
||||
if($_SERVER['HTTP_HOST'] == 'sterntours.test') {
|
||||
if(Util::isLocal()) {
|
||||
$baseUrl = self::API_URL_LOCAL;
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ abstract class SternToursCrmExporter
|
|||
|
||||
//first - login and get token
|
||||
$baseUrl = self::API_v3_URL.'api/';
|
||||
if($_SERVER['HTTP_HOST'] == 'sterntours.test') {
|
||||
if(Util::isLocal()) {
|
||||
$baseUrl = self::API_v3_URL_LOCAL.'api/';
|
||||
}
|
||||
|
||||
|
|
@ -87,16 +87,26 @@ abstract class SternToursCrmExporter
|
|||
'password' => self::API_v3_PASS,
|
||||
);
|
||||
$ret = [];
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $baseUrl.'login');
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
|
||||
if($_SERVER['HTTP_HOST'] == 'sterntours.test') {
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_POST, count($data));
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
|
||||
|
||||
$result = curl_exec($ch);
|
||||
if (curl_errno($ch)) {
|
||||
$error_msg = curl_error($ch);
|
||||
$this->logger->warn($error_msg);
|
||||
|
||||
|
||||
}
|
||||
$r = json_decode($result);
|
||||
|
||||
if($r->success) {
|
||||
//api URL
|
||||
$data = json_encode($postData);
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ class BookingRequestType extends AbstractType
|
|||
|
||||
$builder
|
||||
->add('salutation', ChoiceType::class, [
|
||||
//'placeholder' => 'Anrede (Bitte wählen) *',
|
||||
'placeholder' => 'Anrede (Bitte wählen) *',
|
||||
'choices' => self::$SALUTATION_CHOICES,
|
||||
'constraints' => [
|
||||
new NotNull(),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @author Ulrich Hecht <ulrich.hecht@hecht-software.de>
|
||||
* @date 02/21/2017
|
||||
|
|
@ -37,8 +38,7 @@ class ContactRequestType extends AbstractType
|
|||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$travelerCountChoices = [];
|
||||
for ($i = 1; $i <= 20; ++$i)
|
||||
{
|
||||
for ($i = 1; $i <= 20; ++$i) {
|
||||
$travelerCountChoices[$i] = $i;
|
||||
}
|
||||
|
||||
|
|
@ -65,8 +65,7 @@ class ContactRequestType extends AbstractType
|
|||
],
|
||||
'data' => BookingRequestType::$NATION_CHOICES['Deutschland'],
|
||||
])
|
||||
->add('phone', TextType::class, ['required' => false])
|
||||
->add('mobilePhone')
|
||||
->add('phone', TextType::class, ['required' => true])
|
||||
->add('email', EmailType::class, ['required' => true])
|
||||
->add('travelerCount', ChoiceType::class, [
|
||||
'placeholder' => 'Anzahl der Reisenden (Bitte wählen)',
|
||||
|
|
@ -85,6 +84,6 @@ class ContactRequestType extends AbstractType
|
|||
->add('duration')
|
||||
->add('acceptPrivacy', CheckboxType::class, ['required' => true])
|
||||
->add('acceptProcessing', CheckboxType::class, ['required' => true])
|
||||
;
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class TravelerType extends AbstractType
|
|||
/* @var TravelProgram $travelProgram */
|
||||
$builder
|
||||
->add('sex', ChoiceType::class, [
|
||||
//'placeholder' => 'Geschlecht (Bitte wählen) *',
|
||||
'placeholder' => 'Geschlecht (Bitte wählen) *',
|
||||
'choices' => self::$SEX_CHOICES,
|
||||
'constraints' => [
|
||||
new Choice(['choices' => self::$SEX_CHOICES])
|
||||
|
|
|
|||
|
|
@ -1,288 +1,256 @@
|
|||
<?php
|
||||
/**
|
||||
* @author Ulrich Hecht <ulrich.hecht@hecht-software.de>
|
||||
* @date 12/02/2016
|
||||
*/
|
||||
|
||||
namespace AppBundle\Listener;
|
||||
|
||||
|
||||
use AppBundle\AppBundle;
|
||||
use AppBundle\Controller\DefaultController;
|
||||
use AppBundle\Entity\Page;
|
||||
use AppBundle\Util;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\PersistentCollection;
|
||||
use Symfony\Bundle\FrameworkBundle\Routing\Router;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
|
||||
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
class KernelControllerListener
|
||||
{
|
||||
private $em;
|
||||
private $controllerResolver;
|
||||
|
||||
public function __construct(EntityManager $entityManager, ControllerResolverInterface $controllerResolver)
|
||||
{
|
||||
$this->em = $entityManager;
|
||||
$this->controllerResolver = $controllerResolver;
|
||||
}
|
||||
|
||||
private function setSessionAttributeByTime($request, $key){
|
||||
|
||||
$session = $request->getSession();
|
||||
$session->set('_open_side_about', '');
|
||||
$session->set('_open_side_search', '');
|
||||
|
||||
if($key === 'default') {//is default visit
|
||||
if (!$session->get('default_visit')) { //first visit
|
||||
$session->set('default_visit', true);
|
||||
$session->set('_open_side_about', 'open');
|
||||
$session->set('_open_side_search', 'open');
|
||||
}
|
||||
}
|
||||
|
||||
if($key === 'api') {//is api = Reiseführer
|
||||
if (!$session->get('api_visit')) { //first visit
|
||||
$session->set('api_visit', true);
|
||||
$session->set('_open_side_about', 'open');
|
||||
}
|
||||
}
|
||||
}
|
||||
public function onKernelController(FilterControllerEvent $event)
|
||||
{
|
||||
$request = $event->getRequest();
|
||||
|
||||
$session = $request->getSession();
|
||||
Util::setMySession('search_request_b', $session->get('search_request_b'));
|
||||
Util::setMySession('search_request_e', $session->get('search_request_e'));
|
||||
Util::setMySession('search_request_c', $session->get('search_request_c'));
|
||||
|
||||
if($request->get('_controller') === 'AppBundle\Controller\DefaultController::homeAction'){
|
||||
$this->setSessionAttributeByTime($request, "default");
|
||||
}
|
||||
if ($request->get('_controller') == 'AppBundle\Controller\DefaultController::defaultAction')
|
||||
{
|
||||
|
||||
$repo = $this->em->getRepository('AppBundle:Page');
|
||||
$path = preg_replace('/^\/?(.*?)\/?$/', '$1', $request->getPathInfo());
|
||||
/** @var Page $node */
|
||||
$node = null;
|
||||
|
||||
// Try to find by url path. It's possible that the path consists of two parts:
|
||||
// - the beginning part represents a node
|
||||
// - the ending part represents a handler
|
||||
// e.g. /path/to/travel/program/buchen ("buchen" is the handler part)
|
||||
$pathArray = explode('/', $path);
|
||||
$restOfPath = '';
|
||||
$curPath = $path;
|
||||
//search for entry in new tree objects
|
||||
$api = Util::loadFromApi('cms/search', ['url'=>$curPath]);
|
||||
|
||||
while (!empty($pathArray))
|
||||
{
|
||||
if(!$api){
|
||||
$node = $repo->findOneBy(['realUrlPath' => '/'. $curPath]);
|
||||
if ($node)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
$restOfPath = '/'. array_pop($pathArray) . $restOfPath;
|
||||
$curPath = implode('/', $pathArray);
|
||||
}
|
||||
//find and try 301
|
||||
//find => to
|
||||
$redirects = [
|
||||
'/reisefuehrer/tuerkei' => 'tuerkei-reisen/reisefuehrer',
|
||||
'/reisefuehrer/jordanien' => 'jordanien-reisen/reisefuehrer',
|
||||
'/reisefuehrer/oman' => 'oman-reisen/reisefuehrer',
|
||||
'/reisefuehrer/israel' => 'israel-reisen/israel-reisefuehrer',
|
||||
'/reisefuehrer/aegypten' => 'aegypten-reisen/aegypten-reisefuehrer',
|
||||
'/reisemagazin/tuerkei-reisemagazin' => 'tuerkei-reisen/tuerkei-reisemagazin',
|
||||
'/reisemagazin/aegypten' => 'aegypten-reisen/aegypten-reisemagazin',
|
||||
'/reisemagazin/israel' => 'israel-reisen/israel-reisemagazin',
|
||||
'/reisemagazin/jordanien' => 'jordanien-reisen/jordanien-reisemagazin',
|
||||
'/reisemagazin/marokko' => 'marokko-urlaub/marokko-reisemagazin'
|
||||
|
||||
];
|
||||
//301
|
||||
foreach ($redirects as $find => $to){
|
||||
if(strpos($restOfPath, $find) !== false){
|
||||
$restOfPath = str_replace($find, $to, $restOfPath);
|
||||
$protocol = 'https';
|
||||
if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === "off") {
|
||||
$protocol = 'http';
|
||||
}
|
||||
header("Location: ".$protocol."://" .$_SERVER["HTTP_HOST"]."/".$restOfPath, true, 301);
|
||||
exit();
|
||||
|
||||
}
|
||||
}
|
||||
//load content from API, is found by cms/search
|
||||
|
||||
if($api){
|
||||
$this->setSessionAttributeByTime($request, "api");
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:iqTravelGuide');
|
||||
$request->attributes->set('api', $api);
|
||||
$request->attributes->set('template', 'TravelGuide');
|
||||
try
|
||||
{
|
||||
$controller = $this->controllerResolver->getController($request);
|
||||
}
|
||||
catch (\LogicException $e)
|
||||
{
|
||||
// If there is no controller action, call the default action and pass the template name
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:Default');
|
||||
$request->attributes->set('template', "Default");
|
||||
}
|
||||
$event->setController($controller ?? $this->controllerResolver->getController($request));
|
||||
return;
|
||||
|
||||
}
|
||||
$this->setSessionAttributeByTime($request, "default");
|
||||
|
||||
if (!$node)
|
||||
{
|
||||
// Now try to find a page by tracing a page node path using the page nodes' slugs
|
||||
|
||||
$pathArray = explode('/', $path);
|
||||
$i = 0;
|
||||
while (!empty($pathArray))
|
||||
{
|
||||
$restOfPath = '/'. implode('/', $pathArray);
|
||||
$slug = array_shift($pathArray);
|
||||
|
||||
$qb = $repo->createQueryBuilder('p');
|
||||
$qb->where($qb->expr()->eq('p.lvl', $i));
|
||||
$qb->andWhere($qb->expr()->eq('p.slug', ':slug'));
|
||||
$qb->setParameter('slug', $slug);
|
||||
|
||||
if ($node != null)
|
||||
{
|
||||
$qb->andWhere($qb->expr()->between('p.lft', $node->getLft(), $node->getRgt()));
|
||||
}
|
||||
$qb->setMaxResults(1);
|
||||
$childNode = $qb->getQuery()->getOneOrNullResult();
|
||||
if (!$childNode)
|
||||
{
|
||||
$whitelist = [
|
||||
'buchen',
|
||||
'berechne-gesamtpreis',
|
||||
'show_nationality_country_text',
|
||||
'pdf',
|
||||
];
|
||||
if(!in_array($slug, $whitelist)){
|
||||
throw new HttpException(404, 'Seite nicht gefunden: '.$slug);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ($node)
|
||||
{
|
||||
|
||||
// Avoid database calls to parent later
|
||||
$childNode->setParent($node);
|
||||
}
|
||||
$node = $childNode;
|
||||
++$i;
|
||||
}
|
||||
if ($node && $node->getRealUrlPath() && $node->getRealUrlPath() != '/'. $path)
|
||||
{
|
||||
// If there realUrlPath is set and the slug path differs from realUrlPath, then the slug path is
|
||||
// not a valid URL. Otherwise, there would be two different URLs representing the same page.
|
||||
$event->setController(function() {
|
||||
throw new NotFoundHttpException('Invalid URL');
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!$node)
|
||||
{
|
||||
// Search for a redirect entry
|
||||
$redirect = $this->em->getRepository('AppBundle:Redirect')->findOneBy(['sourceUrlPath' => '/'. $path]);
|
||||
if ($redirect)
|
||||
{
|
||||
$redirectUrl = $redirect->getPage()->getUrlPath();
|
||||
$event->setController(function() use ($redirectUrl) {
|
||||
return new RedirectResponse($redirectUrl, 301);
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ($node)
|
||||
{
|
||||
|
||||
if ($node->getStatus() == 0)
|
||||
{
|
||||
throw new NotFoundHttpException('Inactive page');
|
||||
}
|
||||
|
||||
$request->attributes->set('page', $node);
|
||||
|
||||
if ($node->getTravelProgram() != null && (
|
||||
$restOfPath == '/buchen' || $restOfPath == '/berechne-gesamtpreis' || $restOfPath == '/show_nationality_country_text'))
|
||||
{
|
||||
// Special case: Booking actions
|
||||
$request->attributes->set('travelProgramPage', $node);
|
||||
$request->attributes->set('action', $restOfPath);
|
||||
$request->attributes->set('_controller', 'AppBundle:Booking:index');
|
||||
}
|
||||
elseif($restOfPath && $node->getTravelProgram() !== null && (
|
||||
$restOfPath === '/pdf'))
|
||||
{
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:pdf');
|
||||
}
|
||||
elseif ($node->getTravelProgram() !== null)
|
||||
{
|
||||
if ($node->getTravelProgram()->getStatus() == 0)
|
||||
{
|
||||
throw new \NotFoundHttpException('Inactive travel program');
|
||||
}
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:travelProgram');
|
||||
}
|
||||
elseif ($node->getFewoLodging() != null &&
|
||||
($restOfPath === '/buchen' || $restOfPath === '/berechne-gesamtpreis'))
|
||||
{
|
||||
$request->attributes->set('fewoTravelProgramPage', $node);
|
||||
$request->attributes->set('action', $restOfPath);
|
||||
$request->attributes->set('_controller', 'AppBundle:FewoBooking:index');
|
||||
}
|
||||
elseif ($node->getFewoLodging() !== null)
|
||||
{
|
||||
$request->attributes->set('fewoLodgingPage', $node);
|
||||
$request->attributes->set('action', $restOfPath);
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:fewoLodging');
|
||||
}
|
||||
else
|
||||
{
|
||||
$handler = $node->getTemplate() ? ucfirst($node->getTemplate()) : 'Default';
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:'. $handler);
|
||||
if ($node->getTemplate())
|
||||
{
|
||||
try
|
||||
{
|
||||
$controller = $this->controllerResolver->getController($request);
|
||||
}
|
||||
catch (\LogicException $e)
|
||||
{
|
||||
// If there is no controller action, call the default action and pass the template name
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:Default');
|
||||
$request->attributes->set('template', $node->getTemplate());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
$event->setController($controller ?? $this->controllerResolver->getController($request));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @author Ulrich Hecht <ulrich.hecht@hecht-software.de>
|
||||
* @date 12/02/2016
|
||||
*/
|
||||
|
||||
namespace AppBundle\Listener;
|
||||
|
||||
|
||||
use AppBundle\AppBundle;
|
||||
use AppBundle\Controller\DefaultController;
|
||||
use AppBundle\Entity\Page;
|
||||
use AppBundle\Util;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Doctrine\ORM\PersistentCollection;
|
||||
use Symfony\Bundle\FrameworkBundle\Routing\Router;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpFoundation\Session\Session;
|
||||
use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
|
||||
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
class KernelControllerListener
|
||||
{
|
||||
private $em;
|
||||
private $controllerResolver;
|
||||
|
||||
public function __construct(EntityManager $entityManager, ControllerResolverInterface $controllerResolver)
|
||||
{
|
||||
$this->em = $entityManager;
|
||||
$this->controllerResolver = $controllerResolver;
|
||||
}
|
||||
|
||||
private function setSessionAttributeByTime($request, $key)
|
||||
{
|
||||
|
||||
$session = $request->getSession();
|
||||
$session->set('_open_side_about', '');
|
||||
$session->set('_open_side_search', '');
|
||||
|
||||
if ($key === 'default') { //is default visit
|
||||
if (!$session->get('default_visit')) { //first visit
|
||||
$session->set('default_visit', true);
|
||||
$session->set('_open_side_about', 'open');
|
||||
$session->set('_open_side_search', 'open');
|
||||
}
|
||||
}
|
||||
|
||||
if ($key === 'api') { //is api = Reiseführer
|
||||
if (!$session->get('api_visit')) { //first visit
|
||||
$session->set('api_visit', true);
|
||||
$session->set('_open_side_about', 'open');
|
||||
}
|
||||
}
|
||||
}
|
||||
public function onKernelController(FilterControllerEvent $event)
|
||||
{
|
||||
$request = $event->getRequest();
|
||||
|
||||
$session = $request->getSession();
|
||||
Util::setMySession('search_request_b', $session->get('search_request_b'));
|
||||
Util::setMySession('search_request_e', $session->get('search_request_e'));
|
||||
Util::setMySession('search_request_c', $session->get('search_request_c'));
|
||||
|
||||
if ($request->get('_controller') === 'AppBundle\Controller\DefaultController::homeAction') {
|
||||
$this->setSessionAttributeByTime($request, "default");
|
||||
}
|
||||
if ($request->get('_controller') == 'AppBundle\Controller\DefaultController::defaultAction') {
|
||||
|
||||
$repo = $this->em->getRepository('AppBundle:Page');
|
||||
$path = preg_replace('/^\/?(.*?)\/?$/', '$1', $request->getPathInfo());
|
||||
/** @var Page $node */
|
||||
$node = null;
|
||||
|
||||
// Try to find by url path. It's possible that the path consists of two parts:
|
||||
// - the beginning part represents a node
|
||||
// - the ending part represents a handler
|
||||
// e.g. /path/to/travel/program/buchen ("buchen" is the handler part)
|
||||
$pathArray = explode('/', $path);
|
||||
$restOfPath = '';
|
||||
$curPath = $path;
|
||||
//search for entry in new tree objects
|
||||
$api = Util::loadFromApi('cms/search', ['url' => $curPath]);
|
||||
while (!empty($pathArray)) {
|
||||
if (!$api) {
|
||||
$node = $repo->findOneBy(['realUrlPath' => '/' . $curPath]);
|
||||
if ($node) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
$restOfPath = '/' . array_pop($pathArray) . $restOfPath;
|
||||
$curPath = implode('/', $pathArray);
|
||||
}
|
||||
//find and try 301
|
||||
//find => to
|
||||
$redirects = [
|
||||
'/reisefuehrer/tuerkei' => 'tuerkei-reisen/reisefuehrer',
|
||||
'/reisefuehrer/jordanien' => 'jordanien-reisen/reisefuehrer',
|
||||
'/reisefuehrer/oman' => 'oman-reisen/reisefuehrer',
|
||||
'/reisefuehrer/israel' => 'israel-reisen/israel-reisefuehrer',
|
||||
'/reisefuehrer/aegypten' => 'aegypten-reisen/aegypten-reisefuehrer',
|
||||
'/reisemagazin/tuerkei-reisemagazin' => 'tuerkei-reisen/tuerkei-reisemagazin',
|
||||
'/reisemagazin/aegypten' => 'aegypten-reisen/aegypten-reisemagazin',
|
||||
'/reisemagazin/israel' => 'israel-reisen/israel-reisemagazin',
|
||||
'/reisemagazin/jordanien' => 'jordanien-reisen/jordanien-reisemagazin',
|
||||
'/reisemagazin/marokko' => 'marokko-urlaub/marokko-reisemagazin'
|
||||
|
||||
];
|
||||
//301
|
||||
foreach ($redirects as $find => $to) {
|
||||
if (strpos($restOfPath, $find) !== false) {
|
||||
$restOfPath = str_replace($find, $to, $restOfPath);
|
||||
$protocol = 'https';
|
||||
if (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] === "off") {
|
||||
$protocol = 'http';
|
||||
}
|
||||
header("Location: " . $protocol . "://" . $_SERVER["HTTP_HOST"] . "/" . $restOfPath, true, 301);
|
||||
exit();
|
||||
}
|
||||
}
|
||||
//load content from API, is found by cms/search
|
||||
|
||||
if ($api) {
|
||||
$this->setSessionAttributeByTime($request, "api");
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:iqTravelGuide');
|
||||
$request->attributes->set('api', $api);
|
||||
$request->attributes->set('template', 'TravelGuide');
|
||||
try {
|
||||
$controller = $this->controllerResolver->getController($request);
|
||||
} catch (\LogicException $e) {
|
||||
// If there is no controller action, call the default action and pass the template name
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:Default');
|
||||
$request->attributes->set('template', "Default");
|
||||
}
|
||||
$event->setController($controller ?? $this->controllerResolver->getController($request));
|
||||
return;
|
||||
}
|
||||
$this->setSessionAttributeByTime($request, "default");
|
||||
|
||||
|
||||
if (!$node) {
|
||||
// Now try to find a page by tracing a page node path using the page nodes' slugs
|
||||
|
||||
$pathArray = explode('/', $path);
|
||||
|
||||
while (!empty($pathArray)) {
|
||||
$restOfPath = '/' . implode('/', $pathArray);
|
||||
$slug = array_shift($pathArray);
|
||||
|
||||
$qb = $repo->createQueryBuilder('p');
|
||||
$qb->where($qb->expr()->eq('p.slug', ':slug'));
|
||||
$qb->setParameter('slug', $slug);
|
||||
|
||||
if ($node != null) {
|
||||
$qb->andWhere($qb->expr()->eq('p.parent', ':parentId'));
|
||||
$qb->setParameter('parentId', $node->getId());
|
||||
} else {
|
||||
$qb->andWhere($qb->expr()->isNull('p.parent'));
|
||||
}
|
||||
|
||||
$qb->setMaxResults(1);
|
||||
$childNode = $qb->getQuery()->getOneOrNullResult();
|
||||
if (!$childNode) {
|
||||
$whitelist = [
|
||||
'buchen',
|
||||
'berechne-gesamtpreis',
|
||||
'show_nationality_country_text',
|
||||
'pdf',
|
||||
];
|
||||
if (!in_array($slug, $whitelist)) {
|
||||
throw new HttpException(404, 'Seite nicht gefunden: ' . $slug);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ($node) {
|
||||
|
||||
// Avoid database calls to parent later
|
||||
$childNode->setParent($node);
|
||||
}
|
||||
$node = $childNode;
|
||||
}
|
||||
if ($node && $node->getRealUrlPath() && $node->getRealUrlPath() != '/' . $path) {
|
||||
// If there realUrlPath is set and the slug path differs from realUrlPath, then the slug path is
|
||||
// not a valid URL. Otherwise, there would be two different URLs representing the same page.
|
||||
$event->setController(function () {
|
||||
throw new NotFoundHttpException('Invalid URL');
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!$node) {
|
||||
// Search for a redirect entry
|
||||
$redirect = $this->em->getRepository('AppBundle:Redirect')->findOneBy(['sourceUrlPath' => '/' . $path]);
|
||||
if ($redirect) {
|
||||
$redirectUrl = $redirect->getPage()->getUrlPath();
|
||||
$event->setController(function () use ($redirectUrl) {
|
||||
return new RedirectResponse($redirectUrl, 301);
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
if ($node) {
|
||||
|
||||
if ($node->getStatus() == 0) {
|
||||
throw new NotFoundHttpException('Inactive page');
|
||||
}
|
||||
|
||||
$request->attributes->set('page', $node);
|
||||
|
||||
if ($node->getTravelProgram() != null && (
|
||||
$restOfPath == '/buchen' || $restOfPath == '/berechne-gesamtpreis' || $restOfPath == '/show_nationality_country_text')) {
|
||||
// Special case: Booking actions
|
||||
$request->attributes->set('travelProgramPage', $node);
|
||||
$request->attributes->set('action', $restOfPath);
|
||||
$request->attributes->set('_controller', 'AppBundle:Booking:index');
|
||||
} elseif ($restOfPath && $node->getTravelProgram() !== null && (
|
||||
$restOfPath === '/pdf')) {
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:pdf');
|
||||
} elseif ($node->getTravelProgram() !== null) {
|
||||
if ($node->getTravelProgram()->getStatus() == 0) {
|
||||
throw new \NotFoundHttpException('Inactive travel program');
|
||||
}
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:travelProgram');
|
||||
} elseif (
|
||||
$node->getFewoLodging() != null &&
|
||||
($restOfPath === '/buchen' || $restOfPath === '/berechne-gesamtpreis')
|
||||
) {
|
||||
$request->attributes->set('fewoTravelProgramPage', $node);
|
||||
$request->attributes->set('action', $restOfPath);
|
||||
$request->attributes->set('_controller', 'AppBundle:FewoBooking:index');
|
||||
} elseif ($node->getFewoLodging() !== null) {
|
||||
$request->attributes->set('fewoLodgingPage', $node);
|
||||
$request->attributes->set('action', $restOfPath);
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:fewoLodging');
|
||||
} else {
|
||||
$handler = $node->getTemplate() ? ucfirst($node->getTemplate()) : 'Default';
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:' . $handler);
|
||||
if ($node->getTemplate()) {
|
||||
try {
|
||||
$controller = $this->controllerResolver->getController($request);
|
||||
} catch (\LogicException $e) {
|
||||
// If there is no controller action, call the default action and pass the template name
|
||||
$request->attributes->set('_controller', 'AppBundle:Cms:Default');
|
||||
$request->attributes->set('template', $node->getTemplate());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
$event->setController($controller ?? $this->controllerResolver->getController($request));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
"uuidString" : "7B4142F5-F6AB-47B4-92FD-340AF03CE426"
|
||||
}
|
||||
],
|
||||
"creatorBuild" : "34510",
|
||||
"creatorBuild" : "34576",
|
||||
"files" : {
|
||||
"\/css\/booking.css" : {
|
||||
"aP" : 1,
|
||||
|
|
@ -1095,6 +1095,32 @@
|
|||
"q" : 100,
|
||||
"rq" : 75
|
||||
},
|
||||
"\/images\/logos\/logo_atmosfair_blue.png" : {
|
||||
"ft" : 32768,
|
||||
"iS" : 16820,
|
||||
"oA" : 0,
|
||||
"oAP" : "\/images\/logos\/logo_atmosfair_blue.png",
|
||||
"oF" : 0,
|
||||
"oIPL" : 0,
|
||||
"opt" : 0,
|
||||
"oT" : 1,
|
||||
"ou" : "lpckwebp-none",
|
||||
"q" : 100,
|
||||
"rq" : 75
|
||||
},
|
||||
"\/images\/logos\/logo_atmosfair_white.png" : {
|
||||
"ft" : 32768,
|
||||
"iS" : 86318,
|
||||
"oA" : 0,
|
||||
"oAP" : "\/images\/logos\/logo_atmosfair_white.png",
|
||||
"oF" : 0,
|
||||
"oIPL" : 0,
|
||||
"opt" : 0,
|
||||
"oT" : 1,
|
||||
"ou" : "lpckwebp-none",
|
||||
"q" : 100,
|
||||
"rq" : 75
|
||||
},
|
||||
"\/images\/logos\/logo-jugendreisen-spezialist.png" : {
|
||||
"ft" : 32768,
|
||||
"iS" : 21543,
|
||||
|
|
@ -4058,9 +4084,6 @@
|
|||
"no-new-native-nonconstructor" : {
|
||||
"active" : 0
|
||||
},
|
||||
"no-new-object" : {
|
||||
"active" : 0
|
||||
},
|
||||
"no-new-symbol" : {
|
||||
"active" : 1
|
||||
},
|
||||
|
|
@ -4073,6 +4096,9 @@
|
|||
"no-obj-calls" : {
|
||||
"active" : 1
|
||||
},
|
||||
"no-object-constructor" : {
|
||||
"active" : 0
|
||||
},
|
||||
"no-octal" : {
|
||||
"active" : 1
|
||||
},
|
||||
|
|
@ -4127,9 +4153,6 @@
|
|||
"active" : 0,
|
||||
"optionString" : "'except-parens'"
|
||||
},
|
||||
"no-return-await" : {
|
||||
"active" : 0
|
||||
},
|
||||
"no-script-url" : {
|
||||
"active" : 0
|
||||
},
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -613,14 +613,31 @@ initGoTo();
|
|||
$(document).ready(function() {
|
||||
$('.st-booking-form').validator().on('submit', function (e) {
|
||||
if (e.isDefaultPrevented()) {
|
||||
// handle the invalid form...
|
||||
} else {
|
||||
$(".btn-booking-form").attr("disabled", true);
|
||||
$(".btn-booking-form .alert-danger").removeClass("hide");
|
||||
$(".btn-booking-form .alert-danger").addClass("show");
|
||||
|
||||
} else {
|
||||
$(".btn-booking-form .alert-danger").removeClass("hide");
|
||||
$(".btn-booking-form .alert-danger").addClass("show");
|
||||
|
||||
$(".btn-booking-form").attr("disabled", true);
|
||||
$(".btn-booking-form .btn-booking-submit").addClass("hide");
|
||||
$(".btn-booking-form .btn-booking-loading").removeClass("hide");
|
||||
}
|
||||
});
|
||||
|
||||
$(".st-booking-form")
|
||||
.validator()
|
||||
.on("submit", function (t) {
|
||||
(t.isDefaultPrevented(),
|
||||
$(".btn-booking-form .alert-danger").removeClass("hide"),
|
||||
$(".btn-booking-form .alert-danger").addClass("show")) ||
|
||||
($(".btn-booking-form .alert-danger").removeClass("show"),
|
||||
$(".btn-booking-form .alert-danger").addClass(""),
|
||||
$(".btn-booking-form").attr("disabled", !0),
|
||||
$(".btn-booking-form .btn-booking-submit").addClass("hide"),
|
||||
$(".btn-booking-form .btn-booking-loading").removeClass("hide"));
|
||||
});
|
||||
var $topNavAccordion = $('#topNavAccordion');
|
||||
$topNavAccordion.on('show.bs.collapse','.collapse', function() {
|
||||
$topNavAccordion.find('.collapse.in').collapse('hide');
|
||||
|
|
|
|||
|
|
@ -24,6 +24,13 @@ class Util
|
|||
public static function getMySession($key){
|
||||
return isset(self::$mySession[$key]) ? self::$mySession[$key] : false;
|
||||
}
|
||||
|
||||
public static function isLocal(){
|
||||
if($_SERVER['HTTP_HOST'] == 'sterntours.test') {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* @param Page $page
|
||||
*
|
||||
|
|
@ -93,9 +100,12 @@ class Util
|
|||
//self::buildHttpQueryForCurl($headers, $headerList); //?
|
||||
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
|
||||
curl_setopt($ch, CURLOPT_HEADER, $withRespHeaders);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
if (isset($cookieJar))
|
||||
{
|
||||
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieJar);
|
||||
|
|
@ -108,7 +118,12 @@ class Util
|
|||
curl_setopt($ch, CURLOPT_POSTFIELDS, $dataStr);
|
||||
}
|
||||
$response = curl_exec($ch);
|
||||
|
||||
if (curl_errno($ch)) {
|
||||
$error_msg = curl_error($ch);
|
||||
// var_dump($error_msg);
|
||||
// die("CURL ERROR: ". $error_msg);
|
||||
}
|
||||
|
||||
$ret = [
|
||||
'info' => curl_getinfo($ch),
|
||||
'success' => true,
|
||||
|
|
@ -185,7 +200,7 @@ class Util
|
|||
|
||||
$baseUrl = 'https://mein.sterntours.de/api/';
|
||||
if($_SERVER['HTTP_HOST'] === 'sterntours.test') {
|
||||
$baseUrl = 'http://mein.sterntours.test/api/';
|
||||
$baseUrl = 'https://mein.sterntours.test/api/';
|
||||
}
|
||||
$postData['key'] = 'f6077389c9ce710e554763a5de02c8ec';
|
||||
$data = $postData;
|
||||
|
|
@ -193,14 +208,21 @@ class Util
|
|||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 20);
|
||||
if($_SERVER['HTTP_HOST'] == 'sterntours.test') {
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
}
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
|
||||
curl_setopt($ch, CURLOPT_URL, $baseUrl.$action);
|
||||
|
||||
$result = curl_exec($ch);
|
||||
/* var_dump($result);
|
||||
die();
|
||||
*/
|
||||
if (curl_errno($ch)) {
|
||||
$error_msg = curl_error($ch);
|
||||
var_dump($error_msg);
|
||||
die("CURL ERROR: ". $error_msg);
|
||||
}
|
||||
|
||||
$r = json_decode($result);
|
||||
curl_close($ch);
|
||||
if(isset($r->success)) {
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/*
|
||||
{{ status_code }} {{ status_text }}
|
||||
{{ }} {{ status_text }}
|
||||
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ if (isset($_SERVER['HTTP_CLIENT_IP'])
|
|||
|
||||
/** @var \Composer\Autoload\ClassLoader $loader */
|
||||
$loader = require __DIR__.'/../app/autoload.php';
|
||||
include_once __DIR__.'/../var/bootstrap.php.cache';
|
||||
|
||||
// Redis loader
|
||||
/*
|
||||
|
|
@ -34,9 +35,12 @@ $redisLoader->register(true);
|
|||
|
||||
Debug::enable();
|
||||
|
||||
$kernel = new AppKernel('dev', true);
|
||||
$kernel = new AppKernel('dev', false);
|
||||
//$kernel = new AppCache($kernel);
|
||||
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
|
||||
//Request::enableHttpMethodParameterOverride();
|
||||
$kernel->loadClassCache();
|
||||
$request = Request::createFromGlobals();
|
||||
$response = $kernel->handle($request);
|
||||
$response->send();
|
||||
$kernel->terminate($request, $response);
|
||||
$kernel->terminate($request, $response);
|
||||
File diff suppressed because one or more lines are too long
25180
web/js/custom-min.js
vendored
25180
web/js/custom-min.js
vendored
File diff suppressed because one or more lines are too long
BIN
web/pdf/Stern-Tours-Mietbedingungen.pdf
Normal file → Executable file
BIN
web/pdf/Stern-Tours-Mietbedingungen.pdf
Normal file → Executable file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue