<?php

header('Access-Control-Allow-Origin: *');

if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
    if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_METHOD']))
        header("Access-Control-Allow-Methods: GET, POST, OPTIONS");
    if (isset($_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']))
        header("Access-Control-Allow-Headers: {$_SERVER['HTTP_ACCESS_CONTROL_REQUEST_HEADERS']}");
    exit;
}
if ($_SERVER['REQUEST_METHOD'] === 'POST') {

} else {
    exit();
}
error_reporting(E_ALL);
ini_set('display_errors', 1);
include 'conn.php';

use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;

require 'imapMail/Exception.php';
require 'imapMail/PHPMailer.php';
require 'imapMail/SMTP.php';
include_once './sms.class.php';

function random_string($length) {
    $key = '';
    $keys = array_merge(range(0, 9));
    for ($i = 0; $i < $length; $i++) {
        $key .= $keys[array_rand($keys)];
    }
    return $key;
}

function random_code($length) {
    $key = '';
    $keys = array_merge(range(0, 9), range('a', 'z'));
    for ($i = 0; $i < $length; $i++) {
        $key .= $keys[array_rand($keys)];
    }
    return $key;
}

$postdata = file_get_contents("php://input");
$request = json_decode($postdata);

foreach ($_POST as $key => $value) {
//    echo $key;
    $GLOBALS[$key] = isset($_POST[$key]) ? $_POST[$key] : null;
}
if (isset($GLOBALS['HOUR']) && isset($GLOBALS['MINUTE'])) {
    $GLOBALS['PICKUPTIME'] = $GLOBALS['HOUR'] . ':' . $GLOBALS['MINUTE'] . ':00';
}
if (isset($GLOBALS['HOURRETURN']) && isset($GLOBALS['MINUTERETURN'])) {
    $GLOBALS['PICKUPTIMERETURN'] = $GLOBALS['HOURRETURN'] . ':' . $GLOBALS['MINUTERETURN'] . ':00';
}
$fetchConf = $GLOBALS['MYSQLI']->query('SELECT * FROM conf1') or trigger_error($GLOBALS['MYSQLI']->error);

while ($row = $fetchConf->fetch_array()) {
    $GLOBALS[$row["name"]] = $row['val'];
}
$fetchOrderTimes = $GLOBALS['MYSQLI']->query('SELECT * FROM order_times') or trigger_error($GLOBALS['MYSQLI']->error);

//$GLOBALS['ORDERSTIME'] = new stdClass();
//while ($row = $fetchOrderTimes->fetch_array()) {
////    $GLOBALS[$row["name"]] = $row['minute'];
//    $GLOBALS['ORDERSTIME'][$row["name"]]['MINUTE'] = $row['minute'];
//    $GLOBALS['ORDERSTIME'][$row["name"]]['TIME'] = $row['next'];
//}
function F_MYSQL($query) {


    $fetch1 = $GLOBALS['MYSQLI']->query($query) or trigger_error($GLOBALS['MYSQLI']->error);
    $rows1 = array();
    while ($r = mysqli_fetch_assoc($fetch1)) {
        $rows1[] = $r;
    }
    return $rows1;
}

function F_SQL($sql) {
    $td = F_MYSQL($sql);
    $record = null;
    foreach ($td as $item) {
        $record = $item;
    }
    return $record;
}

function MAILTO($email, $subject, $message) {
    $mail = new PHPMailer;
    $mail->isSMTP();
    $mail->SMTPDebug = 0; // 0 = off (for production use) - 1 = client messages - 2 = client and server messages
    $mail->Host = $GLOBALS['smtp_server']; // use $mail->Host = gethostbyname('smtp.gmail.com'); // if your network does not support SMTP over IPv6
    $mail->Port = 587; // TLS only
    $mail->SMTPSecure = 'tls'; // ssl is depracated
    $mail->SMTPAuth = true;
    $mail->CharSet = 'UTF-8';
    $mail->Username = $GLOBALS['smtp_user'];
    $mail->Password = $GLOBALS['smtp_pass'];
    $mail->setFrom($GLOBALS['smtp_email'], $GLOBALS['smtp_email']);
    $mail->addAddress($email, $email);
    $mail->Subject = $subject;
    $mail->msgHTML($message); //$mail->msgHTML(file_get_contents('contents.html'), __DIR__); //Read an HTML message body from an external file, convert referenced images to embedded,
//    $mail->AltBody = 'HTML messaging not supported';
// $mail->addAttachment('images/phpmailer_mini.png'); //Attach an image file

    if (!$mail->send()) {
        return false;
    } else {
        return true;
    }
}

function ERROR_SEND($message) {
    $mail = new PHPMailer;
    $mail->isSMTP();
    $mail->SMTPDebug = 0; // 0 = off (for production use) - 1 = client messages - 2 = client and server messages
    $mail->Host = $GLOBALS['smtp_server']; // use $mail->Host = gethostbyname('smtp.gmail.com'); // if your network does not support SMTP over IPv6
    $mail->Port = 587; // TLS only
    $mail->SMTPSecure = 'tls'; // ssl is depracated
    $mail->SMTPAuth = true;
    $mail->CharSet = 'UTF-8';
    $mail->Username = $GLOBALS['smtp_user'];
    $mail->Password = $GLOBALS['smtp_pass'];
    $mail->setFrom($GLOBALS['smtp_email'], $GLOBALS['smtp_email']);
    $mail->addAddress($GLOBALS['smtp_email'], $GLOBALS['smtp_email']);
    $mail->Subject = 'SYSTEM FEHLER - ' . $GLOBALS['company_url'];
    $mail->msgHTML($message); //$mail->msgHTML(file_get_contents('contents.html'), __DIR__); //Read an HTML message body from an external file, convert referenced images to embedded,
//    $mail->AltBody = 'HTML messaging not supported';
// $mail->addAttachment('images/phpmailer_mini.png'); //Attach an image file

    if (!$mail->send()) {
        return false;
    } else {
        return true;
    }
}

function MAILTO_KONTAKT($email, $subject, $message, $reply) {
    $mail = new PHPMailer;
    $mail->isSMTP();
    $mail->SMTPDebug = 0; // 0 = off (for production use) - 1 = client messages - 2 = client and server messages
    $mail->Host = $GLOBALS['smtp_server']; // use $mail->Host = gethostbyname('smtp.gmail.com'); // if your network does not support SMTP over IPv6
    $mail->Port = 587; // TLS only
    $mail->SMTPSecure = 'tls'; // ssl is depracated
    $mail->SMTPAuth = true;
    $mail->CharSet = 'UTF-8';
    $mail->Username = $GLOBALS['smtp_user'];
    $mail->Password = $GLOBALS['smtp_pass'];
    $mail->addReplyTo($reply, $reply);
    $mail->setFrom($GLOBALS['smtp_email'], $GLOBALS['smtp_email']);
    $mail->addAddress($email, $email);
    $mail->Subject = $subject;
    $mail->msgHTML($message); //$mail->msgHTML(file_get_contents('contents.html'), __DIR__); //Read an HTML message body from an external file, convert referenced images to embedded,
//    $mail->AltBody = 'HTML messaging not supported';
// $mail->addAttachment('images/phpmailer_mini.png'); //Attach an image file

    if (!$mail->send()) {
        echo "ERROR111";
    } else {
        echo "OK";
    }
}

function GET_NAMES() {
    $result = $GLOBALS['MYSQLI']->query("SELECT name FROM city WHERE id = '" . $GLOBALS['CITY_ID'] . "' ");
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    $GLOBALS['CITYNAME'] = $row['name'];
    $result = $GLOBALS['MYSQLI']->query("SELECT code FROM zip WHERE id = '" . $GLOBALS['ZIP_ID'] . "' ");
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    $GLOBALS['ZIPCODE'] = $row['code'];
    $result = $GLOBALS['MYSQLI']->query("SELECT name FROM street WHERE id = '" . $GLOBALS['STREET_ID'] . "' ");
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    $GLOBALS['STREETNAME'] = $row['name'];
    $result = $GLOBALS['MYSQLI']->query("SELECT code FROM zip WHERE id = '" . $GLOBALS['ADD1ZIP'] . "' ");
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    $GLOBALS['ADD1ZIPCODE'] = $row['code'];
    $result = $GLOBALS['MYSQLI']->query("SELECT name FROM street WHERE id = '" . $GLOBALS['ADD1STREET'] . "' ");
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    $GLOBALS['ADD1STREETNAME'] = $row['name'];
    $result = $GLOBALS['MYSQLI']->query("SELECT code FROM zip WHERE id = '" . $GLOBALS['ADD2ZIP'] . "' ");
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    $GLOBALS['ADD2ZIPCODE'] = $row['code'];
    $result = $GLOBALS['MYSQLI']->query("SELECT name FROM street WHERE id = '" . $GLOBALS['ADD2STREET'] . "' ");
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    $GLOBALS['ADD2STREETNAME'] = $row['name'];
    $result = $GLOBALS['MYSQLI']->query("SELECT code FROM zip WHERE id = '" . $GLOBALS['ADD3ZIP'] . "' ");
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    $GLOBALS['ADD3ZIPCODE'] = $row['code'];
    $result = $GLOBALS['MYSQLI']->query("SELECT name FROM street WHERE id = '" . $GLOBALS['ADD3STREET'] . "' ");
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    $GLOBALS['ADD3STREETNAME'] = $row['name'];
}

if ($GLOBALS['MODEL'] == 'GET_CITY_SELECT') {
    $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");
    $fetch = $GLOBALS['MYSQLI']->query("SELECT id,name FROM city ORDER BY name");
    echo '<option value="1" selected>Wien</option>';
    while ($row = $fetch->fetch_array()) {
        echo "<option value='" . $row['id'] . "'>" . $row['name'] . "</option>";
    }
}

if ($GLOBALS['MODEL'] == 'GET_ZIP') {
    $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");
    $fetch = $GLOBALS['MYSQLI']->query("SELECT id,code,name FROM zip WHERE city_id = '" . $GLOBALS['CITY_ID'] . "'");
    echo '<option value="">Plz auswählen...</option>';
    while ($row = $fetch->fetch_array()) {
        echo "<option value='$row[id]'>$row[code] - $row[name]</option>";
    }
}

if ($GLOBALS['MODEL'] == 'GET_STREET') {
    $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");
    $fetch = $GLOBALS['MYSQLI']->query("SELECT id,name FROM street WHERE zip_id = '" . $GLOBALS['ZIP_ID'] . "' ORDER BY name");
    echo '<option value="none">Strasse auswählen...</option>';
    while ($row = $fetch->fetch_array()) {
        echo "<option value='$row[id]'>$row[name]</option>";
    }
}

if ($GLOBALS['MODEL'] == 'GET_FLIGHT_NUMBER') {
    $term = $GLOBALS['AUTO_FLIGHTNUMBER'];
    $pattern = '/' . $term . '/i';
    $query = $GLOBALS['MYSQLI']->query("SELECT number FROM flight_numbers where number like '" . $term . "%' GROUP BY number order by number");
    $rows = array();
    while ($r = mysqli_fetch_assoc($query)) {
        foreach ($r as $value) {
            if (preg_match($pattern, $value)) {
                $rows[] = $value;
            }
        }
    }
    $json = json_encode($rows);
    echo $json;
}

if ($GLOBALS['MODEL'] == 'GET_DEPARTURE') {
    $term = $GLOBALS['AUTO_DEPARTURE'];
    $pattern = '/' . $term . '/i';
    $query = $GLOBALS['MYSQLI']->query("SELECT name FROM flight_city where name like '" . $term . "%' GROUP BY name order by name");
    $rows = array();
    while ($r = mysqli_fetch_assoc($query)) {
        foreach ($r as $value) {
            if (preg_match($pattern, $value)) {
                $rows[] = $value;
            }
        }
    }
    $json = json_encode($rows);
    echo $json;
}

function GET_PRICE() {

    $result = $GLOBALS['MYSQLI']->query("SELECT code FROM zip WHERE id = '" . $GLOBALS['ZIP_ID'] . "' ");
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    $GLOBALS['ZIPCODE'] = $row['code'];
    $result = $GLOBALS['MYSQLI']->query("SELECT code FROM zip WHERE id = '" . $GLOBALS['ADD1ZIP'] . "' ");
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    $GLOBALS['ADD1ZIPCODE'] = $row['code'];
    $result = $GLOBALS['MYSQLI']->query("SELECT code FROM zip WHERE id = '" . $GLOBALS['ADD2ZIP'] . "' ");
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    $GLOBALS['ADD2ZIPCODE'] = $row['code'];
    $result = $GLOBALS['MYSQLI']->query("SELECT code FROM zip WHERE id = '" . $GLOBALS['ADD3ZIP'] . "' ");
    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    $GLOBALS['ADD3ZIPCODE'] = $row['code'];


    $result = $GLOBALS['MYSQLI']->query("SELECT IF(car='L', 'limo',IF(car='K', 'kombi',IF(car='V', 'van',''))) as car FROM car WHERE personen = '" . $GLOBALS['PASSENGER'] . "' AND koffer = '" . $GLOBALS['SUITCASE'] . "' AND handgepaeck = '" . $GLOBALS['HANDLUGGAGE'] . "' ") or die(mysqli_error($GLOBALS['MYSQLI']));

    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
    if ($row) {
        $GLOBALS['CAR_TYPE'] = $row['car'];
    } else {
        $array = array('price' => '0.00', 'pricereturn' => '0.00', 'gutschein' => 'BLANK');
        echo json_encode($array);
        return;
    }
    if (isset($GLOBALS['ZIP_ID']) && $GLOBALS['ZIP_ID'] != '') {
        $result = $GLOBALS['MYSQLI']->query("SELECT " . $GLOBALS['CAR_TYPE'] . " FROM zip WHERE id = '" . $GLOBALS['ZIP_ID'] . "'") or die(mysqli_error($GLOBALS['MYSQLI']));
        $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
        $GLOBALS['PRICE'] = $row[$GLOBALS['CAR_TYPE']];
        $GLOBALS['PRICE'] = ($GLOBALS['PRICE'] * $GLOBALS['price_balance']);
        $GLOBALS['PRICE'] = number_format($GLOBALS['PRICE'], 2, '.', '');

        if ($GLOBALS['ADDADDRESS'] >= 1) {
            if ($GLOBALS['ADD1ZIPCODE'] != '') {
                $result = $GLOBALS['MYSQLI']->query("SELECT COUNT(price), price FROM additional_address_price WHERE zip1 = '" . $GLOBALS['ZIPCODE'] . "' AND zip2 = '" . $GLOBALS['ADD1ZIPCODE'] . "'");
                $row = $result->fetch_row();
                if ($row[0] == '1') {
                    $GLOBALS['ADD1ZIPPRICE'] = $row[1];
                } else {
                    $GLOBALS['ADD1ZIPPRICE'] = $GLOBALS['additional_address_price'];
                }
            } else {
                $GLOBALS['ADD1ZIPPRICE'] = 0.00;
            }
        } else {
            $GLOBALS['ADD1ZIPPRICE'] = 0.00;
        }
        if ($GLOBALS['ADDADDRESS'] >= 2) {
            if ($GLOBALS['ADD2ZIPCODE'] != '') {
                $result = $GLOBALS['MYSQLI']->query("SELECT COUNT(price), price FROM additional_address_price WHERE zip1 = '" . $GLOBALS['ADD1ZIPCODE'] . "' AND zip2 = '" . $GLOBALS['ADD2ZIPCODE'] . "'");
                $row = $result->fetch_row();

                if ($row[0] == '1') {
                    $GLOBALS['ADD2ZIPPRICE'] = $row[1];
                } else {
                    $GLOBALS['ADD2ZIPPRICE'] = $GLOBALS['additional_address_price'];
                }
            } else {
                $GLOBALS['ADD2ZIPPRICE'] = 0.00;
            }
        } else {
            $GLOBALS['ADD2ZIPPRICE'] = 0.00;
        }
        if ($GLOBALS['ADDADDRESS'] == 3) {
            if ($GLOBALS['ADD3ZIPCODE'] != '') {
                $result = $GLOBALS['MYSQLI']->query("SELECT COUNT(price), price FROM additional_address_price WHERE zip1 = '" . $GLOBALS['ADD2ZIPCODE'] . "' AND zip2 = '" . $GLOBALS['ADD3ZIPCODE'] . "'");
                $row = $result->fetch_row();

                if ($row[0] == '1') {
                    $GLOBALS['ADD3ZIPPRICE'] = $row[1];
                } else {
                    $GLOBALS['ADD3ZIPPRICE'] = $GLOBALS['additional_address_price'];
                }
            } else {
                $GLOBALS['ADD3ZIPPRICE'] = 0.00;
            }
        } else {
            $GLOBALS['ADD3ZIPPRICE'] = 0.00;
        }
        if ($GLOBALS['ADDADDRESS'] == '0') {
            $GLOBALS['ADD1ZIPPRICE'] = 0.00;
            $GLOBALS['ADD2ZIPPRICE'] = 0.00;
            $GLOBALS['ADD3ZIPPRICE'] = 0.00;
        }
        $GLOBALS['PRICE'] = $GLOBALS['PRICE'] + ($GLOBALS['booster_seat_price'] * $GLOBALS['BOOSTERSEAT']);
        $GLOBALS['PRICE'] = $GLOBALS['PRICE'] + ($GLOBALS['child_seat_price'] * $GLOBALS['CHILDSEAT']);
        $GLOBALS['PRICE'] = $GLOBALS['PRICE'] + ($GLOBALS['carrycot_price'] * $GLOBALS['CARRYCOT']);

        if ($GLOBALS['HOUR'] != '') {
            $result = $GLOBALS['MYSQLI']->query("SELECT COUNT(id) AS total FROM night_price WHERE hour = '" . $GLOBALS['HOUR'] . "'");
            $row = $result->fetch_row();
            if ($row[0] > 0) {
                if ($GLOBALS['CITY_ID'] == '1' || $GLOBALS['CITY_ID'] == '71') {
                    $GLOBALS['PRICE'] = $GLOBALS['PRICE'] + $GLOBALS['night_price_wien'];
                } else {
                    $GLOBALS['PRICE'] = $GLOBALS['PRICE'] + $GLOBALS['night_price_other'];
                }
            }
        }

        $GLOBALS['PRICE'] = ($GLOBALS['PRICE'] + $GLOBALS['ADD1ZIPPRICE'] + $GLOBALS['ADD2ZIPPRICE'] + $GLOBALS['ADD3ZIPPRICE']);

        $GLOBALS['PRICE'] = number_format($GLOBALS['PRICE'], 2, '.', '');
        if ($GLOBALS['PAYMENT'] == "Kreditkarte") {
            $GLOBALS['PRICE'] = $GLOBALS['PRICE'] + $GLOBALS['creditcard_price'];
        }
        $priceorig = $GLOBALS['PRICE'];
        if ($GLOBALS['WAY'] == "VOM") {
            $GLOBALS['PRICE'] = $GLOBALS['PRICE'] + $GLOBALS['from_airport_plus'];
            if ($GLOBALS['WITHRETURN'] == "1") {
                $GLOBALS['PRICE'] = $GLOBALS['PRICE'] - $GLOBALS['from_to_minus'];
            }
        }

        /* --------------- RETURN */

        if ($GLOBALS['WITHRETURN'] == "1") {
            $result = $GLOBALS['MYSQLI']->query("SELECT COUNT(id) AS total FROM night_price WHERE hour = '" . $GLOBALS['HOUR'] . "'");
            $row = $result->fetch_row();
            if ($row[0] > 0) {
                if ($GLOBALS['CITY_ID'] == '1' || $GLOBALS['CITY_ID'] == '71') {
                    $GLOBALS['PRICERETURN'] = $priceorig - $GLOBALS['night_price_wien'];
                } else {
                    $GLOBALS['PRICERETURN'] = $priceorig - $GLOBALS['night_price_other'];
                }
            } else {
                $GLOBALS['PRICERETURN'] = $priceorig;
            }

            $result = $GLOBALS['MYSQLI']->query("SELECT COUNT(id) AS total FROM night_price WHERE `hour` = '{$GLOBALS['HOURRETURN']}'");
            $row = $result->fetch_row();
            if ($row[0] > 0) {
                if ($GLOBALS['CITY_ID'] == '1' || $GLOBALS['CITY_ID'] == '71') {
                    $GLOBALS['PRICERETURN'] = $GLOBALS['PRICERETURN'] + $GLOBALS['night_price_wien'];
                } else {
                    $GLOBALS['PRICERETURN'] = $GLOBALS['PRICERETURN'] + $GLOBALS['night_price_other'];
                }
            }

            if ($GLOBALS['WAY'] == "ZUM") {
                $GLOBALS['PRICERETURN'] = $GLOBALS['PRICERETURN'] + $GLOBALS['from_airport_plus'];
                $GLOBALS['PRICERETURN'] = $GLOBALS['PRICERETURN'] - $GLOBALS['from_to_minus'];
            }
        } else {
            $GLOBALS['PRICERETURN'] = 0.00;
        }

        $GLOBALS['PRICE'] = number_format((float) $GLOBALS['PRICE'], 2, '.', '');
        $GLOBALS['PRICERETURN'] = number_format((float) $GLOBALS['PRICERETURN'], 2, '.', '');
        $GLOBALS['PRICESQL'] = str_replace(',', '.', $GLOBALS['PRICE']);
        $GLOBALS['PRICERETURNSQL'] = str_replace(',', '.', $GLOBALS['PRICERETURN']);


        return json_encode(array('price' => $GLOBALS['PRICE'], 'pricereturn' => $GLOBALS['PRICERETURN']));
    } else {
        $array = array('price' => '0.00', 'pricereturn' => '0.00');
        return json_encode($array);
    }
}

if ($GLOBALS['MODEL'] == 'GET_PRICE') {
    echo GET_PRICE();
}

if ($GLOBALS['MODEL'] == 'GET_TIME_BLOCK') {


    if ($GLOBALS['PICKUPDATE']) {
        $pickupdate = $_POST['PICKUPDATE'];
        $hour = $_POST['HOUR'];
        $minute = $_POST['MINUTE'];
        $richtung = $_POST['WAY'];
        $pickuptime = $hour . ':' . $minute . ':00';
        $pickupdate = date("Y-m-d", strtotime($pickupdate));

        if ($richtung == 'ZUM') {
            $table = 'stop_to';
        } else {
            $table = 'stop_from';
        }

        $sqlX = $GLOBALS['MYSQLI']->query("SELECT * FROM $table WHERE date='$pickupdate' AND day='1'");
        $row = $sqlX->fetch_row();
        if ($row[0] <= 0) {

            $sql = $GLOBALS['MYSQLI']->query("SELECT * FROM $table WHERE date='$pickupdate' AND `hour` = '$hour'");
            $row = $sql->fetch_row();
            if ($row[0] <= 0) {

                $sql = $GLOBALS['MYSQLI']->query("SELECT * FROM $table WHERE date='$pickupdate' AND `time` = '$pickuptime'");
                $row = $sql->fetch_row();
                if ($row[0] <= 0) {

                } else {
                    echo 'stop_time';
                }
            } else {
                echo 'stop_hour';
            }
        } else {
            echo 'stop_day';
        }
    }
}

function EMAIL_ZUM($order_no_email, $pickupdate_email, $hour_email, $minute_email, $price_email) {

    GET_NAMES();

    if ($GLOBALS['ADDADDRESS'] >= '1') {
        $aa1 = '<tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Zusatzadresse 1:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	     ' . $GLOBALS['ADD1STREETNAME'] . ' ' . $GLOBALS['ADD1HOUSENUMBER'] . ', ' . $GLOBALS['ADD1ZIPCODE'] . '   </td>
                                      </tr>';
        $aa2 = '';
        $aa3 = '';
    }

    if ($GLOBALS['ADDADDRESS'] >= '2') {

        $aa2 = '<tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Zusatzadresse 2:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	  ' . $GLOBALS['ADD2STREETNAME'] . ' ' . $GLOBALS['ADD2HOUSENUMBER'] . ', ' . $GLOBALS['ADD2ZIPCODE'] . '   </td>
                                      </tr>';
        $aa3 = '';
    }

    if ($GLOBALS['ADDADDRESS'] >= '3') {
        $aa3 = '<tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Zusatzadresse 3:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	  ' . $GLOBALS['ADD3STREETNAME'] . ' ' . $GLOBALS['ADD3HOUSENUMBER'] . ', ' . $GLOBALS['ADD3ZIPCODE'] . '   </td></tr>';
    }
    if ($GLOBALS['ADDADDRESS'] == '0' || $GLOBALS['ADDADDRESS'] == '') {
        $aa1 = '';
        $aa2 = '';
        $aa3 = '';
    }




$subject = '' . $GLOBALS['sitename'] . ' - Bestellbestätigung';
    $message = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Bestätigung</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
   <!--[if !mso]><!-->

<style type="text/css">



</style>
<!--<![endif]-->

<!--[if mso]>
<style>body,table tr,table td,a, span {  font-family:Arial, Helvetica, sans-serif !important;  }</style>
<![endif]-->
<style type="text/css">
  /* Standard CSS */

  a[x-apple-data-detectors] {
    color: inherit !important;
    text-decoration: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
  }

  a {
    text-decoration: none;
  }

  * {
    -webkit-text-size-adjust: none;
  }

  body {
    margin: 0 auto !important;
    padding: 0px !important;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
  }

  html,
  body {
    margin: 0px;
    padding: 0px !important;
  }

  table,
  td,
  th {
    border-collapse: collapse;
    border-spacing: 0px;
    mso-table-lspace: 0pt;
    mso-table-rspace: 0pt;
  }

  div,
  p,
  a,
  li,
  td {
    -webkit-text-size-adjust: none;
  }

  * {
    -webkit-text-size-adjust: none;
  }

  img {
    display: block !important;
  }

  .ReadMsgBody {
    width: 100%;
  }

  .ExternalClass p,
  .ExternalClass span,
  .ExternalClass font,
  .ExternalClass td,
  .ExternalClass div {
    line-height: 100%;
    margin: 0px;
    padding: 0px;
  }

  .ExternalClass {
    width: 100%;
  }

  span.MsoHyperlink {
    mso-style-priority: 99;
    color: inherit;
  }

  span.MsoHyperlinkFollowed {
    mso-style-priority: 99;
    color: inherit;
  }

  .nav .yshortcuts {
    color: #666666
  }

  .blacklink .yshortcuts {
    color: #010101
  }

  .graylink .yshortcuts {
    color: #999999
  }

  .stay-black a {
    color: #010101 !important;
  }

  .footerLink {
    color: #555555 !important;
    text-decoration: none !important;
  }

  .footerLink a {
    color: #555555 !important;
    text-decoration: none !important;
  }

  .mob-br {
    display: none;
  }

  div,
  button {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }

  /* Responsive CSS */

  @media screen and (max-width: 600px) and (min-width: 480px) {
    .scale {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 600px !important;
      height: auto !important;
      max-height: none !important;
    }
  }

  @media (max-width: 590px) {
    .trust-text {
      font-size: 12px !important;
      line-height: 14px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 560px) {
    .trust-text {
      font-size: 11px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 540px) {
    .trust-text {
      font-size: 10px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 520px) {
    .trust-text {
      font-size: 9px !important;
      line-height: 11px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 480px) {
    .scale {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 480px !important;
      height: auto !important;
      max-height: none !important;
    }
    .stack {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      float: left !important;
      display: block !important;
      padding: 0px 0px 0px 0px !important;
    }
    .stack-nrb {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      float: left !important;
      display: block !important;
      padding: 0px 0px 0px 0px !important;
      border-right: none !important;
    }
    .center-stack {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      float: left !important;
      display: block !important;
      padding: 10px 0px 0px 0px !important;
    }
    .center-cta {
      margin: 0px auto !important;
      text-align: center !important;
    }
    .reverse-stack-top {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      display: table-header-group !important;
      padding: 0px 0px 0px 0px !important;
      border: none !important;
    }
    .reverse-stack-bottom {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      display: table-footer-group !important;
      padding: 0px 0px 0px 0px !important;
      border: none !important;
    }

    .pad-top {
      padding: 0px 0px 20px 0px !important;
    }
    .pad-top2 {
      padding: 0px 0px 5px 0px !important;
    }
    .stack-pad {
      padding: 0px 0px 0px 0px !important;
    }
    .logo {
      padding: 30px 0px 25px 0px !important
    }
    .prod-img {
      width: 100% !important;
      max-width: 100px !important;
    }

    .hide {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .headline {
      font-size: 26px !important;
      line-height: 28px !important;
      padding: 0px 0px 20px 0px !important;
    }
    .headline-no-pad {
      font-size: 26px !important;
      line-height: 28px !important;
      padding: 0px 0px 0px 0px !important;
    }

    .copy {
      padding: 0px 15px 20px 15px !important;
      text-align: center !important;
    }
    .copy2 {
      padding: 0px 15px 7px 15px !important;
      text-align: center !important;
    }
    .copy3 {
      padding: 10px 15px 10px 15px !important;
      text-align: center !important;
    }

    .ship-text {
      padding: 10px 0px 10px 0px !important;
      font-size: 11px !important;
      line-height: 110% !important;
      letter-spacing: 1px !important;
    }
    .contact-pad {
      padding: 20px 0px 20px 0px !important;
    }
    .contact-text {
      font-size: 12px !important;
      line-height: 120% !important;
    }
    .trust-pad {
      padding: 14px 5px !important;
    }

    /* Custom CSS */
    .mob-br {
      display: block !important;
    }
    .pr {
      padding: 0px 0px 0px 0px !important;
    }

    .trust-text {
      font-size: 11px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }

    /* Autoship Created Order Summary Styles */
    .summary-outer {

      padding: 0px 10px 30px 10px !important;
      width: 100% !important;
    }
    .summary-headline {
      text-align: center !important;
    }
    .summary-info {
      text-align: center !important;
      padding: 0px !important;
    }
    .summary-inner-pad {
      padding: 20px 20px 20px 20px !important;
      width: 100% !important;
    }
    .summary-cta {
      margin: 0px auto !important;
      text-align: center !important;
      padding: 5px 0px 0px 0px !important;
    }

    /* Order Confirmation Summary Styles */
    .order-outer {
      padding: 0px 10px 30px 10px !important;
      width: 100% !important;
    }
    .order-headline {
      text-align: center !important;
    }
    .order-inner-pad-top {
      padding: 20px 20px 10px 20px !important;
      width: 100% !important;
    }
    .order-inner-pad-btm {
      padding: 20px 20px 25px 20px !important;
      width: 100% !important;
    }
    .order-center {
      text-align: center !important;
      padding: 0px !important;
    }
    .order-info {
      text-align: center !important;
      font-size: 12px !important;
    }
    .order-text {
      text-align: center !important;
      padding-bottom: 12px !important;
      line-height: 22px !important;
      font-size: 12px !important;
    }
    .order-save {
      text-align: center !important;
      padding: 0px !important;
    }

    /* Autoship Reminder Summary Styles */
    .remind-outer {
      padding: 0px 10px 30px 10px !important;
      width: 100% !important;
    }
    .remind-headline {
      text-align: center !important;
    }
    .remind-inner-pad-top {
      padding: 20px 20px 15px 20px !important;
      width: 100% !important;
    }
    .remind-inner-pad-btm {
      padding: 20px 20px 15px 20px !important;
      width: 100% !important;
    }
    .remind-center {
      text-align: center !important;
      padding: 0px !important;
    }
    .remind-info {
      text-align: center !important;
      font-size: 12px !important;
    }
    .remind-text {
      text-align: center !important;
      padding-bottom: 12px !important;
      line-height: 22px !important;
      font-size: 12px !important;
    }
    .remind-save {
      text-align: center !important;
      padding: 0px !important;
    }
    .remind-copy {
      text-align: center !important;
      padding: 0px 0px 15px 0px !important;
      font-size: 12px !important;
    }
    .remind-date {
      padding: 20px 20px 25px 20px !important;
    }

    /* Total Styles */
    .total-info {
      font-size: 12px !important;
      padding: 0px 0px 8px 0px !important;
    }
    .total-outer {
      padding: 25px 25px 22px 0px !important;
    }

    /* Product List Without Price Styles */
    .no-price-outer {
      padding: 0px 10px 0px 10px !important;
    }
    .no-price-prod {
      padding: 0px 20px 0px 20px !important;
      text-align: center !important;
    }
    .no-price-qty {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .no-price-img {
      width: 100% !important;
      max-width: 115px !important;
      min-width: 90px !important
    }
    .no-price-text {
      font-size: 12px !important;
      line-height: 19px !important;
      padding: 0px 10px 0px 0px !important;
    }
    .no-price-col1 {
      width: 35% !important;
    }
    .no-price-col2 {
      width: 50% !important;
    }
    .no-price-col3 {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .no-price-auto {
      width: 100px !important;
      min-width: 150px !important;
      max-width: 218px !important;
    }
    .hiddenQTY {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 15px 0px 0px 0px !important
    }

    /* Product Loop Styles */
    .loop-outer {
      padding: 0px 10px 0px 10px !important;
    }
    .loop-prod {
      padding: 0px 20px 0px 20px !important;
      text-align: center !important;
    }
    .loop-qty,
    .loop-price {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .loop-img {
      width: 100% !important;
      max-width: 115px !important;
      min-width: 90px !important
    }
    .loop-text {
      font-size: 12px !important;
      line-height: 19px !important;
      padding: 0px 10px 0px 0px !important;
    }
    .loop-col1 {
      width: 35% !important;
    }
    .loop-col2 {
      width: 50% !important;
    }
    .loop-col3,
    .loop-col4 {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .loop-auto {
      width: 100px !important;

      min-width: 150px !important;
      max-width: 218px !important;
    }
    .loopQTY {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 15px 0px 3px 0px !important
    }
    .loopPRI {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 5px 0px 20px 0px !important
    }

    /* Release Loop Styles */
    .rel-loop-outer {
      padding: 0px 10px 0px 10px !important;
    }
    .rel-loop-prod {
      padding: 0px 20px 0px 20px !important;
      text-align: center !important;
    }
    .rel-loop-qty,
    .rel-loop-price {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .rel-loop-img {
      width: 100% !important;
      max-width: 115px !important;
      min-width: 90px !important
    }
    .rel-loop-text {
      font-size: 12px !important;
      line-height: 19px !important;
      padding: 0px 10px 0px 0px !important;
    }
    .rel-loop-col1 {
      width: 35% !important;
    }
    .rel-loop-col2 {
      width: 50% !important;
    }
    .rel-loop-col3,
    .rel-loop-col4 {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .rel-loop-auto {
      width: 100px !important;
      min-width: 150px !important;
      max-width: 218px !important;
    }
    .rel-loopQTY {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 15px 0px 3px 0px !important
    }
    .rel-loopPRI {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 5px 0px 20px 0px !important
    }

    .app-text {
      padding: 25px 0px 10px 0px !important;
    }
    .app-btn-outer {
      padding: 26px 0px 5px 0px !important;
    }
    .cta1-pad {
      padding: 0px 0px 20px 0px !important;
    }
    .cta2-pad {
      padding: 0px 0px 10px 0px !important;
    }
    .cta3-pad {
      padding: 0px 0px 35px 0px !important;
    }
    .ship-anim {
      padding: 0px 0px 25px 0px !important;
    }
  }

  @media (max-width: 420px) {
    .trust-text {
      font-size: 10px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }
    .trust-icon-1 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 40px !important;
      height: auto !important;
      max-height: none !important;
    }
    .trust-icon-2 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 44px !important;
      height: auto !important;
      max-height: none !important;
    }
  }

  @media (max-width: 400px) {
    .trust-pad {
      padding: 8px 0px !important;
    }
    .mob-br-400 {
      display: block !important;
    }
  }

  @media (max-width: 380px) {
    .trust-text {
      font-size: 9px !important;
      line-height: 11px !important;
      padding: 4px 0px 0px 0px !important;
    }
    .trust-icon-1 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 36px !important;
      height: auto !important;
      max-height: none !important;
    }
    .trust-icon-2 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 41px !important;
      height: auto !important;
      max-height: none !important;
    }
  }

  @media (max-width: 350px) {
    .trust-text {
      font-size: 8px !important;
      line-height: 10px !important;
      padding: 4px 0px 0px 0px !important;
    }
  }
</style>
 </head>
    <body style="margin: 0; padding: 0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: #eeeeee;">
  <tr>
    <td width="100%" align="center" valign="top" style="background-color: #eeeeee; padding: 10px 0px 0px 0px;">

      <table style="min-width: 600px; width: 600px;" width="600" class="scale" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td style="background-color: #FFFFFF;" align="center" valign="top">

            <!-- CONTENT BEGIN -->

            <table align="center" border="0" cellpadding="0" cellspacing="0" style="min-width: 600px; width: 600px;" width="600" class="scale">
              <tr>
                <td valign="top" style="padding: 0px" class="pad-top2">

                  <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0" style="background-color: #ffffff; border-radius:5px;">



                    <tr>
                      <td align="center" style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 40px; mso-line-height-rule: exactly; color:#444444; text-align:center; line-height: 40px; padding: 40px 0px 25px 0px;" class="headline">
                        Bestätigung</td>
                    </tr>
                    <tr>
                      <td style="font-family:Roboto, Helvetica, Arial, sans-serif; color: #010101; font-size: 12px; mso-line-height-rule: exactly;  padding: 0px 50px 25px 50px;" class="copy">
                       Sehr geehrte Damen und Herren,<br /><br />
 vielen Dank für Ihre Bestellung, die wir Ihnen wie folgt bestätigen:<br />
<hr />
                      </td>
                    </tr>
                    <tr>
                      <td style="font-family:Roboto, Helvetica, Arial, sans-serif; color: #010101; font-size: 15px; mso-line-height-rule: exactly; line-height: 24px; padding: 0px 50px 5px 50px;" class="copy">

    <span style="float:left">Richtung ZUM Flughafen</span>
    <span style="float:right">Bestellnummer: ' . $order_no_email . '</span>
                      </td>

                    </tr>


              <tr>
                <td valign="top" style="padding: 0px 20px 0px 20px;" class="remind-outer">

                  <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                      <td valign="top" style="background-color: #fafafa; border: 1px solid #e5e5e5;">

                        <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
                          <tr>
                            <th width="50%" valign="top" style="padding: 0px!important; border-right: 1px solid #e5e5e5; font-weight: normal; vertical-align: top;" class="stack-nrb">
                              <table align="center" width="100%" cellpadding="0" cellspacing="0" border="0" class="scale">
                                <tr>
                                  <td class="remind-inner-pad-top" style="padding:18px 18px 20px 20px; vertical-align: top;" valign="top">

                                    <table width="100%" cellpadding="0" cellspacing="0" border="0">
                                      <tr>
                                        <td width="100%" style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;"
                                          class="remind-headline">
                                          Fahrdaten:
                                        </td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Abholdatum und Uhrzeit:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px;" class="remind-info"> 	 ' . $pickupdate_email . ' - ' . $hour_email . ':' . $minute_email . ' </td>
                                      </tr>
                                              <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Abfahrt von:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	  ' . $GLOBALS['STREETNAME'] . ' ' . $GLOBALS['HOUSENUMBER'] . ', ' . $GLOBALS['ZIPCODE'] . ' ' . $GLOBALS['CITYNAME'] . '  </td>
                                      </tr>


' . $aa1 . ' ' . $aa2 . ' ' . $aa3 . '

                                       <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Reiseziel nach:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	  Flughafen Wien-Schwechat   </td>
                                      </tr>
                                                  <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif;  font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Personen</strong>:  ' . $GLOBALS['PASSENGER'] . '</td>
                                      </tr>

                                                  <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif;  font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Koffer</strong>: ' . $GLOBALS['SUITCASE'] . '</td>
                                      </tr>

                                                     <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif;  font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Handgepäck</strong>: ' . $GLOBALS['HANDLUGGAGE'] . '</td>
                                      </tr>';
    if ($GLOBALS['CHILDSEAT'] >= '1') {
        $message .= '  <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Kindersitz</strong>: ' . $GLOBALS['CHILDSEAT'] . '</td>
                                      </tr>';
    }
    if ($GLOBALS['BOOSTERSEAT'] >= '1') {
        $message .= '                         <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Sitzerhöhung</strong>: ' . $GLOBALS['BOOSTERSEAT'] . '</td>
                                      </tr>';
    }

    if ($GLOBALS['CARRYCOT'] >= '1') {
        $message .= '        <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Babyschale</strong>: ' . $GLOBALS['CARRYCOT'] . '</td>
                                      </tr>';
    }
    $message .= '</table>

	    </td>
	    </tr>
	    </table>
	    </th>
	    <th width = "50%" valign = "top" style = "padding: 0px!important; font-weight: normal; vertical-align: top;" class = "stack">
	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0" class = "scale">
	    <tr>
	    <td class = "remind-inner-pad-btm" style = "padding:18px 18px 20px 20px; vertical-align: top;" valign = "top" align = "center">

	    <table cellpadding = "0" cellspacing = "0" border = "0" width = "100%">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;" class = "remind-headline">Kontaktinformationen:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">
	     ' . $GLOBALS['SALUTATION'] . ' ' . $GLOBALS['NAME'] . ' ' . $GLOBALS['SURNAME'] . '
	    </td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">
	    ' . $GLOBALS['EMAIL'] . '</td>
	    </tr>

	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px;" class = "remind-info">
	    ' . $GLOBALS['PHONE'] . '</td>
	    </tr>
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">Zahlungsweise:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">  ' . $GLOBALS['PAYMENT'] . ' </td>
	    </tr>
	    </table>

	    </td>


	    </tr>
	    <tr>
	    <td class = "remind-inner-pad-btm" style = "padding:18px 18px 20px 20px; vertical-align: top;" valign = "top" align = "center">

	    <table cellpadding = "0" cellspacing = "0" border = "0" width = "100%">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;" class = "remind-headline">Preis:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">
	     ' . $price_email . ' EUR
	    </td>
	    </tr>


	    </table>

	    </td>


	    </tr>';
    if ($GLOBALS['NOTE'] != '') {
        $message .= '	    <tr>
	    <td class = "remind-inner-pad-btm" style = "padding:18px 18px 20px 20px; vertical-align: top;" valign = "top" align = "center">

	    <table cellpadding = "0" cellspacing = "0" border = "0" width = "100%">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;" class = "remind-headline">Anmerkung:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">' . $GLOBALS['NOTE'] . '</td>
	    </tr>


	    </table>

	    </td>


	    </tr>';
    }
    $message .= '  </table>
	    </th>
	    </tr>

	    </table>

	    </td>
	    </tr>';

    if (strlen($GLOBALS["mapApi"]) > 10) {

        $message .= ' <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: center;background-color: #fafafa; border: 1px solid #e5e5e5;" class = "remind-info">
	    Die Route ist ' . $GLOBALS['KM'] . ' Km lang und dauert ca. ' . $GLOBALS['MIN'] . ' Minuten
	    </td></tr>';
    }

    $message .= ' </table>

	    </td>
	    </tr>

	    <tr>
	    <td valign = "top" style = "padding: 0px 20px 20px 20px;" class = "loop-outer">

	    <table style = "min-width: 560px; width: 560px;" width = "560" class = "scale" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td width = "50%" style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">

	    Ihre Kundennummer

	    </td>
	    <td class = "loop-qty" width = "50%" style = "font-family:Roboto, Helvetica, Arial, sans-serif; color: #333333; font-size: 14px; text-align: right;">
	    ' . $GLOBALS['CUSTOMERNO'] . '
	    </td>

	    </tr>
	    </table>

	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>


	    <tr> </tr>
	    <tr> </tr>
	    <tr> </tr>
	    <tr> </tr>




	    </table>

	    </td>
	    </tr>

	    <tr>
	    <td bgcolor = "#eeeeee" style = "height: 15px; line-height: 15px; mso-line-height: 15px;">&nbsp;

	    </td>
	    </tr>
	    <tr>
	    <td valign = "top">
	    <table align = "center" border = "0" cellpadding = "0" cellspacing = "0" style = "min-width: 600px; width: 600px;" width = "600" class = "scale">
	    <tr>
	    <td valign = "top">

	    <table border = "0" cellpadding = "0" cellspacing = "0" style = "min-width: 600px; width: 600px; background-color: #128ced;" width = "600" class = "scale">
	    <tr>
	    <td width = "100%" align = "center" valign = "middle" style = "vertical-align: middle;">
	    <table cellpadding = "0" cellspacing = "0" border = "0" style = "margin: 0px auto;">
	    <tr>
	    <td style = "padding: 23px 0px 25px 0px;" class = "contact-pad" align = "center">
	    <table cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family: Roboto, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; color: #ffffff!important; text-align: center;" class = "contact-text" align = "center"><a style = "text-decoration: none; color: #ffffff;" href = "tel:' . $GLOBALS['company_phone'] . '"
	    target = "_blank" rilt = "ContactUs_Text">Notfallnummer <span style = "font-family: RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700;">' . $GLOBALS['company_phone'] . '</span> <span class = "mob-br"></span> oder antworten Sie auf diese E-Mail</a></td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>

	    </td>
	    </tr>
<tr>
			<td bgcolor = "#eeeeee" style = "height: 15px; line-height: 15px; mso-line-height: 15px;">&nbsp;

	    </td></tr>
	    <tr>
	    <td valign = "top" >
	    <table border = "0" cellpadding = "0" cellspacing = "0" style = "width: 100%;" width = "100%">

	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 10px 0px 3px 0px; text-align: left;padding:10px 10px 0 10px;" class = "remind-info">

	    <p>' . $GLOBALS['sitename'] . '<br>FLUGHAFEN TRANSFER SERVICE UND LIMOUSINENSERVICE ZUM FIXPREIS<br>
	    WEB: ' . $GLOBALS['company_url'] . '<br>
	    E-Mail: ' . $GLOBALS['smtp_email'] . '<br>
	    Telefon: ' . $GLOBALS['company_phone'] . '
	    </p></td></tr>
	    <tr>
	    <td width = "100%" align = "center" style = "padding: 15px 0px 20px 0px;">
	    <table cellpadding = "0" cellspacing = "0" border = "0" style = "width: 100%;" width = "100%">
	    <tr>
	    <td style = "font-family:Roboto,Arial,sans-serif!important;font-size:13px;padding-left:10px;padding-bottom:10px;">
	    Vertraulichkeitserklärung
	    </td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto,Arial,sans-serif!important;font-size:10px;padding:0 10px 0 10px;">

	    Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind, oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte den Absender und löschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail und der darin enthaltenen Informationen sind nicht gestattet.
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>

	    </table>
	    </td>
	    </tr>
	    </table>

	    </td>
	    </tr>
	    </table>
	      </body>
</html>';







    if (!MAILTO($GLOBALS['EMAIL'], $subject, $message)) {
        echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => 'ERROR', 'MODEL' => 'STOP_EMAIL_ZUM'));
        return;
    } else {

        if ($GLOBALS['WAY'] == 'ZUM' && $GLOBALS['WITHRETURN'] != '1') {
            MAILTO($GLOBALS['backup_fahrten_email'], "KOPIE! " . $GLOBALS['sitename'] . " " . $subject, $message);
            echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => 'OK', 'MODEL' => 'OK_EMAIL_ZUM'));
            return;
        }
        if ($GLOBALS['WAY'] == 'VOM' && $GLOBALS['WITHRETURN'] == '1') {
            MAILTO($GLOBALS['backup_fahrten_email'], "KOPIE! " . $GLOBALS['sitename'] . " " . $subject, $message);
            echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => 'OK', 'MODEL' => 'OK_EMAIL_VOMZUM'));
            return;
        }
    }
}

function EMAIL_VOM($order_no_email, $pickupdate_email, $hour_email, $minute_email, $price_email) {


    GET_NAMES();



    if ($GLOBALS['ADDADDRESS'] >= '1') {
        $aa1 = '<tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Zusatzadresse 1:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	     ' . $GLOBALS['ADD1STREETNAME'] . ' ' . $GLOBALS['ADD1HOUSENUMBER'] . ', ' . $GLOBALS['ADD1ZIPCODE'] . '   </td>
                                      </tr>';
        $aa2 = '';
        $aa3 = '';
    }

    if ($GLOBALS['ADDADDRESS'] >= '2') {

        $aa2 = '<tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Zusatzadresse 2:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	  ' . $GLOBALS['ADD2STREETNAME'] . ' ' . $GLOBALS['ADD2HOUSENUMBER'] . ', ' . $GLOBALS['ADD2ZIPCODE'] . '   </td>
                                      </tr>';
        $aa3 = '';
    }

    if ($GLOBALS['ADDADDRESS'] >= '3') {
        $aa3 = '<tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Zusatzadresse 3:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	  ' . $GLOBALS['ADD3STREETNAME'] . ' ' . $GLOBALS['ADD3HOUSENUMBER'] . ', ' . $GLOBALS['ADD3ZIPCODE'] . '   </td></tr>';
    }
    if ($GLOBALS['ADDADDRESS'] == '0' || $GLOBALS['ADDADDRESS'] == '') {
        $aa1 = '';
        $aa2 = '';
        $aa3 = '';
    }




$subject = '' . $GLOBALS['sitename'] . ' - Bestellbestätigung';
    $message = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Bestätigung</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
   <!--[if !mso]><!-->

<style type="text/css">



</style>
<!--<![endif]-->

<!--[if mso]>
<style>body,table tr,table td,a, span {  font-family:Arial, Helvetica, sans-serif !important;  }</style>
<![endif]-->
<style type="text/css">
  /* Standard CSS */

  a[x-apple-data-detectors] {
    color: inherit !important;
    text-decoration: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
  }

  a {
    text-decoration: none;
  }

  * {
    -webkit-text-size-adjust: none;
  }

  body {
    margin: 0 auto !important;
    padding: 0px !important;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
  }

  html,
  body {
    margin: 0px;
    padding: 0px !important;
  }

  table,
  td,
  th {
    border-collapse: collapse;
    border-spacing: 0px;
    mso-table-lspace: 0pt;
    mso-table-rspace: 0pt;
  }

  div,
  p,
  a,
  li,
  td {
    -webkit-text-size-adjust: none;
  }

  * {
    -webkit-text-size-adjust: none;
  }

  img {
    display: block !important;
  }

  .ReadMsgBody {
    width: 100%;
  }

  .ExternalClass p,
  .ExternalClass span,
  .ExternalClass font,
  .ExternalClass td,
  .ExternalClass div {
    line-height: 100%;
    margin: 0px;
    padding: 0px;
  }

  .ExternalClass {
    width: 100%;
  }

  span.MsoHyperlink {
    mso-style-priority: 99;
    color: inherit;
  }

  span.MsoHyperlinkFollowed {
    mso-style-priority: 99;
    color: inherit;
  }

  .nav .yshortcuts {
    color: #666666
  }

  .blacklink .yshortcuts {
    color: #010101
  }

  .graylink .yshortcuts {
    color: #999999
  }

  .stay-black a {
    color: #010101 !important;
  }

  .footerLink {
    color: #555555 !important;
    text-decoration: none !important;
  }

  .footerLink a {
    color: #555555 !important;
    text-decoration: none !important;
  }

  .mob-br {
    display: none;
  }

  div,
  button {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }

  /* Responsive CSS */

  @media screen and (max-width: 600px) and (min-width: 480px) {
    .scale {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 600px !important;
      height: auto !important;
      max-height: none !important;
    }
  }

  @media (max-width: 590px) {
    .trust-text {
      font-size: 12px !important;
      line-height: 14px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 560px) {
    .trust-text {
      font-size: 11px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 540px) {
    .trust-text {
      font-size: 10px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 520px) {
    .trust-text {
      font-size: 9px !important;
      line-height: 11px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 480px) {
    .scale {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 480px !important;
      height: auto !important;
      max-height: none !important;
    }
    .stack {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      float: left !important;
      display: block !important;
      padding: 0px 0px 0px 0px !important;
    }
    .stack-nrb {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      float: left !important;
      display: block !important;
      padding: 0px 0px 0px 0px !important;
      border-right: none !important;
    }
    .center-stack {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      float: left !important;
      display: block !important;
      padding: 10px 0px 0px 0px !important;
    }
    .center-cta {
      margin: 0px auto !important;
      text-align: center !important;
    }
    .reverse-stack-top {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      display: table-header-group !important;
      padding: 0px 0px 0px 0px !important;
      border: none !important;
    }
    .reverse-stack-bottom {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      display: table-footer-group !important;
      padding: 0px 0px 0px 0px !important;
      border: none !important;
    }

    .pad-top {
      padding: 0px 0px 20px 0px !important;
    }
    .pad-top2 {
      padding: 0px 0px 5px 0px !important;
    }
    .stack-pad {
      padding: 0px 0px 0px 0px !important;
    }
    .logo {
      padding: 30px 0px 25px 0px !important
    }
    .prod-img {
      width: 100% !important;
      max-width: 100px !important;
    }

    .hide {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .headline {
      font-size: 26px !important;
      line-height: 28px !important;
      padding: 0px 0px 20px 0px !important;
    }
    .headline-no-pad {
      font-size: 26px !important;
      line-height: 28px !important;
      padding: 0px 0px 0px 0px !important;
    }

    .copy {
      padding: 0px 15px 20px 15px !important;
      text-align: center !important;
    }
    .copy2 {
      padding: 0px 15px 7px 15px !important;
      text-align: center !important;
    }
    .copy3 {
      padding: 10px 15px 10px 15px !important;
      text-align: center !important;
    }

    .ship-text {
      padding: 10px 0px 10px 0px !important;
      font-size: 11px !important;
      line-height: 110% !important;
      letter-spacing: 1px !important;
    }
    .contact-pad {
      padding: 20px 0px 20px 0px !important;
    }
    .contact-text {
      font-size: 12px !important;
      line-height: 120% !important;
    }
    .trust-pad {
      padding: 14px 5px !important;
    }

    /* Custom CSS */
    .mob-br {
      display: block !important;
    }
    .pr {
      padding: 0px 0px 0px 0px !important;
    }

    .trust-text {
      font-size: 11px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }

    /* Autoship Created Order Summary Styles */
    .summary-outer {

      padding: 0px 10px 30px 10px !important;
      width: 100% !important;
    }
    .summary-headline {
      text-align: center !important;
    }
    .summary-info {
      text-align: center !important;
      padding: 0px !important;
    }
    .summary-inner-pad {
      padding: 20px 20px 20px 20px !important;
      width: 100% !important;
    }
    .summary-cta {
      margin: 0px auto !important;
      text-align: center !important;
      padding: 5px 0px 0px 0px !important;
    }

    /* Order Confirmation Summary Styles */
    .order-outer {
      padding: 0px 10px 30px 10px !important;
      width: 100% !important;
    }
    .order-headline {
      text-align: center !important;
    }
    .order-inner-pad-top {
      padding: 20px 20px 10px 20px !important;
      width: 100% !important;
    }
    .order-inner-pad-btm {
      padding: 20px 20px 25px 20px !important;
      width: 100% !important;
    }
    .order-center {
      text-align: center !important;
      padding: 0px !important;
    }
    .order-info {
      text-align: center !important;
      font-size: 12px !important;
    }
    .order-text {
      text-align: center !important;
      padding-bottom: 12px !important;
      line-height: 22px !important;
      font-size: 12px !important;
    }
    .order-save {
      text-align: center !important;
      padding: 0px !important;
    }

    /* Autoship Reminder Summary Styles */
    .remind-outer {
      padding: 0px 10px 30px 10px !important;
      width: 100% !important;
    }
    .remind-headline {
      text-align: center !important;
    }
    .remind-inner-pad-top {
      padding: 20px 20px 15px 20px !important;
      width: 100% !important;
    }
    .remind-inner-pad-btm {
      padding: 20px 20px 15px 20px !important;
      width: 100% !important;
    }
    .remind-center {
      text-align: center !important;
      padding: 0px !important;
    }
    .remind-info {
      text-align: center !important;
      font-size: 12px !important;
    }
    .remind-text {
      text-align: center !important;
      padding-bottom: 12px !important;
      line-height: 22px !important;
      font-size: 12px !important;
    }
    .remind-save {
      text-align: center !important;
      padding: 0px !important;
    }
    .remind-copy {
      text-align: center !important;
      padding: 0px 0px 15px 0px !important;
      font-size: 12px !important;
    }
    .remind-date {
      padding: 20px 20px 25px 20px !important;
    }

    /* Total Styles */
    .total-info {
      font-size: 12px !important;
      padding: 0px 0px 8px 0px !important;
    }
    .total-outer {
      padding: 25px 25px 22px 0px !important;
    }

    /* Product List Without Price Styles */
    .no-price-outer {
      padding: 0px 10px 0px 10px !important;
    }
    .no-price-prod {
      padding: 0px 20px 0px 20px !important;
      text-align: center !important;
    }
    .no-price-qty {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .no-price-img {
      width: 100% !important;
      max-width: 115px !important;
      min-width: 90px !important
    }
    .no-price-text {
      font-size: 12px !important;
      line-height: 19px !important;
      padding: 0px 10px 0px 0px !important;
    }
    .no-price-col1 {
      width: 35% !important;
    }
    .no-price-col2 {
      width: 50% !important;
    }
    .no-price-col3 {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .no-price-auto {
      width: 100px !important;
      min-width: 150px !important;
      max-width: 218px !important;
    }
    .hiddenQTY {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 15px 0px 0px 0px !important
    }

    /* Product Loop Styles */
    .loop-outer {
      padding: 0px 10px 0px 10px !important;
    }
    .loop-prod {
      padding: 0px 20px 0px 20px !important;
      text-align: center !important;
    }
    .loop-qty,
    .loop-price {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .loop-img {
      width: 100% !important;
      max-width: 115px !important;
      min-width: 90px !important
    }
    .loop-text {
      font-size: 12px !important;
      line-height: 19px !important;
      padding: 0px 10px 0px 0px !important;
    }
    .loop-col1 {
      width: 35% !important;
    }
    .loop-col2 {
      width: 50% !important;
    }
    .loop-col3,
    .loop-col4 {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .loop-auto {
      width: 100px !important;

      min-width: 150px !important;
      max-width: 218px !important;
    }
    .loopQTY {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 15px 0px 3px 0px !important
    }
    .loopPRI {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 5px 0px 20px 0px !important
    }

    /* Release Loop Styles */
    .rel-loop-outer {
      padding: 0px 10px 0px 10px !important;
    }
    .rel-loop-prod {
      padding: 0px 20px 0px 20px !important;
      text-align: center !important;
    }
    .rel-loop-qty,
    .rel-loop-price {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .rel-loop-img {
      width: 100% !important;
      max-width: 115px !important;
      min-width: 90px !important
    }
    .rel-loop-text {
      font-size: 12px !important;
      line-height: 19px !important;
      padding: 0px 10px 0px 0px !important;
    }
    .rel-loop-col1 {
      width: 35% !important;
    }
    .rel-loop-col2 {
      width: 50% !important;
    }
    .rel-loop-col3,
    .rel-loop-col4 {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .rel-loop-auto {
      width: 100px !important;
      min-width: 150px !important;
      max-width: 218px !important;
    }
    .rel-loopQTY {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 15px 0px 3px 0px !important
    }
    .rel-loopPRI {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 5px 0px 20px 0px !important
    }

    .app-text {
      padding: 25px 0px 10px 0px !important;
    }
    .app-btn-outer {
      padding: 26px 0px 5px 0px !important;
    }
    .cta1-pad {
      padding: 0px 0px 20px 0px !important;
    }
    .cta2-pad {
      padding: 0px 0px 10px 0px !important;
    }
    .cta3-pad {
      padding: 0px 0px 35px 0px !important;
    }
    .ship-anim {
      padding: 0px 0px 25px 0px !important;
    }
  }

  @media (max-width: 420px) {
    .trust-text {
      font-size: 10px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }
    .trust-icon-1 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 40px !important;
      height: auto !important;
      max-height: none !important;
    }
    .trust-icon-2 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 44px !important;
      height: auto !important;
      max-height: none !important;
    }
  }

  @media (max-width: 400px) {
    .trust-pad {
      padding: 8px 0px !important;
    }
    .mob-br-400 {
      display: block !important;
    }
  }

  @media (max-width: 380px) {
    .trust-text {
      font-size: 9px !important;
      line-height: 11px !important;
      padding: 4px 0px 0px 0px !important;
    }
    .trust-icon-1 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 36px !important;
      height: auto !important;
      max-height: none !important;
    }
    .trust-icon-2 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 41px !important;
      height: auto !important;
      max-height: none !important;
    }
  }

  @media (max-width: 350px) {
    .trust-text {
      font-size: 8px !important;
      line-height: 10px !important;
      padding: 4px 0px 0px 0px !important;
    }
  }
</style>
 </head>
    <body style="margin: 0; padding: 0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: #eeeeee;">
  <tr>
    <td width="100%" align="center" valign="top" style="background-color: #eeeeee; padding: 10px 0px 0px 0px;">

      <table style="min-width: 600px; width: 600px;" width="600" class="scale" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td style="background-color: #FFFFFF;" align="center" valign="top">

            <!-- CONTENT BEGIN -->

            <table align="center" border="0" cellpadding="0" cellspacing="0" style="min-width: 600px; width: 600px;" width="600" class="scale">
              <tr>
                <td valign="top" style="padding: 0px" class="pad-top2">

                  <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0" style="background-color: #ffffff; border-radius:5px;">



                    <tr>
                      <td align="center" style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 40px; mso-line-height-rule: exactly; color:#444444; text-align:center; line-height: 40px; padding: 40px 0px 25px 0px;" class="headline">
                        Bestätigung</td>
                    </tr>
                    <tr>
                      <td style="font-family:Roboto, Helvetica, Arial, sans-serif; color: #010101; font-size: 12px; mso-line-height-rule: exactly;  padding: 0px 50px 25px 50px;" class="copy">
                       Sehr geehrte Damen und Herren,<br /><br />
 vielen Dank für Ihre Bestellung, die wir Ihnen wie folgt bestätigen:<br />
<hr />
                      </td>
                    </tr>
                    <tr>
                      <td style="font-family:Roboto, Helvetica, Arial, sans-serif; color: #010101; font-size: 12px; mso-line-height-rule: exactly;  padding: 0px 50px 25px 50px;" class="copy">
                             Liebe Fahrgäste bitte schalten Sie Ihr Telefon nach der Landung ein damit Ihr zuständiger Fahrer Sie kontaktieren kann !
                                 <br /> <br><br>
                                                    <span style="color:red;font-weight:bold;">ACHTUNG: </span><span style="color:red;"> Der Treffpunkt wird vom Chauffeur bekannt gegeben.</span>

                      </td>
                    </tr>
                    <tr>
                      <td style="font-family:Roboto, Helvetica, Arial, sans-serif; color: #010101; font-size: 15px; mso-line-height-rule: exactly; line-height: 24px; padding: 0px 50px 5px 50px;" class="copy">

    <span style="float:left">Richtung VOM Flughafen</span>
    <span style="float:right">Bestellnummer: ' . $order_no_email . '</span>
                      </td>

                    </tr>


              <tr>
                <td valign="top" style="padding: 0px 20px 0px 20px;" class="remind-outer">

                  <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                      <td valign="top" style="background-color: #fafafa; border: 1px solid #e5e5e5;">

                        <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
                          <tr>
                            <th width="50%" valign="top" style="padding: 0px!important; border-right: 1px solid #e5e5e5; font-weight: normal; vertical-align: top;" class="stack-nrb">
                              <table align="center" width="100%" cellpadding="0" cellspacing="0" border="0" class="scale">
                                <tr>
                                  <td class="remind-inner-pad-top" style="padding:18px 18px 20px 20px; vertical-align: top;" valign="top">

                                    <table width="100%" cellpadding="0" cellspacing="0" border="0">
                                      <tr>
                                        <td width="100%" style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;"
                                          class="remind-headline">
                                          Fahrdaten:
                                        </td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Flug-Info:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px;" class="remind-info"> 	' . $GLOBALS['DEPARTURE'] . ' - ' . $GLOBALS['FLIGHTNUMBER'] . '</td>
                                      </tr>
										    <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Abholdatum und Uhrzeit:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px;" class="remind-info"> 	 ' . $pickupdate_email . ' - ' . $hour_email . ':' . $minute_email . ' </td>
                                      </tr>
                                              <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Abfahrt von:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 		  Flughafen Wien-Schwechat   </td>
                                      </tr>


' . $aa1 . ' ' . $aa2 . ' ' . $aa3 . '

                                       <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Reiseziel nach:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info">  ' . $GLOBALS['STREETNAME'] . ' ' . $GLOBALS['HOUSENUMBER'] . ', ' . $GLOBALS['ZIPCODE'] . ' ' . $GLOBALS['CITYNAME'] . '   </td>
                                      </tr>
                                                  <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif;  font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Personen</strong>:  ' . $GLOBALS['PASSENGER'] . '</td>
                                      </tr>

                                                  <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif;  font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Koffer</strong>: ' . $GLOBALS['SUITCASE'] . '</td>
                                      </tr>

                                                     <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif;  font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Handgepäck</strong>: ' . $GLOBALS['HANDLUGGAGE'] . '</td>
                                      </tr>';
    if ($GLOBALS['CHILDSEAT'] >= '1') {
        $message .= '  <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Kindersitz</strong>: ' . $GLOBALS['CHILDSEAT'] . '</td>
                                      </tr>';
    }
    if ($GLOBALS['BOOSTERSEAT'] >= '1') {
        $message .= '                         <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Sitzerhöhung</strong>: ' . $GLOBALS['BOOSTERSEAT'] . '</td>
                                      </tr>';
    }

    if ($GLOBALS['CARRYCOT'] >= '1') {
        $message .= '        <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Babyschale</strong>: ' . $GLOBALS['CARRYCOT'] . '</td>
                                      </tr>';
    }
    $message .= '</table>

	    </td>
	    </tr>
	    </table>
	    </th>
	    <th width = "50%" valign = "top" style = "padding: 0px!important; font-weight: normal; vertical-align: top;" class = "stack">
	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0" class = "scale">
	    <tr>
	    <td class = "remind-inner-pad-btm" style = "padding:18px 18px 20px 20px; vertical-align: top;" valign = "top" align = "center">

	    <table cellpadding = "0" cellspacing = "0" border = "0" width = "100%">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;" class = "remind-headline">Kontaktinformationen:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">
	     ' . $GLOBALS['SALUTATION'] . ' ' . $GLOBALS['NAME'] . ' ' . $GLOBALS['SURNAME'] . '
	    </td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">
	    ' . $GLOBALS['EMAIL'] . '</td>
	    </tr>

	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px;" class = "remind-info">
	    ' . $GLOBALS['PHONE'] . '</td>
	    </tr>
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">Zahlungsweise:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">  ' . $GLOBALS['PAYMENT'] . ' </td>
	    </tr>
	    </table>

	    </td>


	    </tr>
	    <tr>
	    <td class = "remind-inner-pad-btm" style = "padding:18px 18px 20px 20px; vertical-align: top;" valign = "top" align = "center">

	    <table cellpadding = "0" cellspacing = "0" border = "0" width = "100%">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;" class = "remind-headline">Preis:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">
	     ' . $price_email . ' EUR
	    </td>
	    </tr>


	    </table>

	    </td>


	    </tr>';
    if ($GLOBALS['NOTE'] != '') {
        $message .= '	    <tr>
	    <td class = "remind-inner-pad-btm" style = "padding:18px 18px 20px 20px; vertical-align: top;" valign = "top" align = "center">

	    <table cellpadding = "0" cellspacing = "0" border = "0" width = "100%">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;" class = "remind-headline">Anmerkung:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">' . $GLOBALS['NOTE'] . '</td>
	    </tr>


	    </table>

	    </td>


	    </tr>';
    }
    $message .= '  </table>
	    </th>
	    </tr>

	    </table>

	    </td>
	    </tr>';

    if (strlen($GLOBALS["mapApi"]) > 10) {

        $message .= ' <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: center;background-color: #fafafa; border: 1px solid #e5e5e5;" class = "remind-info">
	    Die Route ist ' . $GLOBALS['KM'] . ' Km lang und dauert ca. ' . $GLOBALS['MIN'] . ' Minuten
	    </td></tr>';
    }

    $message .= ' </table>

	    </td>
	    </tr>

	    <tr>
	    <td valign = "top" style = "padding: 0px 20px 20px 20px;" class = "loop-outer">

	    <table style = "min-width: 560px; width: 560px;" width = "560" class = "scale" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td width = "50%" style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">

	    Ihre Kundennummer

	    </td>
	    <td class = "loop-qty" width = "50%" style = "font-family:Roboto, Helvetica, Arial, sans-serif; color: #333333; font-size: 14px; text-align: right;">
	    ' . $GLOBALS['CUSTOMERNO'] . '
	    </td>

	    </tr>
	    </table>

	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>


	    <tr> </tr>
	    <tr> </tr>
	    <tr> </tr>
	    <tr> </tr>




	    </table>

	    </td>
	    </tr>

	    <tr>
	    <td bgcolor = "#eeeeee" style = "height: 15px; line-height: 15px; mso-line-height: 15px;">&nbsp;

	    </td>
	    </tr>
	    <tr>
	    <td valign = "top">
	    <table align = "center" border = "0" cellpadding = "0" cellspacing = "0" style = "min-width: 600px; width: 600px;" width = "600" class = "scale">
	    <tr>
	    <td valign = "top">

	    <table border = "0" cellpadding = "0" cellspacing = "0" style = "min-width: 600px; width: 600px; background-color: #128ced;" width = "600" class = "scale">
	    <tr>
	    <td width = "100%" align = "center" valign = "middle" style = "vertical-align: middle;">
	    <table cellpadding = "0" cellspacing = "0" border = "0" style = "margin: 0px auto;">
	    <tr>
	    <td style = "padding: 23px 0px 25px 0px;" class = "contact-pad" align = "center">
	    <table cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family: Roboto, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; color: #ffffff!important; text-align: center;" class = "contact-text" align = "center"><a style = "text-decoration: none; color: #ffffff;" href = "tel:' . $GLOBALS['company_phone'] . '"
	    target = "_blank" rilt = "ContactUs_Text">Notfallnummer <span style = "font-family: RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700;">' . $GLOBALS['company_phone'] . '</span> <span class = "mob-br"></span> oder antworten Sie auf diese E-Mail</a></td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>

	    </td>
	    </tr>
<tr>
			<td bgcolor = "#eeeeee" style = "height: 15px; line-height: 15px; mso-line-height: 15px;">&nbsp;

	    </td></tr>
	    <tr>
	    <td valign = "top" >
	    <table border = "0" cellpadding = "0" cellspacing = "0" style = "width: 100%;" width = "100%">

	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 10px 0px 3px 0px; text-align: left;padding:10px 10px 0 10px;" class = "remind-info">

	    <p>' . $GLOBALS['sitename'] . '<br>FLUGHAFEN TRANSFER SERVICE UND LIMOUSINENSERVICE ZUM FIXPREIS<br>
	    WEB: ' . $GLOBALS['company_url'] . '<br>
	    E-Mail: ' . $GLOBALS['smtp_email'] . '<br>
	    Telefon: ' . $GLOBALS['company_phone'] . '
	    </p></td></tr>
	    <tr>
	    <td width = "100%" align = "center" style = "padding: 15px 0px 20px 0px;">
	    <table cellpadding = "0" cellspacing = "0" border = "0" style = "width: 100%;" width = "100%">
	    <tr>
	    <td style = "font-family:Roboto,Arial,sans-serif!important;font-size:13px;padding-left:10px;padding-bottom:10px;">
	    Vertraulichkeitserklärung
	    </td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto,Arial,sans-serif!important;font-size:10px;padding:0 10px 0 10px;">

	    Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind, oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte den Absender und löschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail und der darin enthaltenen Informationen sind nicht gestattet.
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>

	    </table>
	    </td>
	    </tr>
	    </table>

	    </td>
	    </tr>
	    </table>
	      </body>
</html>';



    if (!MAILTO($GLOBALS['EMAIL'], $subject, $message)) {
        echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => 'ERROR', 'MODEL' => 'STOP_EMAIL_VOM'));
        return;
    } else {

        if ($GLOBALS['WAY'] == 'VOM' && $GLOBALS['WITHRETURN'] != '1') {
            MAILTO($GLOBALS['backup_fahrten_email'], "KOPIE! " . $GLOBALS['sitename'] . " " . $subject, $message);
            echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => 'OK', 'MODEL' => 'OK_EMAIL_VOM'));
            return;
        }
        if ($GLOBALS['WAY'] == 'ZUM' && $GLOBALS['WITHRETURN'] == '1') {
            MAILTO($GLOBALS['backup_fahrten_email'], "KOPIE! " . $GLOBALS['sitename'] . " " . $subject, $message);
            echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => 'OK', 'MODEL' => 'OK_EMAIL_ZUMVOM'));
            return;
        }
    }
}

function INSERT_ZUM() {

    if ($GLOBALS['PICKUPDATE']) {
        $pickupdate = $_POST['PICKUPDATE'];
        $hour = $_POST['HOUR'];
        $minute = $_POST['MINUTE'];
        $richtung = $_POST['WAY'];
        $pickuptime = $hour . ':' . $minute . ':00';
        $pickupdate = date("Y-m-d", strtotime($pickupdate));

        if ($richtung == 'ZUM') {
            $table = 'stop_to';
        } else {
            $table = 'stop_from';
        }

        $sqlX = $GLOBALS['MYSQLI']->query("SELECT * FROM $table WHERE date='$pickupdate' AND day='1'");
        $row = $sqlX->fetch_row();
        if ($row[0] <= 0) {

            $sql = $GLOBALS['MYSQLI']->query("SELECT * FROM $table WHERE date='$pickupdate' AND `hour` = '$hour'");
            $row = $sql->fetch_row();
            if ($row[0] <= 0) {

                $sql = $GLOBALS['MYSQLI']->query("SELECT * FROM $table WHERE date='$pickupdate' AND `time` = '$pickuptime'");
                $row = $sql->fetch_row();
                if ($row[0] <= 0) {

                } else {
                    echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => '1', 'MODEL' => 'STOP_TIME'));
                    exit();
                }
            } else {
                echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => '1', 'MODEL' => 'STOP_HOUR'));
                exit();
            }
        } else {
            echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => '1', 'MODEL' => 'STOP_DAY'));
            exit();
        }



        $orderDateTime = date('Y-m-d H:i:s', strtotime("$pickupdate $pickuptime"));
        $orderDateTime = strtotime($orderDateTime);
        $dateNow = date('Y-m-d H:i:s');
        $dateNowX = date('Y-m-d');
        $dateNow = strtotime($dateNow);
        $razlika = $orderDateTime - $dateNow;

        $hourX = date('H');

        $OT = F_SQL("SELECT * FROM order_times WHERE hour = '" . $hourX . "'");
//        echo $OT['minute'];
//        echo $OT['next'];

        if (is_null($OT['next'])) {

            $hoourDBmin = $OT['minute'] + 0;
            $hourDBsec = $hoourDBmin * 60;

            if ($razlika < $hourDBsec) {

                $endTime = $dateNow + $hourDBsec;
                $stamp = date('d.m.Y H:i', $endTime);
                $timeX = date('H:i', $endTime);
                $dateX = date('d.m.Y', $endTime);


                echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => '1', 'MODEL' => 'STOP', 'DATE' => $dateX, 'TIME' => $timeX));

                exit();
            }
        } else {
            $nextTime = $OT['next'];
            $strDbTime = date('Y-m-d H:i:s', strtotime("$dateNowX $nextTime"));
            $strDbTimeSec = strtotime($strDbTime);

            if ($dateNow > $strDbTimeSec) {
                $strDbTime = strtotime("1 day", strtotime($strDbTime));
                $strDbTime = date("Y-m-d H:i:s", $strDbTime);
            }
            $strDbTimeSec = strtotime($strDbTime);
            if ($orderDateTime < $strDbTimeSec) {
                echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => '1', 'MODEL' => 'STOP', 'DATE' => date('d.m.Y', strtotime($strDbTime)), 'TIME' => date('H:i', strtotime($strDbTime))));
                exit();
            }
        }
    }

    $rand = random_string(8);
    $GLOBALS['ORDERNO'] = $GLOBALS['order_number_prefix_web'] . $rand;

    $GLOBALS['confirm_code'] = md5($GLOBALS['ORDERNO']);
    $GLOBALS['order_date'] = date('Y-m-d H:i:s');
    if (!empty($_SERVER["HTTP_CLIENT_IP"])) {
        $GLOBALS['customer_ip'] = $_SERVER["HTTP_CLIENT_IP"];
    } elseif (!empty($_SERVER["HTTP_X_FORWARDED_FOR"])) {
        $GLOBALS['customer_ip'] = $_SERVER["HTTP_X_FORWARDED_FOR"];
    } else {
        $GLOBALS['customer_ip'] = $_SERVER["REMOTE_ADDR"];
    }

    if ($GLOBALS['EMAIL'] != '') {

        $result = $GLOBALS['MYSQLI']->query("SELECT customer_no FROM customers WHERE email = '" . $GLOBALS['EMAIL'] . "'");
        if ($result->num_rows > 0) {
            $GLOBALS['CUSTOMERNO'] = $result->fetch_object()->customer_no;

            $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");

            $sqlchk1 = $GLOBALS['MYSQLI']->query("SELECT COUNT(*) AS ctr FROM customers_routes WHERE customer_no = '" . $GLOBALS['CUSTOMERNO'] . "' AND city = '" . $GLOBALS['CITY_ID'] . "' AND zip = '" . $GLOBALS['ZIP_ID'] . "' AND street = '" . $GLOBALS['STREET_ID'] . "'");

            $row = mysqli_fetch_assoc($sqlchk1);

            if ($row['ctr'] <= 0) {
                $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");
                $GLOBALS['MYSQLI']->query("INSERT INTO `customers_routes` (customer_no, city, zip, street, house_number)
      VALUES ('" . $GLOBALS['CUSTOMERNO'] . "', '" . $GLOBALS['CITY_ID'] . "', '" . $GLOBALS['ZIP_ID'] . "', '" . $GLOBALS['STREET_ID'] . "', '" . $GLOBALS['HOUSENUMBER'] . "')");
            }
        } else {
            $GLOBALS['CUSTOMERNO'] = random_string($GLOBALS['customerno_length']);
            $GLOBALS['PIN'] = random_string(4);
            $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");
            $GLOBALS['MYSQLI']->query("INSERT INTO `customers` (customer_no, pin, salutation, name, surname, email, phone)
      VALUES ('" . $GLOBALS['CUSTOMERNO'] . "','" . $GLOBALS['PIN'] . "', '" . $GLOBALS['SALUTATION'] . "','" . $GLOBALS['NAME'] . "','" . $GLOBALS['SURNAME'] . "','" . $GLOBALS['EMAIL'] . "','" . $GLOBALS['PHONE'] . "')");
            $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");
            $GLOBALS['MYSQLI']->query("INSERT INTO `customers_routes` (customer_no, city, zip, street, house_number)
      VALUES ('" . $GLOBALS['CUSTOMERNO'] . "','" . $GLOBALS['CITY_ID'] . "','" . $GLOBALS['ZIP_ID'] . "','" . $GLOBALS['STREET_ID'] . "','" . $GLOBALS['HOUSENUMBER'] . "')");
        }
    }




    if ($GLOBALS['ADDADDRESS'] == 0) {
        $GLOBALS['ADD1ZIP'] = "";
        $GLOBALS['ADD2ZIP'] = "";
        $GLOBALS['ADD3ZIP'] = "";
        $GLOBALS['ADD1STREET'] = "";
        $GLOBALS['ADD2STREET'] = "";
        $GLOBALS['ADD3STREET'] = "";
    }
    if ($GLOBALS['ADDADDRESS'] == 1) {
        $GLOBALS['ADD2ZIP'] = "";
        $GLOBALS['ADD3ZIP'] = "";
        $GLOBALS['ADD2STREET'] = "";
        $GLOBALS['ADD3STREET'] = "";
    }
    if ($GLOBALS['ADDADDRESS'] == 2) {
        $GLOBALS['ADD3ZIP'] = "";
        $GLOBALS['ADD3STREET'] = "";
    }

    $transDepart = $GLOBALS['DEPARTURE'];
    $transFlight = $GLOBALS['FLIGHTNUMBER'];
    $GLOBALS['DEPARTURE'] = "";
    $GLOBALS['FLIGHTNUMBER'] = "";

    if ($GLOBALS['CAR_TYPE'] == 'limo') {
        $GLOBALS['CAR_TYPE'] = 'L';
    } else if ($GLOBALS['CAR_TYPE'] == 'kombi') {
        $GLOBALS['CAR_TYPE'] = 'K';
    } else if ($GLOBALS['CAR_TYPE'] == 'van') {
        $GLOBALS['CAR_TYPE'] = 'V';
    }

    $result = $GLOBALS['MYSQLI']->query("INSERT INTO `orders` (order_no, confirm_code, order_date, customer_ip, customer_no, pick_up_date, pick_up_time, pickup, salutation, name, surname, city, zip, street, house_number, phone, email, car_type, passengers, booster_seat, child_seat,  carrycot, suitcase, hand_luggage, additional_address, aa1_zip, aa1_street, aa1_house_number, aa2_zip, aa2_street, aa2_house_number, aa3_zip, aa3_street, aa3_house_number, payment, note, price, cancellation,  confirmed, paid,km,min,flight_departure,flight_number)
      VALUES ('" . $GLOBALS['ORDERNO'] . "', '" . $GLOBALS['confirm_code'] . "', '" . $GLOBALS['order_date'] . "', '" . $GLOBALS['customer_ip'] . "', '" . $GLOBALS['CUSTOMERNO'] . "', '" . $GLOBALS['PICKUPDATE'] . "', '" . $GLOBALS['PICKUPTIME'] . "', 'ZUM', '" . $GLOBALS['SALUTATION'] . "', '" . $GLOBALS['NAME'] . "', '" . $GLOBALS['SURNAME'] . "', '" . $GLOBALS['CITY_ID'] . "', '" . $GLOBALS['ZIP_ID'] . "', '" . $GLOBALS['STREET_ID'] . "', '" . $GLOBALS['HOUSENUMBER'] . "', '" . $GLOBALS['PHONE'] . "', '" . $GLOBALS['EMAIL'] . "', '" . $GLOBALS['CAR_TYPE'] . "', '" . $GLOBALS['PASSENGER'] . "', '" . $GLOBALS['BOOSTERSEAT'] . "', '" . $GLOBALS['CHILDSEAT'] . "', '" . $GLOBALS['CARRYCOT'] . "', '" . $GLOBALS['SUITCASE'] . "', '" . $GLOBALS['HANDLUGGAGE'] . "', '" . $GLOBALS['ADDADDRESS'] . "', '" . $GLOBALS['ADD1ZIP'] . "', '" . $GLOBALS['ADD1STREET'] . "', '" . $GLOBALS['ADD1HOUSENUMBER'] . "', '" . $GLOBALS['ADD2ZIP'] . "', '" . $GLOBALS['ADD2STREET'] . "', '" . $GLOBALS['ADD2HOUSENUMBER'] . "', '" . $GLOBALS['ADD3ZIP'] . "', '" . $GLOBALS['ADD3STREET'] . "', '" . $GLOBALS['ADD3HOUSENUMBER'] . "', '" . $GLOBALS['PAYMENT'] . "', '" . $GLOBALS['NOTE'] . "', '" . $GLOBALS['PRICE'] . "', '0', '0', '0', '" . $GLOBALS['KM'] . "', '" . $GLOBALS['MIN'] . "', '" . $GLOBALS['DEPARTURE'] . "', '" . $GLOBALS['FLIGHTNUMBER'] . "') ") or die(mysqli_error($GLOBALS['MYSQLI']));
    if ($result) {
        $GLOBALS['PICKUPDATE_FORMAT'] = date("d.m.Y", strtotime($GLOBALS['PICKUPDATE']));
        if ($GLOBALS['EMAIL'] != '') {
            EMAIL_ZUM($GLOBALS['ORDERNO'], $GLOBALS['PICKUPDATE_FORMAT'], $GLOBALS['HOUR'], $GLOBALS['MINUTE'], $GLOBALS['PRICE']);
//	    }
        }
        if ($GLOBALS['sms_web_zum'] == '1') {
            $SMSZUM = new SMS;
            $SMSZUM->SMS_SEND($GLOBALS['confirm_code']);
        }
    } else {
        echo "ERROR222";
        return;
    }
    if ($GLOBALS['WITHRETURN'] == '1') {



        $GLOBALS['DEPARTURE'] = $transDepart;
        $GLOBALS['FLIGHTNUMBER'] = $transFlight;


        $GLOBALS['ORDERNORETURN'] = $GLOBALS['ORDERNO'] . 'R';
        $GLOBALS['confirm_codereturn'] = md5($GLOBALS['ORDERNORETURN']);

        $result = $GLOBALS['MYSQLI']->query("INSERT INTO `orders` (order_no, confirm_code, order_date, customer_ip, customer_no, pick_up_date, pick_up_time, pickup, salutation, name, surname, city, zip, street, house_number, phone, email, car_type, passengers, booster_seat, child_seat,  carrycot, suitcase, hand_luggage, additional_address, aa1_zip, aa1_street, aa1_house_number, aa2_zip, aa2_street, aa2_house_number, aa3_zip, aa3_street, aa3_house_number, payment, note, price, cancellation,  confirmed, paid,km,min,flight_departure,flight_number)
      VALUES ('" . $GLOBALS['ORDERNORETURN'] . "', '" . $GLOBALS['confirm_codereturn'] . "', '" . $GLOBALS['order_date'] . "', '" . $GLOBALS['customer_ip'] . "', '" . $GLOBALS['CUSTOMERNO'] . "', '" . $GLOBALS['PICKUPDATERETURN'] . "', '" . $GLOBALS['PICKUPTIMERETURN'] . "', 'VOM', '" . $GLOBALS['SALUTATION'] . "', '" . $GLOBALS['NAME'] . "', '" . $GLOBALS['SURNAME'] . "', '" . $GLOBALS['CITY_ID'] . "', '" . $GLOBALS['ZIP_ID'] . "', '" . $GLOBALS['STREET_ID'] . "', '" . $GLOBALS['HOUSENUMBER'] . "', '" . $GLOBALS['PHONE'] . "', '" . $GLOBALS['EMAIL'] . "', '" . $GLOBALS['CAR_TYPE'] . "', '" . $GLOBALS['PASSENGER'] . "', '" . $GLOBALS['BOOSTERSEAT'] . "', '" . $GLOBALS['CHILDSEAT'] . "', '" . $GLOBALS['CARRYCOT'] . "', '" . $GLOBALS['SUITCASE'] . "', '" . $GLOBALS['HANDLUGGAGE'] . "', '" . $GLOBALS['ADDADDRESS'] . "', '" . $GLOBALS['ADD1ZIP'] . "', '" . $GLOBALS['ADD1STREET'] . "', '" . $GLOBALS['ADD1HOUSENUMBER'] . "', '" . $GLOBALS['ADD2ZIP'] . "', '" . $GLOBALS['ADD2STREET'] . "', '" . $GLOBALS['ADD2HOUSENUMBER'] . "', '" . $GLOBALS['ADD3ZIP'] . "', '" . $GLOBALS['ADD3STREET'] . "', '" . $GLOBALS['ADD3HOUSENUMBER'] . "', '" . $GLOBALS['PAYMENT'] . "', '" . $GLOBALS['NOTE'] . "', '" . $GLOBALS['PRICERETURN'] . "', '0', '0', '0', '" . $GLOBALS['KM'] . "', '" . $GLOBALS['MIN'] . "','" . $GLOBALS['DEPARTURE'] . "','" . $GLOBALS['FLIGHTNUMBER'] . "') ");
        if ($result) {
            $GLOBALS['PICKUPDATERETURN_FORMAT'] = date("d.m.Y", strtotime($GLOBALS['PICKUPDATERETURN']));
            if ($GLOBALS['EMAIL'] != '') {
//		if ($GLOBALS['ORDER']->EMAILSENDEN == '1') {

                EMAIL_VOM($GLOBALS['ORDERNORETURN'], $GLOBALS['PICKUPDATERETURN_FORMAT'], $GLOBALS['HOURRETURN'], $GLOBALS['MINUTERETURN'], $GLOBALS['PRICERETURN']);
//		}
            }
            

        if ($GLOBALS['sms_web_vom'] == '1') {
            $SMSZUM = new SMS;
            $SMSZUM->SMS_SEND($GLOBALS['confirm_codereturn']);
        }
        } else {
            echo "ERROR333";
            return;
        }
    }
}

function INSERT_VOM() {



    if ($GLOBALS['PICKUPDATE']) {
        $pickupdate = $_POST['PICKUPDATE'];
        $hour = $_POST['HOUR'];
        $minute = $_POST['MINUTE'];
        $richtung = $_POST['WAY'];
        $pickuptime = $hour . ':' . $minute . ':00';
        $pickupdate = date("Y-m-d", strtotime($pickupdate));

        if ($richtung == 'ZUM') {
            $table = 'stop_to';
        } else {
            $table = 'stop_from';
        }

        $sqlX = $GLOBALS['MYSQLI']->query("SELECT * FROM $table WHERE date='$pickupdate' AND day='1'");
        $row = $sqlX->fetch_row();
        if ($row[0] <= 0) {

            $sql = $GLOBALS['MYSQLI']->query("SELECT * FROM $table WHERE date='$pickupdate' AND `hour` = '$hour'");
            $row = $sql->fetch_row();
            if ($row[0] <= 0) {

                $sql = $GLOBALS['MYSQLI']->query("SELECT * FROM $table WHERE date='$pickupdate' AND `time` = '$pickuptime'");
                $row = $sql->fetch_row();
                if ($row[0] <= 0) {

                } else {
                    echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => '1', 'MODEL' => 'STOP_TIME'));
                    exit();
                }
            } else {
                echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => '1', 'MODEL' => 'STOP_HOUR'));
                exit();
            }
        } else {
            echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => '1', 'MODEL' => 'STOP_DAY'));
            exit();
        }



        $orderDateTime = date('Y-m-d H:i:s', strtotime("$pickupdate $pickuptime"));
        $orderDateTime = strtotime($orderDateTime);
        $dateNow = date('Y-m-d H:i:s');
        $dateNowX = date('Y-m-d');
        $dateNow = strtotime($dateNow);
        $razlika = $orderDateTime - $dateNow;

        $hourX = date('H');

        $OT = F_SQL("SELECT * FROM order_times WHERE hour = '" . $hourX . "'");
//        echo $OT['minute'];
//        echo $OT['next'];

        if (is_null($OT['next'])) {

            $hoourDBmin = $OT['minute'] + 0;

//            $hoourDBmin = $GLOBALS['h' . $hourX] + 0;
            $hourDBsec = $hoourDBmin * 60;

            if ($razlika < $hourDBsec) {

                $endTime = $dateNow + $hourDBsec;
                $stamp = date('d.m.Y H:i', $endTime);
                $timeX = date('H:i', $endTime);
                $dateX = date('d.m.Y', $endTime);


                echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => '1', 'MODEL' => 'STOP', 'DATE' => $dateX, 'TIME' => $timeX));

                exit();
            }
        } else {
            $nextTime = $OT['next'];
            $strDbTime = date('Y-m-d H:i:s', strtotime("$dateNowX $nextTime"));
            $strDbTimeSec = strtotime($strDbTime);

            if ($dateNow > $strDbTimeSec) {
                $strDbTime = strtotime("1 day", strtotime($strDbTime));
                $strDbTime = date("Y-m-d H:i:s", $strDbTime);
            }
            $strDbTimeSec = strtotime($strDbTime);
            if ($orderDateTime < $strDbTimeSec) {
                echo json_encode(array('PHONE' => $GLOBALS['company_phone'], 'STOP' => '1', 'MODEL' => 'STOP', 'DATE' => date('d.m.Y', strtotime($strDbTime)), 'TIME' => date('H:i', strtotime($strDbTime))));
                exit();
            }
        }
    }

    $rand = random_string(8);
    $GLOBALS['ORDERNO'] = $GLOBALS['order_number_prefix_web'] . $rand;

    $GLOBALS['confirm_code'] = md5($GLOBALS['ORDERNO']);
    $GLOBALS['order_date'] = date('Y-m-d H:i:s');
    if (!empty($_SERVER["HTTP_CLIENT_IP"])) {
        $GLOBALS['customer_ip'] = $_SERVER["HTTP_CLIENT_IP"];
    } elseif (!empty($_SERVER["HTTP_X_FORWARDED_FOR"])) {
        $GLOBALS['customer_ip'] = $_SERVER["HTTP_X_FORWARDED_FOR"];
    } else {
        $GLOBALS['customer_ip'] = $_SERVER["REMOTE_ADDR"];
    }

    if ($GLOBALS['EMAIL'] != '') {

        $result = $GLOBALS['MYSQLI']->query("SELECT customer_no FROM customers WHERE email = '" . $GLOBALS['EMAIL'] . "'");
        if ($result->num_rows > 0) {
            $GLOBALS['CUSTOMERNO'] = $result->fetch_object()->customer_no;

            $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");

            $sqlchk1 = $GLOBALS['MYSQLI']->query("SELECT COUNT(*) AS ctr FROM customers_routes WHERE customer_no = '" . $GLOBALS['CUSTOMERNO'] . "' AND city = '" . $GLOBALS['CITY_ID'] . "' AND zip = '" . $GLOBALS['ZIP_ID'] . "' AND street = '" . $GLOBALS['STREET_ID'] . "'");

            $row = mysqli_fetch_assoc($sqlchk1);

            if ($row['ctr'] <= 0) {
                $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");
                $GLOBALS['MYSQLI']->query("INSERT INTO `customers_routes` (customer_no, city, zip, street, house_number)
      VALUES ('" . $GLOBALS['CUSTOMERNO'] . "', '" . $GLOBALS['CITY_ID'] . "', '" . $GLOBALS['ZIP_ID'] . "', '" . $GLOBALS['STREET_ID'] . "', '" . $GLOBALS['HOUSENUMBER'] . "')");
            }
        } else {
            $GLOBALS['CUSTOMERNO'] = random_string($GLOBALS['customerno_length']);
            $GLOBALS['PIN'] = random_string(4);
            $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");
            $GLOBALS['MYSQLI']->query("INSERT INTO `customers` (customer_no, pin, salutation, name, surname, email, phone)
      VALUES ('" . $GLOBALS['CUSTOMERNO'] . "','" . $GLOBALS['PIN'] . "', '" . $GLOBALS['SALUTATION'] . "','" . $GLOBALS['NAME'] . "','" . $GLOBALS['SURNAME'] . "','" . $GLOBALS['EMAIL'] . "','" . $GLOBALS['PHONE'] . "')");
            $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");
            $GLOBALS['MYSQLI']->query("INSERT INTO `customers_routes` (customer_no, city, zip, street, house_number)
      VALUES ('" . $GLOBALS['CUSTOMERNO'] . "','" . $GLOBALS['CITY_ID'] . "','" . $GLOBALS['ZIP_ID'] . "','" . $GLOBALS['STREET_ID'] . "','" . $GLOBALS['HOUSENUMBER'] . "')");
        }
    }




    if ($GLOBALS['ADDADDRESS'] == 0) {
        $GLOBALS['ADD1ZIP'] = "";
        $GLOBALS['ADD2ZIP'] = "";
        $GLOBALS['ADD3ZIP'] = "";
        $GLOBALS['ADD1STREET'] = "";
        $GLOBALS['ADD2STREET'] = "";
        $GLOBALS['ADD3STREET'] = "";
    }
    if ($GLOBALS['ADDADDRESS'] == 1) {
        $GLOBALS['ADD2ZIP'] = "";
        $GLOBALS['ADD3ZIP'] = "";
        $GLOBALS['ADD2STREET'] = "";
        $GLOBALS['ADD3STREET'] = "";
    }
    if ($GLOBALS['ADDADDRESS'] == 2) {
        $GLOBALS['ADD3ZIP'] = "";
        $GLOBALS['ADD3STREET'] = "";
    }
    if ($GLOBALS['CAR_TYPE'] == 'limo') {
        $GLOBALS['CAR_TYPE'] = 'L';
    } else if ($GLOBALS['CAR_TYPE'] == 'kombi') {
        $GLOBALS['CAR_TYPE'] = 'K';
    } else if ($GLOBALS['CAR_TYPE'] == 'van') {
        $GLOBALS['CAR_TYPE'] = 'V';
    }


    $result = $GLOBALS['MYSQLI']->query("INSERT INTO `orders` (order_no, confirm_code, order_date, customer_ip, customer_no, pick_up_date, pick_up_time, pickup, salutation, name, surname, city, zip, street, house_number, phone, email, car_type, passengers, booster_seat, child_seat,  carrycot, suitcase, hand_luggage, additional_address, aa1_zip, aa1_street, aa1_house_number, aa2_zip, aa2_street, aa2_house_number, aa3_zip, aa3_street, aa3_house_number, payment, note, price, cancellation,  confirmed, paid,km,min,flight_departure,flight_number)
      VALUES ('" . $GLOBALS['ORDERNO'] . "', '" . $GLOBALS['confirm_code'] . "', '" . $GLOBALS['order_date'] . "', '" . $GLOBALS['customer_ip'] . "', '" . $GLOBALS['CUSTOMERNO'] . "', '" . $GLOBALS['PICKUPDATE'] . "', '" . $GLOBALS['PICKUPTIME'] . "', 'VOM', '" . $GLOBALS['SALUTATION'] . "', '" . $GLOBALS['NAME'] . "', '" . $GLOBALS['SURNAME'] . "', '" . $GLOBALS['CITY_ID'] . "', '" . $GLOBALS['ZIP_ID'] . "', '" . $GLOBALS['STREET_ID'] . "', '" . $GLOBALS['HOUSENUMBER'] . "', '" . $GLOBALS['PHONE'] . "', '" . $GLOBALS['EMAIL'] . "', '" . $GLOBALS['CAR_TYPE'] . "', '" . $GLOBALS['PASSENGER'] . "', '" . $GLOBALS['BOOSTERSEAT'] . "', '" . $GLOBALS['CHILDSEAT'] . "', '" . $GLOBALS['CARRYCOT'] . "', '" . $GLOBALS['SUITCASE'] . "', '" . $GLOBALS['HANDLUGGAGE'] . "', '" . $GLOBALS['ADDADDRESS'] . "', '" . $GLOBALS['ADD1ZIP'] . "', '" . $GLOBALS['ADD1STREET'] . "', '" . $GLOBALS['ADD1HOUSENUMBER'] . "', '" . $GLOBALS['ADD2ZIP'] . "', '" . $GLOBALS['ADD2STREET'] . "', '" . $GLOBALS['ADD2HOUSENUMBER'] . "', '" . $GLOBALS['ADD3ZIP'] . "', '" . $GLOBALS['ADD3STREET'] . "', '" . $GLOBALS['ADD3HOUSENUMBER'] . "', '" . $GLOBALS['PAYMENT'] . "', '" . $GLOBALS['NOTE'] . "', '" . $GLOBALS['PRICE'] . "', '0', '0', '0', '" . $GLOBALS['KM'] . "', '" . $GLOBALS['MIN'] . "', '" . $GLOBALS['DEPARTURE'] . "', '" . $GLOBALS['FLIGHTNUMBER'] . "') ") or die(mysqli_error($GLOBALS['MYSQLI']));
    if ($result) {
        $GLOBALS['PICKUPDATE_FORMAT'] = date("d.m.Y", strtotime($GLOBALS['PICKUPDATE']));
        if ($GLOBALS['EMAIL'] != '') {
            EMAIL_VOM($GLOBALS['ORDERNO'], $GLOBALS['PICKUPDATE_FORMAT'], $GLOBALS['HOUR'], $GLOBALS['MINUTE'], $GLOBALS['PRICE']);
//	    }
        }

        if ($GLOBALS['sms_web_vom'] == '1') {
            $SMSZUM = new SMS;
            $SMSZUM->SMS_SEND($GLOBALS['confirm_code']);
        }
    } else {
        echo "ERROR222";
        return;
    }
    if ($GLOBALS['WITHRETURN'] == '1') {



        $GLOBALS['DEPARTURE'] = "";
        $GLOBALS['FLIGHTNUMBER'] = "";

        $GLOBALS['ORDERNORETURN'] = $GLOBALS['ORDERNO'] . 'R';
        $GLOBALS['confirm_codereturn'] = md5($GLOBALS['ORDERNORETURN']);

        $result = $GLOBALS['MYSQLI']->query("INSERT INTO `orders` (order_no, confirm_code, order_date, customer_ip, customer_no, pick_up_date, pick_up_time, pickup, salutation, name, surname, city, zip, street, house_number, phone, email, car_type, passengers, booster_seat, child_seat,  carrycot, suitcase, hand_luggage, additional_address, aa1_zip, aa1_street, aa1_house_number, aa2_zip, aa2_street, aa2_house_number, aa3_zip, aa3_street, aa3_house_number, payment, note, price, cancellation,  confirmed, paid,km,min,flight_departure,flight_number)
      VALUES ('" . $GLOBALS['ORDERNORETURN'] . "', '" . $GLOBALS['confirm_codereturn'] . "', '" . $GLOBALS['order_date'] . "', '" . $GLOBALS['customer_ip'] . "', '" . $GLOBALS['CUSTOMERNO'] . "', '" . $GLOBALS['PICKUPDATERETURN'] . "', '" . $GLOBALS['PICKUPTIMERETURN'] . "', 'ZUM', '" . $GLOBALS['SALUTATION'] . "', '" . $GLOBALS['NAME'] . "', '" . $GLOBALS['SURNAME'] . "', '" . $GLOBALS['CITY_ID'] . "', '" . $GLOBALS['ZIP_ID'] . "', '" . $GLOBALS['STREET_ID'] . "', '" . $GLOBALS['HOUSENUMBER'] . "', '" . $GLOBALS['PHONE'] . "', '" . $GLOBALS['EMAIL'] . "', '" . $GLOBALS['CAR_TYPE'] . "', '" . $GLOBALS['PASSENGER'] . "', '" . $GLOBALS['BOOSTERSEAT'] . "', '" . $GLOBALS['CHILDSEAT'] . "', '" . $GLOBALS['CARRYCOT'] . "', '" . $GLOBALS['SUITCASE'] . "', '" . $GLOBALS['HANDLUGGAGE'] . "', '" . $GLOBALS['ADDADDRESS'] . "', '" . $GLOBALS['ADD1ZIP'] . "', '" . $GLOBALS['ADD1STREET'] . "', '" . $GLOBALS['ADD1HOUSENUMBER'] . "', '" . $GLOBALS['ADD2ZIP'] . "', '" . $GLOBALS['ADD2STREET'] . "', '" . $GLOBALS['ADD2HOUSENUMBER'] . "', '" . $GLOBALS['ADD3ZIP'] . "', '" . $GLOBALS['ADD3STREET'] . "', '" . $GLOBALS['ADD3HOUSENUMBER'] . "', '" . $GLOBALS['PAYMENT'] . "', '" . $GLOBALS['NOTE'] . "', '" . $GLOBALS['PRICERETURN'] . "', '0', '0', '0', '" . $GLOBALS['KM'] . "', '" . $GLOBALS['MIN'] . "','" . $GLOBALS['DEPARTURE'] . "','" . $GLOBALS['FLIGHTNUMBER'] . "') ");
        if ($result) {
            $GLOBALS['PICKUPDATERETURN_FORMAT'] = date("d.m.Y", strtotime($GLOBALS['PICKUPDATERETURN']));
            if ($GLOBALS['EMAIL'] != '') {
//		if ($GLOBALS['ORDER']->EMAILSENDEN == '1') {

                EMAIL_ZUM($GLOBALS['ORDERNORETURN'], $GLOBALS['PICKUPDATERETURN_FORMAT'], $GLOBALS['HOURRETURN'], $GLOBALS['MINUTERETURN'], $GLOBALS['PRICERETURN']);
//		}
            }

        if ($GLOBALS['sms_web_zum'] == '1') {
            $SMSZUM = new SMS;
            $SMSZUM->SMS_SEND($GLOBALS['confirm_codereturn']);
        }
        } else {
            echo "ERROR333";
            return;
        }
    }
}

function INSERT_AB() {


    $GLOBALS['abholadresse'] = isset($_POST['abholadresse']) ? $_POST['abholadresse'] : null;


    if ($GLOBALS['abholadresse'] && $GLOBALS['abholadresse'] != '') {

        $pickupdate = $_POST['pickupdate'];
        $hour = $_POST['hour'];
        $minute = $_POST['minute'];

        $abholadresse = $_POST['abholadresse'];
        $zieladresse = $_POST['zieladresse'];
        $addaddress = $_POST['addaddress'];
        $zusatzadresse1 = $_POST['zusatzadresse1'];
        $zusatzadresse2 = $_POST['zusatzadresse2'];
        $zusatzadresse3 = $_POST['zusatzadresse3'];
        $passengers = $_POST['passengers'];
        $suitcase = $_POST['suitcase'];
        $handlugage = $_POST['handlugage'];
        $boosterseat = $_POST['boosterseat'];
        $childseat = $_POST['childseat'];
        $carrycot = $_POST['carrycot'];
        $payment = $_POST['payment'];
        $salutation = $_POST['salutation'];
        $name = $_POST['name'];
        $surname = $_POST['surname'];
        $phone = $_POST['phone'];
        $email = $_POST['email'];
        $note = $_POST['note'];
        $rueckfahrt = $_POST['rueckfahrt'];
        $pickupdatereturn = $_POST['pickupdatereturn'];
        $hourreturn = $_POST['hourreturn'];
        $minutereturn = $_POST['minutereturn'];
        $price = $_POST['price'];
        $pricereturn = $_POST['pricereturn'];
        $km = $_POST['km'];
        $min = $_POST['min'];






        if ($addaddress == 'none') {
            $addaddress = '0';
        }
        if ($suitcase == 'none') {
            $suitcase = '0';
        }
        if ($handlugage == 'none') {
            $handlugage = '0';
        }
        if ($boosterseat == 'none') {
            $boosterseat = '0';
        }
        if ($childseat == 'none') {
            $childseat = '0';
        }
        if ($carrycot == 'none') {
            $carrycot = '0';
        }
        $carrycot = '0';

        $price = number_format((float) $price, 2, '.', '');
        $pricereturn = number_format((float) $pricereturn, 2, '.', '');


        $pickupdateSQL = date("Y-m-d", strtotime($pickupdate));
        $pickuptimeSQL = $hour . ':' . $minute . ':00';
        $pickup = 'AB';


        $result = $GLOBALS['MYSQLI']->query("SELECT car FROM car WHERE personen = '" . $passengers . "' AND koffer = '" . $suitcase . "' AND handgepaeck = '" . $handlugage . "'");
        if ($result->num_rows > 0) {
            $car_type = $result->fetch_object()->car;
        } else {
            $car_type = "?";
        }


        setlocale(LC_TIME, 'de_DE', 'deu_deu');
        $datum = $pickupdate;
        $time = strtotime($datum);
        $month = date("Y-m", $time);


        $rand = random_string(8);
        $order_no = $GLOBALS['order_number_prefix_web'] . $rand;

        $confirm_code = md5($order_no);
        $order_date = date('Y-m-d H:i:s');
        if (!empty($_SERVER["HTTP_CLIENT_IP"])) {
            $customer_ip = $_SERVER["HTTP_CLIENT_IP"];
        } elseif (!empty($_SERVER["HTTP_X_FORWARDED_FOR"])) {
            $customer_ip = $_SERVER["HTTP_X_FORWARDED_FOR"];
        } else {
            $customer_ip = $_SERVER["REMOTE_ADDR"];
        }


        $result = $GLOBALS['MYSQLI']->query("SELECT customer_no FROM customers WHERE email = '{$email}'");

        $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
        if ($row) {
            $result = $GLOBALS['MYSQLI']->query("SELECT customer_no FROM customers WHERE email = '{$email}'");
            $row = mysqli_fetch_assoc($result);
            $customer_no = $row['customer_no'];
        } else {
            $customer_no = random_string(6);
            $pin = random_string(4);
            $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");
            $GLOBALS['MYSQLI']->query("INSERT INTO `customers` (customer_no, pin, salutation, name, surname, email, phone)
      VALUES ('$customer_no', '$pin', '$salutation', '$name', '$surname', '$email', '$phone')");
        }


        if ($addaddress >= '1') {
            $zusatz1 = $zusatzadresse1;
        } else {
            $zusatz1 = '';
        }
        if ($addaddress >= '2') {
            $zusatz2 = $zusatzadresse2;
        } else {
            $zusatz2 = '';
        }
        if ($addaddress >= '3') {
            $zusatz3 = $zusatzadresse3;
        } else {
            $zusatz3 = '';
        }
        if ($addaddress >= '0') {
            $zusatz1 = '';
            $zusatz2 = '';
            $zusatz3 = '';
        }

        $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");

        $result = $GLOBALS['MYSQLI']->query("INSERT INTO `orders` (order_no, confirm_code, order_date, customer_ip, customer_no, pick_up_date, pick_up_time, pickup, salutation, name, surname,  phone, email, car_type, passengers, booster_seat, child_seat,  carrycot, suitcase, hand_luggage, additional_address, payment, note, price, cancellation,  confirmed, paid,start_adresse, ziel_adresse, zusatzziel1, zusatzziel2, zusatzziel3)
      VALUES ('$order_no', '$confirm_code', '$order_date', '$customer_ip', '$customer_no', '$pickupdateSQL', '$pickuptimeSQL', '$pickup', '$salutation', '$name', '$surname', '$phone', '$email', '$car_type', '$passengers', '$boosterseat', '$childseat', '$carrycot', '$suitcase', '$handlugage', '$addaddress', '$payment', '$note', '$price', '0', '0', '0', '$abholadresse', '$zieladresse', '$zusatz1', '$zusatz2', '$zusatz3') ");


        if ($result) {
            $insertzum = "OK";
            SEND_SMS_AB($order_no, $pickupdate, $hour, $minute, $price);
        } else {
            $insertzum = "ERROR666";
        }


        if ($rueckfahrt == '1') {



            $order_noR = $order_no . '-R';
            $confirm_codeR = md5($order_noR);

            $pickupdateSQL = date("Y-m-d", strtotime($pickupdatereturn));
            $pickuptimeSQL = $hourreturn . ':' . $minutereturn . ':00';
            $pickup = 'AB';
            //$return_price = $price + 3;
//	    $priceQ = $pricereturn;
            //$price = str_replace(',', '.', $return_price);






            $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");

            $result = $GLOBALS['MYSQLI']->query("INSERT INTO `orders` (order_no, confirm_code, order_date, customer_ip, customer_no, pick_up_date, pick_up_time, pickup, salutation, name, surname,  phone, email, car_type, passengers, booster_seat, child_seat,  carrycot, suitcase, hand_luggage, additional_address, payment, note, price, cancellation,  confirmed, paid,start_adresse, ziel_adresse, zusatzziel1, zusatzziel2, zusatzziel3)
      VALUES ('$order_noR', '$confirm_codeR', '$order_date', '$customer_ip', '$customer_no', '$pickupdateSQL', '$pickuptimeSQL', '$pickup', '$salutation', '$name', '$surname', '$phone', '$email', '$car_type', '$passengers', '$boosterseat', '$childseat', '$carrycot', '$suitcase', '$handlugage', '$addaddress', '$payment', '$note', '$pricereturn', '0','0', '0', '$zieladresse', '$abholadresse', '$zusatz1', '$zusatz2', '$zusatz3') ");


            if ($result) {
                $insertvom = "OK";
                SEND_SMS_AB($order_noR, $pickupdatereturn, $hourreturn, $minutereturn, $pricereturn);
            } else {
                $insertvom = "ERROR777";
            }
        }



        if ($rueckfahrt == '1') {
            if ($insertzum == 'OK' && $insertvom == 'OK') {
                $success = "OK";
            }
        } elseif ($rueckfahrt == '0') {
            if ($insertzum == 'OK') {
                $success = "OK";
            }
        } else {
            $success = 'ERROR3';
        }

//        $result = $GLOBALS['MYSQLI']->query("SELECT name FROM payment WHERE id = '" . $payment . "' ");
//        $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
//        $GLOBALS['PAYMENT_EMAIL'] = $row['name'];



        $priceM = str_replace('.', ',', $price);
        $pricereturnM = str_replace('.', ',', $pricereturn);


        if ($addaddress >= '1') {
            $aa1 = '<tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Zusatzadresse 1:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	     ' . $zusatz1 . '   </td>
                                      </tr>';
            $aa2 = '';
            $aa3 = '';
        }

        if ($addaddress >= '2') {

            $aa2 = '<tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Zusatzadresse 2:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	  ' . $zusatz2 . '   </td>
                                      </tr>';
            $aa3 = '';
        }

        if ($addaddress >= '3') {
            $aa3 = '<tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Zusatzadresse 3:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	  ' . $zusatz3 . '   </td></tr>';
        }
        if ($addaddress == '0' || $addaddress == '') {
            $aa1 = '';
            $aa2 = '';
            $aa3 = '';
        }


        $to = $email; // note the comma

$subject = '' . $GLOBALS['sitename'] . ' - Bestellbestätigung';

        $message = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>AIRPORT DRIVER TAXI - Flughafentaxi Wien - Bestätigung</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
   <!--[if !mso]><!-->
<link href="https://www.airportdriver-taxi.at/email/email-font.css" rel="stylesheet" type="text/css">

<style type="text/css">
  @font-face {
    font-family: Roboto;
    src: url(https://www.airportdriver-taxi.at/email/Roboto-Regular-webfont.eot);
    src: url(https://www.airportdriver-taxi.at/email/Roboto-Regular-webfont.eot?#iefix) format(embedded-opentype),
    url(https://www.airportdriver-taxi.at/email/Roboto-Regular-webfont.woff) format(woff),
    url(https://www.airportdriver-taxi.at/email/Roboto-Regular-webfont.ttf) format(truetype),
    url(https://www.airportdriver-taxi.at/email/Roboto-Regular-webfont.svg#robotoregular) format(svg);
    font-weight: 400;
    font-style: normal;
  }

  @font-face {
    font-family: RobotoBold;
    src: url(https://www.airportdriver-taxi.at/email/Roboto-Bold-webfont.eot);
    src: url(https://www.airportdriver-taxi.at/email/Roboto-Bold-webfont.eot?#iefix) format(embedded-opentype),
    url(https://www.airportdriver-taxi.at/email/Roboto-Bold-webfont.woff) format(woff),
    url(https://www.airportdriver-taxi.at/email/Roboto-Bold-webfont.ttf) format(truetype),
    url(https://www.airportdriver-taxi.at/email/Roboto-Bold-webfont.svg#robotobold) format(svg);
    font-weight: 700;
    font-style: normal;
  }

  @import url(https://www.airportdriver-taxi.at/email/email-font1.css);
</style>
<!--<![endif]-->

<!--[if mso]>
<style>body,table tr,table td,a, span {  font-family:Arial, Helvetica, sans-serif !important;  }</style>
<![endif]-->
<style type="text/css">
  /* Standard CSS */

  a[x-apple-data-detectors] {
    color: inherit !important;
    text-decoration: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
  }

  a {
    text-decoration: none;
  }

  * {
    -webkit-text-size-adjust: none;
  }

  body {
    margin: 0 auto !important;
    padding: 0px !important;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
  }

  html,
  body {
    margin: 0px;
    padding: 0px !important;
  }

  table,
  td,
  th {
    border-collapse: collapse;
    border-spacing: 0px;
    mso-table-lspace: 0pt;
    mso-table-rspace: 0pt;
  }

  div,
  p,
  a,
  li,
  td {
    -webkit-text-size-adjust: none;
  }

  * {
    -webkit-text-size-adjust: none;
  }

  img {
    display: block !important;
  }

  .ReadMsgBody {
    width: 100%;
  }

  .ExternalClass p,
  .ExternalClass span,
  .ExternalClass font,
  .ExternalClass td,
  .ExternalClass div {
    line-height: 100%;
    margin: 0px;
    padding: 0px;
  }

  .ExternalClass {
    width: 100%;
  }

  span.MsoHyperlink {
    mso-style-priority: 99;
    color: inherit;
  }

  span.MsoHyperlinkFollowed {
    mso-style-priority: 99;
    color: inherit;
  }

  .nav .yshortcuts {
    color: #666666
  }

  .blacklink .yshortcuts {
    color: #010101
  }

  .graylink .yshortcuts {
    color: #999999
  }

  .stay-black a {
    color: #010101 !important;
  }

  .footerLink {
    color: #555555 !important;
    text-decoration: none !important;
  }

  .footerLink a {
    color: #555555 !important;
    text-decoration: none !important;
  }

  .mob-br {
    display: none;
  }

  div,
  button {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }

  /* Responsive CSS */

  @media screen and (max-width: 600px) and (min-width: 480px) {
    .scale {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 600px !important;
      height: auto !important;
      max-height: none !important;
    }
  }

  @media (max-width: 590px) {
    .trust-text {
      font-size: 12px !important;
      line-height: 14px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 560px) {
    .trust-text {
      font-size: 11px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 540px) {
    .trust-text {
      font-size: 10px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 520px) {
    .trust-text {
      font-size: 9px !important;
      line-height: 11px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 480px) {
    .scale {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 480px !important;
      height: auto !important;
      max-height: none !important;
    }
    .stack {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      float: left !important;
      display: block !important;
      padding: 0px 0px 0px 0px !important;
    }
    .stack-nrb {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      float: left !important;
      display: block !important;
      padding: 0px 0px 0px 0px !important;
      border-right: none !important;
    }
    .center-stack {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      float: left !important;
      display: block !important;
      padding: 10px 0px 0px 0px !important;
    }
    .center-cta {
      margin: 0px auto !important;
      text-align: center !important;
    }
    .reverse-stack-top {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      display: table-header-group !important;
      padding: 0px 0px 0px 0px !important;
      border: none !important;
    }
    .reverse-stack-bottom {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      display: table-footer-group !important;
      padding: 0px 0px 0px 0px !important;
      border: none !important;
    }

    .pad-top {
      padding: 0px 0px 20px 0px !important;
    }
    .pad-top2 {
      padding: 0px 0px 5px 0px !important;
    }
    .stack-pad {
      padding: 0px 0px 0px 0px !important;
    }
    .logo {
      padding: 30px 0px 25px 0px !important
    }
    .prod-img {
      width: 100% !important;
      max-width: 100px !important;
    }

    .hide {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .headline {
      font-size: 26px !important;
      line-height: 28px !important;
      padding: 0px 0px 20px 0px !important;
    }
    .headline-no-pad {
      font-size: 26px !important;
      line-height: 28px !important;
      padding: 0px 0px 0px 0px !important;
    }

    .copy {
      padding: 0px 15px 20px 15px !important;
      text-align: center !important;
    }
    .copy2 {
      padding: 0px 15px 7px 15px !important;
      text-align: center !important;
    }
    .copy3 {
      padding: 10px 15px 10px 15px !important;
      text-align: center !important;
    }

    .ship-text {
      padding: 10px 0px 10px 0px !important;
      font-size: 11px !important;
      line-height: 110% !important;
      letter-spacing: 1px !important;
    }
    .contact-pad {
      padding: 20px 0px 20px 0px !important;
    }
    .contact-text {
      font-size: 12px !important;
      line-height: 120% !important;
    }
    .trust-pad {
      padding: 14px 5px !important;
    }

    /* Custom CSS */
    .mob-br {
      display: block !important;
    }
    .pr {
      padding: 0px 0px 0px 0px !important;
    }

    .trust-text {
      font-size: 11px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }

    /* Autoship Created Order Summary Styles */
    .summary-outer {

      padding: 0px 10px 30px 10px !important;
      width: 100% !important;
    }
    .summary-headline {
      text-align: center !important;
    }
    .summary-info {
      text-align: center !important;
      padding: 0px !important;
    }
    .summary-inner-pad {
      padding: 20px 20px 20px 20px !important;
      width: 100% !important;
    }
    .summary-cta {
      margin: 0px auto !important;
      text-align: center !important;
      padding: 5px 0px 0px 0px !important;
    }

    /* Order Confirmation Summary Styles */
    .order-outer {
      padding: 0px 10px 30px 10px !important;
      width: 100% !important;
    }
    .order-headline {
      text-align: center !important;
    }
    .order-inner-pad-top {
      padding: 20px 20px 10px 20px !important;
      width: 100% !important;
    }
    .order-inner-pad-btm {
      padding: 20px 20px 25px 20px !important;
      width: 100% !important;
    }
    .order-center {
      text-align: center !important;
      padding: 0px !important;
    }
    .order-info {
      text-align: center !important;
      font-size: 12px !important;
    }
    .order-text {
      text-align: center !important;
      padding-bottom: 12px !important;
      line-height: 22px !important;
      font-size: 12px !important;
    }
    .order-save {
      text-align: center !important;
      padding: 0px !important;
    }

    /* Autoship Reminder Summary Styles */
    .remind-outer {
      padding: 0px 10px 30px 10px !important;
      width: 100% !important;
    }
    .remind-headline {
      text-align: center !important;
    }
    .remind-inner-pad-top {
      padding: 20px 20px 15px 20px !important;
      width: 100% !important;
    }
    .remind-inner-pad-btm {
      padding: 20px 20px 15px 20px !important;
      width: 100% !important;
    }
    .remind-center {
      text-align: center !important;
      padding: 0px !important;
    }
    .remind-info {
      text-align: center !important;
      font-size: 12px !important;
    }
    .remind-text {
      text-align: center !important;
      padding-bottom: 12px !important;
      line-height: 22px !important;
      font-size: 12px !important;
    }
    .remind-save {
      text-align: center !important;
      padding: 0px !important;
    }
    .remind-copy {
      text-align: center !important;
      padding: 0px 0px 15px 0px !important;
      font-size: 12px !important;
    }
    .remind-date {
      padding: 20px 20px 25px 20px !important;
    }

    /* Total Styles */
    .total-info {
      font-size: 12px !important;
      padding: 0px 0px 8px 0px !important;
    }
    .total-outer {
      padding: 25px 25px 22px 0px !important;
    }

    /* Product List Without Price Styles */
    .no-price-outer {
      padding: 0px 10px 0px 10px !important;
    }
    .no-price-prod {
      padding: 0px 20px 0px 20px !important;
      text-align: center !important;
    }
    .no-price-qty {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .no-price-img {
      width: 100% !important;
      max-width: 115px !important;
      min-width: 90px !important
    }
    .no-price-text {
      font-size: 12px !important;
      line-height: 19px !important;
      padding: 0px 10px 0px 0px !important;
    }
    .no-price-col1 {
      width: 35% !important;
    }
    .no-price-col2 {
      width: 50% !important;
    }
    .no-price-col3 {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .no-price-auto {
      width: 100px !important;
      min-width: 150px !important;
      max-width: 218px !important;
    }
    .hiddenQTY {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 15px 0px 0px 0px !important
    }

    /* Product Loop Styles */
    .loop-outer {
      padding: 0px 10px 0px 10px !important;
    }
    .loop-prod {
      padding: 0px 20px 0px 20px !important;
      text-align: center !important;
    }
    .loop-qty,
    .loop-price {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .loop-img {
      width: 100% !important;
      max-width: 115px !important;
      min-width: 90px !important
    }
    .loop-text {
      font-size: 12px !important;
      line-height: 19px !important;
      padding: 0px 10px 0px 0px !important;
    }
    .loop-col1 {
      width: 35% !important;
    }
    .loop-col2 {
      width: 50% !important;
    }
    .loop-col3,
    .loop-col4 {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .loop-auto {
      width: 100px !important;

      min-width: 150px !important;
      max-width: 218px !important;
    }
    .loopQTY {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 15px 0px 3px 0px !important
    }
    .loopPRI {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 5px 0px 20px 0px !important
    }

    /* Release Loop Styles */
    .rel-loop-outer {
      padding: 0px 10px 0px 10px !important;
    }
    .rel-loop-prod {
      padding: 0px 20px 0px 20px !important;
      text-align: center !important;
    }
    .rel-loop-qty,
    .rel-loop-price {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .rel-loop-img {
      width: 100% !important;
      max-width: 115px !important;
      min-width: 90px !important
    }
    .rel-loop-text {
      font-size: 12px !important;
      line-height: 19px !important;
      padding: 0px 10px 0px 0px !important;
    }
    .rel-loop-col1 {
      width: 35% !important;
    }
    .rel-loop-col2 {
      width: 50% !important;
    }
    .rel-loop-col3,
    .rel-loop-col4 {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .rel-loop-auto {
      width: 100px !important;
      min-width: 150px !important;
      max-width: 218px !important;
    }
    .rel-loopQTY {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 15px 0px 3px 0px !important
    }
    .rel-loopPRI {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 5px 0px 20px 0px !important
    }

    .app-text {
      padding: 25px 0px 10px 0px !important;
    }
    .app-btn-outer {
      padding: 26px 0px 5px 0px !important;
    }
    .cta1-pad {
      padding: 0px 0px 20px 0px !important;
    }
    .cta2-pad {
      padding: 0px 0px 10px 0px !important;
    }
    .cta3-pad {
      padding: 0px 0px 35px 0px !important;
    }
    .ship-anim {
      padding: 0px 0px 25px 0px !important;
    }
  }

  @media (max-width: 420px) {
    .trust-text {
      font-size: 10px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }
    .trust-icon-1 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 40px !important;
      height: auto !important;
      max-height: none !important;
    }
    .trust-icon-2 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 44px !important;
      height: auto !important;
      max-height: none !important;
    }
  }

  @media (max-width: 400px) {
    .trust-pad {
      padding: 8px 0px !important;
    }
    .mob-br-400 {
      display: block !important;
    }
  }

  @media (max-width: 380px) {
    .trust-text {
      font-size: 9px !important;
      line-height: 11px !important;
      padding: 4px 0px 0px 0px !important;
    }
    .trust-icon-1 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 36px !important;
      height: auto !important;
      max-height: none !important;
    }
    .trust-icon-2 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 41px !important;
      height: auto !important;
      max-height: none !important;
    }
  }

  @media (max-width: 350px) {
    .trust-text {
      font-size: 8px !important;
      line-height: 10px !important;
      padding: 4px 0px 0px 0px !important;
    }
  }
</style>
 </head>
    <body style="margin: 0; padding: 0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: #eeeeee;">
  <tr>
    <td width="100%" align="center" valign="top" style="background-color: #eeeeee; padding: 10px 0px 0px 0px;">

      <table style="min-width: 600px; width: 600px;" width="600" class="scale" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td style="background-color: #FFFFFF;" align="center" valign="top">

            <!-- CONTENT BEGIN -->

            <table align="center" border="0" cellpadding="0" cellspacing="0" style="min-width: 600px; width: 600px;" width="600" class="scale">
              <tr>
                <td valign="top" style="padding: 0px" class="pad-top2">

                  <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0" style="background-color: #ffffff; border-radius:5px;">

                    <tr>
                      <td align="center" style="padding: 45px 0px 40px 0px" class="logo">
                        <a href="https://www.airportdriver-taxi.at"
                          target="_blank" style="color:#128ced; text-decoration:none;outline:0;"><img style="display: block; margin: 0px auto;" src="https://www.airportdriver-taxi.at/email/logo-email.png" border="0" alt="AirportDriver" /></a>
                      </td>
                    </tr>

                    <tr>
                      <td align="center" style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 40px; mso-line-height-rule: exactly; color:#444444; text-align:center; line-height: 40px; padding: 0px 0px 25px 0px;" class="headline">
                        Bestätigung</td>
                    </tr>
                    <tr>
                      <td style="font-family:Roboto, Helvetica, Arial, sans-serif; color: #010101; font-size: 12px; mso-line-height-rule: exactly;  padding: 0px 50px 25px 50px;" class="copy">
                       Sehr geehrte Damen und Herren,<br /><br />
 vielen Dank für Ihre Bestellung, die wir Ihnen wie folgt bestätigen:<br />
<hr />
                      </td>
                    </tr>
                    <tr>
                      <td style="font-family:Roboto, Helvetica, Arial, sans-serif; color: #010101; font-size: 15px; mso-line-height-rule: exactly; line-height: 24px; padding: 0px 50px 5px 50px;" class="copy">

    <span style="float:left">Richtung A nach B</span>
    <span style="float:right">Bestellnummer: ' . $order_no . '</span>
                      </td>

                    </tr>


              <tr>
                <td valign="top" style="padding: 0px 20px 0px 20px;" class="remind-outer">

                  <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                      <td valign="top" style="background-color: #fafafa; border: 1px solid #e5e5e5;">

                        <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
                          <tr>
                            <th width="50%" valign="top" style="padding: 0px!important; border-right: 1px solid #e5e5e5; font-weight: normal; vertical-align: top;" class="stack-nrb">
                              <table align="center" width="100%" cellpadding="0" cellspacing="0" border="0" class="scale">
                                <tr>
                                  <td class="remind-inner-pad-top" style="padding:18px 18px 20px 20px; vertical-align: top;" valign="top">

                                    <table width="100%" cellpadding="0" cellspacing="0" border="0">
                                      <tr>
                                        <td width="100%" style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;"
                                          class="remind-headline">
                                          Fahrdaten:
                                        </td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Abholdatum und Uhrzeit:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px;" class="remind-info"> 	 ' . $pickupdate . ' - ' . $hour . ':' . $minute . ' </td>
                                      </tr>
                                              <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Abfahrt von:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	  ' . $abholadresse . '  </td>
                                      </tr>


' . $aa1 . ' ' . $aa2 . ' ' . $aa3 . '

                                       <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Reiseziel nach:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	  ' . $zieladresse . '   </td>
                                      </tr>
                                                  <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif;  font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Personen</strong>:  ' . $passengers . '</td>
                                      </tr>

                                                  <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif;  font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Koffer</strong>: ' . $suitcase . '</td>
                                      </tr>

                                                     <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif;  font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Handgepäck</strong>: ' . $handlugage . '</td>
                                      </tr>';
        if ($childseat >= '1') {
            $message .= '  <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Kindersitz</strong>: ' . $childseat . '</td>
                                      </tr>';
        }
        if ($boosterseat >= '1') {
            $message .= '                         <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Sitzerhöhung</strong>: ' . $boosterseat . '</td>
                                      </tr>';
        }

        if ($carrycot >= '1') {
            $message .= '        <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Babyschale</strong>: ' . $carrycot . '</td>
                                      </tr>';
        }
        $message .= '</table>

	    </td>
	    </tr>
	    </table>
	    </th>
	    <th width = "50%" valign = "top" style = "padding: 0px!important; font-weight: normal; vertical-align: top;" class = "stack">
	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0" class = "scale">
	    <tr>
	    <td class = "remind-inner-pad-btm" style = "padding:18px 18px 20px 20px; vertical-align: top;" valign = "top" align = "center">

	    <table cellpadding = "0" cellspacing = "0" border = "0" width = "100%">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;" class = "remind-headline">Kontaktinformationen:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">
	     ' . $salutation . ' ' . $name . ' ' . $surname . '
	    </td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">
	    ' . $email . '</td>
	    </tr>

	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px;" class = "remind-info">
	    ' . $phone . '</td>
	    </tr>
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">Zahlungsweise:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">  ' . $GLOBALS['PAYMENT'] . ' </td>
	    </tr>
	    </table>

	    </td>


	    </tr>
	    <tr>
	    <td class = "remind-inner-pad-btm" style = "padding:18px 18px 20px 20px; vertical-align: top;" valign = "top" align = "center">

	    <table cellpadding = "0" cellspacing = "0" border = "0" width = "100%">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;" class = "remind-headline">Preis:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">
	     ' . $priceM . ' EUR
	    </td>
	    </tr>


	    </table>

	    </td>


	    </tr>';
        if ($note != '') {
            $message .= '	    <tr>
	    <td class = "remind-inner-pad-btm" style = "padding:18px 18px 20px 20px; vertical-align: top;" valign = "top" align = "center">

	    <table cellpadding = "0" cellspacing = "0" border = "0" width = "100%">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;" class = "remind-headline">Anmerkung:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">' . $note . '</td>
	    </tr>


	    </table>

	    </td>


	    </tr>';
        }
        $message .= '  </table>
	    </th>
	    </tr>

	    </table>

	    </td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: center;background-color: #fafafa; border: 1px solid #e5e5e5;" class = "remind-info">
	    Die Route ist ' . $km . ' Km lang und dauert ca. ' . $min . ' Minuten
	    </td></tr>
	    </table>

	    </td>
	    </tr>

	    <tr>
	    <td valign = "top" style = "padding: 0px 20px 0px 20px;" class = "loop-outer">

	    <table style = "min-width: 560px; width: 560px;" width = "560" class = "scale" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td width = "50%" style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">

	    Ihre Kundennummer

	    </td>
	    <td class = "loop-qty" width = "50%" style = "font-family:Roboto, Helvetica, Arial, sans-serif; color: #333333; font-size: 14px; text-align: right;">
	    ' . $customer_no . '
	    </td>

	    </tr>
	    </table>

	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>


	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 18px;  color:#010101; padding: 0px 20px 25px 20px; text-align: center;">
	    Wichtige Informationen!
	    </td>
	    </tr>
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">

	    - Bitten wir alle Kunden, welche vom Flughafen anreisen, Treffpunkt mit dem jeweiligen Fahrer bei Flughafen-Airport Information. Vielen Dank für das Verständnis. <a href = "' . $GLOBALS['TREFFPUNKT_URL'] . '">mehr Info</a>

	    </td>


	    </tr>
	    </table>

	    </td>
	    </tr>
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">
	    - Fahrten, die bis 22.00 Uhr am selben Tag stattfinden sollen, mindestens 4 Stunden vorher reservieren.

	    </td>


	    </tr>
	    </table>

	    </td>
	    </tr>
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">
	    - Fahrten, die zwischen 22.00 und 6.00 stattfinden sollen, mindestens 10 Stunden vorher reservieren.

	    </td>


	    </tr>
	    </table>

	    </td>
	    </tr>
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">
	    - Im Falle zu später Reservierung können wir die Verfügbarkeit eines Wagens - trotz automatischer Bestätigung über Internet - nicht garantieren.

	    </td>


	    </tr>
	    </table>

	    </td>
	    </tr>
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">
	    - Lieber Kunde, Bitte machen sie keine Bestellung beim Fahrer da es vielleicht zu falschen Angaben führen kann und wir nicht für unsere Zuverlässigkeit garantieren können.

	    </td>


	    </tr>
	    </table>

	    </td>
	    </tr>




	    </table>

	    </td>
	    </tr>

	    <tr>
	    <td bgcolor = "#eeeeee" style = "height: 15px; line-height: 15px; mso-line-height: 15px;">&nbsp;

	    </td>
	    </tr>
	    <tr>
	    <td valign = "top">
	    <table align = "center" border = "0" cellpadding = "0" cellspacing = "0" style = "min-width: 600px; width: 600px;" width = "600" class = "scale">
	    <tr>
	    <td valign = "top">

	    <table border = "0" cellpadding = "0" cellspacing = "0" style = "min-width: 600px; width: 600px; background-color: #128ced;" width = "600" class = "scale">
	    <tr>
	    <td width = "100%" align = "center" valign = "middle" style = "vertical-align: middle;">
	    <table cellpadding = "0" cellspacing = "0" border = "0" style = "margin: 0px auto;">
	    <tr>
	    <td style = "padding: 23px 0px 25px 0px;" class = "contact-pad" align = "center">
	    <table cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family: Roboto, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; color: #ffffff!important; text-align: center;" class = "contact-text" align = "center"><a style = "text-decoration: none; color: #ffffff;" href = "tel:' . $GLOBALS['company_phone'] . '"
	    target = "_blank" rilt = "ContactUs_Text">Notfallnummer <span style = "font-family: RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700;"><a style="color:#fff;" href ="tel:' . $GLOBALS['company_phone'] . '">' . $GLOBALS['company_phone'] . '</a></span> <span class = "mob-br"></span> oder antworten Sie auf diese E-Mail</a></td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>

	    </td>
	    </tr>
	    <tr>
	    <td valign = "top" style = "background-color: #FFFFFF;">
	    <table cellpadding = "0" cellspacing = "0" style = "width:100%; border-collapse:collapse" border = "0">
	    <tr>
	    <td width = "25%" align = "center" valign = "bottom" style = "border-right:1px solid #EBEBEB; padding: 20px; vertical-align: bottom;" class = "trust-pad">
	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "vertical-align:bottom; text-align: center;" align = "center"><a href = "' . $GLOBALS['anfrage_url'] . '"
	    target = "_blank" style = "text-decoration: none;"><img style = "display: block; font-size: 8px; width: 58px; max-width: 58px; height: auto; max-height: none; margin: 0px auto;" src = "https://www.airportdriver-taxi.at/email/anfrage-icon.png" width = "58" height = "50" border = "0" class = "trust-icon-2"></a></td>
	    </tr>
	    <tr>
	    <td style = "text-align: center; color:#444444!important; font-size:12px; font-family:Roboto, Helvetica, Arial,sans-serif!important; padding: 5px 0px 0px 0px; mso-line-height-rule: exactly; line-height: 12px;" align = "center" class = "trust-text"><a href = "' . $GLOBALS['anfrage_url'] . '"
	    target = "_blank" style = "color:#444444; text-decoration:none">ANFRAGE</a></td>
	    </tr>
	    </table>
	    </td>
	    <td width = "25%" align = "center" valign = "bottom" style = "border-right:1px solid #EBEBEB; padding: 20px; vertical-align: bottom;" class = "trust-pad">
	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "vertical-align:bottom; text-align: center; padding: 12px 0px 0px 0px;"><a href = "' . $GLOBALS['rueckfahrt_url'] . '"
	    target = "_blank" style = "outline:0; text-decoration:none"><img style = "display: block; font-size: 8px; width: 54px; max-width: 54px; height: auto; max-height: none; margin: 0px auto;" src = "https://www.airportdriver-taxi.at/email/return-icon.png" width = "54" height = "37" border = "0" class = "trust-icon-1"></a></td>
	    </tr>
	    <tr>
	    <td style = "text-align: center; color:#444444!important; font-size:12px;  margin:0; font-family:Roboto, Helvetica, Arial,sans-serif!important; padding: 5px 0px 0px 0px; mso-line-height-rule: exactly; line-height: 12px;" align = "center" class = "trust-text"><a href = "' . $GLOBALS['rueckfahrt_url'] . '"
	    target = "_blank" style = "outline:0;color:#444444; text-decoration:none">
	    RÜCKFAHRT <br /> BESTELLEN</a></td>
	    </tr>
	    </table>
	    </td>
	    <td width = "25%" align = "center" valign = "bottom" style = "border-right:1px solid #EBEBEB; padding: 20px; vertical-align: bottom;" class = "trust-pad">
	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "vertical-align:bottom; text-align: center;"><a href = "' . $GLOBALS['meinung_url'] . '"
	    target = "_blank" style = "outline:0; text-decoration:none"><img style = "display: block; font-size: 8px; width: 50px; max-width: 50px; height: auto; max-height: none; margin: 0px auto;" src = "https://www.airportdriver-taxi.at/email/meinung-icon.png" width = "50" height = "50" border = "0" class = "trust-icon-1"></a></td>
	    </tr>
	    <tr>
	    <td style = "text-align: center; color:#444444!important; font-size:12px; margin:0; font-family:Roboto, Helvetica,Arial,sans-serif!important; padding: 5px 0px 0px 0px; mso-line-height-rule: exactly; line-height: 12px;" align = "center" class = "trust-text"><a href = "' . $GLOBALS['meinung_url'] . '"
	    target = "_blank" style = "outline:0;color:#444444; text-decoration:none">IHRE <br /> MEINUNG</a></td>
	    </tr>
	    </table>
	    </td>
	    <td width = "25%" align = "center" valign = "bottom" style = "padding: 20px; vertical-align: bottom;" class = "trust-pad">
	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "vertical-align:bottom; text-align: center;"><a href = "' . $GLOBALS['storno_url'] . '"
	    target = "_blank" style = "outline:0; text-decoration:none"><img style = "display: block; font-size: 8px; width: 58px; max-width: 58px; height: auto; max-height: none; margin: 0px auto;" src = "https://www.airportdriver-taxi.at/email/storno-icon.png" width = "58" height = "50" border = "0" class = "trust-icon-2"></a></td>
	    </tr>
	    <tr>
	    <td style = "text-align: center; color:#444444!important; font-size:12px; margin:0; font-family:Roboto, Helvetica, Arial,sans-serif!important; padding: 5px 0px 0px 0px; mso-line-height-rule: exactly; line-height: 12px;" align = "center" class = "trust-text"><a href = "' . $GLOBALS['storno_url'] . '"
	    target = "_blank" style = "outline:0;color:#444444; text-decoration:none">DIESE FAHRT <br /> STORNIEREN</a></td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    <tr>
	    <td valign = "top">
	    <table border = "0" cellpadding = "0" cellspacing = "0" style = "width: 100%;" width = "100%">
	    <tr>
	    <td style = "padding: 35px 0px 15px 0px;" valign = "top" align = "center" class = "app-btn-outer">

	    <table cellpadding = "0" cellspacing = "0" border = "0" style = "width: 318px;" width = "318">
	    <tr>
	    <th style = "font-weight: normal;" class = "stack" align = "center">
	    <a style = "text-decoration: none;" href = "' . $GLOBALS['ios_url'] . '"
	    target = "_blank"><img style = "display: block;" src = "https://www.airportdriver-taxi.at/email/app-store-v2.png" border = "0" alt = "App Store" /></a>
	    </th>
	    <th style = "font-weight: normal;" class = "stack" align = "center">
	    <a style = "text-decoration: none;" href = "' . $GLOBALS['android_url'] . '"
	    target = "_blank"><img style = "display: block;" src = "https://www.airportdriver-taxi.at/email/google-play-v2.png" border = "0" alt = "Google Play" /></a>
	    </th>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding:0 10px 0 10px;" class = "remind-info">

	    <p>AIRPORTDRIVER<br>FLUGHAFEN TRANSFER SERVICE UND LIMOUSINENSERVICE ZUM FIXPREIS<br>
	    WEB: ' . $GLOBALS['company_url'] . '<br>
	    E-Mail: ' . $GLOBALS['smtp_email'] . '<br>
	    Telefon: ' . $GLOBALS['company_phone'] . '
	    </p></td></tr>
	    <tr>
	    <td width = "100%" align = "center" style = "padding: 15px 0px 20px 0px;">
	    <table cellpadding = "0" cellspacing = "0" border = "0" style = "width: 100%;" width = "100%">
	    <tr>
	    <td style = "font-family:Roboto,Arial,sans-serif!important;font-size:13px;padding-left:10px;padding-bottom:10px;">
	    Vertraulichkeitserklärung
	    </td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto,Arial,sans-serif!important;font-size:10px;padding:0 10px 0 10px;">

	    Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind, oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte den Absender und löschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail und der darin enthaltenen Informationen sind nicht gestattet.
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>

	    </table>
	    </td>
	    </tr>
	    </table>

	    </td>
	    </tr>
	    </table>
	      </body>
</html>
';


        if ($success == 'OK') {
            if (!MAILTO($to, $subject, $message)) {
//		echo 'ERROR11';
                $emailzum = 'ERROR4';
            } else {
                MAILTO($GLOBALS['backup_fahrten_email'], "VAZNO! AIRPORT DRIVER " . $subject, $message);
//		echo 'OK';
                $emailzum = 'OK';
            }
        }
        //echo $success;



        if ($rueckfahrt == '1') {
            $to = $email; // note the comma

$subject = '' . $GLOBALS['sitename'] . ' - Bestellbestätigung';
            $message = ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>AIRPORT DRIVER TAXI - Flughafentaxi Wien - Bestätigung</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
   <!--[if !mso]><!-->
<link href="https://www.airportdriver-taxi.at/email/email-font.css" rel="stylesheet" type="text/css">

<style type="text/css">
  @font-face {
    font-family: Roboto;
    src: url(https://www.airportdriver-taxi.at/email/Roboto-Regular-webfont.eot);
    src: url(https://www.airportdriver-taxi.at/email/Roboto-Regular-webfont.eot?#iefix) format(embedded-opentype),
    url(https://www.airportdriver-taxi.at/email/Roboto-Regular-webfont.woff) format(woff),
    url(https://www.airportdriver-taxi.at/email/Roboto-Regular-webfont.ttf) format(truetype),
    url(https://www.airportdriver-taxi.at/email/Roboto-Regular-webfont.svg#robotoregular) format(svg);
    font-weight: 400;
    font-style: normal;
  }

  @font-face {
    font-family: RobotoBold;
    src: url(https://www.airportdriver-taxi.at/email/Roboto-Bold-webfont.eot);
    src: url(https://www.airportdriver-taxi.at/email/Roboto-Bold-webfont.eot?#iefix) format(embedded-opentype),
    url(https://www.airportdriver-taxi.at/email/Roboto-Bold-webfont.woff) format(woff),
    url(https://www.airportdriver-taxi.at/email/Roboto-Bold-webfont.ttf) format(truetype),
    url(https://www.airportdriver-taxi.at/email/Roboto-Bold-webfont.svg#robotobold) format(svg);
    font-weight: 700;
    font-style: normal;
  }

  @import url(https://www.airportdriver-taxi.at/email/email-font1.css);
</style>
<!--<![endif]-->

<!--[if mso]>
<style>body,table tr,table td,a, span {  font-family:Arial, Helvetica, sans-serif !important;  }</style>
<![endif]-->
<style type="text/css">
  /* Standard CSS */

  a[x-apple-data-detectors] {
    color: inherit !important;
    text-decoration: none !important;
    font-size: inherit !important;
    font-family: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
  }

  a {
    text-decoration: none;
  }

  * {
    -webkit-text-size-adjust: none;
  }

  body {
    margin: 0 auto !important;
    padding: 0px !important;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
  }

  html,
  body {
    margin: 0px;
    padding: 0px !important;
  }

  table,
  td,
  th {
    border-collapse: collapse;
    border-spacing: 0px;
    mso-table-lspace: 0pt;
    mso-table-rspace: 0pt;
  }

  div,
  p,
  a,
  li,
  td {
    -webkit-text-size-adjust: none;
  }

  * {
    -webkit-text-size-adjust: none;
  }

  img {
    display: block !important;
  }

  .ReadMsgBody {
    width: 100%;
  }

  .ExternalClass p,
  .ExternalClass span,
  .ExternalClass font,
  .ExternalClass td,
  .ExternalClass div {
    line-height: 100%;
    margin: 0px;
    padding: 0px;
  }

  .ExternalClass {
    width: 100%;
  }

  span.MsoHyperlink {
    mso-style-priority: 99;
    color: inherit;
  }

  span.MsoHyperlinkFollowed {
    mso-style-priority: 99;
    color: inherit;
  }

  .nav .yshortcuts {
    color: #666666
  }

  .blacklink .yshortcuts {
    color: #010101
  }

  .graylink .yshortcuts {
    color: #999999
  }

  .stay-black a {
    color: #010101 !important;
  }

  .footerLink {
    color: #555555 !important;
    text-decoration: none !important;
  }

  .footerLink a {
    color: #555555 !important;
    text-decoration: none !important;
  }

  .mob-br {
    display: none;
  }

  div,
  button {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
  }

  /* Responsive CSS */

  @media screen and (max-width: 600px) and (min-width: 480px) {
    .scale {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 600px !important;
      height: auto !important;
      max-height: none !important;
    }
  }

  @media (max-width: 590px) {
    .trust-text {
      font-size: 12px !important;
      line-height: 14px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 560px) {
    .trust-text {
      font-size: 11px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 540px) {
    .trust-text {
      font-size: 10px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 520px) {
    .trust-text {
      font-size: 9px !important;
      line-height: 11px !important;
      padding: 5px 0px 0px 0px !important;
    }
  }

  @media (max-width: 480px) {
    .scale {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 480px !important;
      height: auto !important;
      max-height: none !important;
    }
    .stack {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      float: left !important;
      display: block !important;
      padding: 0px 0px 0px 0px !important;
    }
    .stack-nrb {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      float: left !important;
      display: block !important;
      padding: 0px 0px 0px 0px !important;
      border-right: none !important;
    }
    .center-stack {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      float: left !important;
      display: block !important;
      padding: 10px 0px 0px 0px !important;
    }
    .center-cta {
      margin: 0px auto !important;
      text-align: center !important;
    }
    .reverse-stack-top {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      display: table-header-group !important;
      padding: 0px 0px 0px 0px !important;
      border: none !important;
    }
    .reverse-stack-bottom {
      width: 100% !important;
      max-width: 480px !important;
      height: auto !important;
      display: table-footer-group !important;
      padding: 0px 0px 0px 0px !important;
      border: none !important;
    }

    .pad-top {
      padding: 0px 0px 20px 0px !important;
    }
    .pad-top2 {
      padding: 0px 0px 5px 0px !important;
    }
    .stack-pad {
      padding: 0px 0px 0px 0px !important;
    }
    .logo {
      padding: 30px 0px 25px 0px !important
    }
    .prod-img {
      width: 100% !important;
      max-width: 100px !important;
    }

    .hide {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .headline {
      font-size: 26px !important;
      line-height: 28px !important;
      padding: 0px 0px 20px 0px !important;
    }
    .headline-no-pad {
      font-size: 26px !important;
      line-height: 28px !important;
      padding: 0px 0px 0px 0px !important;
    }

    .copy {
      padding: 0px 15px 20px 15px !important;
      text-align: center !important;
    }
    .copy2 {
      padding: 0px 15px 7px 15px !important;
      text-align: center !important;
    }
    .copy3 {
      padding: 10px 15px 10px 15px !important;
      text-align: center !important;
    }

    .ship-text {
      padding: 10px 0px 10px 0px !important;
      font-size: 11px !important;
      line-height: 110% !important;
      letter-spacing: 1px !important;
    }
    .contact-pad {
      padding: 20px 0px 20px 0px !important;
    }
    .contact-text {
      font-size: 12px !important;
      line-height: 120% !important;
    }
    .trust-pad {
      padding: 14px 5px !important;
    }

    /* Custom CSS */
    .mob-br {
      display: block !important;
    }
    .pr {
      padding: 0px 0px 0px 0px !important;
    }

    .trust-text {
      font-size: 11px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }

    /* Autoship Created Order Summary Styles */
    .summary-outer {

      padding: 0px 10px 30px 10px !important;
      width: 100% !important;
    }
    .summary-headline {
      text-align: center !important;
    }
    .summary-info {
      text-align: center !important;
      padding: 0px !important;
    }
    .summary-inner-pad {
      padding: 20px 20px 20px 20px !important;
      width: 100% !important;
    }
    .summary-cta {
      margin: 0px auto !important;
      text-align: center !important;
      padding: 5px 0px 0px 0px !important;
    }

    /* Order Confirmation Summary Styles */
    .order-outer {
      padding: 0px 10px 30px 10px !important;
      width: 100% !important;
    }
    .order-headline {
      text-align: center !important;
    }
    .order-inner-pad-top {
      padding: 20px 20px 10px 20px !important;
      width: 100% !important;
    }
    .order-inner-pad-btm {
      padding: 20px 20px 25px 20px !important;
      width: 100% !important;
    }
    .order-center {
      text-align: center !important;
      padding: 0px !important;
    }
    .order-info {
      text-align: center !important;
      font-size: 12px !important;
    }
    .order-text {
      text-align: center !important;
      padding-bottom: 12px !important;
      line-height: 22px !important;
      font-size: 12px !important;
    }
    .order-save {
      text-align: center !important;
      padding: 0px !important;
    }

    /* Autoship Reminder Summary Styles */
    .remind-outer {
      padding: 0px 10px 30px 10px !important;
      width: 100% !important;
    }
    .remind-headline {
      text-align: center !important;
    }
    .remind-inner-pad-top {
      padding: 20px 20px 15px 20px !important;
      width: 100% !important;
    }
    .remind-inner-pad-btm {
      padding: 20px 20px 15px 20px !important;
      width: 100% !important;
    }
    .remind-center {
      text-align: center !important;
      padding: 0px !important;
    }
    .remind-info {
      text-align: center !important;
      font-size: 12px !important;
    }
    .remind-text {
      text-align: center !important;
      padding-bottom: 12px !important;
      line-height: 22px !important;
      font-size: 12px !important;
    }
    .remind-save {
      text-align: center !important;
      padding: 0px !important;
    }
    .remind-copy {
      text-align: center !important;
      padding: 0px 0px 15px 0px !important;
      font-size: 12px !important;
    }
    .remind-date {
      padding: 20px 20px 25px 20px !important;
    }

    /* Total Styles */
    .total-info {
      font-size: 12px !important;
      padding: 0px 0px 8px 0px !important;
    }
    .total-outer {
      padding: 25px 25px 22px 0px !important;
    }

    /* Product List Without Price Styles */
    .no-price-outer {
      padding: 0px 10px 0px 10px !important;
    }
    .no-price-prod {
      padding: 0px 20px 0px 20px !important;
      text-align: center !important;
    }
    .no-price-qty {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .no-price-img {
      width: 100% !important;
      max-width: 115px !important;
      min-width: 90px !important
    }
    .no-price-text {
      font-size: 12px !important;
      line-height: 19px !important;
      padding: 0px 10px 0px 0px !important;
    }
    .no-price-col1 {
      width: 35% !important;
    }
    .no-price-col2 {
      width: 50% !important;
    }
    .no-price-col3 {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .no-price-auto {
      width: 100px !important;
      min-width: 150px !important;
      max-width: 218px !important;
    }
    .hiddenQTY {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 15px 0px 0px 0px !important
    }

    /* Product Loop Styles */
    .loop-outer {
      padding: 0px 10px 0px 10px !important;
    }
    .loop-prod {
      padding: 0px 20px 0px 20px !important;
      text-align: center !important;
    }
    .loop-qty,
    .loop-price {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .loop-img {
      width: 100% !important;
      max-width: 115px !important;
      min-width: 90px !important
    }
    .loop-text {
      font-size: 12px !important;
      line-height: 19px !important;
      padding: 0px 10px 0px 0px !important;
    }
    .loop-col1 {
      width: 35% !important;
    }
    .loop-col2 {
      width: 50% !important;
    }
    .loop-col3,
    .loop-col4 {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .loop-auto {
      width: 100px !important;

      min-width: 150px !important;
      max-width: 218px !important;
    }
    .loopQTY {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 15px 0px 3px 0px !important
    }
    .loopPRI {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 5px 0px 20px 0px !important
    }

    /* Release Loop Styles */
    .rel-loop-outer {
      padding: 0px 10px 0px 10px !important;
    }
    .rel-loop-prod {
      padding: 0px 20px 0px 20px !important;
      text-align: center !important;
    }
    .rel-loop-qty,
    .rel-loop-price {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px 0px 0px 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .rel-loop-img {
      width: 100% !important;
      max-width: 115px !important;
      min-width: 90px !important
    }
    .rel-loop-text {
      font-size: 12px !important;
      line-height: 19px !important;
      padding: 0px 10px 0px 0px !important;
    }
    .rel-loop-col1 {
      width: 35% !important;
    }
    .rel-loop-col2 {
      width: 50% !important;
    }
    .rel-loop-col3,
    .rel-loop-col4 {
      display: none !important;
      width: 0px !important;
      height: 0px !important;
      max-height: 0px !important;
      padding: 0px !important;
      overflow: hidden !important;
      font-size: 0px !important;
      line-height: 0px !important;
    }
    .rel-loop-auto {
      width: 100px !important;
      min-width: 150px !important;
      max-width: 218px !important;
    }
    .rel-loopQTY {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 15px 0px 3px 0px !important
    }
    .rel-loopPRI {
      display: block !important;
      font-family: Roboto, Arial !important;
      color: #010101 !important;
      font-size: 14px !important;
      overflow: visible !important;
      width: 100% !important;
      line-height: 12px !important;
      height: auto !important;
      max-height: auto !important;
      padding: 5px 0px 20px 0px !important
    }

    .app-text {
      padding: 25px 0px 10px 0px !important;
    }
    .app-btn-outer {
      padding: 26px 0px 5px 0px !important;
    }
    .cta1-pad {
      padding: 0px 0px 20px 0px !important;
    }
    .cta2-pad {
      padding: 0px 0px 10px 0px !important;
    }
    .cta3-pad {
      padding: 0px 0px 35px 0px !important;
    }
    .ship-anim {
      padding: 0px 0px 25px 0px !important;
    }
  }

  @media (max-width: 420px) {
    .trust-text {
      font-size: 10px !important;
      line-height: 12px !important;
      padding: 5px 0px 0px 0px !important;
    }
    .trust-icon-1 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 40px !important;
      height: auto !important;
      max-height: none !important;
    }
    .trust-icon-2 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 44px !important;
      height: auto !important;
      max-height: none !important;
    }
  }

  @media (max-width: 400px) {
    .trust-pad {
      padding: 8px 0px !important;
    }
    .mob-br-400 {
      display: block !important;
    }
  }

  @media (max-width: 380px) {
    .trust-text {
      font-size: 9px !important;
      line-height: 11px !important;
      padding: 4px 0px 0px 0px !important;
    }
    .trust-icon-1 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 36px !important;
      height: auto !important;
      max-height: none !important;
    }
    .trust-icon-2 {
      width: 100% !important;
      min-width: 1px !important;
      max-width: 41px !important;
      height: auto !important;
      max-height: none !important;
    }
  }

  @media (max-width: 350px) {
    .trust-text {
      font-size: 8px !important;
      line-height: 10px !important;
      padding: 4px 0px 0px 0px !important;
    }
  }
</style>
 </head>
    <body style="margin: 0; padding: 0;">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="background-color: #eeeeee;">
  <tr>
    <td width="100%" align="center" valign="top" style="background-color: #eeeeee; padding: 10px 0px 0px 0px;">

      <table style="min-width: 600px; width: 600px;" width="600" class="scale" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td style="background-color: #FFFFFF;" align="center" valign="top">

            <!-- CONTENT BEGIN -->

            <table align="center" border="0" cellpadding="0" cellspacing="0" style="min-width: 600px; width: 600px;" width="600" class="scale">
              <tr>
                <td valign="top" style="padding: 0px" class="pad-top2">

                  <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0" style="background-color: #ffffff; border-radius:5px;">

                    <tr>
                      <td align="center" style="padding: 45px 0px 40px 0px" class="logo">
                        <a href="https://www.airportdriver-taxi.at"
                          target="_blank" style="color:#128ced; text-decoration:none;outline:0;"><img style="display: block; margin: 0px auto;" src="https://www.airportdriver-taxi.at/email/logo-email.png" border="0" alt="AirportDriver" /></a>
                      </td>
                    </tr>

                    <tr>
                      <td align="center" style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 40px; mso-line-height-rule: exactly; color:#444444; text-align:center; line-height: 40px; padding: 0px 0px 25px 0px;" class="headline">
                        Bestätigung</td>
                    </tr>
                    <tr>
                      <td style="font-family:Roboto, Helvetica, Arial, sans-serif; color: #010101; font-size: 12px; mso-line-height-rule: exactly;  padding: 0px 50px 25px 50px;" class="copy">
                       Sehr geehrte Damen und Herren,<br /><br />
 vielen Dank für Ihre Bestellung, die wir Ihnen wie folgt bestätigen:<br />
<hr />
                      </td>
                    </tr>
                    <tr>
                      <td style="font-family:Roboto, Helvetica, Arial, sans-serif; color: #010101; font-size: 15px; mso-line-height-rule: exactly; line-height: 24px; padding: 0px 50px 5px 50px;" class="copy">

    <span style="float:left">Richtung A nach B</span>
    <span style="float:right">Bestellnummer: ' . $order_noR . '</span>
                      </td>

                    </tr>


              <tr>
                <td valign="top" style="padding: 0px 20px 0px 20px;" class="remind-outer">

                  <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
                    <tr>
                      <td valign="top" style="background-color: #fafafa; border: 1px solid #e5e5e5;">

                        <table width="100%" align="center" cellpadding="0" cellspacing="0" border="0">
                          <tr>
                            <th width="50%" valign="top" style="padding: 0px!important; border-right: 1px solid #e5e5e5; font-weight: normal; vertical-align: top;" class="stack-nrb">
                              <table align="center" width="100%" cellpadding="0" cellspacing="0" border="0" class="scale">
                                <tr>
                                  <td class="remind-inner-pad-top" style="padding:18px 18px 20px 20px; vertical-align: top;" valign="top">

                                    <table width="100%" cellpadding="0" cellspacing="0" border="0">
                                      <tr>
                                        <td width="100%" style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;"
                                          class="remind-headline">
                                          Fahrdaten:
                                        </td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Abholdatum und Uhrzeit:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px;" class="remind-info"> 	 ' . $pickupdatereturn . ' - ' . $hourreturn . ':' . $minutereturn . ' </td>
                                      </tr>
                                              <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Abfahrt von:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	  ' . $zieladresse . '  </td>
                                      </tr>


' . $aa1 . ' ' . $aa2 . ' ' . $aa3 . '

                                       <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info">Reiseziel nach:</td>
                                      </tr>
                                      <tr>
                                        <td style="font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px" class="remind-info"> 	  ' . $abholadresse . '   </td>
                                      </tr>
                                                  <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif;  font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Personen</strong>:  ' . $passengers . '</td>
                                      </tr>

                                                  <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif;  font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Koffer</strong>: ' . $suitcase . '</td>
                                      </tr>

                                                     <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif;  font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Handgepäck</strong>: ' . $handlugage . '</td>
                                      </tr>';
            if ($childseat >= '1') {
                $message .= '  <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Kindersitz</strong>: ' . $childseat . '</td>
                                      </tr>';
            }
            if ($boosterseat >= '1') {
                $message .= '                         <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Sitzerhöhung</strong>: ' . $boosterseat . '</td>
                                      </tr>';
            }

            if ($carrycot >= '1') {
                $message .= '        <tr>
                                        <td style="font-family:RobotoBold, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class="remind-info"><strong>Babyschale</strong>: ' . $carrycot . '</td>
                                      </tr>';
            }
            $message .= '</table>

	    </td>
	    </tr>
	    </table>
	    </th>
	    <th width = "50%" valign = "top" style = "padding: 0px!important; font-weight: normal; vertical-align: top;" class = "stack">
	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0" class = "scale">
	    <tr>
	    <td class = "remind-inner-pad-btm" style = "padding:18px 18px 20px 20px; vertical-align: top;" valign = "top" align = "center">

	    <table cellpadding = "0" cellspacing = "0" border = "0" width = "100%">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;" class = "remind-headline">Kontaktinformationen:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">
	     ' . $salutation . ' ' . $name . ' ' . $surname . '
	    </td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">
	    ' . $email . '</td>
	    </tr>

	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding-bottom:10px;" class = "remind-info">
	    ' . $phone . '</td>
	    </tr>
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px; line-height: 15px; mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">Zahlungsweise:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">  ' . $GLOBALS['PAYMENT'] . ' </td>
	    </tr>
	    </table>

	    </td>


	    </tr>
	    <tr>
	    <td class = "remind-inner-pad-btm" style = "padding:18px 18px 20px 20px; vertical-align: top;" valign = "top" align = "center">

	    <table cellpadding = "0" cellspacing = "0" border = "0" width = "100%">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;" class = "remind-headline">Preis:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">
	     ' . $pricereturnM . ' EUR
	    </td>
	    </tr>


	    </table>

	    </td>


	    </tr>';
            if ($note != '') {
                $message .= '	    <tr>
	    <td class = "remind-inner-pad-btm" style = "padding:18px 18px 20px 20px; vertical-align: top;" valign = "top" align = "center">

	    <table cellpadding = "0" cellspacing = "0" border = "0" width = "100%">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 10px 0px; text-align: left; text-transform:uppercase;" class = "remind-headline">Anmerkung:</td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;" class = "remind-info">' . $note . '</td>
	    </tr>


	    </table>

	    </td>


	    </tr>';
            }
            $message .= '  </table>
	    </th>
	    </tr>

	    </table>

	    </td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: center;background-color: #fafafa; border: 1px solid #e5e5e5;" class = "remind-info">
	    Die Route ist ' . $km . ' Km lang und dauert ca. ' . $min . ' Minuten
	    </td></tr>
	    </table>

	    </td>
	    </tr>

	    <tr>
	    <td valign = "top" style = "padding: 0px 20px 0px 20px;" class = "loop-outer">

	    <table style = "min-width: 560px; width: 560px;" width = "560" class = "scale" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td width = "50%" style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">

	    Ihre Kundennummer

	    </td>
	    <td class = "loop-qty" width = "50%" style = "font-family:Roboto, Helvetica, Arial, sans-serif; color: #333333; font-size: 14px; text-align: right;">
	    ' . $customer_no . '
	    </td>

	    </tr>
	    </table>

	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>


	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 18px;  color:#010101; padding: 0px 20px 25px 20px; text-align: center;">
	    Wichtige Informationen!
	    </td>
	    </tr>
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">

	    - Bitten wir alle Kunden, welche vom Flughafen anreisen, Treffpunkt mit dem jeweiligen Fahrer bei Flughafen-Airport Information. Vielen Dank für das Verständnis. <a href = "' . $GLOBALS['TREFFPUNKT_URL'] . '">mehr Info</a>

	    </td>


	    </tr>
	    </table>

	    </td>
	    </tr>
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">
	    - Fahrten, die bis 22.00 Uhr am selben Tag stattfinden sollen, mindestens 4 Stunden vorher reservieren.

	    </td>


	    </tr>
	    </table>

	    </td>
	    </tr>
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">
	    - Fahrten, die zwischen 22.00 und 6.00 stattfinden sollen, mindestens 10 Stunden vorher reservieren.

	    </td>


	    </tr>
	    </table>

	    </td>
	    </tr>
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">
	    - Im Falle zu später Reservierung können wir die Verfügbarkeit eines Wagens - trotz automatischer Bestätigung über Internet - nicht garantieren.

	    </td>


	    </tr>
	    </table>

	    </td>
	    </tr>
	    <tr>
	    <td style = "background-color: #fafafa; padding: 15px 20px 15px 20px; border-bottom: 1px solid #e5e5e5;" valign = "top">

	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family:RobotoBold, Helvetica, Arial; color:#333333; font-weight:700; font-size: 12px; text-align: left;" class = "loop-prod">
	    - Lieber Kunde, Bitte machen sie keine Bestellung beim Fahrer da es vielleicht zu falschen Angaben führen kann und wir nicht für unsere Zuverlässigkeit garantieren können.

	    </td>


	    </tr>
	    </table>

	    </td>
	    </tr>




	    </table>

	    </td>
	    </tr>

	    <tr>
	    <td bgcolor = "#eeeeee" style = "height: 15px; line-height: 15px; mso-line-height: 15px;">&nbsp;

	    </td>
	    </tr>
	    <tr>
	    <td valign = "top">
	    <table align = "center" border = "0" cellpadding = "0" cellspacing = "0" style = "min-width: 600px; width: 600px;" width = "600" class = "scale">
	    <tr>
	    <td valign = "top">

	    <table border = "0" cellpadding = "0" cellspacing = "0" style = "min-width: 600px; width: 600px; background-color: #128ced;" width = "600" class = "scale">
	    <tr>
	    <td width = "100%" align = "center" valign = "middle" style = "vertical-align: middle;">
	    <table cellpadding = "0" cellspacing = "0" border = "0" style = "margin: 0px auto;">
	    <tr>
	    <td style = "padding: 23px 0px 25px 0px;" class = "contact-pad" align = "center">
	    <table cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "font-family: Roboto, Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; color: #ffffff!important; text-align: center;" class = "contact-text" align = "center"><a style = "text-decoration: none; color: #ffffff;" href = "tel:' . $GLOBALS['company_phone'] . '"
	    target = "_blank" rilt = "ContactUs_Text">Notfallnummer <span style = "font-family: RobotoBold, Helvetica, Arial, sans-serif; font-weight: 700;"><a style="color:#fff;" href ="tel:' . $GLOBALS['company_phone'] . '">' . $GLOBALS['company_phone'] . '</a></span> <span class = "mob-br"></span> oder antworten Sie auf diese E-Mail</a></td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>

	    </td>
	    </tr>
	    <tr>
	    <td valign = "top" style = "background-color: #FFFFFF;">
	    <table cellpadding = "0" cellspacing = "0" style = "width:100%; border-collapse:collapse" border = "0">
	    <tr>
	    <td width = "25%" align = "center" valign = "bottom" style = "border-right:1px solid #EBEBEB; padding: 20px; vertical-align: bottom;" class = "trust-pad">
	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "vertical-align:bottom; text-align: center;" align = "center"><a href = "' . $GLOBALS['anfrage_url'] . '"
	    target = "_blank" style = "text-decoration: none;"><img style = "display: block; font-size: 8px; width: 58px; max-width: 58px; height: auto; max-height: none; margin: 0px auto;" src = "https://www.airportdriver-taxi.at/email/anfrage-icon.png" width = "58" height = "50" border = "0" class = "trust-icon-2"></a></td>
	    </tr>
	    <tr>
	    <td style = "text-align: center; color:#444444!important; font-size:12px; font-family:Roboto, Helvetica, Arial,sans-serif!important; padding: 5px 0px 0px 0px; mso-line-height-rule: exactly; line-height: 12px;" align = "center" class = "trust-text"><a href = "' . $GLOBALS['anfrage_url'] . '"
	    target = "_blank" style = "color:#444444; text-decoration:none">ANFRAGE</a></td>
	    </tr>
	    </table>
	    </td>
	    <td width = "25%" align = "center" valign = "bottom" style = "border-right:1px solid #EBEBEB; padding: 20px; vertical-align: bottom;" class = "trust-pad">
	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "vertical-align:bottom; text-align: center; padding: 12px 0px 0px 0px;"><a href = "' . $GLOBALS['rueckfahrt_url'] . '"
	    target = "_blank" style = "outline:0; text-decoration:none"><img style = "display: block; font-size: 8px; width: 54px; max-width: 54px; height: auto; max-height: none; margin: 0px auto;" src = "https://www.airportdriver-taxi.at/email/return-icon.png" width = "54" height = "37" border = "0" class = "trust-icon-1"></a></td>
	    </tr>
	    <tr>
	    <td style = "text-align: center; color:#444444!important; font-size:12px;  margin:0; font-family:Roboto, Helvetica, Arial,sans-serif!important; padding: 5px 0px 0px 0px; mso-line-height-rule: exactly; line-height: 12px;" align = "center" class = "trust-text"><a href = "' . $GLOBALS['rueckfahrt_url'] . '"
	    target = "_blank" style = "outline:0;color:#444444; text-decoration:none">
	    RÜCKFAHRT <br /> BESTELLEN</a></td>
	    </tr>
	    </table>
	    </td>
	    <td width = "25%" align = "center" valign = "bottom" style = "border-right:1px solid #EBEBEB; padding: 20px; vertical-align: bottom;" class = "trust-pad">
	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "vertical-align:bottom; text-align: center;"><a href = "' . $GLOBALS['meinung_url'] . '"
	    target = "_blank" style = "outline:0; text-decoration:none"><img style = "display: block; font-size: 8px; width: 50px; max-width: 50px; height: auto; max-height: none; margin: 0px auto;" src = "https://www.airportdriver-taxi.at/email/meinung-icon.png" width = "50" height = "50" border = "0" class = "trust-icon-1"></a></td>
	    </tr>
	    <tr>
	    <td style = "text-align: center; color:#444444!important; font-size:12px; margin:0; font-family:Roboto, Helvetica,Arial,sans-serif!important; padding: 5px 0px 0px 0px; mso-line-height-rule: exactly; line-height: 12px;" align = "center" class = "trust-text"><a href = "' . $GLOBALS['meinung_url'] . '"
	    target = "_blank" style = "outline:0;color:#444444; text-decoration:none">IHRE <br /> MEINUNG</a></td>
	    </tr>
	    </table>
	    </td>
	    <td width = "25%" align = "center" valign = "bottom" style = "padding: 20px; vertical-align: bottom;" class = "trust-pad">
	    <table width = "100%" cellpadding = "0" cellspacing = "0" border = "0">
	    <tr>
	    <td style = "vertical-align:bottom; text-align: center;"><a href = "' . $GLOBALS['storno_url'] . '"
	    target = "_blank" style = "outline:0; text-decoration:none"><img style = "display: block; font-size: 8px; width: 58px; max-width: 58px; height: auto; max-height: none; margin: 0px auto;" src = "https://www.airportdriver-taxi.at/email/storno-icon.png" width = "58" height = "50" border = "0" class = "trust-icon-2"></a></td>
	    </tr>
	    <tr>
	    <td style = "text-align: center; color:#444444!important; font-size:12px; margin:0; font-family:Roboto, Helvetica, Arial,sans-serif!important; padding: 5px 0px 0px 0px; mso-line-height-rule: exactly; line-height: 12px;" align = "center" class = "trust-text"><a href = "' . $GLOBALS['storno_url'] . '"
	    target = "_blank" style = "outline:0;color:#444444; text-decoration:none">DIESE FAHRT <br /> STORNIEREN</a></td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    <tr>
	    <td valign = "top">
	    <table border = "0" cellpadding = "0" cellspacing = "0" style = "width: 100%;" width = "100%">
	    <tr>
	    <td style = "padding: 35px 0px 15px 0px;" valign = "top" align = "center" class = "app-btn-outer">

	    <table cellpadding = "0" cellspacing = "0" border = "0" style = "width: 318px;" width = "318">
	    <tr>
	    <th style = "font-weight: normal;" class = "stack" align = "center">
	    <a style = "text-decoration: none;" href = "' . $GLOBALS['ios_url'] . '"
	    target = "_blank"><img style = "display: block;" src = "https://www.airportdriver-taxi.at/email/app-store-v2.png" border = "0" alt = "App Store" /></a>
	    </th>
	    <th style = "font-weight: normal;" class = "stack" align = "center">
	    <a style = "text-decoration: none;" href = "' . $GLOBALS['android_url'] . '"
	    target = "_blank"><img style = "display: block;" src = "https://www.airportdriver-taxi.at/email/google-play-v2.png" border = "0" alt = "Google Play" /></a>
	    </th>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto, Helvetica, Arial, sans-serif; font-size: 12px;  mso-line-height-rule: exactly; color:#010101; padding: 0px 0px 3px 0px; text-align: left;padding:0 10px 0 10px;" class = "remind-info">

	    <p>AIRPORTDRIVER<br>FLUGHAFEN TRANSFER SERVICE UND LIMOUSINENSERVICE ZUM FIXPREIS<br>
	    WEB: ' . $GLOBALS['company_url'] . '<br>
	    E-Mail: ' . $GLOBALS['smtp_email'] . '<br>
	    Telefon: ' . $GLOBALS['company_phone'] . '
	    </p></td></tr>
	    <tr>
	    <td width = "100%" align = "center" style = "padding: 15px 0px 20px 0px;">
	    <table cellpadding = "0" cellspacing = "0" border = "0" style = "width: 100%;" width = "100%">
	    <tr>
	    <td style = "font-family:Roboto,Arial,sans-serif!important;font-size:13px;padding-left:10px;padding-bottom:10px;">
	    Vertraulichkeitserklärung
	    </td>
	    </tr>
	    <tr>
	    <td style = "font-family:Roboto,Arial,sans-serif!important;font-size:10px;padding:0 10px 0 10px;">

	    Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind, oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte den Absender und löschen Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail und der darin enthaltenen Informationen sind nicht gestattet.
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>
	    </table>
	    </td>
	    </tr>

	    </table>
	    </td>
	    </tr>
	    </table>

	    </td>
	    </tr>
	    </table>
	      </body>
</html>
';

            if ($success == 'OK') {
                if (!MAILTO($to, $subject, $message)) {
//		    echo 'ERROR11';
                    $emailvom = 'ERROR5';
                } else {
                    MAILTO($GLOBALS['backup_fahrten_email'], "VAZNO! AIRPORT DRIVER " . $subject, $message);
//		    echo 'OK';
                    $emailvom = 'OK';
                }
            }
        }



        if ($rueckfahrt == '1') {
            if ($emailvom == 'OK' && $emailvom == 'OK') {
                $done = "OK";
            }
        } elseif ($rueckfahrt == '0') {
            if ($emailzum == 'OK') {
                $done = "OK";
            }
        } else {
            $done = 'ERROR6';
        }
        if ($done == 'OK') {
            echo "OK";
        } else {
            echo "ERROR888";
        }
    } else {
        echo "ERROR999";
    }
}

if ($GLOBALS['MODEL'] == 'INSERT_ZUM') {
    GET_PRICE();
    INSERT_ZUM();
}

if ($GLOBALS['MODEL'] == 'INSERT_VOM') {
    GET_PRICE();
    INSERT_VOM();
}

if ($GLOBALS['MODEL'] == 'INSERT_AB') {
    INSERT_AB();
}

if ($GLOBALS['MODEL'] == 'GET_CAR') {

//    $result = $GLOBALS['MYSQLI']->query("SELECT car FROM car WHERE personen = '" . $GLOBALS['PASSENGER'] . "' AND koffer = '" . $GLOBALS['SUITCASE'] . "' AND handgepaeck = '" . $GLOBALS['HANDLUGGAGE'] . "' ");
//
//    $row = mysqli_fetch_array($result, MYSQLI_ASSOC);
//    print_r($row);
//    if ($row) {
//	echo $row['car'];
//    } else {
//	echo 'V';
//    }


    $result = $GLOBALS['MYSQLI']->query("SELECT car FROM car WHERE personen = '" . $GLOBALS['PASSENGER'] . "' AND koffer = '" . $GLOBALS['SUITCASE'] . "' AND handgepaeck = '" . $GLOBALS['HANDLUGGAGE'] . "'");

    if ($result->num_rows > 0) {
        echo $result->fetch_object()->car;
    } else {
        echo "V";
    }
}

if ($GLOBALS['MODEL'] == 'AB_OPTIONS') {


    $sql = "SELECT hour from night_price";
    $query = $GLOBALS['MYSQLI']->query($sql);


    $rows = array();

    while ($r = mysqli_fetch_assoc($query)) {
        foreach ($r as $value) {
            $rows[] = $value;
        }
    }

    $json = json_encode($rows);






    $qry = "SELECT child_seat_price, booster_seat_price, carrycot_price, additional_address_price, night_price_wien, night_price_other,  creditcard_price, from_airport_plus, from_to_minus FROM options WHERE id = '1' ";

    $res = $GLOBALS['MYSQLI']->query($qry);
    if (!$res) {
        die('Error: ' . mysqli_error($GLOBALS['MYSQLI']));
    }
    $num_row = mysqli_num_rows($res);
    $row = mysqli_fetch_assoc($res);
    if ($num_row == 1) {

        $child_seat_price = $row['child_seat_price'] - 0;
        $booster_seat_price = $row['booster_seat_price'] - 0;
        $carrycot_price = $row['carrycot_price'] - 0;
        $additional_address_price = $row['additional_address_price'] - 0;
        $night_price_wien = $row['night_price_wien'] - 0;
        $night_price_other = $row['night_price_other'] - 0;
        $creditcard_price = $row['creditcard_price'] - 0;
        $from_airport_plus = $row['from_airport_plus'] - 0;
        $from_to_minus = $row['from_to_minus'] - 0;


        echo json_encode(array(
            'child_seat_price' => $child_seat_price,
            'booster_seat_price' => $booster_seat_price,
            'carrycot_price' => $carrycot_price,
            'additional_address_price' => $additional_address_price,
            'night_price_wien' => $night_price_wien,
            'night_price_other' => $night_price_other,
            'creditcard_price' => $creditcard_price,
            'from_airport_plus' => $from_airport_plus,
            'from_to_minus' => $from_to_minus,
            'nightprice' => $json
        ));
    }
}
if ($GLOBALS['MODEL'] == 'CALLBACK') {

    $message = ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>AIRPORT DRIVER TAXI - Flughafentaxi Wien - Rückrufservice</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
 </head>
    <body style="margin: 0; padding: 0;">
<h1>Rückrufservice - ' . $GLOBALS['sitename'] . '</h1>
<div>Name: ' . $GLOBALS['NAME'] . '</div>
<div>Telefonnummer: ' . $GLOBALS['PHONE'] . '</div>
	      </body>
</html>
';

    $mail = new PHPMailer();
    $mail->IsSMTP();  // telling the class to use SMTP
    $mail->SMTPDebug = 0;
// 0 = no output, 1 = errors and messages, 2 = messages only.
    $mail->SMTPAuth = true;  // enable SMTP authentication
    $mail->addReplyTo($GLOBALS['smtp_email'], $GLOBALS['sitename']);
    $mail->SMTPSecure = "tls";       // sets the prefix to the servier
    $mail->Host = $GLOBALS['SMTP_SERVER']; // sets Gmail as the SMTP server
    $mail->Port = 587;       // set the SMTP port for the GMAIL
    $mail->Username = $GLOBALS['SMTP_USER'];  // Gmail username
    $mail->Password = $GLOBALS['SMTP_PASS'];      // Gmail password
    $mail->CharSet = 'UTF-8';
    $mail->SetFrom($GLOBALS['smtp_email'], $GLOBALS['sitename']);
    $mail->Subject = 'Rückrufservice - ' . $GLOBALS['sitename'];
    $mail->ContentType = 'text/html';
    $mail->IsHTML(true);
    $mail->Body = $message;

    // you may also use $mail->Body = file_get_contents('your_mail_template.html');

    $mail->AddAddress($GLOBALS['smtp_email'], $GLOBALS['smtp_email']);

    // you may also use this format $mail->AddAddress ($recipient);

    if (!$mail->Send()) {
        echo 'ERROR7';
    } else {
        echo 'OK';
    }
}

if ($GLOBALS['MODEL'] == 'FRAGESENDEN') {
    $subject = 'FAQ Kontakt von ' . $GLOBALS['NAME'];

    $message = ' <!DOCTYPE html>
<html>
    <head>
        <title>Fahrt</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>


<table style="border-collapse: collapse;" border="1" width="500px;">
<tbody>
<tr>
<th>Webseite Kontakt ' . $GLOBALS['sitename'] . '</th>
<th></th>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">Name</td>
<td style="padding: 5px;"> ' . $GLOBALS['NAME'] . ' </td>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">E-Mail</td>
<td style="padding: 5px;">' . $GLOBALS['EMAIL'] . '</td>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">Nachricht / Frage</td>
<td style="padding: 5px;">' . $GLOBALS['NOTE'] . '</td>
</tr>
<tr>

</tbody>
</table>


</body>
</html>
';

    MAILTO_KONTAKT($GLOBALS['smtp_email'], $subject, $message, $GLOBALS['EMAIL']);
}

if ($GLOBALS['MODEL'] == 'KONTAKTSENDEN') {
    $subject = 'Website Kontakt von ' . $GLOBALS['SALUTATION'] . ' ' . $GLOBALS['NAME'] . ' ' . $GLOBALS['SURNAME'];

    $message = ' <!DOCTYPE html>
<html>
    <head>
        <title>Fahrt</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>


<table style="border-collapse: collapse;" border="1" width="500px;">
<tbody>
<tr>
<th>Webseite Kontakt</th>
<th></th>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">Name</td>
<td style="padding: 5px;"> ' . $GLOBALS['SALUTATION'] . ' ' . $GLOBALS['NAME'] . ' ' . $GLOBALS['SURNAME'] . ' </td>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">E-Mail</td>
<td style="padding: 5px;">' . $GLOBALS['EMAIL'] . '</td>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">Telefonnummer</td>
<td style="padding: 5px;">' . $GLOBALS['PHONE'] . '</td>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">Nachricht / Frage</td>
<td style="padding: 5px;">' . $GLOBALS['NOTE'] . '</td>
</tr>
<tr>

</tbody>
</table>


</body>
</html>
';

    MAILTO_KONTAKT($GLOBALS['smtp_email'], $subject, $message, $GLOBALS['EMAIL']);
}
if ($GLOBALS['MODEL'] == 'ANGEBOTSENDEN') {
    $subject = 'Firmenangebot von ' . $GLOBALS['SALUTATION'] . ' ' . $GLOBALS['NAME'] . ' ' . $GLOBALS['SURNAME'];

    $message = ' <!DOCTYPE html>
<html>
    <head>
        <title>Fahrt</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
    </head>
    <body>


<table style="border-collapse: collapse;" border="1" width="500px;">
<tbody>
<tr>
<th>Webseite Kontakt</th>
<th></th>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">Name</td>
<td style="padding: 5px;"> ' . $GLOBALS['SALUTATION'] . ' ' . $GLOBALS['NAME'] . ' ' . $GLOBALS['SURNAME'] . ' </td>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">E-Mail</td>
<td style="padding: 5px;">' . $GLOBALS['EMAIL'] . '</td>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">Telefonnummer</td>
<td style="padding: 5px;">' . $GLOBALS['PHONE'] . '</td>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">Nachricht / Frage</td>
<td style="padding: 5px;">' . $GLOBALS['NOTE'] . '</td>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">Art</td>
<td style="padding: 5px;">' . $GLOBALS['MOD'] . '</td>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">Firmenname</td>
<td style="padding: 5px;">' . $GLOBALS['FIRMANAME'] . '</td>
</tr>
<tr>
<td style="padding: 5px;padding-left:30px;">Fahrten pro Monat</td>
<td style="padding: 5px;">' . $GLOBALS['FAHRTEN'] . '</td>
</tr>
<tr>

</tbody>
</table>


</body>
</html>
';

    MAILTO_KONTAKT($GLOBALS['smtp_email'], $subject, $message, $GLOBALS['EMAIL']);
}



if ($GLOBALS['MODEL'] == 'GET_ZIP_PRICE') {
    $GLOBALS['MYSQLI']->query("SET NAMES 'utf8'");
    $fetch = $GLOBALS['MYSQLI']->query("SELECT * FROM zip WHERE id = '" . $GLOBALS['ZIP_ID'] . "'");
    $row = mysqli_fetch_assoc($fetch);
    if ($row) {
        $limo = $row['limo'];
        $kombi = $row['kombi'];
        $van = $row['van'];
    } else {
        $limo = "0.00";
        $kombi = "0.00";
        $van = "0.00";
    }
    echo json_encode(array('L' => $limo, 'K' => $kombi, 'V' => $van));
}



