Extension App + travelsearch

git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3481 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
adametz 2018-12-27 16:40:19 +00:00
parent 645dbaf77e
commit 30c42d0508
2 changed files with 111 additions and 20 deletions

View file

@ -120,6 +120,7 @@ class AppExtension extends \Twig_Extension
public function lozadFilter($html)
{
// return $html;
//(<img\s*?)src
$dom = new \DOMDocument;
$dom->loadHTML('<?xml encoding="utf-8" ?>'.$html);
@ -127,16 +128,16 @@ class AppExtension extends \Twig_Extension
foreach ($images as $image) {
$i = Util::getRootDir().'web/'.$image->getAttribute('src');
if(strpos($image->getAttribute('src'), 'docs')){
if(strpos($image->getAttribute('src'), 'docs') !== false){
$i = Util::getRootDir().'web/'.substr($image->getAttribute('src'), strpos($image->getAttribute('src'), 'docs'));
}
if(strpos($image->getAttribute('src'), 'uploads')){
if(strpos($image->getAttribute('src'), 'uploads') !== false){
$i = Util::getRootDir().'web/'.substr($image->getAttribute('src'), strpos($image->getAttribute('src'), 'uploads'));
}
$i = Image::open($i)->cropResize(848)->guess(75);
$i = Image::open($i)->cropResize(848)->guess(75);
// $i = image()..;
$image->setAttribute('data-src', $i);
$image->setAttribute('data-src', "/".$i);
$image->setAttribute('src', 'images/placeholder-image.png');
$image->setAttribute('class', 'lozad');
}

View file

@ -1,17 +1,112 @@
<?php
<?php
$url = "http://www.sterntours.de/tt-suche?".str_replace("/travelsearch.php?", "", $_SERVER['REQUEST_URI']);
header("Location:".$url, true, 301);
exit;
$requests = str_replace("/travelsearch.php?", "", $_SERVER['REQUEST_URI']);
/*
$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";
$url = "http://dtps-ibe.traveltainment.de/search?&taid=DRS32";
//$url = "http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7&formular=4&engine=pauschal&detail=hotel&showresult=1&";
$url .= "&aid=49720"; //$requests;
http://dtps-ibe.traveltainment.de/?ibe=package&adult=2&ddate=2012-05-26&rdate=2012-06-16&rgid=10000&rid=35&aid=324
http://www.sterntours.de/travelsearch.php?KID=&formular=&detail=termine&showresult=1&personen=25;25&IFF=2286&termin=1525298400&ruecktermin=1525730400&dauer=6_5&marke=SLR&sleistung=PMI501;;;A12H&abflughafen=HAM&bplink=1&ttexpedient=Maria%20Bedel&ttbueroid=DRS32
//$requests = str_replace("/travelsearch.php?", "", $_SERVER['REQUEST_URI']);
$url = "http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7&formular=4&engine=pauschal&detail=hotel&showresult=1&";
$url .= $requests;
echo '<iframe src="'.$url.'" frameborder="0" scrolling="no" width="100%" height="13500" onload="window.parent.parent.scrollTo(0,0);"></iframe>';
*/
/*$url = 'http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7';
$url .= '&' . $_SERVER['QUERY_STRING'];
echo '<iframe src="' . $url . '" frameborder="0" width="592" height="10000"></iframe>';*/
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);
$url = urldecode($url);
/*$destination = 0;
$requests = str_replace("/travelsearch.php?", "", $_SERVER['REQUEST_URI']);
$url = "http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7&formular=4&engine=pauschal&detail=".($destination > 0 ? 'termine' : $detail)."&showresult=1";
$url .= $requests;*/
echo "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Frameset//EN'
'http://www.w3.org/TR/html4/frameset.dtd'>
<html>
<head>
<title>DEEPLINK Sterntours</title>
</head>
<iframe src=\"".$url."\" frameborder=\"0\" width=\"592\" height=\"10000\"></iframe>
</html>";
/* $urlLastMinute = 'http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7';
$urlPauschal = 'http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7';
$urlCharter = 'http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7';
$urlHotel = 'http://www.vidado.com/booking/ibe_bp2/erde/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7';
if (isset($_GET['ttibe']) && $_GET['ttibe'] == 'pauschal') {
$url = $urlPauschal;
} else if (isset($_GET['ttibe']) && $_GET['ttibe'] == 'charter') {
$url = $urlCharter;
} else if (isset($_GET['ttibe']) && $_GET['ttibe'] == 'hotel') {
$url = $urlHotel;
} else {
$url = $urlLastMinute;
}
$url .= '&' . $_SERVER['QUERY_STRING'];
echo '<iframe src="' . $url . '" frameborder="0" width="592"
height="10000"></iframe>';*/
/*
http://www.sterntours.de/tt-suche?termin=&ruecktermin=&dauer=&topRegion=&abflughafen=&shotel=&kategorie=&zimmer=&t=1&child0=&child1=&child2&&KID=
@ -33,19 +128,13 @@
$form="";
$det="termine";
$hotel="49720";
x-webdoc://5EB80A55-1E1B-4688-B586-5E5511A3A415?KID=&formular=&engine=erde&detail=termine&showresult=1&personen=25;25&IFF=6293&termin=1539381600&ruecktermin=1539554400&dauer=6_2&marke=FTI&sleistung=ASW318;PAUS;;DSQF&bplink=1&ttexpedient=Franziska%20Mohsen&ttbueroid=DRS32
http://www.sterntours.de/travelsearch.php?KID=&formular=&detail=termine&showresult=1&personen=25;25&IFF=2286&termin=1525298400&ruecktermin=1525730400&dauer=6_5&marke=SLR&sleistung=PMI501;;;A12H&abflughafen=HAM&bplink=1&ttexpedient=Maria%20Bedel&ttbueroid=DRS32
&formular=$form&detail=$det&IFF=$hotel&abflughafen=$airp&sleistung=$sleist&showresult=$show&personen=$pers&marke=$va&termin=$hin&ruecktermin=$rueck&dauer=$dau&bplink=$bli&ttexpedient=$exp'
//$ttUrl = 'http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7&formular=4&engine=pauschal&showresult=1&'.$_SERVER['QUERY_STRING'];
http://sterntours.local/travelsearch.php?KID=&formular=&detail=termine&showresult=1&personen=25;25&IFF=49720&termin=1523397600&ruecktermin=1524002400&dauer=6_7&marke=FTI&sleistung=MCT328;PAUS;;DX%20F&abflughafen=TXL&bplink=1&ttexpedient=Leoni%20Stern&ttbueroid=DRS32
https://sterntours.de/travelsearch.php?KID=&formular=&detail=termine&showresult=1&personen=25;25&IFF=49720&termin=1523397600&ruecktermin=1524002400&dauer=6_7&marke=FTI&sleistung=MCT328;PAUS;;DX%20F&abflughafen=TXL&bplink=1&ttexpedient=Leoni%20Stern&ttbueroid=DRS32
http://sterntours.local/tt-suche?termin=&ruecktermin=&dauer=&topRegion=&abflughafen=&shotel=&kategorie=&zimmer=&t=1&child0=&child1=&child2&&KID=&formular=&detail=termine&showresult=1&personen=25;25&IFF=19146&termin=1528063200&ruecktermin=1528322400&dauer=6_3&marke=ITS&sleistung=EF02UXT;;F;AP2N&abflughafen=DUS&bplink=1&ttexpedient=Thomas%20Stern&ttbueroid=DRS32
@ -55,3 +144,4 @@
http://www.vidado.com/booking/ibe_bp2/index.php?CID=8ce65750ce5af9d9a6b22c9b04772ea7&formular=&detail=termine&showresult=1&personen=25;25&IFF=49720&termin=1523397600&ruecktermin=1524002400&dauer=6_7&marke=FTI&sleistung=MCT328;PAUS;;DX%20F&abflughafen=TXL&bplink=1&ttexpedient=Leoni%20Stern&ttbueroid=DRS32&detail=termine&showresult=1&personen=25;25&IFF=49720&termin=1523397600&ruecktermin=1524002400&dauer=6_7&marke=FTI&sleistung=MCT328;PAUS;;DX%20F&abflughafen=TXL&bplink=1&ttexpedient=Leoni%20Stern&ttbueroid=DRS32
*/
?>