public static function searchDestinationTemplate($regions, $mro) { Template::setHeader(); echo '<table border="1" cellpadding="5" cellspacing="0" width="80%" rules="all">'; echo '<tr bgcolor="#b0c4de">'; echo '<th>Name</th>'; echo '<th>Flugdauer</th>'; echo '<th>Wasser</th>'; echo '<th>Luft</th>'; echo '<th>Preis p. P.</th>'; echo '<th>Gesamtpreis</th>'; echo '</tr>'; for ($i = 0; $i < count($regions); $i++) { $regionMro = new MixerRequestObject($mro->getCfg(), $mro->getXpwp(), $mro->getIp()); $regionMro->setParamsByArray($mro->getParamsAsArray()); $regionMro->addDestination($regions[$i]->getRegionCode()); echo '<tr bgcolor="#b0c4de">'; echo '<td><h3><a href="./SearchDestinationsController.php?mro=' . base64_encode(serialize($regionMro)) . '">' . $regions[$i]->getName() . '</a></h3></td>'; echo '<td></td>'; echo '<td></td>'; echo '<td></td>'; echo '<td></td>'; echo '<td></td>'; echo '</tr>'; $dst = $regions[$i]->getDstList(); for ($j = 0; $j < count($dst); $j++) { $dstMro = new MixerRequestObject($mro->getCfg(), $mro->getXpwp(), $mro->getIp()); $dstMro->setParamsByArray($mro->getParamsAsArray()); $dstMro->addDestination($dst[$j]->getRef()); $color = $j % 2 == 0 ? '#ffffff' : '#d3d3d3'; echo '<tr bgcolor="' . $color . '" width="100%">'; echo '<td><a href="./SearchDestinationsController.php?mro=' . base64_encode(serialize($dstMro)) . '">' . $dst[$j]->getName() . '</a></td>'; echo '<td>' . $dst[$j]->getFlightTime() . '</td>'; echo '<td>' . $dst[$j]->getWaterTemp() . '</td>'; echo '<td>' . $dst[$j]->getAirTemp() . '</td>'; echo '<td>' . $dst[$j]->getPrice() . '</td>'; echo '<td>' . $dst[$j]->getGprice() . '</td>'; echo '</tr>'; } } echo '</table>'; }