Przeglądaj źródła

grobe Fehler behoben

- utf8_encode und utf8_decode ist veraltet
- diverse Klassenattribute wurden nicht sauber definiert
- Imagemagick angepasst
- __autoload
gc-server3 1 rok temu
rodzic
commit
1f1c82a603

+ 77 - 0
.vscode/settings.json

@@ -0,0 +1,77 @@
+{
+    "files.associations": {
+        "*.inc": "php",
+        "*.php5": "php"
+    },
+    "intelephense.stubs": [
+        "apache",
+        "bcmath",
+        "bz2",
+        "calendar",
+        "com_dotnet",
+        "Core",
+        "ctype",
+        "curl",
+        "date",
+        "dba",
+        "dom",
+        "enchant",
+        "exif",
+        "FFI",
+        "fileinfo",
+        "filter",
+        "fpm",
+        "ftp",
+        "gd",
+        "gettext",
+        "gmp",
+        "hash",
+        "iconv",
+        "imap",
+        "intl",
+        "json",
+        "ldap",
+        "libxml",
+        "mbstring",
+        "meta",
+        "mysqli",
+        "oci8",
+        "odbc",
+        "openssl",
+        "pcntl",
+        "pcre",
+        "PDO",
+        "pgsql",
+        "Phar",
+        "posix",
+        "pspell",
+        "random",
+        "readline",
+        "Reflection",
+        "session",
+        "shmop",
+        "SimpleXML",
+        "snmp",
+        "soap",
+        "sockets",
+        "sodium",
+        "SPL",
+        "sqlite3",
+        "standard",
+        "superglobals",
+        "sysvmsg",
+        "sysvsem",
+        "sysvshm",
+        "tidy",
+        "tokenizer",
+        "xml",
+        "xmlreader",
+        "xmlrpc",
+        "xmlwriter",
+        "xsl",
+        "Zend OPcache",
+        "zip",
+        "zlib",
+        "imagick"
+    ]
+}

+ 3 - 2
apps/MISAuth/MISAuth.class.inc

@@ -32,7 +32,7 @@ class MISAuth extends App {
 			$status = parent::login($p_username,$p_password);
 			$status = parent::login($p_username,$p_password);
 		//}
 		//}
 		if($status == AUTH_LOGGED_IN) {
 		if($status == AUTH_LOGGED_IN) {
-			return array("CMgr.getMODEL().setUser('".utf8_encode($this->getUsername())." ".$this->_getI18N("logout")."');CMgr.getMODEL().__construct();");
+			return array("CMgr.getMODEL().setUser('".utf8_to_latin1($this->getUsername())." ".$this->_getI18N("logout")."');CMgr.getMODEL().__construct();");
 		} elseif($status == AUTH_CONFIRM_LOGIN){
 		} elseif($status == AUTH_CONFIRM_LOGIN){
 			return array("Browser.getElementById('inp_password').value='';CMgr.getAUTH().setInfoMsg('".$this->_getI18N("authConfirmLoginMsg")."');");
 			return array("Browser.getElementById('inp_password').value='';CMgr.getAUTH().setInfoMsg('".$this->_getI18N("authConfirmLoginMsg")."');");
 		} else {
 		} else {
@@ -47,7 +47,8 @@ class MISAuth extends App {
 		$projectDOM = new DOMDocument('1.0', 'utf-8');
 		$projectDOM = new DOMDocument('1.0', 'utf-8');
         $projectDOM->load($MISConfig->getConfigFile());
         $projectDOM->load($MISConfig->getConfigFile());
         $projectXpath = new DOMXpath($projectDOM);
         $projectXpath = new DOMXpath($projectDOM);
-        $configName = $projectXpath->query("/Configuration")->item(0)->getAttribute("Name");
+		$configNode = $projectXpath->query("/Configuration")->item(0);
+		$configName = ($configNode instanceof DOMElement) ? $configNode->getAttribute("Name") : '';
 		return array('CMgr.getMODEL().__construct();CMgr.getMODEL().setConfig("'.$configName.'");CMgr.getMODEL().setUser("'.$this->_getI18N("login").'");');
 		return array('CMgr.getMODEL().__construct();CMgr.getMODEL().setConfig("'.$configName.'");CMgr.getMODEL().setUser("'.$this->_getI18N("login").'");');
 	}
 	}
 	
 	

+ 3 - 3
apps/MISConfig/MISConfig.class.inc

@@ -55,7 +55,7 @@ class MISConfig extends App {
 	}
 	}
 	
 	
 	public function setConfigFile($p_configFile) {
 	public function setConfigFile($p_configFile) {
-		$_SESSION[CONFIG_SESSION]['configFile'] = utf8_encode($p_configFile);
+		$_SESSION[CONFIG_SESSION]['configFile'] = utf8_to_latin1($p_configFile);
 	}
 	}
 	
 	
 	public function getConfigFile() {
 	public function getConfigFile() {
@@ -93,7 +93,7 @@ class MISConfig extends App {
 	public function setNodeValue($p_nodeName,$p_nodeValue,$p_DOM,$p_parentNode,$p_item=0) {
 	public function setNodeValue($p_nodeName,$p_nodeValue,$p_DOM,$p_parentNode,$p_item=0) {
 		$p_Xpath = new DOMXpath($p_DOM);	
 		$p_Xpath = new DOMXpath($p_DOM);	
 		$temp = $p_DOM->createElement($p_nodeName);
 		$temp = $p_DOM->createElement($p_nodeName);
-		$temp->appendChild($p_DOM->createTextNode(utf8_encode($p_nodeValue)));
+		$temp->appendChild($p_DOM->createTextNode(utf8_to_latin1($p_nodeValue)));
 		$nodeList = $p_Xpath->query("./".$p_nodeName,$p_parentNode);
 		$nodeList = $p_Xpath->query("./".$p_nodeName,$p_parentNode);
 		if($nodeList->length >0 && $nodeList->length > $p_item)
 		if($nodeList->length >0 && $nodeList->length > $p_item)
 			$p_parentNode->replaceChild($temp,$p_parentNode->getElementsByTagName($p_nodeName)->item($p_item));
 			$p_parentNode->replaceChild($temp,$p_parentNode->getElementsByTagName($p_nodeName)->item($p_item));
@@ -174,7 +174,7 @@ class MISConfig extends App {
 	
 	
 	public function getDataFile() {
 	public function getDataFile() {
 		$projectDOM = new DOMDocument('1.0', 'iso-8859-1');
 		$projectDOM = new DOMDocument('1.0', 'iso-8859-1');
-		$projectDOM->load($MISConfig->getConfigFile());
+		$projectDOM->load($this->getConfigFile());
 		$projectXpath = new DOMXpath($projectDOM);
 		$projectXpath = new DOMXpath($projectDOM);
 		
 		
 		$dataFile = $projectXpath->query("/Configuration/General/PublishImagePath")->item(0)->nodeValue;
 		$dataFile = $projectXpath->query("/Configuration/General/PublishImagePath")->item(0)->nodeValue;

+ 153 - 153
apps/MISConfigurator/MISConfigurator.class.inc

@@ -52,23 +52,23 @@ class MISConfigurator extends App {
         $PP = $projectDOM->createElement('Publish');
         $PP = $projectDOM->createElement('Publish');
         $PP->setAttribute('ID',$newID);
         $PP->setAttribute('ID',$newID);
         $PP->setAttribute('parentID',$p_parentID);
         $PP->setAttribute('parentID',$p_parentID);
-        $PP->setAttribute('User',utf8_encode($p_username));
-        $PP->setAttribute('Name',utf8_encode(str_replace(" ","_",$p_sectionName)));
-        $PP->setAttribute('Alert',utf8_encode($p_showHauptampel));
+        $PP->setAttribute('User',utf8_to_latin1($p_username));
+        $PP->setAttribute('Name',utf8_to_latin1(str_replace(" ","_",$p_sectionName)));
+        $PP->setAttribute('Alert',utf8_to_latin1($p_showHauptampel));
         $PP->appendChild($projectDOM->createElement('Images'));
         $PP->appendChild($projectDOM->createElement('Images'));
         $projectDOM->getElementsByTagName("Publishes")->item(0)->appendChild($PP);
         $projectDOM->getElementsByTagName("Publishes")->item(0)->appendChild($PP);
         
         
         $SS = $projectDOM->createElement("Scorecard");
         $SS = $projectDOM->createElement("Scorecard");
         $SS->setAttribute("ID",$newID);
         $SS->setAttribute("ID",$newID);
-        $SS->setAttribute("Directory",utf8_encode($p_username)."\\");
-        $SS->setAttribute("Name",utf8_encode(str_replace(" ","_",$p_sectionName)));
+        $SS->setAttribute("Directory",utf8_to_latin1($p_username)."\\");
+        $SS->setAttribute("Name",utf8_to_latin1(str_replace(" ","_",$p_sectionName)));
         $SS->appendChild($projectDOM->createElement("Reports"));
         $SS->appendChild($projectDOM->createElement("Reports"));
         $projectDOM->getElementsByTagname("Scorecards")->item(0)->appendChild($SS);
         $projectDOM->getElementsByTagname("Scorecards")->item(0)->appendChild($SS);
         
         
         $SS = $projectDOM->createElement("Dashboard");
         $SS = $projectDOM->createElement("Dashboard");
         $SS->setAttribute("ID",$newID);
         $SS->setAttribute("ID",$newID);
-        $SS->setAttribute("Directory",utf8_encode($p_username)."\\");
-        $SS->setAttribute("Name",utf8_encode(str_replace(" ","_",$p_sectionName)));
+        $SS->setAttribute("Directory",utf8_to_latin1($p_username)."\\");
+        $SS->setAttribute("Name",utf8_to_latin1(str_replace(" ","_",$p_sectionName)));
         $SS->appendChild($projectDOM->createElement("Reviews"));
         $SS->appendChild($projectDOM->createElement("Reviews"));
         $projectDOM->getElementsByTagname("Dashboards")->item(0)->appendChild($SS);
         $projectDOM->getElementsByTagname("Dashboards")->item(0)->appendChild($SS);
 
 
@@ -470,7 +470,7 @@ class MISConfigurator extends App {
 			}
 			}
 			$oldNode = $selectedGeneralNodeChilds->item($i);
 			$oldNode = $selectedGeneralNodeChilds->item($i);
 			$newNode = $oldNode->cloneNode(false);
 			$newNode = $oldNode->cloneNode(false);
-			$newTextNode = $projectDOM->createTextNode(utf8_encode($args[($i-$k)]));
+			$newTextNode = $projectDOM->createTextNode(utf8_to_latin1($args[($i-$k)]));
 			$newNode->appendChild($newTextNode);
 			$newNode->appendChild($newTextNode);
 			$oldNode->parentNode->replaceChild($newNode,$oldNode);
 			$oldNode->parentNode->replaceChild($newNode,$oldNode);
 		}
 		}
@@ -534,7 +534,7 @@ class MISConfigurator extends App {
 				$k++;continue;
 				$k++;continue;
 			}
 			}
 			$oldTextNode = $selectedGeneralNodeChilds->item($i)->firstChild;
 			$oldTextNode = $selectedGeneralNodeChilds->item($i)->firstChild;
-			$newTextNode = $projectDOM->createTextNode(utf8_encode($args[($i-$k)]));
+			$newTextNode = $projectDOM->createTextNode(utf8_to_latin1($args[($i-$k)]));
 			$selectedGeneralNodeChilds->item($i)->replaceChild($newTextNode,$oldTextNode);
 			$selectedGeneralNodeChilds->item($i)->replaceChild($newTextNode,$oldTextNode);
 		}
 		}
 		$projectDOM->save($MISConfig->getConfigFile());
 		$projectDOM->save($MISConfig->getConfigFile());
@@ -595,7 +595,7 @@ class MISConfigurator extends App {
 				$k++;continue;
 				$k++;continue;
 			}
 			}
 			$oldTextNode = $selectedGeneralNodeChilds->item($i)->firstChild;
 			$oldTextNode = $selectedGeneralNodeChilds->item($i)->firstChild;
-			$newTextNode = $projectDOM->createTextNode(utf8_encode($args[($i-$k)]));
+			$newTextNode = $projectDOM->createTextNode(utf8_to_latin1($args[($i-$k)]));
 			$selectedGeneralNodeChilds->item($i)->replaceChild($newTextNode,$oldTextNode);
 			$selectedGeneralNodeChilds->item($i)->replaceChild($newTextNode,$oldTextNode);
 		}
 		}
 		$projectDOM->save($MISConfig->getConfigFile());
 		$projectDOM->save($MISConfig->getConfigFile());
@@ -672,14 +672,14 @@ class MISConfigurator extends App {
         $Version = $projectXpath->query('/Configuration/Version')->item(0);
         $Version = $projectXpath->query('/Configuration/Version')->item(0);
         
         
         $Version->setAttribute("show",$p_show);
         $Version->setAttribute("show",$p_show);
-        $Version->setAttribute("odbc",utf8_encode($p_odbc));
-        $Version->setAttribute("user",utf8_encode($p_user));
-        if($p_pw != "     ") $Version->setAttribute("pw",utf8_encode($p_pw));
+        $Version->setAttribute("odbc",utf8_to_latin1($p_odbc));
+        $Version->setAttribute("user",utf8_to_latin1($p_user));
+        if($p_pw != "     ") $Version->setAttribute("pw",utf8_to_latin1($p_pw));
         $Views = $projectXpath->query("./Views",$Version)->item(0);
         $Views = $projectXpath->query("./Views",$Version)->item(0);
-        $Views->setAttribute("fp_feld",utf8_encode($p_fp_feld));
-        $Views->setAttribute("fp_description",utf8_encode($p_fp_description));
-        $Views->setAttribute("view_feld",utf8_encode($p_view_feld));
-        $Views->setAttribute("view_description",utf8_encode($p_view_description));
+        $Views->setAttribute("fp_feld",utf8_to_latin1($p_fp_feld));
+        $Views->setAttribute("fp_description",utf8_to_latin1($p_fp_description));
+        $Views->setAttribute("view_feld",utf8_to_latin1($p_view_feld));
+        $Views->setAttribute("view_description",utf8_to_latin1($p_view_description));
         
         
         $projectDOM->save($MISConfig->getConfigFile());
         $projectDOM->save($MISConfig->getConfigFile());
         return array('CMgr.getMODEL().__construct();');
         return array('CMgr.getMODEL().__construct();');
@@ -851,7 +851,7 @@ class MISConfigurator extends App {
             //if(!$sectionHasValue)$sectionHasValue = ($projectXpath->query('/Configuration/Dashboards/Dashboard/Reviews/Review[./../../@ID="'.$sectionID.'" and ./../../@Directory = "'.$p_username.'\\"]')->length > 0) ? true : false;
             //if(!$sectionHasValue)$sectionHasValue = ($projectXpath->query('/Configuration/Dashboards/Dashboard/Reviews/Review[./../../@ID="'.$sectionID.'" and ./../../@Directory = "'.$p_username.'\\"]')->length > 0) ? true : false;
             $subPublishNodeList = $projectXpath->query('/Configuration/Publishes/Publish[./@parentID = "'.$sectionID.'"]');
             $subPublishNodeList = $projectXpath->query('/Configuration/Publishes/Publish[./@parentID = "'.$sectionID.'"]');
             
             
-            $PIList = $projectXpath->query('/Configuration/Publishes/Publish/Images/Image[./../../@ID="'.$sectionID.'" and ./Directory="'.utf8_encode($p_username).'\\" and ./Active="J"]');
+            $PIList = $projectXpath->query('/Configuration/Publishes/Publish/Images/Image[./../../@ID="'.$sectionID.'" and ./Directory="'.utf8_to_latin1($p_username).'\\" and ./Active="J"]');
 
 
             $newIcon = new Icon("img/package.png");
             $newIcon = new Icon("img/package.png");
             $newIcon->addEventListener(new EventListener("onclick",'ContextMenu.leftClick();ContextMenu.show(this.parentNode.parentNode.parentNode.parentNode.parentNode,event);'));
             $newIcon->addEventListener(new EventListener("onclick",'ContextMenu.leftClick();ContextMenu.show(this.parentNode.parentNode.parentNode.parentNode.parentNode,event);'));
@@ -944,7 +944,7 @@ class MISConfigurator extends App {
 	    $selectedSectionArr = explode("_",$selectedSection);
 	    $selectedSectionArr = explode("_",$selectedSection);
 
 
 		$sectionID = $selectedSectionArr[0];
 		$sectionID = $selectedSectionArr[0];
-		$p_username = utf8_encode($selectedSectionArr[1]);
+		$p_username = utf8_to_latin1($selectedSectionArr[1]);
 		$PIList = $projectXpath->query('/Configuration/Publishes/Publish/Images/Image[./../../@ID="'.$sectionID.'" and ./Directory="'.$p_username.'\\" and ./Active="J"]');
 		$PIList = $projectXpath->query('/Configuration/Publishes/Publish/Images/Image[./../../@ID="'.$sectionID.'" and ./Directory="'.$p_username.'\\" and ./Active="J"]');
 		$Tree = new Tree("administrationMenu2");
 		$Tree = new Tree("administrationMenu2");
 	   for($i=0;$i<$PIList->length;$i++){
 	   for($i=0;$i<$PIList->length;$i++){
@@ -1008,7 +1008,7 @@ class MISConfigurator extends App {
 	    $selectedSectionArr = explode("_",$selectedSection);
 	    $selectedSectionArr = explode("_",$selectedSection);
         
         
         $sectionID = $selectedSectionArr[0];
         $sectionID = $selectedSectionArr[0];
-        $p_username = utf8_encode($selectedSectionArr[1]);
+        $p_username = utf8_to_latin1($selectedSectionArr[1]);
         $PSList = $projectXpath->query('/Configuration/Scorecards/Scorecard/Reports/Report[./../../@ID="'.$sectionID.'" and ./../../@Directory="'.$p_username.'\\"]');
         $PSList = $projectXpath->query('/Configuration/Scorecards/Scorecard/Reports/Report[./../../@ID="'.$sectionID.'" and ./../../@Directory="'.$p_username.'\\"]');
         $Tree = new Tree("administrationMenu3");
         $Tree = new Tree("administrationMenu3");
         
         
@@ -1069,7 +1069,7 @@ class MISConfigurator extends App {
 	    $selectedSectionArr = explode("_",$selectedSection);
 	    $selectedSectionArr = explode("_",$selectedSection);
         
         
         $sectionID = $selectedSectionArr[0];
         $sectionID = $selectedSectionArr[0];
-        $p_username = utf8_encode($selectedSectionArr[1]);
+        $p_username = utf8_to_latin1($selectedSectionArr[1]);
         $PSList = $projectXpath->query('/Configuration/Dashboards/Dashboard/Reviews/Review[./../../@ID="'.$sectionID.'" and ./../../@Directory="'.$p_username.'\\"]');
         $PSList = $projectXpath->query('/Configuration/Dashboards/Dashboard/Reviews/Review[./../../@ID="'.$sectionID.'" and ./../../@Directory="'.$p_username.'\\"]');
         $Tree = new Tree("administrationMenu4");
         $Tree = new Tree("administrationMenu4");
         
         
@@ -1523,7 +1523,7 @@ class MISConfigurator extends App {
             //if(!$sectionHasValue)$sectionHasValue = ($projectXpath->query('/Configuration/Dashboards/Dashboard/Reviews/Review[./../../@ID="'.$sectionID.'" and ./../../@Directory = "'.$p_username.'\\"]')->length > 0) ? true : false;
             //if(!$sectionHasValue)$sectionHasValue = ($projectXpath->query('/Configuration/Dashboards/Dashboard/Reviews/Review[./../../@ID="'.$sectionID.'" and ./../../@Directory = "'.$p_username.'\\"]')->length > 0) ? true : false;
             $subPublishNodeList = $projectXpath->query('/Configuration/Publishes/Publish[./@parentID = "'.$sectionID.'"]');
             $subPublishNodeList = $projectXpath->query('/Configuration/Publishes/Publish[./@parentID = "'.$sectionID.'"]');
             
             
-            $PIList = $projectXpath->query('/Configuration/Publishes/Publish/Images/Image[./../../@ID="'.$sectionID.'" and ./Directory="'.utf8_encode($p_username).'\\" and ./Active="J"]');
+            $PIList = $projectXpath->query('/Configuration/Publishes/Publish/Images/Image[./../../@ID="'.$sectionID.'" and ./Directory="'.utf8_to_latin1($p_username).'\\" and ./Active="J"]');
 
 
             $newIcon = new Icon("img/package.png");
             $newIcon = new Icon("img/package.png");
             //$newIcon->addEventListener(new EventListener("onclick",'ContextMenu.leftClick();ContextMenu.show(this.parentNode.parentNode.parentNode.parentNode.parentNode,event);'));
             //$newIcon->addEventListener(new EventListener("onclick",'ContextMenu.leftClick();ContextMenu.show(this.parentNode.parentNode.parentNode.parentNode.parentNode,event);'));
@@ -1560,7 +1560,7 @@ class MISConfigurator extends App {
 	    $selectedSectionArr = explode("_",$selectedSection);
 	    $selectedSectionArr = explode("_",$selectedSection);
 
 
 		$sectionID = $selectedSectionArr[0];
 		$sectionID = $selectedSectionArr[0];
-		$p_username = utf8_encode($selectedSectionArr[1]);
+		$p_username = utf8_to_latin1($selectedSectionArr[1]);
 		$PIList = $projectXpath->query('/Configuration/Publishes/Publish/Images/Image[./../../@ID="'.$sectionID.'" and ./Directory="'.$p_username.'\\" and ./Active="J"]');
 		$PIList = $projectXpath->query('/Configuration/Publishes/Publish/Images/Image[./../../@ID="'.$sectionID.'" and ./Directory="'.$p_username.'\\" and ./Active="J"]');
 		$Tree = new Tree("administrationMenu11");
 		$Tree = new Tree("administrationMenu11");
 	   for($i=0;$i<$PIList->length;$i++){
 	   for($i=0;$i<$PIList->length;$i++){
@@ -1788,7 +1788,7 @@ class MISConfigurator extends App {
 			$Image->getElementsByTagName("Email")->item(0)->nodeValue = implode(";",$newEmailArr);
 			$Image->getElementsByTagName("Email")->item(0)->nodeValue = implode(";",$newEmailArr);
 		}
 		}
 		$projectDOM->save($MISConfig->getConfigFile());
 		$projectDOM->save($MISConfig->getConfigFile());
-		return array('CMgr.getMODEL().abortRetrieveInput();CMgr.getMODEL().getMain("MISConfigurator","emailSetup","'.utf8_encode($_SESSION["configurator"]["emailSetup"]["section"]).'");');
+		return array('CMgr.getMODEL().abortRetrieveInput();CMgr.getMODEL().getMain("MISConfigurator","emailSetup","'.utf8_to_latin1($_SESSION["configurator"]["emailSetup"]["section"]).'");');
 	}
 	}
 	
 	
 	private function emailExport() {
 	private function emailExport() {
@@ -2147,7 +2147,7 @@ class MISConfigurator extends App {
         $Project->appendChild($Emails);
         $Project->appendChild($Emails);
         
         
         foreach($iPublishesList as $iPublish) { 
         foreach($iPublishesList as $iPublish) { 
-        	$SectionIDs[str_replace("|"," ",str_replace("_"," ",$iPublish->getAttribute("User")))][$iPublish->getAttribute("ID")] = $this->_createSection($ProjectDOM,$ProjectXpath,$iPublish->getAttribute("ID"), $iPublish->getAttribute("parentID"), utf8_decode(str_replace("|"," ",str_replace("_"," ",$iPublish->getAttribute("User")))), utf8_decode($iPublish->getAttribute("Name")),$iPublish->getAttribute("Alert"));
+        	$SectionIDs[str_replace("|"," ",str_replace("_"," ",$iPublish->getAttribute("User")))][$iPublish->getAttribute("ID")] = $this->_createSection($ProjectDOM,$ProjectXpath,$iPublish->getAttribute("ID"), $iPublish->getAttribute("parentID"), latin1_to_utf8(str_replace("|"," ",str_replace("_"," ",$iPublish->getAttribute("User")))), latin1_to_utf8($iPublish->getAttribute("Name")),$iPublish->getAttribute("Alert"));
         }
         }
         
         
         $emailArr = array();
         $emailArr = array();
@@ -2164,7 +2164,7 @@ class MISConfigurator extends App {
             $PublishAlert = $iImage->parentNode->parentNode->getAttribute("Alert");
             $PublishAlert = $iImage->parentNode->parentNode->getAttribute("Alert");
             
             
         	if(!array_key_exists($ImageUser,$SectionIDs) || !array_key_exists($PublishID,$SectionIDs[$ImageUser])) {
         	if(!array_key_exists($ImageUser,$SectionIDs) || !array_key_exists($PublishID,$SectionIDs[$ImageUser])) {
-                $SectionIDs[$ImageUser][$PublishID] = $this->_createSection($ProjectDOM,$ProjectXpath,$PublishID,$PublishParentID,utf8_decode($ImageUser),utf8_decode($PublishName),$PublishAlert);
+                $SectionIDs[$ImageUser][$PublishID] = $this->_createSection($ProjectDOM,$ProjectXpath,$PublishID,$PublishParentID,latin1_to_utf8($ImageUser),latin1_to_utf8($PublishName),$PublishAlert);
                 $Publish = $ProjectXpath->query("./Publish[./@ID='".$SectionIDs[$ImageUser][$PublishID]."']",$Publishes)->item(0);
                 $Publish = $ProjectXpath->query("./Publish[./@ID='".$SectionIDs[$ImageUser][$PublishID]."']",$Publishes)->item(0);
         	}else{
         	}else{
                 $Publish = $ProjectXpath->query("./Publish[./@ID='".$SectionIDs[$ImageUser][$PublishID]."']",$Publishes)->item(0);
                 $Publish = $ProjectXpath->query("./Publish[./@ID='".$SectionIDs[$ImageUser][$PublishID]."']",$Publishes)->item(0);
@@ -2223,7 +2223,7 @@ class MISConfigurator extends App {
             $PublishParentID = $iReport->parentNode->parentNode->getAttribute("parentID");
             $PublishParentID = $iReport->parentNode->parentNode->getAttribute("parentID");
             $PublishName = $iReport->parentNode->parentNode->getAttribute("Name");
             $PublishName = $iReport->parentNode->parentNode->getAttribute("Name");
             if(!array_key_exists($ReportUser,$SectionIDs) || !array_key_exists($PublishID,$SectionIDs[$ReportUser])) {
             if(!array_key_exists($ReportUser,$SectionIDs) || !array_key_exists($PublishID,$SectionIDs[$ReportUser])) {
-                $SectionIDs[$ReportUser][$PublishID] = $this->_createSection($ProjectDOM,$ProjectXpath,$PublishID,$PublishParentID,utf8_decode($ReportUser),utf8_decode($PublishName),false);
+                $SectionIDs[$ReportUser][$PublishID] = $this->_createSection($ProjectDOM,$ProjectXpath,$PublishID,$PublishParentID,latin1_to_utf8($ReportUser),latin1_to_utf8($PublishName),false);
                 $Scorecard = $ProjectXpath->query("./Scorecard[./@ID='".$SectionIDs[$ImageUser][$PublishID]."']",$Scorecards)->item(0);
                 $Scorecard = $ProjectXpath->query("./Scorecard[./@ID='".$SectionIDs[$ImageUser][$PublishID]."']",$Scorecards)->item(0);
             }else{
             }else{
             	$Scorecard = $ProjectXpath->query("./Scorecard[./@ID='".$SectionIDs[$ReportUser][$PublishID]."']",$Scorecards)->item(0);
             	$Scorecard = $ProjectXpath->query("./Scorecard[./@ID='".$SectionIDs[$ReportUser][$PublishID]."']",$Scorecards)->item(0);
@@ -2243,7 +2243,7 @@ class MISConfigurator extends App {
             $PublishParentID = $iReport->parentNode->parentNode->getAttribute("parentID");
             $PublishParentID = $iReport->parentNode->parentNode->getAttribute("parentID");
             $PublishName = $iReport->parentNode->parentNode->getAttribute("Name");
             $PublishName = $iReport->parentNode->parentNode->getAttribute("Name");
             if(!array_key_exists($ReportUser,$SectionIDs) || !array_key_exists($PublishID,$SectionIDs[$ReportUser])) {
             if(!array_key_exists($ReportUser,$SectionIDs) || !array_key_exists($PublishID,$SectionIDs[$ReportUser])) {
-            	$SectionIDs[$ReportUser][$PublishID] = $this->_createSection($ProjectDOM,$ProjectXpath,$PublishID,$PublishParentID,utf8_decode($ReportUser),utf8_decode($PublishName),false);
+            	$SectionIDs[$ReportUser][$PublishID] = $this->_createSection($ProjectDOM,$ProjectXpath,$PublishID,$PublishParentID,latin1_to_utf8($ReportUser),latin1_to_utf8($PublishName),false);
             	$Dashboard = $ProjectXpath->query("./Dashboard[./@ID='".$SectionIDs[$ImageUser][$PublishID]."']",$Dashboards)->item(0);
             	$Dashboard = $ProjectXpath->query("./Dashboard[./@ID='".$SectionIDs[$ImageUser][$PublishID]."']",$Dashboards)->item(0);
             }else{
             }else{
                 $Dashboard = $ProjectXpath->query("./Dashboard[./@ID='".$SectionIDs[$ReportUser][$PublishID]."']",$Dashboards)->item(0);
                 $Dashboard = $ProjectXpath->query("./Dashboard[./@ID='".$SectionIDs[$ReportUser][$PublishID]."']",$Dashboards)->item(0);
@@ -2259,7 +2259,7 @@ class MISConfigurator extends App {
         
         
         foreach($users as $username => $ansicht) {
         foreach($users as $username => $ansicht) {
             if(!in_array($username,$allUsersArr)) {
             if(!in_array($username,$allUsersArr)) {
-                $this->saveRetrieveInput("saveCreateUser",utf8_decode($username),"asdf","asdf","de",$ansicht);
+                $this->saveRetrieveInput("saveCreateUser",latin1_to_utf8($username),"asdf","asdf","de",$ansicht);
             }
             }
         }
         }
         
         
@@ -2289,7 +2289,7 @@ class MISConfigurator extends App {
     	if($this->isRole("master")){
     	if($this->isRole("master")){
         $MISConfig = new MISConfig();
         $MISConfig = new MISConfig();
         $projectDOM = new DOMDocument('1.0', 'iso-8859-1');
         $projectDOM = new DOMDocument('1.0', 'iso-8859-1');
-        $projectDOM->load($MISConfig->getConfigFilesPath().utf8_encode($p_ID));
+        $projectDOM->load($MISConfig->getConfigFilesPath().utf8_to_latin1($p_ID));
         $projectXpath = new DOMXpath($projectDOM);
         $projectXpath = new DOMXpath($projectDOM);
 
 
         $configName = $projectXpath->query("/Configuration")->item(0)->getAttribute("Name");
         $configName = $projectXpath->query("/Configuration")->item(0)->getAttribute("Name");
@@ -2298,17 +2298,17 @@ class MISConfigurator extends App {
         $ret = '<form action="" encoding="utf-8" method="post" onSubmit="return Form.submit(this,\'MISConfigurator\',\'saveRetrieveInput\',\'name\');">';
         $ret = '<form action="" encoding="utf-8" method="post" onSubmit="return Form.submit(this,\'MISConfigurator\',\'saveRetrieveInput\',\'name\');">';
         $ret.= '<fieldset>';
         $ret.= '<fieldset>';
         $ret.= '<legend>'.$this->_getI18N('editConfig').'</legend>';
         $ret.= '<legend>'.$this->_getI18N('editConfig').'</legend>';
-        $ret.= '<input type="hidden" name="saveMethod" value="saveEditConfig"><input type="hidden" name="ID" value="'.utf8_encode($p_ID).'">';
-        $ret.= '<table><tr><td colspan="2">'.$this->_getI18N('editConfigInfoMsg').' <i>'.utf8_encode($p_ID).'</i>.<hr></td><td></td></tr>';
+        $ret.= '<input type="hidden" name="saveMethod" value="saveEditConfig"><input type="hidden" name="ID" value="'.utf8_to_latin1($p_ID).'">';
+        $ret.= '<table><tr><td colspan="2">'.$this->_getI18N('editConfigInfoMsg').' <i>'.utf8_to_latin1($p_ID).'</i>.<hr></td><td></td></tr>';
         $ret.= '<tr><td class="label"><label for="inp_name">'.$this->_getI18N('configName').':</label></td><td><input id="inp_name" name="name" type="text" value="'.$configName.'"></td></tr>';
         $ret.= '<tr><td class="label"><label for="inp_name">'.$this->_getI18N('configName').':</label></td><td><input id="inp_name" name="name" type="text" value="'.$configName.'"></td></tr>';
             $ret.= '<tr><td class="label"><label for="inp_lang">'.$this->_getI18N('lang').':</label></td><td>';
             $ret.= '<tr><td class="label"><label for="inp_lang">'.$this->_getI18N('lang').':</label></td><td>';
             $ret.= '<select id="inp_lang" name="lang">';
             $ret.= '<select id="inp_lang" name="lang">';
             $allLangsArr = I18N::getLanguages();
             $allLangsArr = I18N::getLanguages();
             foreach($allLangsArr as $key => $lang) {
             foreach($allLangsArr as $key => $lang) {
                 if($configLang == $lang)
                 if($configLang == $lang)
-                $ret.= '<option value="'.$lang.'" selected="selected">'.utf8_encode($lang).'</option>';
+                $ret.= '<option value="'.$lang.'" selected="selected">'.utf8_to_latin1($lang).'</option>';
                 else 
                 else 
-                $ret.= '<option value="'.$lang.'">'.utf8_encode($lang).'</option>';
+                $ret.= '<option value="'.$lang.'">'.utf8_to_latin1($lang).'</option>';
             }
             }
             $ret.= '</select>';
             $ret.= '</select>';
         $ret.= '</td></tr>';
         $ret.= '</td></tr>';
@@ -2324,15 +2324,15 @@ class MISConfigurator extends App {
     	if($this->isRole("master")){
     	if($this->isRole("master")){
         $MISConfig = new MISConfig();
         $MISConfig = new MISConfig();
         $projectDOM = new DOMDocument('1.0', 'iso-8859-1');
         $projectDOM = new DOMDocument('1.0', 'iso-8859-1');
-        $projectDOM->load($MISConfig->getConfigFilesPath().utf8_encode($p_configFile));
+        $projectDOM->load($MISConfig->getConfigFilesPath().utf8_to_latin1($p_configFile));
         $projectXpath = new DOMXpath($projectDOM);
         $projectXpath = new DOMXpath($projectDOM);
         
         
         $PP = $projectXpath->query('/Configuration')->item(0);
         $PP = $projectXpath->query('/Configuration')->item(0);
-        $PP->setAttribute("Name",utf8_encode($p_name));
+        $PP->setAttribute("Name",utf8_to_latin1($p_name));
         $PX = $projectXpath->query('/Configuration/General')->item(0);
         $PX = $projectXpath->query('/Configuration/General')->item(0);
         $MISConfig->setNodeValue("Language",$p_lang,$projectDOM,$PX); 
         $MISConfig->setNodeValue("Language",$p_lang,$projectDOM,$PX); 
         
         
-        $projectDOM->save($MISConfig->getConfigFilesPath().utf8_encode($p_configFile));
+        $projectDOM->save($MISConfig->getConfigFilesPath().utf8_to_latin1($p_configFile));
     	}
     	}
         return array('CMgr.getMODEL().__construct();'); 
         return array('CMgr.getMODEL().__construct();'); 
     }
     }
@@ -2348,8 +2348,8 @@ class MISConfigurator extends App {
 		$ret.= '<fieldset>';
 		$ret.= '<fieldset>';
 
 
 		$ret.= '<legend>'.$this->_getI18N('deleteConfig').'</legend>';
 		$ret.= '<legend>'.$this->_getI18N('deleteConfig').'</legend>';
-		$ret.= '<input type="hidden" name="saveMethod" value="saveDeleteConfig"><input type="hidden" name="ID" value="'.utf8_encode($p_configFile).'">';
-		$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('deleteConfigInfoMsg1').' <i>'.utf8_encode($PPName).'</i> '.$this->_getI18N('deleteConfigInfoMsg2').'<hr></td></tr>';
+		$ret.= '<input type="hidden" name="saveMethod" value="saveDeleteConfig"><input type="hidden" name="ID" value="'.utf8_to_latin1($p_configFile).'">';
+		$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('deleteConfigInfoMsg1').' <i>'.utf8_to_latin1($PPName).'</i> '.$this->_getI18N('deleteConfigInfoMsg2').'<hr></td></tr>';
 		$ret.= '<tr><td class="label"><label for="inp_name"><font color="#ee3333">'.$this->_getI18N('deleteUserConfig').':</font></label></td><td><input id="inp_name" name="deleteUserConfig" type="checkbox"></td></tr>';
 		$ret.= '<tr><td class="label"><label for="inp_name"><font color="#ee3333">'.$this->_getI18N('deleteUserConfig').':</font></label></td><td><input id="inp_name" name="deleteUserConfig" type="checkbox"></td></tr>';
 		$ret.= '<tr><td colspan="2"><hr><input class="btn" type="button" value="'.$this->_getI18N('abort').'" onclick="CMgr.getMODEL().abortRetrieveInput();"><input class="btn" type="submit" value="'.$this->_getI18N('delete').'"></td></tr>';
 		$ret.= '<tr><td colspan="2"><hr><input class="btn" type="button" value="'.$this->_getI18N('abort').'" onclick="CMgr.getMODEL().abortRetrieveInput();"><input class="btn" type="submit" value="'.$this->_getI18N('delete').'"></td></tr>';
 		$ret.= '</table>';
 		$ret.= '</table>';
@@ -2366,14 +2366,14 @@ class MISConfigurator extends App {
 		$authDOM->load($MISConfig->authFile);
 		$authDOM->load($MISConfig->authFile);
 		$authXpath = new DOMXpath($authDOM);
 		$authXpath = new DOMXpath($authDOM);
 		if($p_deleteUserConfig == "true") {
 		if($p_deleteUserConfig == "true") {
-			$AUList = $authXpath->query("/auth/users/user[@setting='".utf8_encode(basename($p_configFile,".xml"))."']");
+			$AUList = $authXpath->query("/auth/users/user[@setting='".utf8_to_latin1(basename($p_configFile,".xml"))."']");
 			for($i=0;$i<$AUList->length;$i++) {
 			for($i=0;$i<$AUList->length;$i++) {
 				$AU = $AUList->item($i);
 				$AU = $AUList->item($i);
 				$AU->parentNode->removeChild($AU);
 				$AU->parentNode->removeChild($AU);
 			}
 			}
 			$authDOM->save($MISConfig->authFile);
 			$authDOM->save($MISConfig->authFile);
 	    }
 	    }
-		unlink(ROOT_DIR."apps/MISConfig/data/".utf8_encode($p_configFile));
+		unlink(ROOT_DIR."apps/MISConfig/data/".utf8_to_latin1($p_configFile));
 		
 		
 		$projectDOM = new DOMDocument('1.0', 'iso-8859-1');
 		$projectDOM = new DOMDocument('1.0', 'iso-8859-1');
         $projectDOM->load($MISConfig->getConfigFile());
         $projectDOM->load($MISConfig->getConfigFile());
@@ -2401,7 +2401,7 @@ class MISConfigurator extends App {
 			$ret.= '<form action="" encoding="utf-8" method="post" onSubmit="return Form.submit(this,\'MISConfigurator\',\'saveRetrieveInput\',\'name\');">';
 			$ret.= '<form action="" encoding="utf-8" method="post" onSubmit="return Form.submit(this,\'MISConfigurator\',\'saveRetrieveInput\',\'name\');">';
 			$ret.= '<fieldset>';
 			$ret.= '<fieldset>';
 			$ret.= '<legend><img src="img/package.png">'.str_replace("_"," ",trim($PPName,"_ ")).' '.$this->_getI18N('editSection').'</legend>';
 			$ret.= '<legend><img src="img/package.png">'.str_replace("_"," ",trim($PPName,"_ ")).' '.$this->_getI18N('editSection').'</legend>';
-			$ret.= '<input type="hidden" name="saveMethod" value="saveEditSection"><input type="hidden" name="ID" value="'.utf8_encode($p_ID).'">';
+			$ret.= '<input type="hidden" name="saveMethod" value="saveEditSection"><input type="hidden" name="ID" value="'.utf8_to_latin1($p_ID).'">';
 			$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('editSectionInfoMsg').' <i>'.str_replace("_"," ",trim($PPName,"_ ")).'</i>.<hr></td><td></td></tr>';
 			$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('editSectionInfoMsg').' <i>'.str_replace("_"," ",trim($PPName,"_ ")).'</i>.<hr></td><td></td></tr>';
 			$ret.= '<tr><td class="label"><label for="inp_name">'.$this->_getI18N('sectionName').':</label></td><td><input id="inp_name" name="name" type="text" value="'.str_replace("_"," ",trim($PPName,"_ ")).'"></td></tr>';
 			$ret.= '<tr><td class="label"><label for="inp_name">'.$this->_getI18N('sectionName').':</label></td><td><input id="inp_name" name="name" type="text" value="'.str_replace("_"," ",trim($PPName,"_ ")).'"></td></tr>';
 			$ret.= '<tr><td class="label"><label for="inp_showHauptampel">'.$this->_getI18N('showHauptampel').':</label></td><td><input id="inp_name" name="showHauptampel" type="checkbox" ';
 			$ret.= '<tr><td class="label"><label for="inp_showHauptampel">'.$this->_getI18N('showHauptampel').':</label></td><td><input id="inp_name" name="showHauptampel" type="checkbox" ';
@@ -2430,19 +2430,19 @@ class MISConfigurator extends App {
 		$projectDOM->load($MISConfig->getConfigFile());
 		$projectDOM->load($MISConfig->getConfigFile());
 		$projectXpath = new DOMXpath($projectDOM);
 		$projectXpath = new DOMXpath($projectDOM);
 		
 		
-		$PP = $projectXpath->query('/Configuration/Publishes/Publish[./@ID = "'.$ID.'" and ./@User = "'.utf8_encode($username).'"]')->item(0);
-		$PP->setAttribute("Name",utf8_encode("_".str_replace(" ","_",trim($p_name,"_ "))));
-		$PP->setAttribute("Alert",utf8_encode($p_showHauptampel));
+		$PP = $projectXpath->query('/Configuration/Publishes/Publish[./@ID = "'.$ID.'" and ./@User = "'.utf8_to_latin1($username).'"]')->item(0);
+		$PP->setAttribute("Name",utf8_to_latin1("_".str_replace(" ","_",trim($p_name,"_ "))));
+		$PP->setAttribute("Alert",utf8_to_latin1($p_showHauptampel));
 		
 		
-		$PSList = $projectXpath->query('/Configuration/Scorecards/Scorecard[./@ID = "'.$ID.'" and ./@Directory = "'.utf8_encode($username).'\\"]');
+		$PSList = $projectXpath->query('/Configuration/Scorecards/Scorecard[./@ID = "'.$ID.'" and ./@Directory = "'.utf8_to_latin1($username).'\\"]');
 		for($i=0;$i<$PSList->length;$i++) {
 		for($i=0;$i<$PSList->length;$i++) {
 			$PS = $PSList->item($i);
 			$PS = $PSList->item($i);
-			$PS->setAttribute("Name",utf8_encode("_".str_replace(" ","_",$p_name)));
+			$PS->setAttribute("Name",utf8_to_latin1("_".str_replace(" ","_",$p_name)));
 		}
 		}
-		$PSList = $projectXpath->query('/Configuration/Dashboards/Dashboard[./@ID = "'.$ID.'" and ./@Directory = "'.utf8_encode($username).'\\"]');
+		$PSList = $projectXpath->query('/Configuration/Dashboards/Dashboard[./@ID = "'.$ID.'" and ./@Directory = "'.utf8_to_latin1($username).'\\"]');
 		for($i=0;$i<$PSList->length;$i++) {
 		for($i=0;$i<$PSList->length;$i++) {
 			$PS = $PSList->item($i);
 			$PS = $PSList->item($i);
-			$PS->setAttribute("Name",utf8_encode("_".str_replace(" ","_",$p_name)));
+			$PS->setAttribute("Name",utf8_to_latin1("_".str_replace(" ","_",$p_name)));
 		}
 		}
 		$projectDOM->save($MISConfig->getConfigFile());
 		$projectDOM->save($MISConfig->getConfigFile());
 		if(count($IDsArr)>0){
 		if(count($IDsArr)>0){
@@ -2508,7 +2508,7 @@ class MISConfigurator extends App {
 			if(count($IDArr)>1){
 			if(count($IDArr)>1){
 				$ID = $IDArr[0];
 				$ID = $IDArr[0];
 				$username = $IDArr[1];
 				$username = $IDArr[1];
-				$PPList = $projectXpath->query('/Configuration/Publishes/Publish[./@parentID="'.$ID.'" and ./@User = "'.utf8_encode($username).'"]');
+				$PPList = $projectXpath->query('/Configuration/Publishes/Publish[./@parentID="'.$ID.'" and ./@User = "'.utf8_to_latin1($username).'"]');
 				for($i=0;$i<$PPList->length;$i++) {
 				for($i=0;$i<$PPList->length;$i++) {
 					$PP = $PPList->item($i);
 					$PP = $PPList->item($i);
 					$currentID = $PP->getAttribute('ID');				
 					$currentID = $PP->getAttribute('ID');				
@@ -2533,15 +2533,15 @@ class MISConfigurator extends App {
 		$projectDOM->load($MISConfig->getConfigFile());
 		$projectDOM->load($MISConfig->getConfigFile());
 		$projectXpath = new DOMXpath($projectDOM);
 		$projectXpath = new DOMXpath($projectDOM);
 			
 			
-		$PP = $projectXpath->query('/Configuration/Publishes/Publish[./@ID="'.$p_ID.'" and ./@User = "'.utf8_encode($p_username).'"]');
+		$PP = $projectXpath->query('/Configuration/Publishes/Publish[./@ID="'.$p_ID.'" and ./@User = "'.utf8_to_latin1($p_username).'"]');
 		if($PP->length>0) {
 		if($PP->length>0) {
 			$PP = $PP->item(0);
 			$PP = $PP->item(0);
 			$PP->parentNode->removeChild($PP);
 			$PP->parentNode->removeChild($PP);
-			$PS = $projectXpath->query('/Configuration/Scorecards/Scorecard[./@ID="'.$p_ID.'" and ./@Directory = "'.utf8_encode($p_username).'\\"]');
+			$PS = $projectXpath->query('/Configuration/Scorecards/Scorecard[./@ID="'.$p_ID.'" and ./@Directory = "'.utf8_to_latin1($p_username).'\\"]');
 			for($i=0;$i<$PS->length;$i++){
 			for($i=0;$i<$PS->length;$i++){
 				$PS->item($i)->parentNode->removeChild($PS->item($i));
 				$PS->item($i)->parentNode->removeChild($PS->item($i));
 			}
 			}
-		    $PS = $projectXpath->query('/Configuration/Dashboards/Dashboard[./@ID="'.$p_ID.'" and ./@Directory = "'.utf8_encode($p_username).'\\"]');
+		    $PS = $projectXpath->query('/Configuration/Dashboards/Dashboard[./@ID="'.$p_ID.'" and ./@Directory = "'.utf8_to_latin1($p_username).'\\"]');
 	        for($i=0;$i<$PS->length;$i++){
 	        for($i=0;$i<$PS->length;$i++){
 	            $PS->item($i)->parentNode->removeChild($PS->item($i));
 	            $PS->item($i)->parentNode->removeChild($PS->item($i));
 	        }
 	        }
@@ -2559,7 +2559,7 @@ class MISConfigurator extends App {
 		$ret.= '<fieldset>';
 		$ret.= '<fieldset>';
 
 
 		$ret.= '<legend><img src="img/package.png">'.$this->_getI18N('createSection').'</legend>';
 		$ret.= '<legend><img src="img/package.png">'.$this->_getI18N('createSection').'</legend>';
-		$ret.= '<input type="hidden" name="saveMethod" value="saveCreateSection"><input type="hidden" name="parentID" value="'.$p_parentID.'"><input type="hidden" name="username" value="'.utf8_encode($p_username).'">';
+		$ret.= '<input type="hidden" name="saveMethod" value="saveCreateSection"><input type="hidden" name="parentID" value="'.$p_parentID.'"><input type="hidden" name="username" value="'.utf8_to_latin1($p_username).'">';
 		$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('createSectionInfoMsg').'<hr></td></tr>';
 		$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('createSectionInfoMsg').'<hr></td></tr>';
 		$ret.= '<tr><td class="label"><label for="inp_name">'.$this->_getI18N('sectionName').':</label></td><td><input id="inp_name" name="name" type="text" value=""></td></tr>';
 		$ret.= '<tr><td class="label"><label for="inp_name">'.$this->_getI18N('sectionName').':</label></td><td><input id="inp_name" name="name" type="text" value=""></td></tr>';
 		$ret.= '<tr><td class="label"><label for="inp_showHauptampel">'.$this->_getI18N('showHauptampel').':</label></td><td><input id="inp_showHauptampel" name="showHauptampel" type="checkbox" checked=checked value="1"></td></tr>';
 		$ret.= '<tr><td class="label"><label for="inp_showHauptampel">'.$this->_getI18N('showHauptampel').':</label></td><td><input id="inp_showHauptampel" name="showHauptampel" type="checkbox" checked=checked value="1"></td></tr>';
@@ -2646,7 +2646,7 @@ class MISConfigurator extends App {
 		$ret.= '<fieldset>';
 		$ret.= '<fieldset>';
 
 
 		$ret.= '<legend><img src="img/report.png">'.$this->_getI18N('createReport').'</legend>';
 		$ret.= '<legend><img src="img/report.png">'.$this->_getI18N('createReport').'</legend>';
-		$ret.= '<input type="hidden" name="saveMethod" value="saveCreateReport"><input type="hidden" name="ID" value="'.$p_sectionID.'"><input type="hidden" name="username" value="'.utf8_encode($p_username).'">';
+		$ret.= '<input type="hidden" name="saveMethod" value="saveCreateReport"><input type="hidden" name="ID" value="'.$p_sectionID.'"><input type="hidden" name="username" value="'.utf8_to_latin1($p_username).'">';
 		$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('createReportInfoMsg').'<hr></td></tr>';
 		$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('createReportInfoMsg').'<hr></td></tr>';
 		$ret.= '<tr><td><label for="inp_name">'.$this->_getI18N('reportName').':</label></td><td><input id="inp_name" name="name" type="text" value=""></td></tr>';
 		$ret.= '<tr><td><label for="inp_name">'.$this->_getI18N('reportName').':</label></td><td><input id="inp_name" name="name" type="text" value=""></td></tr>';
 		$ret.= '<tr><td><label for="inp_description">'.$this->_getI18N('reportDescription').':</label></td><td><textarea id="inp_description" name="description"></textarea></td></tr>';
 		$ret.= '<tr><td><label for="inp_description">'.$this->_getI18N('reportDescription').':</label></td><td><textarea id="inp_description" name="description"></textarea></td></tr>';
@@ -2758,13 +2758,13 @@ class MISConfigurator extends App {
 		$PI = $projectDOM->createElement("Image");
 		$PI = $projectDOM->createElement("Image");
 		$PI->setAttribute("ID",$newID);
 		$PI->setAttribute("ID",$newID);
 		$temp = $projectDOM->createElement("Name");
 		$temp = $projectDOM->createElement("Name");
-		$temp->appendChild($projectDOM->createTextNode(utf8_encode($p_reportName)));
+		$temp->appendChild($projectDOM->createTextNode(utf8_to_latin1($p_reportName)));
 		$PI->appendChild($temp);
 		$PI->appendChild($temp);
 		$temp = $projectDOM->createElement("Description");
 		$temp = $projectDOM->createElement("Description");
-		$temp->appendChild($projectDOM->createTextNode(utf8_encode($p_reportDescription)));
+		$temp->appendChild($projectDOM->createTextNode(utf8_to_latin1($p_reportDescription)));
 		$PI->appendChild($temp);
 		$PI->appendChild($temp);
-		$PI->appendChild($projectDOM->createElement("Directory",utf8_encode($p_username)."\\"));
-		$PI->appendChild($projectDOM->createElement("Report",utf8_encode($p_pprReport)));
+		$PI->appendChild($projectDOM->createElement("Directory",utf8_to_latin1($p_username)."\\"));
+		$PI->appendChild($projectDOM->createElement("Report",utf8_to_latin1($p_pprReport)));
 		$PI->appendChild($projectDOM->createElement("GIFGenerate",$p_gifGenerate));
 		$PI->appendChild($projectDOM->createElement("GIFGenerate",$p_gifGenerate));
 		$PI->appendChild($projectDOM->createElement("JPGGenerate",$p_jpgGenerate));
 		$PI->appendChild($projectDOM->createElement("JPGGenerate",$p_jpgGenerate));
 		$PI->appendChild($projectDOM->createElement("PDFGenerate",$p_pdfGenerate1));
 		$PI->appendChild($projectDOM->createElement("PDFGenerate",$p_pdfGenerate1));
@@ -2780,8 +2780,8 @@ class MISConfigurator extends App {
 		}else{
 		}else{
 			$PI->appendChild($projectDOM->createElement("Ansicht",$this->_getView($p_username)));
 			$PI->appendChild($projectDOM->createElement("Ansicht",$this->_getView($p_username)));
 		}
 		}
-		$PI->appendChild($projectDOM->createElement("Email",utf8_encode($p_email)));
-		$PI->appendChild($projectDOM->createElement("ppx",utf8_encode($p_ppxFile)));
+		$PI->appendChild($projectDOM->createElement("Email",utf8_to_latin1($p_email)));
+		$PI->appendChild($projectDOM->createElement("ppx",utf8_to_latin1($p_ppxFile)));
 		
 		
 		$PIs = $projectXpath->query("/Configuration/Publishes/Publish/Images[./../@ID='".$p_sectionID."']")->item(0);
 		$PIs = $projectXpath->query("/Configuration/Publishes/Publish/Images[./../@ID='".$p_sectionID."']")->item(0);
 		$PIs->appendChild($PI);
 		$PIs->appendChild($PI);
@@ -2790,13 +2790,13 @@ class MISConfigurator extends App {
 			$PI = $projectDOM->createElement("Image");
 			$PI = $projectDOM->createElement("Image");
 			$PI->setAttribute("ID",$newID);
 			$PI->setAttribute("ID",$newID);
 			$temp = $projectDOM->createElement("Name");
 			$temp = $projectDOM->createElement("Name");
-			$temp->appendChild($projectDOM->createTextNode(utf8_encode($p_reportName)));
+			$temp->appendChild($projectDOM->createTextNode(utf8_to_latin1($p_reportName)));
 			$PI->appendChild($temp);
 			$PI->appendChild($temp);
 			$temp = $projectDOM->createElement("Description");
 			$temp = $projectDOM->createElement("Description");
-			$temp->appendChild($projectDOM->createTextNode(utf8_encode($p_reportDescription)));
+			$temp->appendChild($projectDOM->createTextNode(utf8_to_latin1($p_reportDescription)));
 			$PI->appendChild($temp);
 			$PI->appendChild($temp);
-			$PI->appendChild($projectDOM->createElement("Directory",utf8_encode($p_username)."\\"));
-			$PI->appendChild($projectDOM->createElement("Report",utf8_encode($p_pprReport)."_Graf"));
+			$PI->appendChild($projectDOM->createElement("Directory",utf8_to_latin1($p_username)."\\"));
+			$PI->appendChild($projectDOM->createElement("Report",utf8_to_latin1($p_pprReport)."_Graf"));
 			if($p_imageGenerate == "GIF") {
 			if($p_imageGenerate == "GIF") {
 				$PI->appendChild($projectDOM->createElement("GIFGenerate","J"));
 				$PI->appendChild($projectDOM->createElement("GIFGenerate","J"));
 				$PI->appendChild($projectDOM->createElement("JPGGenerate","N"));
 				$PI->appendChild($projectDOM->createElement("JPGGenerate","N"));
@@ -2814,7 +2814,7 @@ class MISConfigurator extends App {
 			$PI->appendChild($projectDOM->createElement("PDFImageLayer",$p_pdfLayer2));
 			$PI->appendChild($projectDOM->createElement("PDFImageLayer",$p_pdfLayer2));
 			$PI->appendChild($projectDOM->createElement("Ansicht",$p_view));
 			$PI->appendChild($projectDOM->createElement("Ansicht",$p_view));
 			$PI->appendChild($projectDOM->createElement("Email",$p_email));
 			$PI->appendChild($projectDOM->createElement("Email",$p_email));
-			$PI->appendChild($projectDOM->createElement("ppx",utf8_encode($p_ppxFile)));
+			$PI->appendChild($projectDOM->createElement("ppx",utf8_to_latin1($p_ppxFile)));
 			
 			
 			$PIs = $projectXpath->query("/Configuration/Publishes/Publish/Images[./../@ID='".$p_sectionID."']")->item(0);
 			$PIs = $projectXpath->query("/Configuration/Publishes/Publish/Images[./../@ID='".$p_sectionID."']")->item(0);
 			$PIs->appendChild($PI);
 			$PIs->appendChild($PI);
@@ -2822,7 +2822,7 @@ class MISConfigurator extends App {
 		
 		
 		$projectDOM->save($MISConfig->getConfigFile());
 		$projectDOM->save($MISConfig->getConfigFile());
 		$this->_registerEmails($p_email);
 		$this->_registerEmails($p_email);
-		return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configReportsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configReportsFormCb);');
+		return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configReportsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configReportsFormCb);');
 	}
 	}
 	
 	
 	private function editReport($p_ID) {
 	private function editReport($p_ID) {
@@ -3070,7 +3070,7 @@ class MISConfigurator extends App {
 			$PIpreview->appendChild($projectDOM->createElement("Description"));
 			$PIpreview->appendChild($projectDOM->createElement("Description"));
 			$MISConfig->setNodeValue("Description",$p_reportDescription,$projectDOM,$PIpreview);
 			$MISConfig->setNodeValue("Description",$p_reportDescription,$projectDOM,$PIpreview);
 			$PIpreview->appendChild($projectDOM->createElement("Directory"));
 			$PIpreview->appendChild($projectDOM->createElement("Directory"));
-			$MISConfig->setNodeValue("Directory",utf8_decode($PI->getElementsByTagName("Directory")->item(0)->nodeValue),$projectDOM,$PIpreview);
+			$MISConfig->setNodeValue("Directory",latin1_to_utf8($PI->getElementsByTagName("Directory")->item(0)->nodeValue),$projectDOM,$PIpreview);
 			$PIpreview->appendChild($projectDOM->createElement("Report"));
 			$PIpreview->appendChild($projectDOM->createElement("Report"));
 			$MISConfig->setNodeValue("Report",$p_pprReport,$projectDOM,$PIpreview);			
 			$MISConfig->setNodeValue("Report",$p_pprReport,$projectDOM,$PIpreview);			
 			$PIpreview->appendChild($projectDOM->createElement("GIFGenerate"));
 			$PIpreview->appendChild($projectDOM->createElement("GIFGenerate"));
@@ -3113,7 +3113,7 @@ class MISConfigurator extends App {
 		if(count($IDArr)>0){
 		if(count($IDArr)>0){
 			$eval = 'CMgr.getMODEL().getRetrieveInput("MISConfigurator","editReport","'.implode("|",$IDArr).'");';
 			$eval = 'CMgr.getMODEL().getRetrieveInput("MISConfigurator","editReport","'.implode("|",$IDArr).'");';
 		}else{
 		}else{
-			$eval = 'CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configReportsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configReportsFormCb);';
+			$eval = 'CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configReportsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configReportsFormCb);';
 		}
 		}
 		return array($eval);
 		return array($eval);
 	}
 	}
@@ -3161,7 +3161,7 @@ class MISConfigurator extends App {
 			}
 			}
 		}
 		}
 		$projectDOM->save($MISConfig->getConfigFile());
 		$projectDOM->save($MISConfig->getConfigFile());
-		return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configReportsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configReportsFormCb);');
+		return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configReportsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configReportsFormCb);');
 	}
 	}
 	
 	
 	private function createScorecard($p_sectionID,$p_username) {
 	private function createScorecard($p_sectionID,$p_username) {
@@ -3174,7 +3174,7 @@ class MISConfigurator extends App {
 		$ret.= '<fieldset>';
 		$ret.= '<fieldset>';
 
 
 		$ret.= '<legend><img src="img/scorecard.png">'.$this->_getI18N('createScorecard').'</legend>';
 		$ret.= '<legend><img src="img/scorecard.png">'.$this->_getI18N('createScorecard').'</legend>';
-		$ret.= '<input type="hidden" name="saveMethod" value="saveCreateScorecard"><input type="hidden" name="ID" value="'.$p_sectionID.'"><input type="hidden" name="username" value="'.utf8_encode($p_username).'">';
+		$ret.= '<input type="hidden" name="saveMethod" value="saveCreateScorecard"><input type="hidden" name="ID" value="'.$p_sectionID.'"><input type="hidden" name="username" value="'.utf8_to_latin1($p_username).'">';
 		$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('createScorecardInfoMsg').'<hr></td></tr>';
 		$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('createScorecardInfoMsg').'<hr></td></tr>';
 		$ret.= '<tr><td><label for="inp_name">'.$this->_getI18N('scorecardName').':</label></td><td><input id="inp_name" name="name" type="text" value=""></td></tr>';
 		$ret.= '<tr><td><label for="inp_name">'.$this->_getI18N('scorecardName').':</label></td><td><input id="inp_name" name="name" type="text" value=""></td></tr>';
 		$ret.= '<tr><td><label for="inp_description">'.$this->_getI18N('scorecardDescription').':</label></td><td><textarea id="inp_description" name="description"></textarea></td></tr>';
 		$ret.= '<tr><td><label for="inp_description">'.$this->_getI18N('scorecardDescription').':</label></td><td><textarea id="inp_description" name="description"></textarea></td></tr>';
@@ -3201,7 +3201,7 @@ class MISConfigurator extends App {
 		$ret.= '<select name="format">';
 		$ret.= '<select name="format">';
 		$PSFormatsArr = $MISConfig->getAllScorcardFormats();
 		$PSFormatsArr = $MISConfig->getAllScorcardFormats();
 		foreach($PSFormatsArr as $key => $PSFormat) {
 		foreach($PSFormatsArr as $key => $PSFormat) {
-			$ret.= '<option value="'.$key.'">'.utf8_encode($PSFormat).'</option>';		
+			$ret.= '<option value="'.$key.'">'.utf8_to_latin1($PSFormat).'</option>';		
 		}
 		}
 		$ret.= '</select>';
 		$ret.= '</select>';
 		$ret.= '</td></tr>';
 		$ret.= '</td></tr>';
@@ -3226,15 +3226,15 @@ class MISConfigurator extends App {
 		
 		
 		$newID = $this->_generateReportID();
 		$newID = $this->_generateReportID();
 		
 		
-		$PRsList = $projectXpath->query("/Configuration/Scorecards/Scorecard/Reports[./../@ID='".$p_sectionID."' and ./../@Directory='".utf8_encode($p_username)."\\']");
+		$PRsList = $projectXpath->query("/Configuration/Scorecards/Scorecard/Reports[./../@ID='".$p_sectionID."' and ./../@Directory='".utf8_to_latin1($p_username)."\\']");
 		$PPName = $projectXpath->query("/Configuration/Publishes/Publish[./@ID='".$p_sectionID."']")->item(0)->getAttribute("Name");
 		$PPName = $projectXpath->query("/Configuration/Publishes/Publish[./@ID='".$p_sectionID."']")->item(0)->getAttribute("Name");
 		if($PRsList->length > 0) {
 		if($PRsList->length > 0) {
 			$PRs = $PRsList->item(0);
 			$PRs = $PRsList->item(0);
 		}else{
 		}else{
 			$PS = $projectDOM->createElement("Scorecard");
 			$PS = $projectDOM->createElement("Scorecard");
-			$PS->setAttribute("Directory",utf8_encode($p_username)."\\");
+			$PS->setAttribute("Directory",utf8_to_latin1($p_username)."\\");
 			$PS->setAttribute("ID",$p_sectionID);
 			$PS->setAttribute("ID",$p_sectionID);
-			$PS->setAttribute("Name",utf8_encode($PPName));
+			$PS->setAttribute("Name",utf8_to_latin1($PPName));
 			$PRs = $projectDOM->createElement("Reports");
 			$PRs = $projectDOM->createElement("Reports");
 			$PS->appendChild($PRs);
 			$PS->appendChild($PRs);
 			$PSs = $projectXpath->query("/Configuration/Scorecards")->item(0);
 			$PSs = $projectXpath->query("/Configuration/Scorecards")->item(0);
@@ -3275,7 +3275,7 @@ class MISConfigurator extends App {
 		$PRs->appendChild($PR);
 		$PRs->appendChild($PR);
 		
 		
 		$projectDOM->save($MISConfig->getConfigFile());
 		$projectDOM->save($MISConfig->getConfigFile());
-		return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configScorecardsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configScorecardsFormCb);');
+		return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configScorecardsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configScorecardsFormCb);');
 	}
 	}
 	
 	
 	private function editScorecard($p_ID) {
 	private function editScorecard($p_ID) {
@@ -3342,7 +3342,7 @@ class MISConfigurator extends App {
 		foreach($PSFormatsArr as $key => $PSFormat) {
 		foreach($PSFormatsArr as $key => $PSFormat) {
 			$ret.= '<option value="'.$key.'"';
 			$ret.= '<option value="'.$key.'"';
 			if($key == $sec_key)$ret.= ' selected="selected"';
 			if($key == $sec_key)$ret.= ' selected="selected"';
-			$ret.= '>'.utf8_encode($PSFormat).'</option>';		 
+			$ret.= '>'.utf8_to_latin1($PSFormat).'</option>';		 
 		}
 		}
 		$ret.= '</select>';
 		$ret.= '</select>';
 		$ret.= '</td></tr>';
 		$ret.= '</td></tr>';
@@ -3404,7 +3404,7 @@ class MISConfigurator extends App {
 		if(count($IDsArr)>0){
 		if(count($IDsArr)>0){
 			$eval = 'CMgr.getMODEL().getRetrieveInput("MISConfigurator","editScorecard","'.implode("|",$IDsArr).'");';
 			$eval = 'CMgr.getMODEL().getRetrieveInput("MISConfigurator","editScorecard","'.implode("|",$IDsArr).'");';
 		}else{
 		}else{
-			$eval = 'CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configScorecardsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configScorecardsFormCb);';
+			$eval = 'CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configScorecardsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configScorecardsFormCb);';
 		}
 		}
 		return array($eval);		
 		return array($eval);		
 	}
 	}
@@ -3451,7 +3451,7 @@ class MISConfigurator extends App {
 		}
 		}
 		
 		
 		$projectDOM->save($MISConfig->getConfigFile());
 		$projectDOM->save($MISConfig->getConfigFile());
-		return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configScorecardsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configScorecardsFormCb);');
+		return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configScorecardsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configScorecardsFormCb);');
 	}
 	}
 	
 	
     private function editLanguage($p_app,$p_key="") {
     private function editLanguage($p_app,$p_key="") {
@@ -3549,7 +3549,7 @@ foreach($langs as $lang) {
 			$ret.= '<select id="inp_lang" name="lang">';
 			$ret.= '<select id="inp_lang" name="lang">';
 			$allLangsArr = $MISConfig->getAllLangs();
 			$allLangsArr = $MISConfig->getAllLangs();
 			foreach($allLangsArr as $key => $lang) {
 			foreach($allLangsArr as $key => $lang) {
-				$ret.= '<option value="'.$key.'">'.utf8_encode($lang).'</option>';
+				$ret.= '<option value="'.$key.'">'.utf8_to_latin1($lang).'</option>';
 			}
 			}
 			$ret.= '</select>';
 			$ret.= '</select>';
 		$ret.= '</td></tr>';
 		$ret.= '</td></tr>';
@@ -3557,7 +3557,7 @@ foreach($langs as $lang) {
 			$ret.= '<select id="inp_view" name="view">';
 			$ret.= '<select id="inp_view" name="view">';
 			$allViewsArr = $MISConfig->getAllViews();
 			$allViewsArr = $MISConfig->getAllViews();
 			foreach($allViewsArr as $key => $view) {
 			foreach($allViewsArr as $key => $view) {
-				$ret.= '<option value="'.$key.'">'.utf8_encode($view).'</option>';
+				$ret.= '<option value="'.$key.'">'.utf8_to_latin1($view).'</option>';
 			}
 			}
 			$ret.= '</select>';
 			$ret.= '</select>';
 		$ret.= '</td></tr>';
 		$ret.= '</td></tr>';
@@ -3578,7 +3578,7 @@ foreach($langs as $lang) {
 		$authDOM->load($MISConfig->authFile);
 		$authDOM->load($MISConfig->authFile);
 		$authXpath = new DOMXpath($authDOM);
 		$authXpath = new DOMXpath($authDOM);
 		
 		
-		$userUnique = $authXpath->query("/auth/users/user[./@username='".utf8_encode($p_username)."' and (@setting='".basename($MISConfig->getConfigFile(),".xml")."' or @setting='')]");
+		$userUnique = $authXpath->query("/auth/users/user[./@username='".utf8_to_latin1($p_username)."' and (@setting='".basename($MISConfig->getConfigFile(),".xml")."' or @setting='')]");
 		
 		
 		if($p_password != $p_passwordRepeat)
 		if($p_password != $p_passwordRepeat)
 			return array('alert("'.$this->_getI18N("pw_not_equal").'");');
 			return array('alert("'.$this->_getI18N("pw_not_equal").'");');
@@ -3589,7 +3589,7 @@ foreach($langs as $lang) {
 		if(!strpbrk($p_username, "|") === false)
 		if(!strpbrk($p_username, "|") === false)
 			return array('alert("'.$this->_getI18N("no_vert_dash_allowed").'");');
 			return array('alert("'.$this->_getI18N("no_vert_dash_allowed").'");');
 		$UU = $authDOM->createElement('user');
 		$UU = $authDOM->createElement('user');
-		$UU->setAttribute('username',utf8_encode($p_username));
+		$UU->setAttribute('username',utf8_to_latin1($p_username));
 		$UU->setAttribute('password',md5($p_password));
 		$UU->setAttribute('password',md5($p_password));
 		$UU->setAttribute('global',$p_global);
 		$UU->setAttribute('global',$p_global);
 		$UU->setAttribute('lang',$p_lang);
 		$UU->setAttribute('lang',$p_lang);
@@ -3616,13 +3616,13 @@ foreach($langs as $lang) {
 			$authDOM->load($MISConfig->authFile);
 			$authDOM->load($MISConfig->authFile);
 			$authXpath = new DOMXpath($authDOM);
 			$authXpath = new DOMXpath($authDOM);
 		
 		
-			$AU = $authXpath->query("/auth/users/user[@username='".utf8_encode($username)."']")->item(0);
+			$AU = $authXpath->query("/auth/users/user[@username='".utf8_to_latin1($username)."']")->item(0);
 		
 		
 			$ret.= '<form action="" encoding="utf-8" method="post" onSubmit="return Form.submit(this,\'MISConfigurator\',\'saveRetrieveInput\',\'username\',\'password\',\'password_repeat\');">';
 			$ret.= '<form action="" encoding="utf-8" method="post" onSubmit="return Form.submit(this,\'MISConfigurator\',\'saveRetrieveInput\',\'username\',\'password\',\'password_repeat\');">';
 			$ret.= '<fieldset>';
 			$ret.= '<fieldset>';
 	
 	
 			$ret.= '<legend><img src="img/personal.png">'.$this->_getI18N('editUser').'</legend>';
 			$ret.= '<legend><img src="img/personal.png">'.$this->_getI18N('editUser').'</legend>';
-			$ret.= '<input type="hidden" name="saveMethod" value="saveEditUser"><input type="hidden" name="name" value="'.utf8_encode($p_ID).'">';
+			$ret.= '<input type="hidden" name="saveMethod" value="saveEditUser"><input type="hidden" name="name" value="'.utf8_to_latin1($p_ID).'">';
 			$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('editUserInfoMsg').'<hr></td></tr>';
 			$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('editUserInfoMsg').'<hr></td></tr>';
 			$ret.= '<tr><td class="label"><label for="inp_name">'.$this->_getI18N('username').':</label></td><td><input id="inp_name" name="username" type="text" value="'.$AU->getAttribute("username").'"></td></tr>';
 			$ret.= '<tr><td class="label"><label for="inp_name">'.$this->_getI18N('username').':</label></td><td><input id="inp_name" name="username" type="text" value="'.$AU->getAttribute("username").'"></td></tr>';
 			$ret.= '<tr><td class="label"><label for="inp_pw">'.$this->_getI18N('password').':</label></td><td><input id="inp_pw" name="password" type="password" value="     "></td></tr>';
 			$ret.= '<tr><td class="label"><label for="inp_pw">'.$this->_getI18N('password').':</label></td><td><input id="inp_pw" name="password" type="password" value="     "></td></tr>';
@@ -3647,9 +3647,9 @@ foreach($langs as $lang) {
 				$allViewsArr = $MISConfig->getAllViews();
 				$allViewsArr = $MISConfig->getAllViews();
 				foreach($allViewsArr as $key => $view) {
 				foreach($allViewsArr as $key => $view) {
 					if($AU->getAttribute("view") == $key)
 					if($AU->getAttribute("view") == $key)
-					$ret.= '<option value="'.$key.'" selected="selected">'.utf8_encode($view).'</option>';
+					$ret.= '<option value="'.$key.'" selected="selected">'.utf8_to_latin1($view).'</option>';
 					else
 					else
-					$ret.= '<option value="'.$key.'">'.utf8_encode($view).'</option>';
+					$ret.= '<option value="'.$key.'">'.utf8_to_latin1($view).'</option>';
 				}
 				}
 				$ret.= '</select>';
 				$ret.= '</select>';
 			$ret.= '</td></tr>';
 			$ret.= '</td></tr>';
@@ -3675,9 +3675,9 @@ foreach($langs as $lang) {
 		$IDsArr = explode("|",$p_ID);
 		$IDsArr = explode("|",$p_ID);
 		
 		
 		
 		
-		$username = utf8_encode(array_shift($IDsArr));
+		$username = utf8_to_latin1(array_shift($IDsArr));
 
 
-		$newUsername = utf8_encode($p_newUsername);
+		$newUsername = utf8_to_latin1($p_newUsername);
 		
 		
 		$projectDOM = new DOMDocument('1.0', 'iso-8859-1');
 		$projectDOM = new DOMDocument('1.0', 'iso-8859-1');
 		$projectDOM->load($MISConfig->getConfigFile());
 		$projectDOM->load($MISConfig->getConfigFile());
@@ -3710,7 +3710,7 @@ foreach($langs as $lang) {
 		$PIList = $projectXpath->query("/Configuration/Publishes/Publish/Images/Image[./Directory='".$username."\\']");
 		$PIList = $projectXpath->query("/Configuration/Publishes/Publish/Images/Image[./Directory='".$username."\\']");
 		for($i=0;$i<$PIList->length;$i++) {
 		for($i=0;$i<$PIList->length;$i++) {
 			$PI = $PIList->item($i);
 			$PI = $PIList->item($i);
-			$MISConfig->setNodeValue("Directory",utf8_decode($newUsername)."\\",$projectDOM,$PI);
+			$MISConfig->setNodeValue("Directory",latin1_to_utf8($newUsername)."\\",$projectDOM,$PI);
 		}
 		}
 	    $PIList = $projectXpath->query("/Configuration/Publishes/Publish[./@User='".$username."']");
 	    $PIList = $projectXpath->query("/Configuration/Publishes/Publish[./@User='".$username."']");
         for($i=0;$i<$PIList->length;$i++) {
         for($i=0;$i<$PIList->length;$i++) {
@@ -3747,7 +3747,7 @@ foreach($langs as $lang) {
 			$IDArr = explode("_",$IDStr);
 			$IDArr = explode("_",$IDStr);
 			if(count($IDArr)==1) {
 			if(count($IDArr)==1) {
 				$username = $IDArr[0];
 				$username = $IDArr[0];
-				array_push($usernames, utf8_encode($username));
+				array_push($usernames, utf8_to_latin1($username));
 			}else{
 			}else{
 				$deleteSections = true;
 				$deleteSections = true;
 				array_push($newIDsArr,$IDStr);
 				array_push($newIDsArr,$IDStr);
@@ -3757,7 +3757,7 @@ foreach($langs as $lang) {
 		$ret.= '<fieldset>';
 		$ret.= '<fieldset>';
 
 
 		$ret.= '<legend><img src="img/personal.png">'.$this->_getI18N('deleteUser').'</legend>';
 		$ret.= '<legend><img src="img/personal.png">'.$this->_getI18N('deleteUser').'</legend>';
-		$ret.= '<input type="hidden" name="saveMethod" value="saveDeleteUser"><input type="hidden" name="username" value="'.utf8_encode($p_ID).'">';
+		$ret.= '<input type="hidden" name="saveMethod" value="saveDeleteUser"><input type="hidden" name="username" value="'.utf8_to_latin1($p_ID).'">';
 		$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('deleteUserInfoMsg1').' <i>'.implode(", ",$usernames).'</i> '.$this->_getI18N('deleteUserInfoMsg2').'<hr></td></tr>';
 		$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('deleteUserInfoMsg1').' <i>'.implode(", ",$usernames).'</i> '.$this->_getI18N('deleteUserInfoMsg2').'<hr></td></tr>';
 		$ret.= '<tr><td colspan="2"><hr><input class="btn" type="button" value="'.$this->_getI18N('abort').'" onclick="';
 		$ret.= '<tr><td colspan="2"><hr><input class="btn" type="button" value="'.$this->_getI18N('abort').'" onclick="';
 		if($deleteSections) {
 		if($deleteSections) {
@@ -3787,7 +3787,7 @@ foreach($langs as $lang) {
 		foreach($IDsArr as $IDStr) {
 		foreach($IDsArr as $IDStr) {
 			$IDArr = explode("_",$IDStr);
 			$IDArr = explode("_",$IDStr);
 			if(count($IDArr)==1){
 			if(count($IDArr)==1){
-				$username = utf8_encode($IDArr[0]);
+				$username = utf8_to_latin1($IDArr[0]);
 				$AU = $authXpath->query("/auth/users/user[@username='".$username."' and @setting='".basename($MISConfig->getConfigFile(),".xml")."']")->item(0);
 				$AU = $authXpath->query("/auth/users/user[@username='".$username."' and @setting='".basename($MISConfig->getConfigFile(),".xml")."']")->item(0);
 				$AU->parentNode->removeChild($AU);
 				$AU->parentNode->removeChild($AU);
 				
 				
@@ -3835,7 +3835,7 @@ foreach($langs as $lang) {
         $ret.= '<fieldset>';
         $ret.= '<fieldset>';
 
 
         $ret.= '<legend><img src="img/dashboard.png">'.$this->_getI18N('createDashboard').'</legend>';
         $ret.= '<legend><img src="img/dashboard.png">'.$this->_getI18N('createDashboard').'</legend>';
-        $ret.= '<input type="hidden" name="saveMethod" value="saveCreateDashboard"><input type="hidden" name="ID" value="'.$p_sectionID.'"><input type="hidden" name="username" value="'.utf8_encode($p_username).'">';
+        $ret.= '<input type="hidden" name="saveMethod" value="saveCreateDashboard"><input type="hidden" name="ID" value="'.$p_sectionID.'"><input type="hidden" name="username" value="'.utf8_to_latin1($p_username).'">';
         $ret.= '<table><tr><td colspan="2">'.$this->_getI18N('createDashboardInfoMsg').'<hr></td></tr>';
         $ret.= '<table><tr><td colspan="2">'.$this->_getI18N('createDashboardInfoMsg').'<hr></td></tr>';
         $ret.= '<tr><td><label for="inp_name">'.$this->_getI18N('dashboardName').':</label></td><td><input id="inp_name" name="name" type="text" value=""></td></tr>';
         $ret.= '<tr><td><label for="inp_name">'.$this->_getI18N('dashboardName').':</label></td><td><input id="inp_name" name="name" type="text" value=""></td></tr>';
         $ret.= '<tr><td><label for="inp_description">'.$this->_getI18N('dashboardDescription').':</label></td><td><textarea id="inp_description" name="description"></textarea></td></tr>';
         $ret.= '<tr><td><label for="inp_description">'.$this->_getI18N('dashboardDescription').':</label></td><td><textarea id="inp_description" name="description"></textarea></td></tr>';
@@ -3863,12 +3863,12 @@ foreach($langs as $lang) {
         
         
         $newID = $this->_generateReportID();
         $newID = $this->_generateReportID();
         
         
-        $PRsList = $projectXpath->query("/Configuration/Dashboards/Dashboard[./@ID='".$p_sectionID."' and ./@Directory='".utf8_encode($p_username)."\\']");
+        $PRsList = $projectXpath->query("/Configuration/Dashboards/Dashboard[./@ID='".$p_sectionID."' and ./@Directory='".utf8_to_latin1($p_username)."\\']");
         $PPName = $projectXpath->query("/Configuration/Publishes/Publish[./@ID='".$p_sectionID."']")->item(0)->getAttribute("Name");
         $PPName = $projectXpath->query("/Configuration/Publishes/Publish[./@ID='".$p_sectionID."']")->item(0)->getAttribute("Name");
         if($PRsList->length > 0) {
         if($PRsList->length > 0) {
             $PRs = $PRsList->item(0);
             $PRs = $PRsList->item(0);
         }else{
         }else{
-        	return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configDashboardsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configDashboardsFormCb);');
+        	return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configDashboardsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configDashboardsFormCb);');
         }
         }
         
         
         $PR = $projectDOM->createElement("Review");
         $PR = $projectDOM->createElement("Review");
@@ -3880,7 +3880,7 @@ foreach($langs as $lang) {
         $PRs->getElementsByTagname("Reviews")->item(0)->appendChild($PR);
         $PRs->getElementsByTagname("Reviews")->item(0)->appendChild($PR);
         
         
         $projectDOM->save($MISConfig->getConfigFile());
         $projectDOM->save($MISConfig->getConfigFile());
-        return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configDashboardsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configDashboardsFormCb);');
+        return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configDashboardsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configDashboardsFormCb);');
 	}
 	}
 	
 	
     private function deleteDashboard($p_ID) {
     private function deleteDashboard($p_ID) {
@@ -3925,7 +3925,7 @@ foreach($langs as $lang) {
         }
         }
         
         
         $projectDOM->save($MISConfig->getConfigFile());
         $projectDOM->save($MISConfig->getConfigFile());
-        return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configDashboardsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configDashboardsFormCb);');
+        return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configDashboardsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configDashboardsFormCb);');
     }
     }
     
     
     private function editDashboard($p_ID) {
     private function editDashboard($p_ID) {
@@ -3986,7 +3986,7 @@ foreach($langs as $lang) {
     	if(count($IDsArr)>0){
     	if(count($IDsArr)>0){
 			$eval = 'CMgr.getMODEL().getRetrieveInput("MISConfigurator","editDashboard","'.implode("|",$IDsArr).'");';
 			$eval = 'CMgr.getMODEL().getRetrieveInput("MISConfigurator","editDashboard","'.implode("|",$IDsArr).'");';
 		}else{
 		}else{
-			$eval = 'CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configDashboardsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configDashboardsFormCb);';
+			$eval = 'CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configDashboardsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configDashboardsFormCb);';
 		}
 		}
         return array($eval);     
         return array($eval);     
     }
     }
@@ -4165,9 +4165,9 @@ foreach($langs as $lang) {
 				$parentID = $currentPP->getAttribute('parentID');
 				$parentID = $currentPP->getAttribute('parentID');
 			}
 			}
 			$ret.= '<legend>'.$this->_getI18N('dragSection').'</legend>';
 			$ret.= '<legend>'.$this->_getI18N('dragSection').'</legend>';
-			$ret.= '<input type="hidden" name="saveMethod" value="saveDADSectionToSection"><input type="hidden" name="dragType" value="'.$p_dragType.'"><input type="hidden" name="dragID" value="'.utf8_encode($p_dragID).'"><input type="hidden" name="dropType" value="'.$p_dropType.'"><input type="hidden" name="dropID" value="'.utf8_encode($p_dropID).'"><input type="hidden" name="dropOrder" value="'.$p_dropOrder.'">';
+			$ret.= '<input type="hidden" name="saveMethod" value="saveDADSectionToSection"><input type="hidden" name="dragType" value="'.$p_dragType.'"><input type="hidden" name="dragID" value="'.utf8_to_latin1($p_dragID).'"><input type="hidden" name="dropType" value="'.$p_dropType.'"><input type="hidden" name="dropID" value="'.utf8_to_latin1($p_dropID).'"><input type="hidden" name="dropOrder" value="'.$p_dropOrder.'">';
 			$ret.= '<table><tr><td>'.$this->_getI18N('dragSectionInfoMsg1').' <i>'.str_replace("_"," ",trim($PPName,"_ ")).'</i> '.$this->_getI18N('dragSectionInfoMsg2').'<hr></td></tr>';
 			$ret.= '<table><tr><td>'.$this->_getI18N('dragSectionInfoMsg1').' <i>'.str_replace("_"," ",trim($PPName,"_ ")).'</i> '.$this->_getI18N('dragSectionInfoMsg2').'<hr></td></tr>';
-			if($this->_getView(utf8_decode($dragUser)) == "Client" && $this->_getView(utf8_decode($dropUser)) == "Info-User") {
+			if($this->_getView(latin1_to_utf8($dragUser)) == "Client" && $this->_getView(latin1_to_utf8($dropUser)) == "Info-User") {
 				$ret.= '<tr><td style="color:#ee3333;"><img src="img/warning.png">'.$this->_getI18N("makeClientToInfoUser").'</td></tr>';
 				$ret.= '<tr><td style="color:#ee3333;"><img src="img/warning.png">'.$this->_getI18N("makeClientToInfoUser").'</td></tr>';
 			}
 			}
 			if($canReplace) {
 			if($canReplace) {
@@ -4185,8 +4185,8 @@ foreach($langs as $lang) {
                 return array('','CMgr.getMODEL().__construct();');
                 return array('','CMgr.getMODEL().__construct();');
             }        
             }        
             $ret.= '<legend>'.$this->_getI18N('dragUser').'</legend>';
             $ret.= '<legend>'.$this->_getI18N('dragUser').'</legend>';
-            $ret.= '<input type="hidden" name="saveMethod" value="saveDADUserToUser"><input type="hidden" name="dragType" value="'.$p_dragType.'"><input type="hidden" name="dragID" value="'.utf8_encode($p_dragID).'"><input type="hidden" name="dropType" value="'.$p_dropType.'"><input type="hidden" name="dropID" value="'.utf8_encode($p_dropID).'"><input type="hidden" name="dropOrder" value="'.$p_dropOrder.'">';
-            $ret.= '<table><tr><td>'.$this->_getI18N('dragUserInfoMsg1').' <i>'.utf8_encode($p_dragID).'</i> '.$this->_getI18N('dragUserInfoMsg2').' <i>'.utf8_encode($p_dropID).'</i> '.$this->_getI18N('dragUserInfoMsg3').'<hr></td></tr>';
+            $ret.= '<input type="hidden" name="saveMethod" value="saveDADUserToUser"><input type="hidden" name="dragType" value="'.$p_dragType.'"><input type="hidden" name="dragID" value="'.utf8_to_latin1($p_dragID).'"><input type="hidden" name="dropType" value="'.$p_dropType.'"><input type="hidden" name="dropID" value="'.utf8_to_latin1($p_dropID).'"><input type="hidden" name="dropOrder" value="'.$p_dropOrder.'">';
+            $ret.= '<table><tr><td>'.$this->_getI18N('dragUserInfoMsg1').' <i>'.utf8_to_latin1($p_dragID).'</i> '.$this->_getI18N('dragUserInfoMsg2').' <i>'.utf8_to_latin1($p_dropID).'</i> '.$this->_getI18N('dragUserInfoMsg3').'<hr></td></tr>';
             if($this->_getView($p_dragID) == "Client" && $this->_getView($p_dropID) == "Info-User") {
             if($this->_getView($p_dragID) == "Client" && $this->_getView($p_dropID) == "Info-User") {
                 $ret.= '<tr><td style="color:#ee3333;"><img src="img/warning.png">'.$this->_getI18N("makeClientToInfoUser").'</td></tr>';
                 $ret.= '<tr><td style="color:#ee3333;"><img src="img/warning.png">'.$this->_getI18N("makeClientToInfoUser").'</td></tr>';
             }
             }
@@ -4201,8 +4201,8 @@ foreach($langs as $lang) {
             $PPName = $dragPP->getAttribute('Name');
             $PPName = $dragPP->getAttribute('Name');
             
             
             $ret.= '<legend>'.$this->_getI18N('dragSection').'</legend>';
             $ret.= '<legend>'.$this->_getI18N('dragSection').'</legend>';
-            $ret.= '<input type="hidden" name="saveMethod" value="saveDADSectionToUser"><input type="hidden" name="dragType" value="'.$p_dragType.'"><input type="hidden" name="dragID" value="'.utf8_encode($p_dragID).'"><input type="hidden" name="dropType" value="'.$p_dropType.'"><input type="hidden" name="dropID" value="'.utf8_encode($p_dropID).'"><input type="hidden" name="dropOrder" value="'.$p_dropOrder.'">';
-            $ret.= '<table><tr><td>'.$this->_getI18N('dragSectionInfoMsg1').' <i>'.str_replace("_"," ",trim($PPName,"_ ")).'</i> '.$this->_getI18N('to').' '.utf8_encode($p_dropIDArr[0]).' '.$this->_getI18N('dragSectionInfoMsg2').'<hr></td></tr>';
+            $ret.= '<input type="hidden" name="saveMethod" value="saveDADSectionToUser"><input type="hidden" name="dragType" value="'.$p_dragType.'"><input type="hidden" name="dragID" value="'.utf8_to_latin1($p_dragID).'"><input type="hidden" name="dropType" value="'.$p_dropType.'"><input type="hidden" name="dropID" value="'.utf8_to_latin1($p_dropID).'"><input type="hidden" name="dropOrder" value="'.$p_dropOrder.'">';
+            $ret.= '<table><tr><td>'.$this->_getI18N('dragSectionInfoMsg1').' <i>'.str_replace("_"," ",trim($PPName,"_ ")).'</i> '.$this->_getI18N('to').' '.utf8_to_latin1($p_dropIDArr[0]).' '.$this->_getI18N('dragSectionInfoMsg2').'<hr></td></tr>';
             if($this->_getView($p_dragIDArr[1]) == "Client" && $this->_getView($p_dropID) == "Info-User") {
             if($this->_getView($p_dragIDArr[1]) == "Client" && $this->_getView($p_dropID) == "Info-User") {
                 $ret.= '<tr><td style="color:#ee3333;"><img src="img/warning.png">'.$this->_getI18N("makeClientToInfoUser").'</td></tr>';
                 $ret.= '<tr><td style="color:#ee3333;"><img src="img/warning.png">'.$this->_getI18N("makeClientToInfoUser").'</td></tr>';
             }
             }
@@ -4212,8 +4212,8 @@ foreach($langs as $lang) {
             $ret.= '</table>';
             $ret.= '</table>';
 		} else if($p_dragType == "report" && ($p_dropType == "section" || $p_dropType == "report")) {
 		} else if($p_dragType == "report" && ($p_dropType == "section" || $p_dropType == "report")) {
 		    if($p_dropType == "report") {
 		    if($p_dropType == "report") {
-                $this->saveDADReportToSection($p_dragType,utf8_decode($p_dragID),$p_dropType,utf8_decode($p_dropID),$p_dropOrder,"replace");
-                return array('','CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configReportsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configReportsFormCb);');
+                $this->saveDADReportToSection($p_dragType,latin1_to_utf8($p_dragID),$p_dropType,latin1_to_utf8($p_dropID),$p_dropOrder,"replace");
+                return array('','CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configReportsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configReportsFormCb);');
             }
             }
 			$p_dragIDArr = explode("_",$p_dragID);
 			$p_dragIDArr = explode("_",$p_dragID);
 			$dragPR = $projectXpath->query('/Configuration/Publishes/Publish/Images/Image[./@ID = "'.$p_dragIDArr[0].'"]')->item(0);
 			$dragPR = $projectXpath->query('/Configuration/Publishes/Publish/Images/Image[./@ID = "'.$p_dragIDArr[0].'"]')->item(0);
@@ -4222,7 +4222,7 @@ foreach($langs as $lang) {
 			$PRName = $dragPR->getElementsByTagName("Name")->item(0)->nodeValue;
 			$PRName = $dragPR->getElementsByTagName("Name")->item(0)->nodeValue;
 			
 			
 			$ret.= '<legend>'.$this->_getI18N('dragReport').'</legend>';
 			$ret.= '<legend>'.$this->_getI18N('dragReport').'</legend>';
-			$ret.= '<input type="hidden" name="saveMethod" value="saveDADReportToSection"><input type="hidden" name="dragType" value="'.$p_dragType.'"><input type="hidden" name="dragID" value="'.utf8_encode($p_dragID).'"><input type="hidden" name="dropType" value="'.$p_dropType.'"><input type="hidden" name="dropID" value="'.utf8_encode($p_dropID).'"><input type="hidden" name="dropOrder" value="'.$p_dropOrder.'">';
+			$ret.= '<input type="hidden" name="saveMethod" value="saveDADReportToSection"><input type="hidden" name="dragType" value="'.$p_dragType.'"><input type="hidden" name="dragID" value="'.utf8_to_latin1($p_dragID).'"><input type="hidden" name="dropType" value="'.$p_dropType.'"><input type="hidden" name="dropID" value="'.utf8_to_latin1($p_dropID).'"><input type="hidden" name="dropOrder" value="'.$p_dropOrder.'">';
 			$ret.= '<table><tr><td>'.$this->_getI18N('dragReportInfoMsg1').' <i>'.$PRName.'</i> '.$this->_getI18N('dragReportInfoMsg2').'<hr></td></tr>';
 			$ret.= '<table><tr><td>'.$this->_getI18N('dragReportInfoMsg1').' <i>'.$PRName.'</i> '.$this->_getI18N('dragReportInfoMsg2').'<hr></td></tr>';
 		    if($this->_getView($p_dragIDArr[1]) == "Client" && $this->_getView($p_dropIDArr[1]) == "Info-User") {
 		    if($this->_getView($p_dragIDArr[1]) == "Client" && $this->_getView($p_dropIDArr[1]) == "Info-User") {
                 $ret.= '<tr><td style="color:#ee3333;"><img src="img/warning.png">'.$this->_getI18N("makeClientToInfoUser").'</td></tr>';
                 $ret.= '<tr><td style="color:#ee3333;"><img src="img/warning.png">'.$this->_getI18N("makeClientToInfoUser").'</td></tr>';
@@ -4235,7 +4235,7 @@ foreach($langs as $lang) {
 		} else if($p_dragType == "scorecard" && ($p_dropType == "section" || $p_dropType == "scorecard")) {
 		} else if($p_dragType == "scorecard" && ($p_dropType == "section" || $p_dropType == "scorecard")) {
 		    if($p_dropType == "scorecard") {
 		    if($p_dropType == "scorecard") {
                 $this->saveDADScorecardToSection($p_dragType,$p_dragID,$p_dropType,$p_dropID,$p_dropOrder,"replace");
                 $this->saveDADScorecardToSection($p_dragType,$p_dragID,$p_dropType,$p_dropID,$p_dropOrder,"replace");
-                return array('','CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configScorecardsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configScorecardsFormCb);');
+                return array('','CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configScorecardsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configScorecardsFormCb);');
             }
             }
 			$p_dragIDArr = explode("_",$p_dragID);
 			$p_dragIDArr = explode("_",$p_dragID);
 			$dragPR = $projectXpath->query('/Configuration/Scorecards/Scorecard/Reports/Report[./@ID = "'.$p_dragIDArr[0].'"]')->item(0);
 			$dragPR = $projectXpath->query('/Configuration/Scorecards/Scorecard/Reports/Report[./@ID = "'.$p_dragIDArr[0].'"]')->item(0);
@@ -4244,7 +4244,7 @@ foreach($langs as $lang) {
 			$PRName = $dragPR->getElementsByTagName("Name")->item(0)->nodeValue;
 			$PRName = $dragPR->getElementsByTagName("Name")->item(0)->nodeValue;
 			
 			
 			$ret.= '<legend>'.$this->_getI18N('dragScorecard').'</legend>';
 			$ret.= '<legend>'.$this->_getI18N('dragScorecard').'</legend>';
-			$ret.= '<input type="hidden" name="saveMethod" value="saveDADScorecardToSection"><input type="hidden" name="dragType" value="'.$p_dragType.'"><input type="hidden" name="dragID" value="'.utf8_encode($p_dragID).'"><input type="hidden" name="dropType" value="'.$p_dropType.'"><input type="hidden" name="dropID" value="'.utf8_encode($p_dropID).'"><input type="hidden" name="dropOrder" value="'.$p_dropOrder.'">';
+			$ret.= '<input type="hidden" name="saveMethod" value="saveDADScorecardToSection"><input type="hidden" name="dragType" value="'.$p_dragType.'"><input type="hidden" name="dragID" value="'.utf8_to_latin1($p_dragID).'"><input type="hidden" name="dropType" value="'.$p_dropType.'"><input type="hidden" name="dropID" value="'.utf8_to_latin1($p_dropID).'"><input type="hidden" name="dropOrder" value="'.$p_dropOrder.'">';
 			$ret.= '<table><tr><td>'.$this->_getI18N('dragScorecardInfoMsg1').' <i>'.$PRName.'</i> '.$this->_getI18N('dragScorecardInfoMsg2').'<hr></td></tr>';
 			$ret.= '<table><tr><td>'.$this->_getI18N('dragScorecardInfoMsg1').' <i>'.$PRName.'</i> '.$this->_getI18N('dragScorecardInfoMsg2').'<hr></td></tr>';
 			$ret.= '<tr><td><input class="btn" id="inp_replace" name="action" type="radio" value="replace"><label for="inp_replace">'.$this->_getI18N('replace').'</label></td></tr>';
 			$ret.= '<tr><td><input class="btn" id="inp_replace" name="action" type="radio" value="replace"><label for="inp_replace">'.$this->_getI18N('replace').'</label></td></tr>';
 			$ret.= '<tr><td><input class="btn" id="inp_copy" name="action" type="radio" value="copy" checked="checked"><label for="inp_copy">'.$this->_getI18N('copy').'</label>';
 			$ret.= '<tr><td><input class="btn" id="inp_copy" name="action" type="radio" value="copy" checked="checked"><label for="inp_copy">'.$this->_getI18N('copy').'</label>';
@@ -4253,7 +4253,7 @@ foreach($langs as $lang) {
 		} else if($p_dragType == "dashboard" && ($p_dropType == "section" || $p_dropType == "dashboard")) {
 		} else if($p_dragType == "dashboard" && ($p_dropType == "section" || $p_dropType == "dashboard")) {
             if($p_dropType == "dashboard") {
             if($p_dropType == "dashboard") {
                 $this->saveDADDashboardToSection($p_dragType,$p_dragID,$p_dropType,$p_dropID,$p_dropOrder,"replace");
                 $this->saveDADDashboardToSection($p_dragType,$p_dragID,$p_dropType,$p_dropID,$p_dropOrder,"replace");
-                return array('','CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configDashboardsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configDashboardsFormCb);');
+                return array('','CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configDashboardsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configDashboardsFormCb);');
             }
             }
             $p_dragIDArr = explode("_",$p_dragID);
             $p_dragIDArr = explode("_",$p_dragID);
             $dragPR = $projectXpath->query('/Configuration/Dashboards/Dashboard/Reviews/Review[./@ID = "'.$p_dragIDArr[0].'"]')->item(0);
             $dragPR = $projectXpath->query('/Configuration/Dashboards/Dashboard/Reviews/Review[./@ID = "'.$p_dragIDArr[0].'"]')->item(0);
@@ -4262,7 +4262,7 @@ foreach($langs as $lang) {
             $PRName = $dragPR->getElementsByTagName("Name")->item(0)->nodeValue;
             $PRName = $dragPR->getElementsByTagName("Name")->item(0)->nodeValue;
             
             
             $ret.= '<legend>'.$this->_getI18N('dragDashboard').'</legend>';
             $ret.= '<legend>'.$this->_getI18N('dragDashboard').'</legend>';
-            $ret.= '<input type="hidden" name="saveMethod" value="saveDADDashboardToSection"><input type="hidden" name="dragType" value="'.$p_dragType.'"><input type="hidden" name="dragID" value="'.utf8_encode($p_dragID).'"><input type="hidden" name="dropType" value="'.$p_dropType.'"><input type="hidden" name="dropID" value="'.utf8_encode($p_dropID).'"><input type="hidden" name="dropOrder" value="'.$p_dropOrder.'">';
+            $ret.= '<input type="hidden" name="saveMethod" value="saveDADDashboardToSection"><input type="hidden" name="dragType" value="'.$p_dragType.'"><input type="hidden" name="dragID" value="'.utf8_to_latin1($p_dragID).'"><input type="hidden" name="dropType" value="'.$p_dropType.'"><input type="hidden" name="dropID" value="'.utf8_to_latin1($p_dropID).'"><input type="hidden" name="dropOrder" value="'.$p_dropOrder.'">';
             $ret.= '<table><tr><td>'.$this->_getI18N('dragDashboardInfoMsg1').' <i>'.$PRName.'</i> '.$this->_getI18N('dragDashboardInfoMsg2').'<hr></td></tr>';
             $ret.= '<table><tr><td>'.$this->_getI18N('dragDashboardInfoMsg1').' <i>'.$PRName.'</i> '.$this->_getI18N('dragDashboardInfoMsg2').'<hr></td></tr>';
             $ret.= '<tr><td><input class="btn" id="inp_replace" name="action" type="radio" value="replace"><label for="inp_replace">'.$this->_getI18N('replace').'</label></td></tr>';
             $ret.= '<tr><td><input class="btn" id="inp_replace" name="action" type="radio" value="replace"><label for="inp_replace">'.$this->_getI18N('replace').'</label></td></tr>';
             $ret.= '<tr><td><input class="btn" id="inp_copy" name="action" type="radio" value="copy" checked="checked"><label for="inp_copy">'.$this->_getI18N('copy').'</label>';
             $ret.= '<tr><td><input class="btn" id="inp_copy" name="action" type="radio" value="copy" checked="checked"><label for="inp_copy">'.$this->_getI18N('copy').'</label>';
@@ -4289,14 +4289,14 @@ foreach($langs as $lang) {
         $p_dragIDArr = explode("_",$p_dragID);
         $p_dragIDArr = explode("_",$p_dragID);
         $p_dropIDArr = explode("_",$p_dropID);
         $p_dropIDArr = explode("_",$p_dropID);
         
         
-        $dropPublish = $ProjectXpath->query('./Publishes/Publish[./@ID = "'.$p_dropIDArr[0].'" and ./@User="'.utf8_encode($p_dropIDArr[1]).'"]',$Project)->item(0);
-        $dropScorecard = $ProjectXpath->query('./Scorecards/Scorecard[./@ID = "'.$p_dropIDArr[0].'" and ./@Directory="'.utf8_encode($p_dropIDArr[1]).'\\"]',$Project)->item(0);
-        $dropDashboard = $ProjectXpath->query('./Dashboards/Dashboard[./@ID = "'.$p_dropIDArr[0].'" and ./@Directory="'.utf8_encode($p_dropIDArr[1]).'\\"]',$Project)->item(0);
+        $dropPublish = $ProjectXpath->query('./Publishes/Publish[./@ID = "'.$p_dropIDArr[0].'" and ./@User="'.utf8_to_latin1($p_dropIDArr[1]).'"]',$Project)->item(0);
+        $dropScorecard = $ProjectXpath->query('./Scorecards/Scorecard[./@ID = "'.$p_dropIDArr[0].'" and ./@Directory="'.utf8_to_latin1($p_dropIDArr[1]).'\\"]',$Project)->item(0);
+        $dropDashboard = $ProjectXpath->query('./Dashboards/Dashboard[./@ID = "'.$p_dropIDArr[0].'" and ./@Directory="'.utf8_to_latin1($p_dropIDArr[1]).'\\"]',$Project)->item(0);
         
         
         if($p_action == "replace") {
         if($p_action == "replace") {
-            $dragPublish = $ProjectXpath->query('./Publishes/Publish[./@ID = "'.$p_dragIDArr[0].'" and ./@User="'.utf8_encode($p_dragIDArr[1]).'"]',$Project)->item(0);
+            $dragPublish = $ProjectXpath->query('./Publishes/Publish[./@ID = "'.$p_dragIDArr[0].'" and ./@User="'.utf8_to_latin1($p_dragIDArr[1]).'"]',$Project)->item(0);
             $dragPublish = $dragPublish->parentNode->removeChild($dragPublish);
             $dragPublish = $dragPublish->parentNode->removeChild($dragPublish);
-            $dragPublish->setAttribute("User",utf8_encode($p_dropIDArr[1]));
+            $dragPublish->setAttribute("User",utf8_to_latin1($p_dropIDArr[1]));
             $ImageList = $dragPublish->getElementsByTagname("Image");
             $ImageList = $dragPublish->getElementsByTagname("Image");
             for($i=0;$ImageList->length>$i;$i++) {
             for($i=0;$ImageList->length>$i;$i++) {
             	$Image = $ImageList->item($i);
             	$Image = $ImageList->item($i);
@@ -4308,33 +4308,33 @@ foreach($langs as $lang) {
             	   }
             	   }
             	}
             	}
             }
             }
-            $dragScorecard = $ProjectXpath->query('./Scorecards/Scorecard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_encode($p_dragIDArr[1]).'\\"]',$Project)->item(0);
+            $dragScorecard = $ProjectXpath->query('./Scorecards/Scorecard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_to_latin1($p_dragIDArr[1]).'\\"]',$Project)->item(0);
             $dragScorecard = $dragScorecard->parentNode->removeChild($dragScorecard);
             $dragScorecard = $dragScorecard->parentNode->removeChild($dragScorecard);
-            $dragScorecard->setAttribute("Directory",utf8_encode($p_dropIDArr[1])."\\");
+            $dragScorecard->setAttribute("Directory",utf8_to_latin1($p_dropIDArr[1])."\\");
             
             
-            $dragDashboard = $ProjectXpath->query('./Dashboards/Dashboard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_encode($p_dragIDArr[1]).'\\"]',$Project)->item(0);
+            $dragDashboard = $ProjectXpath->query('./Dashboards/Dashboard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_to_latin1($p_dragIDArr[1]).'\\"]',$Project)->item(0);
             $dragDashboard = $dragDashboard->parentNode->removeChild($dragDashboard);
             $dragDashboard = $dragDashboard->parentNode->removeChild($dragDashboard);
-            $dragDashboard->setAttribute("Directory",utf8_encode($p_dropIDArr[1])."\\");
+            $dragDashboard->setAttribute("Directory",utf8_to_latin1($p_dropIDArr[1])."\\");
         } elseif($p_action == "copy") {
         } elseif($p_action == "copy") {
             $newID = $this->_generateSectionID();
             $newID = $this->_generateSectionID();
             
             
-            $iDragPublish = $ProjectXpath->query('/Configuration/Publishes/Publish[./@ID = "'.$p_dragIDArr[0].'" and ./@User="'.utf8_encode($p_dragIDArr[1]).'"]')->item(0);
+            $iDragPublish = $ProjectXpath->query('/Configuration/Publishes/Publish[./@ID = "'.$p_dragIDArr[0].'" and ./@User="'.utf8_to_latin1($p_dragIDArr[1]).'"]')->item(0);
             $dragPublish = $iDragPublish->cloneNode(false);
             $dragPublish = $iDragPublish->cloneNode(false);
             $dragPublish->appendChild($ProjectDOM->createElement("Images"));
             $dragPublish->appendChild($ProjectDOM->createElement("Images"));
             $dragPublish->setAttribute("ID",$newID);
             $dragPublish->setAttribute("ID",$newID);
-            $dragPublish->setAttribute("User",utf8_encode($p_dropIDArr[1]));
+            $dragPublish->setAttribute("User",utf8_to_latin1($p_dropIDArr[1]));
             
             
-            $iDragScorecard = $ProjectXpath->query('/Configuration/Scorecards/Scorecard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_encode($p_dragIDArr[1]).'\\"]')->item(0);
+            $iDragScorecard = $ProjectXpath->query('/Configuration/Scorecards/Scorecard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_to_latin1($p_dragIDArr[1]).'\\"]')->item(0);
             $dragScorecard = $iDragScorecard->cloneNode(false);
             $dragScorecard = $iDragScorecard->cloneNode(false);
             $dragScorecard->appendChild($ProjectDOM->createElement("Reports"));
             $dragScorecard->appendChild($ProjectDOM->createElement("Reports"));
             $dragScorecard->setAttribute("ID",$newID);
             $dragScorecard->setAttribute("ID",$newID);
-            $dragScorecard->setAttribute("Directory",utf8_encode($p_dropIDArr[1])."\\");
+            $dragScorecard->setAttribute("Directory",utf8_to_latin1($p_dropIDArr[1])."\\");
             
             
-            $iDragDashboard = $ProjectXpath->query('/Configuration/Dashboards/Dashboard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_encode($p_dragIDArr[1]).'\\"]')->item(0);
+            $iDragDashboard = $ProjectXpath->query('/Configuration/Dashboards/Dashboard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_to_latin1($p_dragIDArr[1]).'\\"]')->item(0);
             $dragDashboard = $iDragDashboard->cloneNode(false);
             $dragDashboard = $iDragDashboard->cloneNode(false);
             $dragDashboard->appendChild($ProjectDOM->createElement("Reviews"));
             $dragDashboard->appendChild($ProjectDOM->createElement("Reviews"));
             $dragDashboard->setAttribute("ID",$newID);
             $dragDashboard->setAttribute("ID",$newID);
-            $dragDashboard->setAttribute("Directory",utf8_encode($p_dropIDArr[1])."\\");
+            $dragDashboard->setAttribute("Directory",utf8_to_latin1($p_dropIDArr[1])."\\");
 
 
             $ImageIDs = array();
             $ImageIDs = array();
             $iImageList = $iDragPublish->getElementsByTagname("Image");     
             $iImageList = $iDragPublish->getElementsByTagname("Image");     
@@ -4411,7 +4411,7 @@ foreach($langs as $lang) {
                             break;
                             break;
         }
         }
         
         
-        $subDragPublishes = $ProjectXpath->query("./Publishes/Publish[./@parentID = '".$p_dragIDArr[0]."' and ./@User='".utf8_encode($p_dragIDArr[1])."']");
+        $subDragPublishes = $ProjectXpath->query("./Publishes/Publish[./@parentID = '".$p_dragIDArr[0]."' and ./@User='".utf8_to_latin1($p_dragIDArr[1])."']");
         if($subDragPublishes->length>0) {
         if($subDragPublishes->length>0) {
             for($i=0;$i<$subDragPublishes->length;$i++) {
             for($i=0;$i<$subDragPublishes->length;$i++) {
                $this->saveDADSectionToSection($p_dragType,$subDragPublishes->item($i)->getAttribute("ID")."_".$p_dragIDArr[1],"section",$dragPublish->getAttribute("ID")."_".$p_dropIDArr[1],"under",$p_action,$ProjectDOM,$ProjectXpath);
                $this->saveDADSectionToSection($p_dragType,$subDragPublishes->item($i)->getAttribute("ID")."_".$p_dragIDArr[1],"section",$dragPublish->getAttribute("ID")."_".$p_dropIDArr[1],"under",$p_action,$ProjectDOM,$ProjectXpath);
@@ -4437,9 +4437,9 @@ foreach($langs as $lang) {
         $p_dragIDArr = explode("_",$p_dragID);
         $p_dragIDArr = explode("_",$p_dragID);
         
         
         if($p_action == "replace") {
         if($p_action == "replace") {
-            $dragPublish = $ProjectXpath->query('./Publishes/Publish[./@ID = "'.$p_dragIDArr[0].'" and ./@User="'.utf8_encode($p_dragIDArr[1]).'"]',$Project)->item(0);
+            $dragPublish = $ProjectXpath->query('./Publishes/Publish[./@ID = "'.$p_dragIDArr[0].'" and ./@User="'.utf8_to_latin1($p_dragIDArr[1]).'"]',$Project)->item(0);
             $dragPublish = $dragPublish->parentNode->removeChild($dragPublish);
             $dragPublish = $dragPublish->parentNode->removeChild($dragPublish);
-            $dragPublish->setAttribute("User",utf8_encode($p_dropID));
+            $dragPublish->setAttribute("User",utf8_to_latin1($p_dropID));
             $dragPublish->setAttribute("parentID","");
             $dragPublish->setAttribute("parentID","");
             $ImageList = $dragPublish->getElementsByTagname("Image");
             $ImageList = $dragPublish->getElementsByTagname("Image");
             for($i=0;$ImageList->length>$i;$i++) {
             for($i=0;$ImageList->length>$i;$i++) {
@@ -4452,34 +4452,34 @@ foreach($langs as $lang) {
                    }
                    }
                 }
                 }
             }
             }
-            $dragScorecard = $ProjectXpath->query('./Scorecards/Scorecard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_encode($p_dragIDArr[1]).'\\"]',$Project)->item(0);
+            $dragScorecard = $ProjectXpath->query('./Scorecards/Scorecard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_to_latin1($p_dragIDArr[1]).'\\"]',$Project)->item(0);
             $dragScorecard = $dragScorecard->parentNode->removeChild($dragScorecard);
             $dragScorecard = $dragScorecard->parentNode->removeChild($dragScorecard);
-            $dragScorecard->setAttribute("Directory",utf8_encode($p_dropID)."\\");
+            $dragScorecard->setAttribute("Directory",utf8_to_latin1($p_dropID)."\\");
             
             
-            $dragDashboard = $ProjectXpath->query('./Dashboards/Dashboard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_encode($p_dragIDArr[1]).'\\"]',$Project)->item(0);
+            $dragDashboard = $ProjectXpath->query('./Dashboards/Dashboard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_to_latin1($p_dragIDArr[1]).'\\"]',$Project)->item(0);
             $dragDashboard = $dragDashboard->parentNode->removeChild($dragDashboard);
             $dragDashboard = $dragDashboard->parentNode->removeChild($dragDashboard);
-            $dragDashboard->setAttribute("Directory",utf8_encode($p_dropID)."\\");
+            $dragDashboard->setAttribute("Directory",utf8_to_latin1($p_dropID)."\\");
         } elseif($p_action == "copy") {
         } elseif($p_action == "copy") {
             $newID = $this->_generateSectionID();
             $newID = $this->_generateSectionID();
             
             
-            $iDragPublish = $ProjectXpath->query('/Configuration/Publishes/Publish[./@ID = "'.$p_dragIDArr[0].'" and ./@User="'.utf8_encode($p_dragIDArr[1]).'"]')->item(0);
+            $iDragPublish = $ProjectXpath->query('/Configuration/Publishes/Publish[./@ID = "'.$p_dragIDArr[0].'" and ./@User="'.utf8_to_latin1($p_dragIDArr[1]).'"]')->item(0);
             $dragPublish = $iDragPublish->cloneNode(false);
             $dragPublish = $iDragPublish->cloneNode(false);
             $dragPublish->appendChild($ProjectDOM->createElement("Images"));
             $dragPublish->appendChild($ProjectDOM->createElement("Images"));
             $dragPublish->setAttribute("ID",$newID);
             $dragPublish->setAttribute("ID",$newID);
             $dragPublish->setAttribute("parentID","");
             $dragPublish->setAttribute("parentID","");
-            $dragPublish->setAttribute("User",utf8_encode($p_dropID));
+            $dragPublish->setAttribute("User",utf8_to_latin1($p_dropID));
             
             
-            $iDragScorecard = $ProjectXpath->query('/Configuration/Scorecards/Scorecard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_encode($p_dragIDArr[1]).'\\"]')->item(0);
+            $iDragScorecard = $ProjectXpath->query('/Configuration/Scorecards/Scorecard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_to_latin1($p_dragIDArr[1]).'\\"]')->item(0);
             $dragScorecard = $iDragScorecard->cloneNode(false);
             $dragScorecard = $iDragScorecard->cloneNode(false);
             $dragScorecard->appendChild($ProjectDOM->createElement("Reports"));
             $dragScorecard->appendChild($ProjectDOM->createElement("Reports"));
             $dragScorecard->setAttribute("ID",$newID);
             $dragScorecard->setAttribute("ID",$newID);
-            $dragScorecard->setAttribute("Directory",utf8_encode($p_dropID)."\\");
+            $dragScorecard->setAttribute("Directory",utf8_to_latin1($p_dropID)."\\");
             
             
-            $iDragDashboard = $ProjectXpath->query('/Configuration/Dashboards/Dashboard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_encode($p_dragIDArr[1]).'\\"]')->item(0);
+            $iDragDashboard = $ProjectXpath->query('/Configuration/Dashboards/Dashboard[./@ID = "'.$p_dragIDArr[0].'" and ./@Directory="'.utf8_to_latin1($p_dragIDArr[1]).'\\"]')->item(0);
             $dragDashboard = $iDragDashboard->cloneNode(false);
             $dragDashboard = $iDragDashboard->cloneNode(false);
             $dragDashboard->appendChild($ProjectDOM->createElement("Reviews"));
             $dragDashboard->appendChild($ProjectDOM->createElement("Reviews"));
             $dragDashboard->setAttribute("ID",$newID);
             $dragDashboard->setAttribute("ID",$newID);
-            $dragDashboard->setAttribute("Directory",utf8_encode($p_dropID)."\\");
+            $dragDashboard->setAttribute("Directory",utf8_to_latin1($p_dropID)."\\");
 
 
             $ImageIDs = array();
             $ImageIDs = array();
             $iImageList = $iDragPublish->getElementsByTagname("Image");     
             $iImageList = $iDragPublish->getElementsByTagname("Image");     
@@ -4525,7 +4525,7 @@ foreach($langs as $lang) {
         $dropScorecards->appendChild($dragScorecard);
         $dropScorecards->appendChild($dragScorecard);
         $dropDashboards->appendChild($dragDashboard);
         $dropDashboards->appendChild($dragDashboard);
 
 
-        $subDragPublishes = $ProjectXpath->query("./Publishes/Publish[./@parentID = '".$p_dragIDArr[0]."' and ./@User='".utf8_encode($p_dragIDArr[1])."']");
+        $subDragPublishes = $ProjectXpath->query("./Publishes/Publish[./@parentID = '".$p_dragIDArr[0]."' and ./@User='".utf8_to_latin1($p_dragIDArr[1])."']");
         if($subDragPublishes->length>0) {
         if($subDragPublishes->length>0) {
             for($i=0;$i<$subDragPublishes->length;$i++) {
             for($i=0;$i<$subDragPublishes->length;$i++) {
                $this->saveDADSectionToSection($p_dragType,$subDragPublishes->item($i)->getAttribute("ID")."_".$p_dragIDArr[1],"section",$dragPublish->getAttribute("ID")."_".$p_dropID,"under",$p_action,$ProjectDOM,$ProjectXpath);
                $this->saveDADSectionToSection($p_dragType,$subDragPublishes->item($i)->getAttribute("ID")."_".$p_dragIDArr[1],"section",$dragPublish->getAttribute("ID")."_".$p_dropID,"under",$p_action,$ProjectDOM,$ProjectXpath);
@@ -4544,7 +4544,7 @@ foreach($langs as $lang) {
 	        $ProjectDOM->load($MISConfig->getConfigFile());
 	        $ProjectDOM->load($MISConfig->getConfigFile());
 	        $ProjectXpath = new DOMXpath($ProjectDOM);
 	        $ProjectXpath = new DOMXpath($ProjectDOM);
 	        $Project =  $ProjectXpath->query('/Configuration')->item(0); 
 	        $Project =  $ProjectXpath->query('/Configuration')->item(0); 
-			$iDragPublishList = $ProjectXpath->query('./Publishes/Publish[./@User = "'.utf8_encode($p_dragID).'" and ./@parentID = ""]',$Project);
+			$iDragPublishList = $ProjectXpath->query('./Publishes/Publish[./@User = "'.utf8_to_latin1($p_dragID).'" and ./@parentID = ""]',$Project);
 	   
 	   
 	        $temp=$iDragPublishList->length;
 	        $temp=$iDragPublishList->length;
 		    for($i=0;$temp>$i;$i=$i+1) {
 		    for($i=0;$temp>$i;$i=$i+1) {
@@ -4558,8 +4558,8 @@ foreach($langs as $lang) {
         	$UserDOM->load($this->authFile);
         	$UserDOM->load($this->authFile);
         	$UserXpath = new DOMXpath($UserDOM);
         	$UserXpath = new DOMXpath($UserDOM);
 
 
-        	$dragUser = $UserXpath->query("/auth/users/user[@username='".utf8_encode($p_dragID)."' and @setting='".basename($MISConfig->getConfigFile(),".xml")."']")->item(0);
-        	$dropUser = $UserXpath->query("/auth/users/user[@username='".utf8_encode($p_dropID)."' and @setting='".basename($MISConfig->getConfigFile(),".xml")."']")->item(0);
+        	$dragUser = $UserXpath->query("/auth/users/user[@username='".utf8_to_latin1($p_dragID)."' and @setting='".basename($MISConfig->getConfigFile(),".xml")."']")->item(0);
+        	$dropUser = $UserXpath->query("/auth/users/user[@username='".utf8_to_latin1($p_dropID)."' and @setting='".basename($MISConfig->getConfigFile(),".xml")."']")->item(0);
         	switch($p_dropOrder) {
         	switch($p_dropOrder) {
 	            case "before":  $dropUser->parentNode->insertBefore($dragUser,$dropUser);
 	            case "before":  $dropUser->parentNode->insertBefore($dragUser,$dropUser);
 	                            break;
 	                            break;
@@ -4655,7 +4655,7 @@ foreach($langs as $lang) {
 		}
 		}
 		$ProjectDOM->save($MISConfig->getConfigFile());
 		$ProjectDOM->save($MISConfig->getConfigFile());
 		$this->saveRetrieveInput("dummy");
 		$this->saveRetrieveInput("dummy");
-		return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configReportsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configReportsFormCb);');
+		return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configReportsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configReportsFormCb);');
 	}
 	}
 	
 	
 	private function saveDADScorecardToSection($p_dragType,$p_dragID,$p_dropType,$p_dropID,$p_dropOrder,$p_action) {
 	private function saveDADScorecardToSection($p_dragType,$p_dragID,$p_dropType,$p_dropID,$p_dropOrder,$p_action) {
@@ -4670,13 +4670,13 @@ foreach($langs as $lang) {
 		
 		
 		$dragPR = $projectXpath->query("/Configuration/Scorecards/Scorecard/Reports/Report[./@ID='".$p_dragIDArr[0]."']")->item(0);
 		$dragPR = $projectXpath->query("/Configuration/Scorecards/Scorecard/Reports/Report[./@ID='".$p_dragIDArr[0]."']")->item(0);
 		if($p_dropType == "section") {
 		if($p_dropType == "section") {
-			$PRsList = $projectXpath->query("/Configuration/Scorecards/Scorecard/Reports[./../@ID='".$p_dropIDArr[0]."' and ./../@Directory='".utf8_encode($p_dropIDArr[1])."\\']");
+			$PRsList = $projectXpath->query("/Configuration/Scorecards/Scorecard/Reports[./../@ID='".$p_dropIDArr[0]."' and ./../@Directory='".utf8_to_latin1($p_dropIDArr[1])."\\']");
 			$PPName = $projectXpath->query("/Configuration/Publishes/Publish[./@ID='".$p_dropIDArr[0]."']")->item(0)->getAttribute("Name");
 			$PPName = $projectXpath->query("/Configuration/Publishes/Publish[./@ID='".$p_dropIDArr[0]."']")->item(0)->getAttribute("Name");
 			if($PRsList->length > 0) {
 			if($PRsList->length > 0) {
 				$dropPRs = $PRsList->item(0);
 				$dropPRs = $PRsList->item(0);
 			}else{
 			}else{
 				$PS = $projectDOM->createElement("Scorecard");
 				$PS = $projectDOM->createElement("Scorecard");
-				$PS->setAttribute("Directory",utf8_encode($p_dropIDArr[1])."\\");
+				$PS->setAttribute("Directory",utf8_to_latin1($p_dropIDArr[1])."\\");
 				$PS->setAttribute("ID",$p_dropIDArr[0]);
 				$PS->setAttribute("ID",$p_dropIDArr[0]);
 				$PS->setAttribute("Name",$PPName);
 				$PS->setAttribute("Name",$PPName);
 				$dropPRs = $projectDOM->createElement("Reports");
 				$dropPRs = $projectDOM->createElement("Reports");
@@ -4716,7 +4716,7 @@ foreach($langs as $lang) {
 		}
 		}
 		$projectDOM->save($MISConfig->getConfigFile());
 		$projectDOM->save($MISConfig->getConfigFile());
 		$this->saveRetrieveInput("dummy");
 		$this->saveRetrieveInput("dummy");
-		return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configScorecardsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configScorecardsFormCb);');
+		return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configScorecardsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configScorecardsFormCb);');
 	}
 	}
 	
 	
     private function saveDADDashboardToSection($p_dragType,$p_dragID,$p_dropType,$p_dropID,$p_dropOrder,$p_action) {
     private function saveDADDashboardToSection($p_dragType,$p_dragID,$p_dropType,$p_dropID,$p_dropOrder,$p_action) {
@@ -4731,13 +4731,13 @@ foreach($langs as $lang) {
         
         
         $dragPR = $projectXpath->query("/Configuration/Dashboards/Dashboard/Reviews/Review[./@ID='".$p_dragIDArr[0]."']")->item(0);
         $dragPR = $projectXpath->query("/Configuration/Dashboards/Dashboard/Reviews/Review[./@ID='".$p_dragIDArr[0]."']")->item(0);
         if($p_dropType == "section") {
         if($p_dropType == "section") {
-            $PRsList = $projectXpath->query("/Configuration/Dashboards/Dashboard/Reviews[./../@ID='".$p_dropIDArr[0]."' and ./../@Directory='".utf8_encode($p_dropIDArr[1])."\\']");
+            $PRsList = $projectXpath->query("/Configuration/Dashboards/Dashboard/Reviews[./../@ID='".$p_dropIDArr[0]."' and ./../@Directory='".utf8_to_latin1($p_dropIDArr[1])."\\']");
             $PPName = $projectXpath->query("/Configuration/Publishes/Publish[./@ID='".$p_dropIDArr[0]."']")->item(0)->getAttribute("Name");
             $PPName = $projectXpath->query("/Configuration/Publishes/Publish[./@ID='".$p_dropIDArr[0]."']")->item(0)->getAttribute("Name");
             if($PRsList->length > 0) {
             if($PRsList->length > 0) {
                 $dropPRs = $PRsList->item(0);
                 $dropPRs = $PRsList->item(0);
             }else{
             }else{
                 $PS = $projectDOM->createElement("Dashboard");
                 $PS = $projectDOM->createElement("Dashboard");
-                $PS->setAttribute("Directory",utf8_encode($p_dropIDArr[1])."\\");
+                $PS->setAttribute("Directory",utf8_to_latin1($p_dropIDArr[1])."\\");
                 $PS->setAttribute("ID",$p_dropIDArr[0]);
                 $PS->setAttribute("ID",$p_dropIDArr[0]);
                 $PS->setAttribute("Name",$PPName);
                 $PS->setAttribute("Name",$PPName);
                 $dropPRs = $projectDOM->createElement("Reviews");
                 $dropPRs = $projectDOM->createElement("Reviews");
@@ -4777,7 +4777,7 @@ foreach($langs as $lang) {
         }
         }
         $projectDOM->save($MISConfig->getConfigFile());
         $projectDOM->save($MISConfig->getConfigFile());
         $this->saveRetrieveInput("dummy");
         $this->saveRetrieveInput("dummy");
-        return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configDashboardsForm","'.utf8_encode($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configDashboardsFormCb);');
+        return array('CMgr.getMODEL().abortRetrieveInput();Ajax.request(MISConfigurator.__toString(),"configDashboardsForm","'.utf8_to_latin1($_SESSION["configurator"]["publishes"]["section"]).'",MISConfigurator.configDashboardsFormCb);');
     }
     }
 	
 	
 	private function dummy(){}
 	private function dummy(){}
@@ -4833,8 +4833,8 @@ foreach($langs as $lang) {
 			$name = $report->getElementsByTagName("Report")->item(0)->nodeValue;
 			$name = $report->getElementsByTagName("Report")->item(0)->nodeValue;
 								$reportPath = $projectXpath->query("/Configuration/General/ReportPath")->item(0)->nodeValue;
 								$reportPath = $projectXpath->query("/Configuration/General/ReportPath")->item(0)->nodeValue;
 								$ppx = $report->getElementsByTagName("ppx")->item(0)->nodeValue;
 								$ppx = $report->getElementsByTagName("ppx")->item(0)->nodeValue;
-                                if($ppx == "J" && file_exists($reportPath.$name.".ppx")) $filename = utf8_decode($reportPath.$name.".ppx"); 	
-					            else $filename = utf8_decode($reportPath.$name.".ppr");
+                                if($ppx == "J" && file_exists($reportPath.$name.".ppx")) $filename = latin1_to_utf8($reportPath.$name.".ppx"); 	
+					            else $filename = latin1_to_utf8($reportPath.$name.".ppr");
 
 
 					            $file_extension = strtolower(substr(strrchr($filename,"."),1));
 					            $file_extension = strtolower(substr(strrchr($filename,"."),1));
 	
 	

+ 14 - 14
apps/MISView/MISView.class.inc

@@ -217,7 +217,7 @@ class MISView extends App {
 		$datensatz = array();
 		$datensatz = array();
 		$dom = new DOMDocument('1.0', 'iso-8859-1');
 		$dom = new DOMDocument('1.0', 'iso-8859-1');
 	   
 	   
-		$dom->load(utf8_decode($publishImagePath . $this->getUsername() . "/data.xml"));
+		$dom->load(latin1_to_utf8($publishImagePath . $this->getUsername() . "/data.xml"));
 		$xpath = new DOMXPath($dom);
 		$xpath = new DOMXPath($dom);
 		$berichte = $xpath->query('/Daten/child::*[@ID = ' . $p_sectionID . ']/Scorecards/Bericht');
 		$berichte = $xpath->query('/Daten/child::*[@ID = ' . $p_sectionID . ']/Scorecards/Bericht');
 	
 	
@@ -362,14 +362,14 @@ class MISView extends App {
         $reportFile = $report->getElementsByTagName("Report")->item(0)->nodeValue;
         $reportFile = $report->getElementsByTagName("Report")->item(0)->nodeValue;
         if($report->getElementsByTagName("Ansicht")->item(0)->nodeValue == "Client") {
         if($report->getElementsByTagName("Ansicht")->item(0)->nodeValue == "Client") {
 	        if($ppx == "J" && file_exists($reportPath.$reportFile.".ppx")) $filename = $reportPath.$reportFile.".ppx"; 
 	        if($ppx == "J" && file_exists($reportPath.$reportFile.".ppx")) $filename = $reportPath.$reportFile.".ppx"; 
-	        else $filename = utf8_decode($reportPath.$reportFile.".ppr");
+	        else $filename = latin1_to_utf8($reportPath.$reportFile.".ppr");
         }else{
         }else{
         	if(!isset($_SESSION["Config"]) && !isset($_SESSION["Config"]["General"]) && !isset($_SESSION["Config"]["General"]["PublishImagePath"])){
         	if(!isset($_SESSION["Config"]) && !isset($_SESSION["Config"]["General"]) && !isset($_SESSION["Config"]["General"]["PublishImagePath"])){
 				$_SESSION["Config"]["General"]["PublishImagePath"] = $projectXpath->query('/Configuration/General/PublishImagePath')->item(0)->nodeValue;
 				$_SESSION["Config"]["General"]["PublishImagePath"] = $projectXpath->query('/Configuration/General/PublishImagePath')->item(0)->nodeValue;
 			}
 			}
 			$publishImagePath = $_SESSION["Config"]["General"]["PublishImagePath"];
 			$publishImagePath = $_SESSION["Config"]["General"]["PublishImagePath"];
             
             
-            $filename = utf8_decode($publishImagePath.$this->getUsername()."\\".$sectionName."\\".$reportName.".pdf");
+            $filename = latin1_to_utf8($publishImagePath.$this->getUsername()."\\".$sectionName."\\".$reportName.".pdf");
         } 
         } 
         if (!file_exists($filename)) {
         if (!file_exists($filename)) {
             $tpl->assign("reportLink",'javascript:alert(\''.$this->_getI18N('missingReportFile').'\');');
             $tpl->assign("reportLink",'javascript:alert(\''.$this->_getI18N('missingReportFile').'\');');
@@ -440,13 +440,13 @@ class MISView extends App {
 				}
 				}
 			}
 			}
 			
 			
-	        $filename = utf8_decode($filename);
+	        $filename = latin1_to_utf8($filename);
 		    if (file_exists($filename)) {
 		    if (file_exists($filename)) {
 
 
 		        $im = new Imagick($filename);
 		        $im = new Imagick($filename);
 			    $im->scaleImage(750,0);
 			    $im->scaleImage(750,0);
 /*
 /*
-	            if(date('j-m-y',time()) > date('j-m-y',filemtime(utf8_decode($publishImagePath.$this->getUsername()."/data.xml")))+3) {
+	            if(date('j-m-y',time()) > date('j-m-y',filemtime(latin1_to_utf8($publishImagePath.$this->getUsername()."/data.xml")))+3) {
 
 
 				    $draw = new ImagickDraw();
 				    $draw = new ImagickDraw();
 				
 				
@@ -483,7 +483,7 @@ class MISView extends App {
                     $draw->setFontSize( 30 );
                     $draw->setFontSize( 30 );
                 
                 
                     /*** add some transparency ***/
                     /*** add some transparency ***/
-                    $draw->setFillAlpha( 0.7 );
+                    $draw->setFillOpacity( 0.7 );
                 
                 
                     /*** set gravity to the center ***/
                     /*** set gravity to the center ***/
                     $draw->setGravity( Imagick::GRAVITY_CENTER );
                     $draw->setGravity( Imagick::GRAVITY_CENTER );
@@ -526,8 +526,8 @@ class MISView extends App {
 				case "Client":	$name = $report->getElementsByTagName("Report")->item(0)->nodeValue;
 				case "Client":	$name = $report->getElementsByTagName("Report")->item(0)->nodeValue;
 								$reportPath = $projectXpath->query("/Configuration/General/ReportPath")->item(0)->nodeValue;
 								$reportPath = $projectXpath->query("/Configuration/General/ReportPath")->item(0)->nodeValue;
 								$ppx = $report->getElementsByTagName("ppx")->item(0)->nodeValue;
 								$ppx = $report->getElementsByTagName("ppx")->item(0)->nodeValue;
-                                if($ppx == "J" && file_exists($reportPath.$name.".ppx")) $filename = utf8_decode($reportPath.$name.".ppx"); 	
-					            else $filename = utf8_decode($reportPath.$name.".ppr");
+                                if($ppx == "J" && file_exists($reportPath.$name.".ppx")) $filename = latin1_to_utf8($reportPath.$name.".ppx"); 	
+					            else $filename = latin1_to_utf8($reportPath.$name.".ppr");
 
 
 					            $file_extension = strtolower(substr(strrchr($filename,"."),1));
 					            $file_extension = strtolower(substr(strrchr($filename,"."),1));
 	
 	
@@ -564,7 +564,7 @@ class MISView extends App {
 				case "Info-User":$name = $report->getElementsByTagName("Name")->item(0)->nodeValue;
 				case "Info-User":$name = $report->getElementsByTagName("Name")->item(0)->nodeValue;
 								$reportPath = $projectXpath->query("/Configuration/General/PublishImagePath")->item(0)->nodeValue;
 								$reportPath = $projectXpath->query("/Configuration/General/PublishImagePath")->item(0)->nodeValue;
 								$sectionName = $projectXpath->query("/Configuration/Publishes/Publish[./Images/Image/@ID = '".$p_reportID."']")->item(0);	
 								$sectionName = $projectXpath->query("/Configuration/Publishes/Publish[./Images/Image/@ID = '".$p_reportID."']")->item(0);	
-					            $filename = utf8_decode($reportPath.$this->getUsername()."\\".$sectionName->getAttribute("Name")."\\".$name.".pdf");
+					            $filename = latin1_to_utf8($reportPath.$this->getUsername()."\\".$sectionName->getAttribute("Name")."\\".$name.".pdf");
 	
 	
 					            $file_extension = strtolower(substr(strrchr($filename,"."),1));
 					            $file_extension = strtolower(substr(strrchr($filename,"."),1));
 								$filename = $filename;
 								$filename = $filename;
@@ -614,7 +614,7 @@ class MISView extends App {
         $projectXpath = new DOMXpath($projectDOM);
         $projectXpath = new DOMXpath($projectDOM);
         $publishImagePath = $projectXpath->query('/Configuration/General/PublishImagePath')->item(0)->nodeValue;
         $publishImagePath = $projectXpath->query('/Configuration/General/PublishImagePath')->item(0)->nodeValue;
 		$dataDOM = new DOMDocument('1.0', 'iso-8859-1');
 		$dataDOM = new DOMDocument('1.0', 'iso-8859-1');
-		$dataDOM->load(utf8_decode($publishImagePath.$this->getUsername()."/data.xml"));
+		$dataDOM->load(latin1_to_utf8($publishImagePath.$this->getUsername()."/data.xml"));
 		$dataXpath = new DOMXpath($dataDOM);
 		$dataXpath = new DOMXpath($dataDOM);
 		
 		
 		$report = $dataXpath->query('/Daten/child::*/Scorecards/Bericht[../../@ID = "'.$p_sectionID.'"]')->item($p_scorecardID);
 		$report = $dataXpath->query('/Daten/child::*/Scorecards/Bericht[../../@ID = "'.$p_sectionID.'"]')->item($p_scorecardID);
@@ -648,7 +648,7 @@ class MISView extends App {
 		$publishImagePath = $projectXpath->query('/Configuration/General/PublishImagePath')->item(0)->nodeValue;
 		$publishImagePath = $projectXpath->query('/Configuration/General/PublishImagePath')->item(0)->nodeValue;
 		
 		
 		$dataDOM = new DOMDocument('1.0', 'iso-8859-1');
 		$dataDOM = new DOMDocument('1.0', 'iso-8859-1');
-		$dataDOM->load(utf8_decode($publishImagePath.$this->getUsername()."/data.xml"));
+		$dataDOM->load(latin1_to_utf8($publishImagePath.$this->getUsername()."/data.xml"));
 		$dataXpath = new DOMXpath($dataDOM);
 		$dataXpath = new DOMXpath($dataDOM);
 		
 		
 		$p_reportID = $projectXpath->query('/Configuration/Scorecards/Scorecard/Reports/Report[./../../@ID = "'.$p_sectionID.'"]')->item($p_scorecardID)->getAttribute("ID");
 		$p_reportID = $projectXpath->query('/Configuration/Scorecards/Scorecard/Reports/Report[./../../@ID = "'.$p_sectionID.'"]')->item($p_scorecardID)->getAttribute("ID");
@@ -751,7 +751,7 @@ class MISView extends App {
         $publishImagePath = $projectXpath->query('/Configuration/General/PublishImagePath')->item(0)->nodeValue;
         $publishImagePath = $projectXpath->query('/Configuration/General/PublishImagePath')->item(0)->nodeValue;
         
         
         $dataDOM = new DOMDocument('1.0', 'iso-8859-1');
         $dataDOM = new DOMDocument('1.0', 'iso-8859-1');
-        $dataDOM->load(utf8_decode($publishImagePath.$this->getUsername()."/data.xml"));
+        $dataDOM->load(latin1_to_utf8($publishImagePath.$this->getUsername()."/data.xml"));
         $dataXpath = new DOMXpath($dataDOM);
         $dataXpath = new DOMXpath($dataDOM);
 
 
         
         
@@ -803,7 +803,7 @@ class MISView extends App {
             $MISConfig->setNodeValue("NiedrigerWert",str_replace(".",",",number_reformat($p_lowValue, 2, ',',"."))."",$dataDOM,$PRR);
             $MISConfig->setNodeValue("NiedrigerWert",str_replace(".",",",number_reformat($p_lowValue, 2, ',',"."))."",$dataDOM,$PRR);
             $MISConfig->setNodeValue("HoherWert",str_replace(".",",",number_reformat($p_highValue, 2, ',',"."))."",$dataDOM,$PRR);
             $MISConfig->setNodeValue("HoherWert",str_replace(".",",",number_reformat($p_highValue, 2, ',',"."))."",$dataDOM,$PRR);
         }
         }
-        $dataDOM->save(utf8_decode($publishImagePath.$this->getUsername()."/data.xml"));
+        $dataDOM->save(latin1_to_utf8($publishImagePath.$this->getUsername()."/data.xml"));
         $projectDOM->save($MISConfig->getConfigFile());
         $projectDOM->save($MISConfig->getConfigFile());
         return array('CMgr.getMODEL().__construct();');     
         return array('CMgr.getMODEL().__construct();');     
     }
     }
@@ -871,7 +871,7 @@ class MISView extends App {
         
         
 		
 		
 		$dataDOM = new DOMDocument('1.0', 'iso-8859-1');
 		$dataDOM = new DOMDocument('1.0', 'iso-8859-1');
-		$dataDOM->load(utf8_decode($publishImagePath.$this->getUsername()."/data.xml"));
+		$dataDOM->load(latin1_to_utf8($publishImagePath.$this->getUsername()."/data.xml"));
 		$dataXpath = new DOMXpath($dataDOM);
 		$dataXpath = new DOMXpath($dataDOM);
 		
 		
 		$scorecard = $dataXpath->query('/Daten/child::*/Scorecards/Bericht[../../@ID = "'.$p_sectionID.'"]')->item($p_scorecardID);
 		$scorecard = $dataXpath->query('/Daten/child::*/Scorecards/Bericht[../../@ID = "'.$p_sectionID.'"]')->item($p_scorecardID);

+ 9 - 9
apps/MISView/version_config_batch.php

@@ -7,29 +7,29 @@
         $projectDOM->load($plusMISConfig->getConfigFile());
         $projectDOM->load($plusMISConfig->getConfigFile());
         $projectXpath = new DOMXpath($projectDOM);   
         $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"));
+        $odbc = latin1_to_utf8($projectXpath->query("/Configuration/Version")->item(0)->getAttribute("odbc"));
+        $user = latin1_to_utf8($projectXpath->query("/Configuration/Version")->item(0)->getAttribute("user"));
+        $pw = latin1_to_utf8($projectXpath->query("/Configuration/Version")->item(0)->getAttribute("pw"));
 //        $user = "sa";
 //        $user = "sa";
 //        $pw = "sa";
 //        $pw = "sa";
         // Welche Views sollen abgefragt werden
         // Welche Views sollen abgefragt werden
         $ViewList = $projectXpath->query("/Configuration/Version/Views/View");
         $ViewList = $projectXpath->query("/Configuration/Version/Views/View");
         for($i=0;$i<$ViewList->length;$i++) {
         for($i=0;$i<$ViewList->length;$i++) {
         	$View = $ViewList->item($i);
         	$View = $ViewList->item($i);
-        	$ViewArr[] = utf8_decode($View->getElementsByTagName("Name")->item(0)->nodeValue);
-        	$ViewDescArr[] = utf8_decode($View->getElementsByTagName("Description")->item(0)->nodeValue);
+        	$ViewArr[] = latin1_to_utf8($View->getElementsByTagName("Name")->item(0)->nodeValue);
+        	$ViewDescArr[] = latin1_to_utf8($View->getElementsByTagName("Description")->item(0)->nodeValue);
         }
         }
         // Datenbankversionsfeld
         // Datenbankversionsfeld
         $Views = $projectXpath->query("/Configuration/Version/Views");
         $Views = $projectXpath->query("/Configuration/Version/Views");
-        $VersionFPFeld = utf8_decode($Views->item(0)->getAttribute("fp_feld"));
+        $VersionFPFeld = latin1_to_utf8($Views->item(0)->getAttribute("fp_feld"));
         //$VersionFPFeldString = "Version Datenbank: ";
         //$VersionFPFeldString = "Version Datenbank: ";
         // Datenbankversionsfeld Bezeichnung
         // Datenbankversionsfeld Bezeichnung
-        $VersionFPFeldString = utf8_decode($Views->item(0)->getAttribute("fp_description"));
+        $VersionFPFeldString = latin1_to_utf8($Views->item(0)->getAttribute("fp_description"));
         // View Version Feld
         // View Version Feld
-        $VersionViewFeld = utf8_decode($Views->item(0)->getAttribute("view_feld"));
+        $VersionViewFeld = latin1_to_utf8($Views->item(0)->getAttribute("view_feld"));
         //$VersionViewString = "Version View: ";
         //$VersionViewString = "Version View: ";
         // View Version Bezeichnung
         // View Version Bezeichnung
-        $VersionViewFeldString = utf8_decode($Views->item(0)->getAttribute("view_description"));
+        $VersionViewFeldString = latin1_to_utf8($Views->item(0)->getAttribute("view_description"));
 	  //$VersionViewFeldString = "Version View:  ";
 	  //$VersionViewFeldString = "Version View:  ";
 
 
 ?>
 ?>

+ 26 - 17
lib/App.class.php5

@@ -15,6 +15,7 @@ class App extends User {
 	protected $HTML;
 	protected $HTML;
 	protected $JS;
 	protected $JS;
 	protected $CSS;
 	protected $CSS;
+	protected $Template = null;
 	private $_componentFile = null;
 	private $_componentFile = null;
 	private $_componentPath = null;
 	private $_componentPath = null;
 	private $_component		= null;
 	private $_component		= null;
@@ -24,16 +25,16 @@ class App extends User {
 		parent::__construct();
 		parent::__construct();
 		$this->_componentFile = $p_componentFile;
 		$this->_componentFile = $p_componentFile;
 		$this->_componentPath = dirname($p_componentFile);
 		$this->_componentPath = dirname($p_componentFile);
-		$this->_component		= array_shift(explode(".",basename($p_componentFile)));
+		$this->_component		= explode(".",basename($p_componentFile))[0];
 		$this->_componentPath .= "/";
 		$this->_componentPath .= "/";
 		if(file_exists($this->_componentPath.$this->_component.".i18n.xml"))
 		if(file_exists($this->_componentPath.$this->_component.".i18n.xml"))
-			$this->componentI18NFile = $this->_componentPath.$this->_component.".i18n.xml";
+			$this->_componentI18NFile = $this->_componentPath.$this->_component.".i18n.xml";
 	}	
 	}	
 	
 	
 	/* OLD FUNCTIONS */
 	/* OLD FUNCTIONS */
 	
 	
     protected function Template(){
     protected function Template(){
-        if(!isset($this->Template)) {
+        if($this->Template == null) {
             $this->Template = new Smarty();
             $this->Template = new Smarty();
             $this->Template->left_delimiter = "{[";
             $this->Template->left_delimiter = "{[";
             $this->Template->right_delimiter = "]}";
             $this->Template->right_delimiter = "]}";
@@ -90,9 +91,9 @@ class App extends User {
 	protected function _getI18N($p_node) {
 	protected function _getI18N($p_node) {
 		$MISConfig = new MISConfig();
 		$MISConfig = new MISConfig();
 
 
-		if($this->componentI18NFile != null) {
+		if($this->_componentI18NFile != null) {
 			$i18nDOM = new DOMDocument('1.0', 'utf-8');
 			$i18nDOM = new DOMDocument('1.0', 'utf-8');
-			$i18nDOM->load($this->componentI18NFile);
+			$i18nDOM->load($this->_componentI18NFile);
 			$i18nXpath = new DOMXpath($i18nDOM);
 			$i18nXpath = new DOMXpath($i18nDOM);
 			$i18nNodeList = $i18nXpath->query("/i18n/".$p_node."/".$this->_getLang());
 			$i18nNodeList = $i18nXpath->query("/i18n/".$p_node."/".$this->_getLang());
 			$i18nNodeList2 = $i18nXpath->query("/i18n/".$p_node."");
 			$i18nNodeList2 = $i18nXpath->query("/i18n/".$p_node."");
@@ -100,7 +101,7 @@ class App extends User {
 				return $i18nNodeList->item(0)->nodeValue;
 				return $i18nNodeList->item(0)->nodeValue;
 			}elseif ($i18nNodeList2->length == 0) {
 			}elseif ($i18nNodeList2->length == 0) {
 				$MISConfig->setNodeValue($p_node,"",$i18nDOM,$i18nXpath->query("/i18n")->item(0));
 				$MISConfig->setNodeValue($p_node,"",$i18nDOM,$i18nXpath->query("/i18n")->item(0));
-				$i18nDOM->save($this->componentI18NFile);
+				$i18nDOM->save($this->_componentI18NFile);
 				return "[".$this->_component.":".$this->_getLang().":".$p_node."=!]";
 				return "[".$this->_component.":".$this->_getLang().":".$p_node."=!]";
 			} else {
 			} else {
 				return "[".$this->_component.":".$this->_getLang().":".$p_node."=?]";	
 				return "[".$this->_component.":".$this->_getLang().":".$p_node."=?]";	
@@ -119,24 +120,32 @@ class App extends User {
 		$userDOM = new DOMDocument('1.0', 'utf-8');
 		$userDOM = new DOMDocument('1.0', 'utf-8');
 		$userDOM->load($this->authFile);
 		$userDOM->load($this->authFile);
 		$userXpath = new DOMXpath($userDOM);
 		$userXpath = new DOMXpath($userDOM);
-		$UU = $userXpath->query("/auth/users/user[./@username='".utf8_encode($p_username)."']")->item(0);
-		if(!$UU) {
-	        $MISConfig = new MISConfig();
-	        $projectDOM = new DOMDocument('1.0', 'utf-8');
-	        $projectDOM->load($MISConfig->getConfigFile());
-	        $projectXpath = new DOMXpath($projectDOM);
-			return $projectXpath->query("/Configuration/General/Language")->item(0)->nodeValue;
+		$UU = $userXpath->query("/auth/users/user[./@username='".utf8_to_latin1($p_username)."']");
+		if ($UU->count() > 0) {
+			$userNode = $UU->item(0);
+			if ($userNode instanceof DOMElement) {
+				return $userNode->getAttribute("lang");
+			}
 		}
 		}
-		return $UU->getAttribute("lang");
+		
+		$MISConfig = new MISConfig();
+		$projectDOM = new DOMDocument('1.0', 'utf-8');
+		$projectDOM->load($MISConfig->getConfigFile());
+		$projectXpath = new DOMXpath($projectDOM);
+		return $projectXpath->query("/Configuration/General/Language")->item(0)->nodeValue;
+		
 	}
 	}
 	
 	
 	final protected function _getView($p_username=null){
 	final protected function _getView($p_username=null){
-		if($p_username==null) $p_username = utf8_decode($this->getUsername());
+		if($p_username==null) $p_username = latin1_to_utf8($this->getUsername());
 		$userDOM = new DOMDocument('1.0', 'utf-8');
 		$userDOM = new DOMDocument('1.0', 'utf-8');
 		$userDOM->load($this->authFile);
 		$userDOM->load($this->authFile);
 		$userXpath = new DOMXpath($userDOM);
 		$userXpath = new DOMXpath($userDOM);
-		$UU = $userXpath->query("/auth/users/user[./@username='".utf8_encode($p_username)."']")->item(0);
-		return $UU->getAttribute("view");
+		$UU = $userXpath->query("/auth/users/user[./@username='".utf8_to_latin1($p_username)."']")->item(0);
+		if ($UU instanceof DOMElement) {
+			return $UU->getAttribute("view");
+		}
+		return null;
 	}
 	}
 }
 }
 ?>
 ?>

+ 16 - 16
lib/Auth.class.inc

@@ -123,7 +123,7 @@ class Auth
 		$authSessionsXpath = new DOMXpath($authSessionsDOM);	
 		$authSessionsXpath = new DOMXpath($authSessionsDOM);	
 		
 		
 		//$sessionsForUsername = $authSessionsXpath->query("/sessions/session/@status[./../@username='".$this->_getProp("username")."' and ./../@status='online' and ./../@ip!='".$this->_getProp("ip")."']");;
 		//$sessionsForUsername = $authSessionsXpath->query("/sessions/session/@status[./../@username='".$this->_getProp("username")."' and ./../@status='online' and ./../@ip!='".$this->_getProp("ip")."']");;
-		$sessionsForUsername = $authSessionsXpath->query("/sessions/session/@status[./../@username='".utf8_encode($this->_getProp("username"))."' and ./../@status='online']");;
+		$sessionsForUsername = $authSessionsXpath->query("/sessions/session/@status[./../@username='".utf8_to_latin1($this->_getProp("username"))."' and ./../@status='online']");;
 		if($sessionsForUsername->length > 0) {	
 		if($sessionsForUsername->length > 0) {	
 			return true;
 			return true;
 		} else {
 		} else {
@@ -201,7 +201,7 @@ class Auth
 				$authSessionsDOM->load(dirname(__file__)."/".$this->_authSessionsFile);
 				$authSessionsDOM->load(dirname(__file__)."/".$this->_authSessionsFile);
 				$authSessionsXpath = new DOMXpath($authSessionsDOM);	
 				$authSessionsXpath = new DOMXpath($authSessionsDOM);	
 		
 		
-				$sessions = $authSessionsXpath->query("/sessions/session/@username[./../@id='".$this->_getProp('session')."' and ./../@status='online' and ./../@ip='".$this->_getProp('ip')."' and ./../@userAgent='".utf8_encode($this->_getProp('userAgent'))."']");
+				$sessions = $authSessionsXpath->query("/sessions/session/@username[./../@id='".$this->_getProp('session')."' and ./../@status='online' and ./../@ip='".$this->_getProp('ip')."' and ./../@userAgent='".utf8_to_latin1($this->_getProp('userAgent'))."']");
 		
 		
 				if($sessions->length > 0) {		
 				if($sessions->length > 0) {		
 					$ret = $sessions->item($sessions->length-1)->nodeValue;
 					$ret = $sessions->item($sessions->length-1)->nodeValue;
@@ -215,7 +215,7 @@ class Auth
 				$authDOM->load(dirname(__file__)."/".$this->authFile);
 				$authDOM->load(dirname(__file__)."/".$this->authFile);
 				$authXpath = new DOMXpath($authDOM);	
 				$authXpath = new DOMXpath($authDOM);	
 		
 		
-				$global = @$authXpath->query("/auth/users/user/@global[./../@username='".utf8_encode($this->_getProp('username'))."']")->item(0)->nodeValue;
+				$global = @$authXpath->query("/auth/users/user/@global[./../@username='".utf8_to_latin1($this->_getProp('username'))."']")->item(0)->nodeValue;
 		
 		
 				if($global == "true") {		
 				if($global == "true") {		
 					$ret = true;
 					$ret = true;
@@ -229,7 +229,7 @@ class Auth
 				$authDOM->load(dirname(__file__)."/".$this->authFile);
 				$authDOM->load(dirname(__file__)."/".$this->authFile);
 				$authXpath = new DOMXpath($authDOM);	
 				$authXpath = new DOMXpath($authDOM);	
 		
 		
-				$securityLevels = $authXpath->query("/auth/users/user/@securityLevel[./../@username='".utf8_encode($this->_getProp('username'))."']");
+				$securityLevels = $authXpath->query("/auth/users/user/@securityLevel[./../@username='".utf8_to_latin1($this->_getProp('username'))."']");
 		
 		
 				if($securityLevels->length > 0) {		
 				if($securityLevels->length > 0) {		
 					$ret = $securityLevels->item($securityLevels->length-1)->nodeValue;
 					$ret = $securityLevels->item($securityLevels->length-1)->nodeValue;
@@ -250,7 +250,7 @@ class Auth
 		$authDOM->load(dirname(__file__)."/".$this->authFile);
 		$authDOM->load(dirname(__file__)."/".$this->authFile);
 		$authXpath = new DOMXpath($authDOM);
 		$authXpath = new DOMXpath($authDOM);
 		
 		
-		$passwords = $authXpath->query("/auth/users/user/@password[(./../@setting='".basename($MISConfig->getConfigFile(),".xml")."' or ./../@setting='') and ./../@username = '".utf8_encode($this->_getProp('username'))."']");
+		$passwords = $authXpath->query("/auth/users/user/@password[(./../@setting='".basename($MISConfig->getConfigFile(),".xml")."' or ./../@setting='') and ./../@username = '".utf8_to_latin1($this->_getProp('username'))."']");
 		
 		
 		if($passwords->length > 0) {
 		if($passwords->length > 0) {
 			$password = $passwords->item($passwords->length-1)->nodeValue;
 			$password = $passwords->item($passwords->length-1)->nodeValue;
@@ -288,7 +288,7 @@ class Auth
 		
 		
 		//$sessions = $authSessionsXpath->query("/sessions/session[@status='online' and @username='".$this->_getProp('username')."' and @ip!='".$this->_getProp('ip')."']");
 		//$sessions = $authSessionsXpath->query("/sessions/session[@status='online' and @username='".$this->_getProp('username')."' and @ip!='".$this->_getProp('ip')."']");
 		if(!$this->_getProp("global")) {
 		if(!$this->_getProp("global")) {
-		$sessions = $authSessionsXpath->query("/sessions/session[@status='online' and @username='".utf8_encode($this->_getProp('username'))."']");
+		$sessions = $authSessionsXpath->query("/sessions/session[@status='online' and @username='".utf8_to_latin1($this->_getProp('username'))."']");
 		if($sessions->length > 0) {
 		if($sessions->length > 0) {
 			//Set status = 'security'
 			//Set status = 'security'
 			for($i=0;$i<$sessions->length;$i++) {
 			for($i=0;$i<$sessions->length;$i++) {
@@ -298,7 +298,7 @@ class Auth
 			}			
 			}			
 		}
 		}
 		
 		
-		$sessions = $authSessionsXpath->query("/sessions/session[@status='confirm' and @session='".$this->_getProp("session")."' and @username='".utf8_encode($this->_getProp('username'))."' and @ip='".$this->_getProp('ip')."']");
+		$sessions = $authSessionsXpath->query("/sessions/session[@status='confirm' and @session='".$this->_getProp("session")."' and @username='".utf8_to_latin1($this->_getProp('username'))."' and @ip='".$this->_getProp('ip')."']");
 		if($sessions->length > 0) {
 		if($sessions->length > 0) {
 			//Set status = 'security'
 			//Set status = 'security'
 			for($i=0;$i<$sessions->length;$i++) {
 			for($i=0;$i<$sessions->length;$i++) {
@@ -313,13 +313,13 @@ class Auth
 		$master = $authSessionsXpath->query("/sessions/session[@id = 'master']")->item(0);
 		$master = $authSessionsXpath->query("/sessions/session[@id = 'master']")->item(0);
 		$newSession = $master->cloneNode(true);
 		$newSession = $master->cloneNode(true);
 		$newSession->attributes->getNamedItem("id")->nodeValue = $id;
 		$newSession->attributes->getNamedItem("id")->nodeValue = $id;
-		$newSession->attributes->getNamedItem("username")->nodeValue = utf8_encode($this->_getProp('username'));
+		$newSession->attributes->getNamedItem("username")->nodeValue = utf8_to_latin1($this->_getProp('username'));
 		$newSession->attributes->getNamedItem("password")->nodeValue = "";
 		$newSession->attributes->getNamedItem("password")->nodeValue = "";
 		$newSession->attributes->getNamedItem("status")->nodeValue = "online";
 		$newSession->attributes->getNamedItem("status")->nodeValue = "online";
 		$newSession->attributes->getNamedItem("login")->nodeValue = time();
 		$newSession->attributes->getNamedItem("login")->nodeValue = time();
 		$newSession->attributes->getNamedItem("logout")->nodeValue = time();
 		$newSession->attributes->getNamedItem("logout")->nodeValue = time();
 		$newSession->attributes->getNamedItem("ip")->nodeValue = $this->_getProp("ip");
 		$newSession->attributes->getNamedItem("ip")->nodeValue = $this->_getProp("ip");
-		$newSession->attributes->getNamedItem("userAgent")->nodeValue = utf8_encode($this->_getProp("userAgent"));
+		$newSession->attributes->getNamedItem("userAgent")->nodeValue = utf8_to_latin1($this->_getProp("userAgent"));
 		
 		
 		$master->parentNode->appendChild($newSession);
 		$master->parentNode->appendChild($newSession);
 		$authSessionsDOM->save(dirname(__file__)."/".$this->_authSessionsFile);
 		$authSessionsDOM->save(dirname(__file__)."/".$this->_authSessionsFile);
@@ -339,13 +339,13 @@ class Auth
 		$master = $authSessionsXpath->query("/sessions/session[@id = 'master']")->item(0);
 		$master = $authSessionsXpath->query("/sessions/session[@id = 'master']")->item(0);
 		$newSession = $master->cloneNode(true);
 		$newSession = $master->cloneNode(true);
 		$newSession->attributes->getNamedItem("id")->nodeValue = $id;
 		$newSession->attributes->getNamedItem("id")->nodeValue = $id;
-		$newSession->attributes->getNamedItem("username")->nodeValue = utf8_encode($this->_getProp('username'));
+		$newSession->attributes->getNamedItem("username")->nodeValue = utf8_to_latin1($this->_getProp('username'));
 		$newSession->attributes->getNamedItem("password")->nodeValue = "";
 		$newSession->attributes->getNamedItem("password")->nodeValue = "";
 		$newSession->attributes->getNamedItem("status")->nodeValue = "confirm";
 		$newSession->attributes->getNamedItem("status")->nodeValue = "confirm";
 		$newSession->attributes->getNamedItem("login")->nodeValue = time();
 		$newSession->attributes->getNamedItem("login")->nodeValue = time();
 		$newSession->attributes->getNamedItem("logout")->nodeValue = time();
 		$newSession->attributes->getNamedItem("logout")->nodeValue = time();
 		$newSession->attributes->getNamedItem("ip")->nodeValue = $this->_getProp("ip");
 		$newSession->attributes->getNamedItem("ip")->nodeValue = $this->_getProp("ip");
-		$newSession->attributes->getNamedItem("userAgent")->nodeValue = utf8_encode($this->_getProp("userAgent"));
+		$newSession->attributes->getNamedItem("userAgent")->nodeValue = utf8_to_latin1($this->_getProp("userAgent"));
 		
 		
 		$master->parentNode->appendChild($newSession);
 		$master->parentNode->appendChild($newSession);
 		$authSessionsDOM->save(dirname(__file__)."/".$this->_authSessionsFile);
 		$authSessionsDOM->save(dirname(__file__)."/".$this->_authSessionsFile);
@@ -361,13 +361,13 @@ class Auth
 		$master = $authSessionsXpath->query("/sessions/session[@id = 'master']")->item(0);
 		$master = $authSessionsXpath->query("/sessions/session[@id = 'master']")->item(0);
 		$newSession = $master->cloneNode(true);
 		$newSession = $master->cloneNode(true);
 		$newSession->attributes->getNamedItem("id")->nodeValue = $this->_getProp('session');
 		$newSession->attributes->getNamedItem("id")->nodeValue = $this->_getProp('session');
-		$newSession->attributes->getNamedItem("username")->nodeValue = utf8_encode($this->_getProp('username'));
+		$newSession->attributes->getNamedItem("username")->nodeValue = utf8_to_latin1($this->_getProp('username'));
 		$newSession->attributes->getNamedItem("password")->nodeValue = $this->_getProp('password');
 		$newSession->attributes->getNamedItem("password")->nodeValue = $this->_getProp('password');
 		$newSession->attributes->getNamedItem("status")->nodeValue = "failed";
 		$newSession->attributes->getNamedItem("status")->nodeValue = "failed";
 		$newSession->attributes->getNamedItem("login")->nodeValue = time();
 		$newSession->attributes->getNamedItem("login")->nodeValue = time();
 		$newSession->attributes->getNamedItem("logout")->nodeValue = time();
 		$newSession->attributes->getNamedItem("logout")->nodeValue = time();
 		$newSession->attributes->getNamedItem("ip")->nodeValue = $this->_getProp("ip");
 		$newSession->attributes->getNamedItem("ip")->nodeValue = $this->_getProp("ip");
-		$newSession->attributes->getNamedItem("userAgent")->nodeValue = utf8_encode($this->_getProp("userAgent"));
+		$newSession->attributes->getNamedItem("userAgent")->nodeValue = utf8_to_latin1($this->_getProp("userAgent"));
 		
 		
 		$master->parentNode->appendChild($newSession);
 		$master->parentNode->appendChild($newSession);
 		$authSessionsDOM->save(dirname(__file__)."/".$this->_authSessionsFile);		
 		$authSessionsDOM->save(dirname(__file__)."/".$this->_authSessionsFile);		
@@ -403,7 +403,7 @@ class Auth
 		$authSessionsDOM->load(dirname(__file__)."/".$this->_authSessionsFile);
 		$authSessionsDOM->load(dirname(__file__)."/".$this->_authSessionsFile);
 		$authSessionsXpath = new DOMXpath($authSessionsDOM);
 		$authSessionsXpath = new DOMXpath($authSessionsDOM);
 		
 		
-		$sessions = $authSessionsXpath->query("/sessions/session[@status='online' and @id='".$this->_getProp("session")."' and @ip='".$this->_getProp("ip")."' and @userAgent='".utf8_encode($this->_getProp("userAgent"))."']");
+		$sessions = $authSessionsXpath->query("/sessions/session[@status='online' and @id='".$this->_getProp("session")."' and @ip='".$this->_getProp("ip")."' and @userAgent='".utf8_to_latin1($this->_getProp("userAgent"))."']");
 		if($sessions->length > 0) {
 		if($sessions->length > 0) {
 			$session = $sessions->item(($sessions->length-1));
 			$session = $sessions->item(($sessions->length-1));
 			$session->attributes->getNamedItem("status")->nodeValue = "logout";
 			$session->attributes->getNamedItem("status")->nodeValue = "logout";
@@ -418,7 +418,7 @@ class Auth
 		$authSessionsDOM->load(dirname(__file__)."/".$this->_authSessionsFile);
 		$authSessionsDOM->load(dirname(__file__)."/".$this->_authSessionsFile);
 		$authSessionsXpath = new DOMXpath($authSessionsDOM);		
 		$authSessionsXpath = new DOMXpath($authSessionsDOM);		
 		
 		
-		$sessions = $authSessionsXpath->query("/sessions/session[@status = 'online' and @id = '".$this->_getProp('session')."' and @ip = '".$this->_getProp('ip')."' and @userAgent = '".utf8_encode($this->_getProp('userAgent'))."']");
+		$sessions = $authSessionsXpath->query("/sessions/session[@status = 'online' and @id = '".$this->_getProp('session')."' and @ip = '".$this->_getProp('ip')."' and @userAgent = '".utf8_to_latin1($this->_getProp('userAgent'))."']");
 		if($sessions->length > 0) {
 		if($sessions->length > 0) {
 			$session = $sessions->item(($sessions->length-1));
 			$session = $sessions->item(($sessions->length-1));
 			$session->attributes->getNamedItem("logout")->nodeValue = time();
 			$session->attributes->getNamedItem("logout")->nodeValue = time();
@@ -438,7 +438,7 @@ class Auth
 		$authSessionsDOM->load(dirname(__file__)."/".$this->_authSessionsFile);
 		$authSessionsDOM->load(dirname(__file__)."/".$this->_authSessionsFile);
 		$authSessionsXpath = new DOMXpath($authSessionsDOM);	
 		$authSessionsXpath = new DOMXpath($authSessionsDOM);	
 
 
-		$sessions = $authSessionsXpath->query("/sessions/session/@status[./../@id='".$this->_getProp('session')."' and ./../@id!='' and ./../@ip='".$this->_getProp('ip')."' and ./../@userAgent='".utf8_encode($this->_getProp('userAgent'))."']");
+		$sessions = $authSessionsXpath->query("/sessions/session/@status[./../@id='".$this->_getProp('session')."' and ./../@id!='' and ./../@ip='".$this->_getProp('ip')."' and ./../@userAgent='".utf8_to_latin1($this->_getProp('userAgent'))."']");
 		if($sessions->length > 0) {		
 		if($sessions->length > 0) {		
 			$status = $sessions->item($sessions->length-1)->nodeValue;
 			$status = $sessions->item($sessions->length-1)->nodeValue;
 		} else {
 		} else {

+ 3 - 2
lib/GUI.class.inc

@@ -112,6 +112,7 @@ class Input {
     private $_type;
     private $_type;
     private $_value;
     private $_value;
     private $_eventListeners = array();
     private $_eventListeners = array();
+    private $_selected = false;
     
     
     public function __construct($p_id,$p_name,$p_class,$p_type,$p_value = null,$p_selected = false) {
     public function __construct($p_id,$p_name,$p_class,$p_type,$p_value = null,$p_selected = false) {
         $this->_ID = $p_id;
         $this->_ID = $p_id;
@@ -255,7 +256,7 @@ class TreeNode {
     }
     }
     
     
     public function setRenderer($p_renderer) {
     public function setRenderer($p_renderer) {
-        if(is_subclass_of($p_listener,"TreeNodeRenderer") || is_a($p_listener,"TreeNodeRenderer")) {
+        if(is_subclass_of($p_renderer,"TreeNodeRenderer") || is_a($p_renderer,"TreeNodeRenderer")) {
             $this->_renderer = $p_renderer;
             $this->_renderer = $p_renderer;
         }
         }
     }
     }
@@ -491,7 +492,7 @@ class ContextMenuNode {
     }
     }
     
     
     public function setRenderer($p_renderer) {
     public function setRenderer($p_renderer) {
-        if(is_subclass_of($p_listener,"ContextMenuNodeRenderer") || is_a($p_listener,"ContextMenuNodeRenderer")) {
+        if(is_subclass_of($p_renderer,"ContextMenuNodeRenderer") || is_a($p_renderer,"ContextMenuNodeRenderer")) {
             $this->_renderer = $p_renderer;
             $this->_renderer = $p_renderer;
         }
         }
     }
     }

+ 2 - 2
lib/Runner.class.php5

@@ -66,7 +66,7 @@ class Runner {
 		}
 		}
 	}
 	}
 	
 	
-	final private function _formatRequestResEsc($val) {
+	private function _formatRequestResEsc($val) {
 		
 		
 		$val = str_replace("\\", "\\\\", $val);		
 		$val = str_replace("\\", "\\\\", $val);		
 		$val = str_replace("\r", "\\r", $val);
 		$val = str_replace("\r", "\\r", $val);
@@ -77,7 +77,7 @@ class Runner {
 		return str_replace('"', '\\"', $val);
 		return str_replace('"', '\\"', $val);
 	}	
 	}	
 	
 	
-	final private function _formatRequestRes($p_result) {
+	private function _formatRequestRes($p_result) {
 		if (is_bool($p_result)) {
 		if (is_bool($p_result)) {
 			return ($p_result) ? "Boolean(true)" : "Boolean(false)";
 			return ($p_result) ? "Boolean(true)" : "Boolean(false)";
 		}
 		}

+ 1 - 1
lib/descToName.php

@@ -13,7 +13,7 @@ $Images = $projectXpath->query("/Configuration/Publishes/Publish/Images/Image");
 
 
 for($i=0;$i<$Images->length;$i++){
 for($i=0;$i<$Images->length;$i++){
 	$Image = $Images->item($i);
 	$Image = $Images->item($i);
-	$MISConfig->setNodeValue("Name", utf8_decode($Image->getElementsByTagName("Description")->item(0)->nodeValue), $projectDOM, $Image);
+	$MISConfig->setNodeValue("Name", latin1_to_utf8($Image->getElementsByTagName("Description")->item(0)->nodeValue), $projectDOM, $Image);
 }
 }
 $projectDOM->save($MISConfig->getConfigFilesPath().$argv[1]);
 $projectDOM->save($MISConfig->getConfigFilesPath().$argv[1]);
 ?>
 ?>

+ 22 - 1
lib/functions.inc

@@ -16,7 +16,7 @@
    return strtolower($path_parts['extension']);
    return strtolower($path_parts['extension']);
  }
  }
 
 
-function __autoload($p_comp){
+function module_autoload($p_comp){
 	
 	
 	while(substr($p_comp,0,1) == "/" || substr($p_comp,0,1) == ".") {
 	while(substr($p_comp,0,1) == "/" || substr($p_comp,0,1) == ".") {
 		$p_comp = substr($p_comp,1);
 		$p_comp = substr($p_comp,1);
@@ -32,6 +32,9 @@ function __autoload($p_comp){
 		return false;
 		return false;
 	}
 	}
 }
 }
+
+spl_autoload_register("module_autoload");
+
 function umwandeln($var) {
 function umwandeln($var) {
      $var = str_replace("%","",$var);
      $var = str_replace("%","",$var);
      $var = str_replace(".","",$var);
      $var = str_replace(".","",$var);
@@ -83,4 +86,22 @@ function getImgAlarmstufeSrc($aktwert,$niedriger,$hoher,$positiv) {
      }
      }
      return substr($farbe,0,1) . $stufe;
      return substr($farbe,0,1) . $stufe;
 }
 }
+
+function utf8_to_latin1($string) {
+     if (function_exists('mb_convert_encoding')) {
+          return mb_convert_encoding($string, 'UTF-8', 'ISO-8859-1');
+     } else {
+          return utf8_encode($string);
+     }
+}
+
+function latin1_to_utf8($string) {
+     if (function_exists('mb_convert_encoding')) {
+          return mb_convert_encoding($string, 'ISO-8859-1', 'UTF-8');
+     } else {
+          return utf8_decode($string);
+     }
+}
+
+
 ?>
 ?>