", $STL, $t['main']); $t['main'] = str_replace("", $STM, $t['main']); include('inc.header.php'); include('inc.formevaluate.php'); include('inc.searchbar.php'); include('inc.topmenu.php'); include('inc.footer.php'); include('inc.footer2.php'); include('inc.newsblock.php'); include('inc.advantageblock.php'); include('inc.slideshow.php'); //include('inc.tips.php'); include('inc.countriesbar.php'); $prop = new Properties(PSN); $prop->readDB(1); $today = date('Y-m-d'); //$timer->startTimer(); $cache = false; if ($today>$prop->value['toptripchange']){ $trip = new tTrip(PSN, 'ttrip', false); $trip->regenerate(); $prop->value['toptripchange'] = date('Y-m-d'); $prop->update(); $cache = true; } //$timer->endTimer(); //echo $timer->getTotalTime(); //if (($cache) || (!$topoffer = Managercache::getInstance(PSN)->getFromCache('topoffer'))) { $topoffer = ' '; $trip = new tTrip(PSN, 'ttrip', false); $trip2 = new tTrip(PSN, 'ttrip', false); $schedule = new tSchedule(PSN, 'tschedule', false); $schedule2 = new tSchedule(PSN, 'tschedule', false); $select = " select ttrip.id as tripid, tschedule.id as scheduleid from tschedule,ttrip where tschedule.trip_fkid = ttrip.id and ttrip.top=1 and tschedule.begindate = ( select min(begindate) from tschedule where tschedule.trip_fkid=ttrip.id and (tschedule.disable = 0 or tschedule.disable is null) and tschedule.begindate>'".$today."' ) group by ttrip.id limit 0,10"; $trip2->runSelect($select); $a = 1; while ($trip2->fetchAttr()){ $trip->readDB($trip2->value['tripid']); $schedule->readDB($trip2->value['scheduleid']); $url = tTrip::getScheduleUrl($trip, $schedule); $tripname = $trip->value['name']; if (strlen($tripname) > 38) $tripname = substr($tripname, 0, 38).'...'; $temp = '
 

'.$tripname.'

Oblasť: '.$trip->getCountry().(($dest = $trip->getDestination())? ', ' . $dest : '' ).'
 
CK: '.$trip->getAgency().'
'.$trip->getMainPagePic($url).'
  • Termín zájazdu: '.tSchedule::formatDate($schedule->value['begindate']).' - '.tSchedule::formatDate($schedule->value['enddate']).'
  • ' .(($trip->getCategory())?'
  • Úroveň hotela:
  • '.$trip->getCategoryStars(). '
  • ':'') .'
  • Strava: '.$schedule->getFood2().'
  • Dĺžka pobytu: '.$schedule->getDays().' dní
  • Doprava: '.$schedule->getTransport().'
  • Konečná cena za osobu: '.Utility::displayPrice($schedule->value['discount_price']).',- EUR
Viac informácií o zájazde
 
'; // $temp = '
// '.$trip->getMainPagePic($url).' //
//

'.$trip->getCategory().''.$trip->value['name'].'

//

'.$trip->getCountry().(($dest = $trip->getDestination())? ' / ' . $dest : '' ).'

//

'.$schedule->getDays().' dní, '.tSchedule::formatDate($schedule->value['begindate']).' - '.tSchedule::formatDate($schedule->value['enddate']).'

//

'.$schedule->getFood().', '.$schedule->getTransport().'

//

Pôvodná cena: '.Utility::displayPrice($schedule->value['sumprice']).' €

//

Cena so zľavou:

'.Utility::displayPrice($schedule->value['discount_price']).'

' // .'

Kalkulovať

//
//
'; $topoffer = str_replace("", $temp, $topoffer); $a++; } //Managercache::getInstance(PSN)->insertIntoCache('topoffer', $topoffer); //} $t['main'] = str_replace("", $topoffer, $t['main']); echo $t['main']; require ("inc.finalisation.php"); ?>