<?php

    define("ROOT_DIR",dirname(__FILE__)."/../../");
    include(ROOT_DIR."lib/functions.inc");
          $MISConfig = new MISConfig();
        $projectDOM = new DOMDocument('1.0', 'utf-8');
        $projectDOM->load($MISConfig->getConfigFile());
        $projectXpath = new DOMXpath($projectDOM);   

        $odbc = utf8_decode($projectXpath->query("/Configuration/Version")->item(0)->getAttribute("odbc"));
        $user = utf8_decode($projectXpath->query("/Configuration/Version")->item(0)->getAttribute("user"));
        $pw = utf8_decode($projectXpath->query("/Configuration/Version")->item(0)->getAttribute("pw"));
//        $user = "sa";
//        $pw = "sa";
        // Welche Views sollen abgefragt werden
        $ViewList = $projectXpath->query("/Configuration/Version/Views/View");
        for($i=0;$i<$ViewList->length;$i++) {
        	$View = $ViewList->item($i);
        	$ViewArr[] = utf8_decode($View->getElementsByTagName("Name")->item(0)->nodeValue);
        	$ViewDescArr[] = utf8_decode($View->getElementsByTagName("Description")->item(0)->nodeValue);
        }
        // Datenbankversionsfeld
        $Views = $projectXpath->query("/Configuration/Version/Views");
        $VersionFPFeld = utf8_decode($Views->item(0)->getAttribute("fp_feld"));
        //$VersionFPFeldString = "Version Datenbank: ";
        // Datenbankversionsfeld Bezeichnung
        $VersionFPFeldString = utf8_decode($Views->item(0)->getAttribute("fp_description"));
        // View Version Feld
        $VersionViewFeld = utf8_decode($Views->item(0)->getAttribute("view_feld"));
        //$VersionViewString = "Version View: ";
        // View Version Bezeichnung
        $VersionViewFeldString = utf8_decode($Views->item(0)->getAttribute("view_description"));
	  //$VersionViewFeldString = "Version View:  ";

?>