function __construct()
 {
     $this->tr = new trace('html');
     /*
      * check for show stoppers:
      * 1) presence of settings file
      * 2) correct authentication
      * 3) mandatory configuration constants
      */
     if (!defined("PATH_TO_SETTINGS")) {
         die("<p>Constant PATH_TO_SETTINGS is undefined.");
     }
     $close_gate = '';
     if (file_exists(PATH_TO_SETTINGS)) {
         require_once PATH_TO_SETTINGS;
         //TODO: TRACE_LEVEL and EXTJS_UI_ENABLED are available after call of proofreadOptionalSettings
         //move proofreadOptionalSettings up here
         $this->debug = defined('TRACE_LEVEL') && constant('TRACE_LEVEL') < 4 ? false : true;
         $this->use_extjs = defined('EXTJS_UI_ENABLED') ? constant('EXTJS_UI_ENABLED') : false;
         $this->authentication_enabled = defined('YAPHOBIA_WEB_INTERFACE_PASSWORD') && constant('YAPHOBIA_WEB_INTERFACE_PASSWORD') != "";
         if ($this->authentication_enabled) {
             $close_gate = $this->authenticate();
         }
         $sv = new settingsValidator();
         $sermon = $sv->proofreadMandatorySettings();
         if ($sermon != "") {
             $close_gate = '<div class="welcome" style="text-align: left;">' . $sermon . '</div>';
         }
     } else {
         $close_gate = '<div class="welcome"><p>ERROR: There is no configuration file <b>settings.php</b>!<br/>Please copy <b>settings.defaults.php</b> to <b>settings.php</b> and change the options within the file according to your needs.</p></div>';
         $this->authentication_enabled = true;
         //this should prevent category menu from being displayed
     }
     $this->importRequestVars();
     // needed for correct rendering of categorie_menu
     if ($this->xmldata == 0) {
         $this->htmlHeader();
         //render yaphobia header if not in printview
         if ($this->printview === false) {
             print '<div class="yaph_header"><h1>Yaphobia</h1>';
             if ($close_gate == '' && $this->cat != self::CATEGORY_LOGOUT || !$this->authentication_enabled) {
                 $this->render_categorie_menu();
             }
             print "</div><br/>";
         }
         //stop here if a showstopper has occured above
         if ($close_gate != '') {
             print $close_gate . "<br/>";
         } else {
             parent::__construct();
             //connect to database
             $this->installHelperChecks();
             $this->actions();
         }
         $this->htmlFooter();
     } else {
         header("Content-type: text/xml");
         if ($close_gate != '') {
             print $close_gate . "<br/>";
         } else {
             parent::__construct();
             //connect to database
             //$this->installHelperChecks();
             $this->xmlActions();
         }
     }
 }