function addAutoData() { $ab = "SELECT DISTINCT * FROM Autobuchung JOIN Auto ON Auto.id=auto_id \n\t\t\t\tWHERE personenid='" . $_SESSION["username"] . "' GROUP BY auto_id ORDER BY marke"; $res = mysql_query($ab); if (mysql_num_rows($res) == 0) { echo "keine Daten verfügbar"; } else { while ($auto = mysql_fetch_object($res)) { echo ' <div class="auto"> <div class="autoBildDiv"> <img id="autoBild" src="images/autos/' . $auto->id . '.jpg" /> </div> <div class="autoBeschreibungDiv"> <div class="autoBeschreibung"> <div class="autoHeader"> <div class="autoName">' . $auto->marke . ' ' . $auto->modell . '</div> <div class="farbbox" style="background-color:#' . $auto->farbe . '"></div> </div> <div class="preisDiv autoInformationen"> Preis pro Tag:</br>' . $auto->preis . ' € </div> <div class="kilometerDiv autoInformationen"> Kilometer:</br>' . $auto->km . ' </div> <div class="erstZulassung autoInformationen"> Schaltung:</br>' . $auto->schaltung . ' </div> <div class="kraftstoffDiv autoInformationen"> ' . $auto->kraftstoff . ' </div> <div class="PS autoInformationen"> ' . round($auto->ps * 0.735499, 0) . ' KW (' . $auto->ps . ' PS) </div> <div class="abholFlughafenDiv autoInformationen"> Abholflughafen:</br> ' . getFlughafenOrtByID($auto->flughafen_id) . ' (' . $auto->flughafen_id . ') ' . getFlagByFlughafenID($auto->flughafen_id) . ' </div> </div> </div> </div>'; } } }
function addHotelData() { $ab = "SELECT DISTINCT * FROM Zimmerbuchung JOIN Hotel ON hotelid=Hotel.id WHERE personenid='" . $_SESSION["username"] . "'\n\t\t\tGROUP BY hotelid ORDER BY Hotel.name"; $res = mysql_query($ab); // echo $ab; if (mysql_num_rows($res) == 0) { echo "keine Daten verfügbar"; } else { while ($hotel = mysql_fetch_object($res)) { $belegung = getBelegteZimmerZahl($hotel->id, TRUE) . "/" . $hotel->zimmerzahl; echo '<div class="hotel"> <div class="hotelBildDiv"> <img id="hotelBild" src="images/hotels/' . getHotelBild($hotel->name) . '" /> </div> <div class="hotelBeschreibungDiv"> <div class="hotelBeschreibung"> <div class="hotelHeader"> <div class="hotelName">' . $hotel->name . '</div> <div class="sterndiv">' . addSterne($hotel->sterne, "images/") . '</div> </div> <div class="adresseDiv"> <div class="adresse">' . $hotel->strasse . '</div> <div class="adresse">' . $hotel->ort . '</div> <div class="adresse">' . getLandNameByISO($hotel->land) . ' ' . getFlagByFlughafenID($hotel->naherFlughafen) . '</div> </div> <div class="naherFlughafen"> Naher Flughafen:</br> ' . getFlughafenOrtByID($hotel->naherFlughafen) . ' (' . $hotel->naherFlughafen . ') </div> <div class="belegung"> Zimmerbelegung:</br> ' . $belegung . ' </div> </div> </div> </div>'; } } }
function genAuto($autoid, $button = TRUE) { $ab = "SELECT * FROM Auto WHERE id='{$autoid}'"; $auto = mysql_fetch_object(mysql_query($ab)); $preis = isset($_SESSION["preis"]["auto"]) ? $_SESSION["preis"]["auto"] : getAutoPreis($auto->id); $select = $button ? '<input class="selectauto" TYPE = "submit" Name = "selectauto[' . $auto->id . ']" value="Wählen" />' : ''; echo ' <div class="auto' . ($button ? "" : 2) . '"> <div class="autoBildDiv"> <img id="autoBild" src="images/autos/' . $auto->id . '.jpg" /> </div> <div class="autoBeschreibungDiv"> <div class="autoBeschreibung"> <div class="autoHeader"> <div class="autoName">' . $auto->marke . ' ' . $auto->modell . '</div> <div class="autoPreis">' . $preis . ' €</div> <div class="farbbox" style="background-color:#' . $auto->farbe . '"></div> </div> <div class="preisDiv autoInformationen"> Preis pro Tag:</br>' . $_SESSION["minpreis"]["auto"][$autoid] . ' € </div> <div class="kilometerDiv autoInformationen"> Kilometer:</br>' . $auto->km . ' </div> <div class="erstZulassung autoInformationen"> Schaltung:</br>' . $auto->schaltung . ' </div> <div class="kraftstoffDiv autoInformationen"> ' . $auto->kraftstoff . ' </div> <div class="PS autoInformationen"> ' . round($auto->ps * 0.735499, 0) . ' KW (' . $auto->ps . ' PS) </div> <div class="abholFlughafenDiv autoInformationen"> Abholflughafen:</br> ' . getFlughafenOrtByID($auto->flughafen_id) . ' (' . $auto->flughafen_id . ') ' . getFlagByFlughafenID($auto->flughafen_id) . ' </div> ' . $select . ' <div class="clear"></div> </div> </div> </div>'; }