<?php
/**
 * @copyright (c) Kufer Software GmbH, Oderstraße 7, D-84453 Mühldorf
 */


$tz = 'Europe/Berlin';
if (date_default_timezone_get() !== $tz) {
  date_default_timezone_set($tz);
}






setlocale(LC_NUMERIC, 'C');

$dname = dirname(__FILE__);
if (substr($dname, -1) != DIRECTORY_SEPARATOR) {
  $dname .= DIRECTORY_SEPARATOR;
}


define('BASEDIR', substr($dname, 0, -8));

define('LEGACY_USERCONSTANTS_PATH', 'classes' . DIRECTORY_SEPARATOR . 'userconstants.php');

include_once BASEDIR . 'classes' . DIRECTORY_SEPARATOR . 'autoloader' . DIRECTORY_SEPARATOR . 'autoloader.php';

function ichLadeKlassenNach($classname)
{
  
  if (is_numeric($classname)) {
    return;
  }

  try {
    $autoloader = AutoLoader::getInstance();
    $autoloader->load($classname);
  } catch (Exception $ex) {
    die('Beim Autoloader ist ein Fehler aufgetreten: <br>' . $ex->getMessage());
  }
}

spl_autoload_register('ichLadeKlassenNach');



define('ISO_8859_1', 'ISO-8859-1');
define('UTF_8', 'UTF-8');

define('ISO_8859_15', 'ISO-8859-15');
define('CP1252', 'Windows-1252');


define('KW_INTERNAL_ENCODING', UTF_8);


define('LOG_DB', false);


define('LOG_EMAIL', false);


define('IS_INLINGUA', false);


define('KUFERSQL', 'KuferSQL');

define('KUFERWEB', 'KuferWEB');

define('KUFERTOOLS', 'KuferTools');

define('WEBADMIN', 'Webadmin');

define('KUBUS_FEHLERMAIL_ADRESSE', 'info@kufer.de');


 


define('ADDKURS2WARENKORBACTIONASK', 0);

define('ADDKURS2WARENKORBACTIONEMPTY', 1);

define('ADDKURS2WARENKORBACTIONKEEP', 2);



define('CATEGORYOLD', 0);

define('CATEGORYTREE', 1);

define('CATDESCOBEN', 0);

define('CATDESCUNTEN', 1);



define('KATTYP_NORMAL', 1);

define('KATTYP_SONDER', 2);

define('DMN_STANDARD', 0);

define('DMN_EDITABLE', 1);

define('DMNM_GENAUIGKEIT_TAG', 1);

define('DMNM_GENAUIGKEIT_MINUTE', 2);


define('COPYRIGHT', '&copy; 2004 - 2024 Kufer Software GmbH');


define('COPYRIGHT_ADMIN', '&copy; 2010 - 2024 Kufer Software GmbH');


define('BUNDESLANDAT', 'A-');

define('BUNDESLANDCH', 'CH-');

define('DEFAULTDATE', '30.12.1899');


define('DEFAULTTIME', '00:00');


define('DEFAULTTIME_WITH_SECONDS', '00:00:00');


define('MAXLEN_DAT', 10);


define('MAXLEN_TIME', 5);


define('DATE_HEUTE', 1);

define('DATE_MORGEN', 2);


define('DATE_DIE_WO', 3);

define('DATE_NAE_WO', 4);


define('DATE_DIE_MO', 5);


define('DATE_NAE_MO', 6);

define('DATE_TAG_VOR', 7);


define('DATE_TAG_ZUR', 8);


define('DATE_WO_VOR', 9);


define('DATE_WO_ZUR', 10);


define('DATE_2_MO_BEGINN', 11);


define('DATE_2_MO_ENDE', 12);


define('DATE_3_MO_BEGINN', 13);


define('DATE_3_MO_ENDE', 14);


define('DATE_2_MO', 15);


define('DATE_3_MO', 16);



define('DATE_DIE_WO_AB_HEUTE', 17);


define('DATE_DIE_MO_AB_HEUTE', 18);


define('DATE_NAE_QUART_BEGINN', 19);


define('DATE_NAE_QUART_ENDE', 20);


define('DATE_DIE_QUARTAL', 21);


define('DATE_NAE_QUARTAL', 22);


define('DATE_2_WO_BEGINN', 23);


define('DATE_2_WO_ENDE', 24);

define('DATE_3_WO_BEGINN', 25);


define('DATE_3_WO_ENDE', 26);



define('TIME_5_MIT_PUNKT', 0);

define('TIME_4_MIT_PUNKT', 1);

define('TIME_NUR_STUNDE', 2);

define('TIME_4_MIT_DOPPELPUNKT', 3);

define('TIME_4_MIT_PUNKT_2', 4);

define('TIME_5_MIT_DOPPELPUNKT', 5);

define('TIME_MAGIC', 7);

define('TIME_4_MIT_AMPM', 8);

define('TIME_4_NUR_STUNDEN', 9);

define('TIME_4_NUR_MINUTEN', 10);


define('DEFAULT_FARBE4AUSWAHL', '#FFFFFE');


define('STARTZEIT', '7.5');

define('ENDEZEIT', '22.5');


define('PW_SPECIALCHARS', '#!?$@&~=|:-_()<>');


define('KURZ_DOZENT', 'DOZ');

define('KURZ_TEILNEHMER', 'TN');

define('KURZ_FIRMA', 'FA');

define('KURZ_HAUSMEISTER', 'ADR');

define('KURZ_MITARBEITER', 'MA');

define('KURZ_VERANSTALTER', 'VA');


define('NO_UPLOAD', 0); 
define('UPLOAD_OK', 1); 
define('UPLOAD_NOT_OK', 2); 



define('TNDATEN_ALLE_BEIBEHALTEN', 1);


define('TNDATEN_HAUPTPERSON_BEIBEHALTEN', 2);


define('HATLISTEGEDRUCKT_MAIL', 0);
define('HATLISTEGEDRUCKT_DIREKT', 1);
define('HATLISTEGEDRUCKT_DMZ', 2);




define('USERPREFIX', 'ben');




define('URLPARAMETER_TRENNZEICHEN', ';');


define('URLPARAMETER_ZUWEISUNG', ':');


define('DELIMITER_FILTER_AUSSENST', 'a');


define('DELIMITER_FILTER_SEMESTER', 'a');


define('DELIMITER_FILTER_WOCHENTAG', 'a');


define('FILTER_FORM_DELIMITER', ':');


define('SEARCH_FORM_DELIMITER', '|');

define('BR_WT', '<br>');


function include_once_ex($path)
{
  
  if (is_string($path)) {
    $path = explode('/', $path);
  }

  $path = BASEDIR . implode(DIRECTORY_SEPARATOR, $path);

  return include_once $path;
}

$v = Version::getCurrentVersion();



define('VERSION', $v->version);
define('VERSION_DATE', $v->versionDate);


define('WBPLUGIN_PATH', BASEDIR . 'plugins' . DIRECTORY_SEPARATOR);




define('WEBTOOLS_PATH', BASEDIR . 'webtools' . DIRECTORY_SEPARATOR);






define('WT_MEDIENTRENNER', '|');


define('WT_HIDDENTRENNER', '|');


define('WT_DRUCKANW_ANZAHLKTPROSEITE_NORM', 15);


define('WT_DRUCKANW_ANZAHLKTPROSEITE_BIG', 6);


define('WB_KURSE_SORTIERUNG_DATUM_BEGINN_KNR', 1);

define('WB_KURSE_SORTIERUNG_DATUM_KNR', 2);

define('WB_KURSE_SORTIERUNG_KNR', 3);

define('WB_KURSE_SORTIERUNG_KURZBEZ_TITEL_KNR', 4);

define('WB_KURSE_SORTIERUNG_TITEL_KURZBEZ_KNR', 5);

define('WB_KURSE_SORTIERUNG_AS_ERST_BESTIMMTE', 6);

define('WB_KURSE_SORTIERUNG_AS_ERST_BESTIMMTE_DANN_FREI', 7);

define('WB_KURSE_SORTIERUNG_ALTE_HINTEN', 8);

define('WB_SPLITMEHRFACHANMELDUNG_NIE', 0);

define('WB_SPLITMEHRFACHANMELDUNG_IMMER', 1);

define('WB_SPLITMEHRFACHANMELDUNG_FALLS_ERMAESSIGT', 2);


define('SQL_FREIDEF_TYP_TEXT', 'T');
define('SQL_FREIDEF_TYP_CHECKBOX', 'C');
define('SQL_FREIDEF_TYP_DATE', 'D');
define('SQL_FREIDEF_TYP_NUMBER', 'Z');


define('KUFERWEB_MODUS_NORMAL', 1);


define('KUFERWEB_MODUS_MEHRSPRACH', 1);


define('KUFERWEB_SPRACHE_STANDARD', 0x00);


define('WB_MAX_ANZAHL_ATTACHMENTS', 5);


define('MAX_ANZAHL_ATTACHMENTS', 5);


define('ANMELDEART_URL_NORMAL', 1);

define('ANMELDEART_URL_FIRMA', 2);

define('ANMELDEART_URL_ELTERNKIND', 3);

define('ANMELDEART_URL_PAAR', 4);

define('ANMELDEART_URL_MEHRFACH', 5);

define('ANMELDEART_URL_FIRMA2', 7);

define('ANMELDEART_URL_BERATUNGSTAGE', 8);

define('ANMELDEART_URL_GRILLHUETTEN', 9);

define('ANMELDEART_URL_NORMALFIRMA', 10);

define('ANMELDEART_URL_ZSA', 11);

define('ANMELDEART_URL_FERIENPROGRAMM', 12);

define('ANMELDEART_URL_WEBSHOP', 13);

define('ANMELDEART_URL_FIRMAHOTEL', 14);

define('ANMELDEART_URL_STAMMHMITFIRMA', 15);


define('WBL_DEFAULT', 0);

define('WBL_PW_GEAENDERT', 1);

define('WBL_PW_NICHTGEAENDERT', 2);

define('ANM_ZAHLVERFAHREN_SEPA_KTO', 'sepa_kto');

define('ANM_ZAHLVERFAHREN_NUR_SEPA', 'sepa');

define('ANM_ZAHLVERFAHREN_NUR_KTO', 'kto');


define('LISTEN_FUSSZEILE_OHNE', 0);

define('LISTEN_FUSSZEILE_ALLE', 1);

define('LISTEN_FUSSZEILE_LETZTE', 2);


define('DETAILS_SELF', '0');

define('DETAILS_EXTRA', '1');

define('TERMINE_SELF', '2');

define('TERMINE_EXTRA', '3');

define('UEBERSICHT', '4');



define('BUTTONBAR_TOP', 'top');

define('BUTTONBAR_BOTTOM', 'bottom');

define('BUTTONBAR_BOTH', 'both');



define('FEEDBACK_INFOTEXT', 0);

define('FEEDBACK_JA_NEIN', 1);

define('FEEDBACK_CHECKBOX_NEBENEINANDER', 2);

define('FEEDBACK_CHECKBOX_UNTEREINANDER', 3);

define('FEEDBACK_NOTEN', 4);

define('FEEDBACK_PUNKTE', 5);

define('FEEDBACK_PUNKTE_NEBENEINANDER', 6);

define('FEEDBACK_PUNKTE_UNTEREINANDER', 7);




define('PUNKTESTATUS_OK', 'bestätigt');

define('PUNKTESTATUS_NEIN', 'abgelehnt');

define('PUNKTESTATUS_FRAGEZEICHEN', 'unbestätigt');

define('PUNKTESTATUS_AUSRUFEZEICHEN', 'Der Kurs ist nicht für Ihre Berufsgruppe geeignet');


define('PUNKTESTATUS_NICHT_TEILGENOMMEN', 'nicht teilgenommen');



define('BLAK_NOT_SHOW_WSS', '[BLAK_NICHT_ANZEIGEN]');


define('TEXTE_TOPCATEGORY', 0);


define('TEXTE_TOPSONDERCATEGORY', 1);


define('TEXTE_WK_GELEERT', 2);


define('TEXTE_WK_KANNNICHTABLEGEN', 3);


define('TEXTE_WK_VERANSTALTUNGENNICHTMISCHEN', 21);


define('TEXTE_WK_ABGELEGT', 4);


define('TEXTE_WK_HINZUFUEGEN', 5);


define('TEXTE_WK_ENTFERNT', 6);


define('TEXTE_ANM_NICHTFREIGEGEBEN', 7);


define('TEXTE_GEFUNDEN', 8);


define('TEXTE_SUCHENACH', 9);


define('TEXTE_LEEREKATEGORIE', 10);


define('TEXTE_WK_COOKIECHECK', 11);


define('TEXTE_FALSCHESEITENANGABE', 12);


define('TEXTE_EINGEGEBENE_TN_DATEN_GELOESCHT', 13);


define('TEXTE_VERANSTALTUNGENAM', 14);

define('TEXTE_NICHTS_GEFUNDEN_NACH', 15);


define('TEXTE_NICHTS_GEFUNDEN', 16);


define('TEXTE_FALSCHE_EINGABE', 21);


define('TEXTE_ML_HINZUGEFUEGT', 17);


define('TEXTE_ML_ENTFERNT', 18);


define('TEXTE_ML_HINZUFUEGEN_NICHT_MOEGLICH', 19);


define('TEXTE_ML_ENTFERNEN_NICHT_MOEGLICH', 20);



define('TEXTE_STORNO_GESENDET', 21);


define('TEXTE_STORNO_FEHLER', 22);


define('TEXTE_STORNO_ERFOLGREICH', 23);


define('TEXTE_WK_HAUPTKURS_NICHT_LOESCHBAR', 24);


define('VALIDIERUNG_PLZ_KEINE', 0);

define('VALIDIERUNG_PLZ_5', 1);

define('VALIDIERUNG_PLZ_45', 2);

define('VALIDIERUNG_PLZ_4', 3);

define('VALIDIERUNG_PLZ_INTERNATIONAL', 4);

define('CAPTCHA_SIMPLECAPTCHA', 1);

define('CAPTCHA_RECAPTCHA', 2);

define('CAPTCHA_FRIENDLYCAPTCHA', 3);

define('CAPTCHA_CAPTCHAFOX', 4);

define('CAPTCHA_RECAPTCH_DEFAULT_THRESHOLD', '0,6');


define('CAPTCHA_FRIENDLYCAPTCHA_DEFAULT_ENDPUNKT', 'Global');



define('DOUBLEQUOTE', '|doublequote|');


define('ANMELDEART', 'gWKAnmForm');
define('ANMELDEART_INTERN_NORMAL', '');
define('ANMELDEART_INTERN_ELTERNKIND', 1);
define('ANMELDEART_INTERN_FIRMA', 2);
define('ANMELDEART_INTERN_PAAR', 3);
define('ANMELDEART_INTERN_MEHRFACH', 4);
define('ANMELDEART_INTERN_HOTEL', 5);
define('ANMELDEART_INTERN_KINDERKURS', 6);


define('ANMELDEPFAD_ART', 'anmeldepfad_art');


define('ANMELDEPFAD_SCHRITTMAX', 'anmeldepfad_schrittmax');


define('ANMELDEPFAD_SCHRITT', 'anmeldepfad_schritt');


define('KURSFIELD_FILTER_SESSION_NAME', 'kursfieldfilter');


define('DELIMITER_FILTER_KURSFIELD', '|');


define('RANDOM_LINK_SESS_KEY', 'rdlid');




define('ANMELDUNGONLINE_OK', 1);
define('ANMELDUNGONLINE_OFFLINE', 2);
define('ANMELDUNGONLINE_KURSVOLL', 3);
define('ANMELDUNGONLINE_AUSFALL', 4);
define('ANMELDUNGONLINE_KNRUNGUELTIG', 5);
define('ANMELDUNGONLINE_KURSENDE', 6);
define('ANMELDUNGONLINE_ANMELDESCHLUSS', 7);
define('ANMELDUNGONLINE_ABSCHLUSS', 8);
define('ANMELDUNGONLINE_TECHNISCHEPROBLEME', 9);
define('ANMELDUNGONLINE_ANMELDEBEGINN', 10);

define('ANMELDUNGONLINE_KURSBEGINN', 11);
define('ANMELDUNGONLINE_WEBFLAGKEINE', 12);
define('ANMELDUNGONLINE_DEAKTIVIERT', 13);




define('STATUS_SCHWERE_REIHENFOLGE', array(ANMELDUNGONLINE_OK, ANMELDUNGONLINE_KURSVOLL, ANMELDUNGONLINE_OFFLINE, ANMELDUNGONLINE_KNRUNGUELTIG, ANMELDUNGONLINE_ABSCHLUSS,
                                  ANMELDUNGONLINE_ANMELDEBEGINN, ANMELDUNGONLINE_KURSENDE, ANMELDUNGONLINE_AUSFALL, ANMELDUNGONLINE_ANMELDESCHLUSS,
                                  ANMELDUNGONLINE_TECHNISCHEPROBLEME));



define('REPLIKATMITONLINEBUCHUNG', true);



define('ANMELDUNGPER_MAIL', 0);
define('ANMELDUNGPER_FILE', 1);
define('ANMELDUNGPER_ONLINE', 2);
define('ANMELDUNGPER_DMZ', 3);
define('ANMELDUNGPER_FILEVERIFICATION', 4);
define('DATEIENDUNG_VERIFICATION', '.verify');


define('ANMELDUNG_MATOOL_WIEKUFERWEB', 0);
define('ANMELDUNG_MATOOL_DMZ', 1);
define('ANMELDUNG_MATOOL_MAIL', 2);
define('ANMELDUNG_MATOOL_FILE', 3);
define('ANMELDUNG_MATOOL_ONLINE', 4);




define('ANMELDUNGSOFORTEINBUCHEN_NIE', 0);
define('ANMELDUNGSOFORTEINBUCHEN_TNRUNBEKANNT', 1);



define('ANMELDUNGSOFORTEINBUCHEN_DUBLETTENERKENNUNG_NEIN', 0);
define('ANMELDUNGSOFORTEINBUCHEN_DUBLETTENERKENNUNG_JA', 1);
define('ANMELDUNGSOFORTEINBUCHEN_DUBLETTENERKENNUNG_GETAUSCHTE_NAMEN', 1);

define('TEILNEHMER_IN_MYSQL_ANLEGEN', 0);
define('KEINE_TEILNEHMER_IN_MYSQL_ANLEGEN', 1);

define('SERVER_WARTUNGSARBEITEN_BEGINN', '');
define('SERVER_WARTUNGSARBEITEN_ENDE', '');

define('SCHALTER_SOFORTEINBUCHEN', 528);
define('SCHALTER_LOGIN_REGISTRIERUNG_PER_DMZ', 533);
define('SCHALTER_SPENDENFOND', 539);
define('SCHALTER_STANDORTE_UEBER_KENNZEICHEN', 546);
define('SCHALTER_VERBRAUCHERSERVICE_ODER_ZENTRALE', 604);


define('FONTSIZE_SMALL', -1);
define('FONTSIZE_NORMAL', 1);
define('FONTSIZE_BIG', 2);
define('FONTSIZE_EXTRABIG', 3);



define('WB_SIGHT_PART_HEADER', '0');
define('WB_SIGHT_PART_BODY', '1');
define('WB_SIGHT_PART_FOOTER', '2');
define('WB_SIGHT_PART_NOCOLUMN', '3');
define('WB_SIGHT_PART_NODATA', '4');



define('PREFIX_KOMMBEZ', 'kommbez_');


define('FONTSIZE_SESSION_VAR', 'fontsize');





define('WBT3_REDIRECT_KALENDER', '&amp;wbt3_redirect=kalender');


define('SALT', 'pkNd8os3');


define('WBT3_REDIRECT_WARENKORB', '&amp;wbt3_redirect=warenkorb');


define('RFC_SMTP_LINEBREAK', "\r\n");


define('SMTP_CONTENTTYPE_HTML', 'text/html; charset="' . UTF_8 . '"; format=flowed');


define('SMTP_CONTENTTYPE_TEXT', 'text/plain; charset="' . UTF_8 . '"; format=flowed');







define('SMTP_CONTENTTYPE_XML', 'text/plain; charset="' . UTF_8 . '";  format=flowed');

define('FILENAME_SYSTEMSETTINGS', 'allgeinstell.cfg');

define('FILENAME_MAIL_ERROR_LOG', 'mailerror.log');


define('DARSTELLUNG_MIT_LEFT_MAIN_MENU', '0');

define('DARSTELLUNG_LEER_NUR_INHALT', '1');

define('DARSTELLUNG_MIT_BANNER', '2');

define('DARSTELLUNG_OHNE_BANNER', '3');






if (!function_exists('stripslashes_deep')) {
  function stripslashes_deep($value)
  {
    return is_array($value)
              ? array_map('stripslashes_deep', $value)
              : stripslashes($value);
  }
}


if (version_compare(PHP_VERSION, '7.4.0') == -1 && function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
  $_GET = stripslashes_deep($_GET);
  $_POST = stripslashes_deep($_POST);
  $_COOKIE = stripslashes_deep($_COOKIE);
  $_REQUEST = stripslashes_deep($_REQUEST);
}




$tmp = ini_get('max_execution_time');
if ($tmp == '' || ((int)$tmp <= 30)) {
  ini_set('max_execution_time', '60');
}




if (file_exists(ConstantOperations::getUserConstantsPath())) {
  include_once ConstantOperations::getUserConstantsPath();
}


if (!defined('DEVELOP')) {
  define('DEVELOP', false);
}


if (!defined('DEBUG')) {
  define('DEBUG', false);
}


if (!defined('PRAESENTATION')) {
  define('PRAESENTATION', false);
}

if (!DEBUG) {
  $modifier = E_ALL & ~E_NOTICE & ~E_WARNING;
  if (defined('E_DEPRECATED')) {
    $modifier = $modifier & ~E_DEPRECATED;
  }
  $modifier = $modifier & ~E_STRICT;
  error_reporting($modifier);

  if (version_compare(PHP_VERSION, '8.3.0')) { 
    assert_options(ASSERT_ACTIVE, false);
  }
} else {
  error_reporting(-1 & ~E_STRICT);
  
  if (version_compare(PHP_VERSION, '8.3.0')) { 
    assert_options(ASSERT_ACTIVE, true);
    
    assert_options(ASSERT_CALLBACK, 'assert_callback');
    assert_options(ASSERT_WARNING, false);
  }

  
  function assert_callback($pFile, $pLine, $pMessage = '')
  {
    $class = '';
    $function = '';
    $args = array();

    
    $backTrace = debug_backtrace();
    if (isset($backTrace[2])) {
      $class = (isset($backTrace[2]['class']) ? $backTrace[2]['class'] : '');
      $function = (isset($backTrace[2]['function']) ? $backTrace[2]['function'] : '');
      $args = (isset($backTrace[2]['args']) ? $backTrace[2]['args'] : array());
    }

    $aufruf = ($class != '' ? $class . '::' : '');
    if (is_object($function)) {
      $function = get_class($function);
    }

    $args = array_map(static function($arg) {
      if (is_object($arg)) {
        return get_class($arg);
      } elseif (is_array($arg)) {
        return print_r($arg, true);
      } else {
        return $arg;
      }
    }, $args);

    $aufruf .= ($function != '' ? $function . '(' . implode(', ', $args) . ')' : '');

    echo '<div class="assert_message">'
         . 'Assert fehlgeschlagen' . "<br>\n"
         . 'Pfad: ' . $pFile . "<br>\n"
         . 'Zeile: ' . $pLine . "<br>\n";
    if ($aufruf) {
      echo 'Aufruf: ' . $aufruf . "<br>\n";
    }
    if ($pMessage) {
      echo 'Ausdruck: ' . $pMessage;
    }
    echo '</div>';
  }
}


if (!defined('INDEXSCRIPT')) {
  define('INDEXSCRIPT', 'index.php');
}

if (!defined('CONTENTTYPE')) {
  define('CONTENTTYPE', 'HTML');
}

if (!defined('CURRENCY')) {
  define('CURRENCY', 'EUR');
}

if (!defined('KW_IBAN_LENGTH')) {
  define('KW_IBAN_LENGTH', 22);
}

if (!defined('KW_INTRANET')) {
  define('KW_INTRANET', false);
}


if (!defined('VALIDATE_PATTERN_TEL')) {
  define('VALIDATE_PATTERN_TEL', '');
}

if (!defined('KTOPRUEF_TYP')) {
  define('KTOPRUEF_TYP', 'webservice');
}

if (!defined('KTOPRUEF_AUSLAENDISCHE_BIC_VEREINFACHT')) {
  define('KTOPRUEF_AUSLAENDISCHE_BIC_VEREINFACHT', false);
}

if (!defined('KW_MULTILANG_NODEFAULT')) {
  define('KW_MULTILANG_NODEFAULT', false);
}

if (!defined('SESSION_PREFIX')) {
  define('SESSION_PREFIX', 'wb_');
}

if (!defined('SESSION_PREFIX_ANM')) {
  define('SESSION_PREFIX_ANM', 'anm_');
}

if (!defined('SESSION_PREFIX_DRUCK')) {
  define('SESSION_PREFIX_DRUCK', 'druck_');
}

if (!defined('SESSION_PREFIX_EINST')) {
  define('SESSION_PREFIX_EINST', 'einst_');
}

if (!defined('SESSION_PREFIX_EPAY')) {
  define('SESSION_PREFIX_EPAY', 'epay_');
}

if (!defined('SESSION_PREFIX_FILTER')) {
  define('SESSION_PREFIX_FILTER', 'filter_');
}

if (!defined('SESSION_PREFIX_SUCHE')) {
  define('SESSION_PREFIX_SUCHE', 'suche_');
}

if (!defined('SESSION_PREFIX_WK')) {
  define('SESSION_PREFIX_WK', 'wk_');
}

if (!defined('SESSION_PREFIX_INTERN') || SESSION_PREFIX_INTERN == '') {
  $section_prefix = md5(BASEDIR);
  define('SESSION_PREFIX_INTERN', 'int' . $section_prefix . '_');
}

if (!defined('SESSION_PREFIX_WT')) {
  define('SESSION_PREFIX_WT', 'wt_');
}

if (!defined('SESSION_PREFIX_GV')) {
  define('SESSION_PREFIX_GV', 'gv_');
}


if (!defined('SESSION_PREFIX_WM')) {
  define('SESSION_PREFIX_WM', 'wm_');
}

if (!defined('SESSION_PREFIX_WT_INTERN') || SESSION_PREFIX_WT_INTERN == '') {
  $section_prefix = md5(BASEDIR);
  define('SESSION_PREFIX_WT_INTERN', 'wt_int' . $section_prefix . '_');
}

if (!defined('WB_SESSION_PREFIX_NL')) {
  define('WB_SESSION_PREFIX_NL', 'nl_');
}

if (!defined('SIGHTS_LOADFROMFILE')) {
  define('SIGHTS_LOADFROMFILE', true);
}

if (!defined('SIGHTS_PATH')) {
  define('SIGHTS_PATH', 'layout' . DIRECTORY_SEPARATOR . 'sichten');
}

if (!defined('SIGHTS_PREFIX')) {
  define('SIGHTS_PREFIX', 'sicht-');
}

if (!defined('SETTINGS_LOADFROMFILE')) {
  define('SETTINGS_LOADFROMFILE', true);
}


if (!defined('SETTINGS_PATH')) {
  define('SETTINGS_PATH', 'layout' . DIRECTORY_SEPARATOR . 'settings');
}

if (!defined('SETTINGS_PREFIX')) {
  define('SETTINGS_PREFIX', 'settings-');
}

if (!defined('SETTINGS_SUFFIX')) {
  define('SETTINGS_SUFFIX', '.stg');
}

if (!defined('CURL_USE')) {
  define('CURL_USE', false);
}

if (!defined('CURL_PROXYSERVER')) {
  define('CURL_PROXYSERVER', '');
}

if (!defined('CURL_PROXYPASS')) {
  define('CURL_PROXYPASS', '');
}


if (!defined('STATIC_IP')) {
  define('STATIC_IP', '92.79.147.171');
}


if (!defined('STATIC_IP2')) {
  define('STATIC_IP2', '87.193.223.98');
}


if (!defined('SEITEN_BLAETTERN_DELIMITER')) {
  define('SEITEN_BLAETTERN_DELIMITER', '&nbsp;|&nbsp;');
}



if (!defined('ENCODING')) {
  define('ENCODING', 'UTF_8');
}

if (!defined('DEBUG_FILE_SIZE')) {
  define('DEBUG_FILE_SIZE', 2 * 1024 * 1024);
} 

if (!defined('SHOW_LEFTMENU')) {
  define('SHOW_LEFTMENU', true);
}


if (!defined('ANKER_NAME_CONTENT')) {
  define('ANKER_NAME_CONTENT', 'inhalt');
}

if (!defined('WEITEREMPFEHLEN_KATHAUPT')) {
  define('WEITEREMPFEHLEN_KATHAUPT', 11);
}


if (!defined('SEARCHENGINE_FUNCTIONS')) {
  define('SEARCHENGINE_FUNCTIONS', true);
}


if (!defined('KUFERSQL_BILDER_BASEDIR')) {
  define('KUFERSQL_BILDER_BASEDIR', '');
}
if (!defined('KUFERWEB_BILDER_LINKPREFIX')) {
  define('KUFERWEB_BILDER_LINKPREFIX', '');
}


if (!defined('KUFERSQL_DOKUMENTEWEB_BASEDIR')) {
  define('KUFERSQL_DOKUMENTEWEB_BASEDIR', '');
}

if (!defined('KW_BOOTSTRAP')) {
  define('KW_BOOTSTRAP', false);
}

if (!defined('KW_BOOTSTRAP4')) {
  define('KW_BOOTSTRAP4', false);
}

if (!defined('KW_BOOTSTRAP5')) {
  define('KW_BOOTSTRAP5', false);
}

if (!defined('T3_BASEURL')) {
  define('T3_BASEURL', true);
}

if (!defined('KW_JQUERY_SELECT')) {
  define('KW_JQUERY_SELECT', false);
}


if (!defined('LOG_DIR')) {
  define('LOG_DIR', '..' . DIRECTORY_SEPARATOR . 'log');
}

if (!defined('KW_CACHE_DIR')) {
  define('KW_CACHE_DIR', '..' . DIRECTORY_SEPARATOR . 'log' . DIRECTORY_SEPARATOR . 'cache');
}


if (!defined('DEBUGANMELDUNG')) {
  define('DEBUGANMELDUNG', false);
}

if (!defined('SPLITMEHRFACHANMELDUNG')) {
  define('SPLITMEHRFACHANMELDUNG', WB_SPLITMEHRFACHANMELDUNG_NIE);
}


if (!defined('WEBTOOLS_SETTINGS_PATH')) {
  define('WEBTOOLS_SETTINGS_PATH', 'webtools' . DIRECTORY_SEPARATOR . 'config');
}

if (!defined('WB_LOG_PREFIX_NL')) {
  define('WB_LOG_PREFIX_NL', 'Newsletterplugin: ');
}

if (!defined('WB_LOG_PREFIX_STAMMHOERER')) {
  define('WB_LOG_PREFIX_STAMMHOERER', 'Stammhörer: ');
}

if (!defined('NO_MENUE_DIV')) {
  define('NO_MENUE_DIV', false);
}

if (!defined('WORDPRESS_CMS_USED')) {
  define('WORDPRESS_CMS_USED', false);
}

if (!defined('TYPO3_CMS_USED')) {
  define('TYPO3_CMS_USED', false);
}


if (!defined('TYPO3_CMS_RELPATH') && !defined('TYPO3_CMS_USED_EXTERN')) {
  define('TYPO3_CMS_RELPATH', '../');
}

if (!defined('SERVER_PFAD')) {
  define('SERVER_PFAD', '');
}

if (!defined('REMOVE_DIV_HAUPTSEITE_OHNE_STATUS')) {
  define('REMOVE_DIV_HAUPTSEITE_OHNE_STATUS', false);
}



if (!defined('NO_CLEAR_BEFORE_HAUPTSEITE_KURSE')) {
  define('NO_CLEAR_BEFORE_HAUPTSEITE_KURSE', false);
}


if (!defined('TRENNER_VORBELEGUNG')) {
  define('TRENNER_VORBELEGUNG', ':_:');
}


if (!defined('TRENNER_AUSWAHL')) {
  define('TRENNER_AUSWAHL', ':opt:');
}


define('STATUSART_TEILNEHMER', 'tn');
define('STATUSART_ANWESENHEITSKONTROLLE', 'ak');
define('STATUSART_KURSTAGE', 'kt');
define('STATUSART_OHNE', 'nx');
define('STATUSART_TEILNEHMEREINGABE', 'tn_eingabe');
define('STATUSART_FIRMA', 'fa');
define('STATUSART_KURSTAGEUEBERSICHT', 'kt_uebersicht');
define('STATUSART_KURS', 'k');



if (!defined('EPAYMENT_PAYPAL')) {
  define('EPAYMENT_PAYPAL', 2);
}

if (!defined('EPAYMENT_NOVALNET')) {
  define('EPAYMENT_NOVALNET', 4);
}
if (!defined('EPAYMENT_GIROCHECKOUT')) {
  define('EPAYMENT_GIROCHECKOUT', 5);
}
if (!defined('EPAYMENT_PAYPALPLUS')) {
  define('EPAYMENT_PAYPALPLUS', 6);
}
if (!defined('EPAYMENT_WIRECARDEPP')) {
  define('EPAYMENT_WIRECARDEPP', 7);
}
if (!defined('EPAYMENT_PMPAYMENT')) {
  define('EPAYMENT_PMPAYMENT', 8);
}
if (!defined('EPAYMENT_GIROCHECKOUT_PAYDIREKT')) {
  define('EPAYMENT_GIROCHECKOUT_PAYDIREKT', 9);
}
if (!defined('EPAYMENT_GIROCHECKOUT_GIROPAY')) {
  define('EPAYMENT_GIROCHECKOUT_GIROPAY', 10);
}
if (!defined('EPAYMENT_GIROCHECKOUT_CREDITCARD')) {
  define('EPAYMENT_GIROCHECKOUT_CREDITCARD', 11);
}
if (!defined('EPAYMENT_PAYPALCHECKOUT')) {
  define('EPAYMENT_PAYPALCHECKOUT', 12);
}
if (!defined('EPAYMENT_GIROCHECKOUT_EPS')) {
  define('EPAYMENT_GIROCHECKOUT_EPS', 13);
}
if (!defined('EPAYMENT_EPAYBL_PAYPAL')) {
  define('EPAYMENT_EPAYBL_PAYPAL', 14);
}
if (!defined('EPAYMENT_EPAYBL_PAYDIREKT')) {
  define('EPAYMENT_EPAYBL_PAYDIREKT', 15);
}
if (!defined('EPAYMENT_EPAYBL_GIROPAY')) {
  define('EPAYMENT_EPAYBL_GIROPAY', 16);
}
if (!defined('EPAYMENT_EPAYBL_CREDITCARD')) {
  define('EPAYMENT_EPAYBL_CREDITCARD', 17);
}
if (!defined('EPAYMENT_GIROCHECKOUT_PAYPAL')) {
  define('EPAYMENT_GIROCHECKOUT_PAYPAL', 18);
}
if (!defined('EPAYMENT_EPAY21')) {
  define('EPAYMENT_EPAY21', 20);
}

if (!defined('EPAYMENT_SCHNITTSTELLENARRAY')) {
  define('EPAYMENT_SCHNITTSTELLENARRAY', array(
    2 => 'paypal',
    4 => 'novalnet',
    5 => 'girocheckout',
    6 => 'paypalplus',
    7 => 'wirecardepp',
    8 => 'pmpayment',
    9 => 'girocheckout_paydirekt',
    10 => 'girocheckout_giropay',
    11 => 'girocheckout_creditcard',
    12 => 'paypalcheckout',
    13 => 'girocheckout_eps',
    14 => 'epaybl_paypal',
    15 => 'epaybl_paydirekt',
    16 => 'epaybl_giropay',
    17 => 'epaybl_creditcard',
    18 => 'girocheckout_paypal',
    20 => 'epay21'
  ));
}

if (!defined('HOOKS_STOP_CALLER')) {
  define('HOOKS_STOP_CALLER', 0);
}





if (!defined('SAFER_HEADER')) {
  define('SAFER_HEADER', true);
}
if (!defined('SAFER_HTTPS')) {
  define('SAFER_HTTPS', false);
}
if (!defined('REFERRER_POLICY')) {
  define('REFERRER_POLICY', 'strict-origin-when-cross-origin');
}
if (!defined('SAFER_HEADER_FRAME_ANCESTORS')) {
  define('SAFER_HEADER_FRAME_ANCESTORS', '');
}

if (CONTENTTYPE == 'HTML') {
  define('CLOSE_TAG', '>');
} elseif (CONTENTTYPE == 'XHTML') {
  define('CLOSE_TAG', ' />');
} else {
  define('CLOSE_TAG', '>');
}

if (!defined('SMART_BLOCK_BOTS')) {
  define('SMART_BLOCK_BOTS', false);
}

if (!defined('SECOND_QUERY_FOR_STICHWORT')) {
  $dbop = DBOperation::getInstance(1);
  if ($dbop->checkConnection()) {
    define('SECOND_QUERY_FOR_STICHWORT', DBWorkBASysSettings::isKlagenfurt());
  } else {
    define('SECOND_QUERY_FOR_STICHWORT', false);
  }
}


define('BR', '<br' . CLOSE_TAG . "\n");


define('SHOW_DOKU_TN_ALL', 1);


define('SHOW_DOKU_TN_LOGIN', 2);


define('SHOW_DOKU_TN_INKURS', 3);



define('PERSDAT_VAR_NR', 'Nr des Stammdatensatzes');
define('PERSDAT_VAR_NAME', 'Name');
define('PERSDAT_VAR_VORNAME', 'Vorname');
define('PERSDAT_VAR_AENDERUNGEN', 'Änderungen an den Daten');
define('PERSDAT_VAR_BENUTZERGRUPPE', 'Benutzergruppe');















  
if (isset($_SERVER['HTTP_REFERER'])) {
  StatistikAPI::writeReferer($_SERVER['HTTP_REFERER']);
}





define('ANMELDUNG', 'anmelden');
define('LOGIN', 'login');







  

if (!SessionOperations::isKuferTools()) {
  
  SessionOperations::storeLanguage2Mode();
}


define('WEBSERVICE_URL', 'https://service.kufer.de/');


define('PORTRAIT_FLAG_KUFERTOOLS', 1);


define('PORTRAIT_FLAG_KUFERWEB', 2);


define('PORTRAIT_FLAG_BILD_LOESCHEN', 4);

define('KALENDER_KURSBEGINN', 0);
define('KALENDER_KURSTAGE', 1);

define('BUNDESLAND_BADEN_WUERTTEMBERG', 'Baden-Württemberg');
define('BUNDESLAND_BAYERN', 'Bayern');
define('BUNDESLAND_BERLIN', 'Berlin');
define('BUNDESLAND_BRANDENBURG', 'Brandenburg');
define('BUNDESLAND_BREMEN', 'Bremen');
define('BUNDESLAND_HAMBURG', 'Hamburg');
define('BUNDESLAND_HESSEN', 'Hessen');
define('BUNDESLAND_MECKLENBURG_VORPOMMERN', 'Mecklenburg-Vorp.');
define('BUNDESLAND_NIEDERSACHSEN', 'Niedersachsen');
define('BUNDESLAND_NORDRHEIN_WESTFALEN', 'Nordrhein-Westfalen');
define('BUNDESLAND_RHEINLAND_PFALZ', 'Rheinland-Pfalz');
define('BUNDESLAND_SAARLAND', 'Saarland');
define('BUNDESLAND_SACHSEN', 'Sachsen');
define('BUNDESLAND_SACHSEN_ANHALT', 'Sachsen-Anhalt');
define('BUNDESLAND_SCHLESWIG_HOLSTEIN', 'Schleswig-Holstein');
define('BUNDESLAND_THUERINGEN', 'Thüringen');



define('PLUGIN_BERATUNGSTAGE', 'beratungstage' . DIRECTORY_SEPARATOR . 'beratungstage.php');
define('PLUGIN_EPAYMENT', 'epayment' . DIRECTORY_SEPARATOR . 'epayment.php');
define('PLUGIN_FEEDBACK', 'feedback' . DIRECTORY_SEPARATOR . 'feedback.php');
define('PLUGIN_GRILLHUETTENVERWALTUNG', 'grillhuettenverwaltung' . DIRECTORY_SEPARATOR . 'grillhuettenverwaltung.php');
define('PLUGIN_GUTSCHEIN', 'giftvoucher' . DIRECTORY_SEPARATOR . 'giftvoucher.php');
define('PLUGIN_MOODLE', 'moodle' . DIRECTORY_SEPARATOR . 'SoapMoodle.php');
define('PLUGIN_MPAY24', 'mpay24' . DIRECTORY_SEPARATOR . 'mpay24.php');
define('PLUGIN_NEWS', 'news' . DIRECTORY_SEPARATOR . 'news.php');
define('PLUGIN_PLANUNGSBOGEN_KBS', 'planungsbogen_kbs' . DIRECTORY_SEPARATOR . 'planungsbogen_kbs.php');
define('PLUGIN_SEPA_WITTENBERG', 'sepalastschrift_wittenberg' . DIRECTORY_SEPARATOR . 'lastschriftmandat.php');
define('PLUGIN_UNIVIE', 'univie' . DIRECTORY_SEPARATOR . 'univie.php');
define('PLUGIN_KUENDIGUNG', 'kuendigung' . DIRECTORY_SEPARATOR . 'kuendigung.php');

if (SAFER_HEADER) {
  
  header('X-Content-Type-Options: nosniff');

  if (SAFER_HEADER_FRAME_ANCESTORS != '') {
    $hosts = explode(' ', SAFER_HEADER_FRAME_ANCESTORS);
    
    

    
    header('Content-Security-Policy: frame-ancestors ' . SAFER_HEADER_FRAME_ANCESTORS);
    SessionOperations::enforceSameSiteForSessionCookie('none');
  } else {
    
    header('X-Frame-Options: SAMEORIGIN');
    SessionOperations::setSameSiteForSessionCookie();
  }
}

if (SAFER_HTTPS) {
  
  
  
  header('Strict-Transport-Security: max-age=10893354; includeSubDomains');
}
if (REFERRER_POLICY != '') {
  $validate = in_array(REFERRER_POLICY, array('strict-origin-when-cross-origin',
    'strict-origin', 'no-referrer', 'no-referrer-when-downgrade',
    'same-origin', 'origin', 'origin-when-cross-origin'));
  if ($validate) {
    header('Referrer-Policy: ' . REFERRER_POLICY);
  }
}

SessionOperations::setHttpOnlyForSessionCookie();
if (RequestOperations::isHttps()) {
  SessionOperations::setSecureForSessionCookie();
}