Example #1
0
function endpreisBerechnen()
{
    if ($_SESSION["preis"]["gesamt"] == "" && !isset($_SESSION["preis"]["gesamt"])) {
        if ($_SESSION["suchen"]["auto"] === "on") {
            $_SESSION["preis"]["auto"] = getAutoPreis($_SESSION["auto"]);
        } else {
            $_SESSION["preis"]["auto"] = 0;
        }
        if ($_SESSION["suchen"]["hotel"] === "on") {
            $_SESSION["preis"]["hotel"] = getHotelPreis($_SESSION["hotel"], $_SESSION["versorgung"], $_SESSION["zimmer"]);
        } else {
            $_SESSION["preis"]["hotel"] = 0;
        }
        $_SESSION["preis"]["flug"] = getFlugPreis($_SESSION["hinflug"]["flug"], $_SESSION["rueckflug"]["flug"]);
        $_SESSION["preis"]["gesamt"] = round($_SESSION["preis"]["auto"] + $_SESSION["preis"]["hotel"] + $_SESSION["preis"]["flug"], 0);
    }
    return $_SESSION["preis"]["gesamt"];
}
Example #2
0
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>';
}