From 83de9a1ae554495092de1efab1509b87438a1405 Mon Sep 17 00:00:00 2001 From: adametz Date: Fri, 13 Apr 2018 13:39:14 +0000 Subject: [PATCH] IBE / Ticket 1376 + 1377 git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3389 f459cee4-fb09-11de-96c3-f9c5f16c3c76 --- .../views/default/components/footer.html.twig | 52 +++------ .../views/default/pages/contact.html.twig | 44 ++++++-- .../Controller/DefaultController.php | 100 +++++++++++++++++- trunk/src/AppBundle/Form/TravelerType.php | 3 +- .../AppBundle/Resources/public/js/custom.js | 6 +- 5 files changed, 152 insertions(+), 53 deletions(-) diff --git a/trunk/app/Resources/views/default/components/footer.html.twig b/trunk/app/Resources/views/default/components/footer.html.twig index 4c18b9da..37535636 100644 --- a/trunk/app/Resources/views/default/components/footer.html.twig +++ b/trunk/app/Resources/views/default/components/footer.html.twig @@ -37,37 +37,7 @@
-

NEWSLETTER:

-
-

Erhalten Sie ca. einmal wöchentlich mit dem Newsletter von STERN TOURS aktuelle Angebote, indem Sie sich hier eintragen:

-
-
-
- -
-
-
-
- -
-
-
-
- -
-
-
- -
-
-
-
- - -
-
-
-

ANGESCHLOSSEN AN PROFIS DER REISEBRANCHE:

+

ANGESCHLOSSEN AN PROFIS DER REISEBRANCHE:

{% image '@AppBundle/Resources/public/images/logos/iata.png' %}IATA{% endimage %} @@ -80,24 +50,26 @@ {% image '@AppBundle/Resources/public/images/logos/DB.png' %}DB Bahn{% endimage %}
-
+ +
+ +
+
-

Sicherheit & starke Marken:

+

Sicherheit & starke Marken:

{% image '@AppBundle/Resources/public/images/logos/ssl.png' %}SSL{% endimage %}
-
-
- {% image '@AppBundle/Resources/public/images/logos/logo-jugendreisen-spezialist.png' %}jugendreisen spezialist{% endimage %} -
-
- {% image '@AppBundle/Resources/public/images/logos/fairliners_g.png' %}fairliners{% endimage %} -
+
+
+ +
+
diff --git a/trunk/app/Resources/views/default/pages/contact.html.twig b/trunk/app/Resources/views/default/pages/contact.html.twig index f6c00efa..49e92129 100644 --- a/trunk/app/Resources/views/default/pages/contact.html.twig +++ b/trunk/app/Resources/views/default/pages/contact.html.twig @@ -15,7 +15,7 @@
-
+
@@ -44,17 +44,47 @@

Persönliche Daten

-
{{ form_field_pho(contact_form.salutation) }}
-
{{ form_field_pho(contact_form.firstName, 'Vorname') }}
-
{{ form_field_pho(contact_form.lastName, 'Nachname') }}
+
+
+ {{ form_field_pho(contact_form.salutation) }} +
+
+
+
+
+ {{ form_field_pho(contact_form.firstName, 'Vorname') }} +
+
+
+
+
+ {{ form_field_pho(contact_form.lastName, 'Nachname') }} +
+
+
{{ form_field_pho(contact_form.streetAddress, 'Straße, Hausnummer') }}
{{ form_field_pho(contact_form.zipCode, 'Postleitzahl') }}
{{ form_field_pho(contact_form.city, 'Ort') }}
{{ form_field_pho(contact_form.nation) }}
-
{{ form_field_pho(contact_form.phone, 'Telefon tagsüber') }}
+
+
+ {{ form_field_pho(contact_form.phone, 'Telefon tagsüber') }} +
+
+
{{ form_field_pho(contact_form.mobilePhone, 'Telefon mobil') }}
-
{{ form_field_pho(contact_form.email, 'E-Mail-Adresse') }}
-
{{ form_field_pho(contact_form.travelerCount) }}
+
+
+ {{ form_field_pho(contact_form.email, 'E-Mail-Adresse') }} +
+
+
+
+
+ {{ form_field_pho(contact_form.travelerCount) }} +
+
+
{{ form_field_pho(contact_form.notes, 'Bitte Reiseland und Programmwunsch angeben', {attr: {rows: 8}}) }} diff --git a/trunk/src/AppBundle/Controller/DefaultController.php b/trunk/src/AppBundle/Controller/DefaultController.php index 5c8a3cff..d8eec88b 100644 --- a/trunk/src/AppBundle/Controller/DefaultController.php +++ b/trunk/src/AppBundle/Controller/DefaultController.php @@ -112,7 +112,53 @@ class DefaultController extends Controller { $data = $form->getData(); - $ttUrl = 'http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7&formular=4&engine=pauschal&showresult=1'; + $ttUrl = "http://dtps-ibe.traveltainment.de/search?&taid=DRS32"; //ibe=package"; + + /*$requests = "&ibe=package&aidgiata=49720&ddate=".date("Y-m-d", 1523397600)."&depap=TXL&rdate=".date("Y-m-d", 1524002400)."&dur=6,2&brand=FTI&oid=ASW318;PAUS;;DSQF&adult=2";*/ + + $ttUrl .= '&ddate=' . $data['termin']->format('d.m.Y'); + $ttUrl .= '&rdate=' . $data['ruecktermin']->format('d.m.Y'); + if (!empty($data['dauer'])){ + $ttUrl .= '&dur='.str_replace("_", ",", $data['dauer']); + } + + if (!empty($data['t'])) + { + $ttUrl .= '&adult='. $data['t']; + $count = 0; + for ($i = 0; $i < 3; ++$i) + { + if (!empty($data['child'.$i])) + { + $count++; + } + } + $ttUrl .= '&child='. $count; + } + $ttUrl .= '&ibe='; + if (!empty($data['topRegion']) && isset(TtSearchRequestType::$DESTINATION_CHOICES[$data['topRegion']])) + { + $ttUrl .= 'hotel&rgid='. TtSearchRequestType::$DESTINATION_CHOICES[$data['topRegion']]; + } + else + { + $ttUrl .= 'package'; + } + if (!empty($data['abflughafen'])) $ttUrl .= '&depap='. $data['abflughafen']; + if (!empty($data['shotel'])) $ttUrl .= '&accom='. urlencode($data['shotel']); + if (!empty($data['kategorie'])) $ttUrl .= '&stars='. $data['kategorie']; + if (!empty($data['zimmer'])) $ttUrl .= '&room='. $data['zimmer']; + if (!empty($data['verpflegung'])) $ttUrl .= '&board='. $data['verpflegung']; + if (!empty($data['hbfges'])) $ttUrl .= '&raavg='. $data['hbfges']; + if (!empty($data['hbfanz'])) $ttUrl .= '&hbfanz='. $data['hbfanz']; + if (!empty($data['hbfempf'])) $ttUrl .= '&racnt='. $data['hbfempf']; + //if ($data['familie_kinder'] ?? false) $ttUrl .= '&familie_kinder=0'; + //if ($data['strand'] ?? false) $ttUrl .= '&beach=0'; + //if ($data['wellness'] ?? false) $ttUrl .= '&wellness=0'; + //if ($data['typ'] ?? false) $ttUrl .= '&typ=0'; + if (!empty($data['sportangebot'])) $ttUrl .= '&sports='. $data['sportangebot']; + + /*$ttUrl = 'http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7&formular=4&engine=pauschal&showresult=1'; $ttUrl .= '&termin=' . $data['termin']->format('d.m.Y'); $ttUrl .= '&ruecktermin=' . $data['ruecktermin']->format('d.m.Y'); if (!empty($data['dauer'])) $ttUrl .= '&dauer='. $data['dauer']; @@ -149,9 +195,59 @@ class DefaultController extends Controller if ($data['wellness'] ?? false) $ttUrl .= '&wellness=0'; if ($data['typ'] ?? false) $ttUrl .= '&typ=0'; if (!empty($data['sportangebot'])) $ttUrl .= '&sportangebot='. $data['sportangebot']; + */ + }else{ if(strpos($_SERVER['QUERY_STRING'], 'ttexpedient')){ - $ttUrl = 'http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7&formular=4&engine=pauschal&showresult=1&'.$_SERVER['QUERY_STRING']; + + if(isset($_GET['formular'])) { $form=$_GET['formular']; } + else { $form=""; } + + if(isset($_GET['detail'])) { $det=$_GET['detail']; } + else { $det=""; } + + if(isset($_GET['IFF'])) { $hotel=$_GET['IFF']; } + else { $hotel=""; } + + if(isset($_GET['abflughafen'])) { $airp=$_GET['abflughafen']; } + else { $airp=""; } + + if(isset($_GET['sleistung'])) { $sleist=$_GET['sleistung']; } + else { $sleist=""; } + + if(isset($_GET['showresult'])) { $show=$_GET['showresult']; } + else { $show=""; } + + if(isset($_GET['personen'])) { $pers=$_GET['personen']; } + else { $pers=""; } + + if(isset($_GET['marke'])) { $va=$_GET['marke']; } + else { $va=""; } + + if(isset($_GET['termin'])) { $hin=$_GET['termin']; } + else { $hin=""; } + + if(isset($_GET['ruecktermin'])) { $rueck=$_GET['ruecktermin']; } + else { $rueck=""; } + + if(isset($_GET['dauer'])) { $dau=$_GET['dauer']; } + else { $dau=""; } + + if(isset($_GET['bplink'])) { $bli=$_GET['bplink']; } + else { $bli=""; } + + if(isset($_GET['ttexpedient'])) { $exp=$_GET['ttexpedient']; } + else { $exp=""; } + + $url = "http://dtps-ibe.traveltainment.de/search?&taid=DRS32"; //&ibe=package"; + + + $url = $url."&adult=".substr_count($pers, '25')."&aid=$hotel&ddate=".date("Y-m-d", $hin)."&rdate=".date("Y-m-d", $rueck)."&dur=".str_replace("_", ",", $dau)."&brand=$va&depap=$airp"; + $url .= "&aidList=".str_replace(";", ",", $sleist); + $ttUrl = urldecode($url); + + + /*$requests = "&ibe=package&aidgiata=49720&ddate=".date("Y-m-d", 1523397600)."&depap=TXL&rdate=".date("Y-m-d", 1524002400)."&dur=6,2&brand=FTI&oid=ASW318;PAUS;;DSQF&adult=2";*///'http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7&formular=4&engine=pauschal&showresult=1&'.$_SERVER['QUERY_STRING']; } } diff --git a/trunk/src/AppBundle/Form/TravelerType.php b/trunk/src/AppBundle/Form/TravelerType.php index 2f1d4f43..66668fa1 100644 --- a/trunk/src/AppBundle/Form/TravelerType.php +++ b/trunk/src/AppBundle/Form/TravelerType.php @@ -58,4 +58,5 @@ class TravelerType extends AbstractType ] */ } -} \ No newline at end of file +} + diff --git a/trunk/src/AppBundle/Resources/public/js/custom.js b/trunk/src/AppBundle/Resources/public/js/custom.js index 6db85ad5..9357d5d9 100644 --- a/trunk/src/AppBundle/Resources/public/js/custom.js +++ b/trunk/src/AppBundle/Resources/public/js/custom.js @@ -18,9 +18,9 @@ jQuery(document).ready(function($) { $('