<?php
$var = str_replace("\n", "", $var);
$var = str_replace("\r", "", $var);
$var = str_replace("\t", "", $var);
$var = str_replace("<p>", "", $var);
$var = str_replace("</p>", "\n", $var);
$var = str_replace("<br />", "\n", $var);
$var = str_replace("<br>", "\n", $var);
$var = str_replace("&nbsp;", " ", $var);
$var = str_replace("&quot;", "\"", $var);
if ("Frau" == $ntk['Anrede'])
{
	$Briefanrede = "Sehr geehrte Frau " . $ntk['Nachname'];
}
else
{
	$Briefanrede = "Sehr geehrter Herr " . $ntk['Nachname'];
}
$var = str_replace('[Kunde_Briefanrede]', $Briefanrede, $var);
$var = str_replace('[Kunde_Anrede]', $ntk['Anrede'], $var);
$var = str_replace('[Kunde_Nachname]', $ntk['Nachname'], $var);
$var = str_replace('[Kunde_Vorname]', $ntk['Vorname'], $var);

$var = str_replace('[Bearbeiter_Nachname]', $nta['Nachname'], $var);
$var = str_replace('[Bearbeiter_Vorname]', $nta['Vorname'], $var);
$var = str_replace('[Bearbeiter_Telefon]', $nta['Telefon'], $var);
$var = str_replace('[Bearbeiter_Mobil]', $nta['Mobil'], $var);
$var = str_replace('[Bearbeiter_EMail]', $nta['EMail'], $var);

$var = str_replace('[Firma_Name]', $_SESSION['Firma']['Firma_Name'], $var);
$var = str_replace('[Firma_Vertreter]', $_SESSION['Firma']['Vertreter'], $var);
$var = str_replace('[Firma_Telefon]', $_SESSION['Firma']['Telefon'], $var);
$var = str_replace('[Firma_Mobil]', $_SESSION['Firma']['Mobil'], $var);
$var = str_replace('[Firma_EMail]', $_SESSION['Firma']['EMail'], $var);