|
|
@@ -1,4 +1,4 @@
|
|
|
-<?php
|
|
|
+<?php
|
|
|
/*
|
|
|
* DON'T REMOVE THE FOLLOWING LICENSE
|
|
|
* INFORMATION!
|
|
|
@@ -13,7 +13,7 @@
|
|
|
class MISConfigurator extends App {
|
|
|
static private $generatedSectionIDs = array();
|
|
|
static private $generatedReportIDs = array();
|
|
|
- static private $version = "20110812";
|
|
|
+ static private $version = "20110908";
|
|
|
|
|
|
public function __construct() {
|
|
|
parent::__construct(__file__);
|
|
|
@@ -53,7 +53,7 @@ class MISConfigurator extends App {
|
|
|
$PP->setAttribute('ID',$newID);
|
|
|
$PP->setAttribute('parentID',$p_parentID);
|
|
|
$PP->setAttribute('User',utf8_to_latin1($p_username));
|
|
|
- $PP->setAttribute('Name',utf8_to_latin1(str_replace(" ","_",$p_sectionName)));
|
|
|
+ $PP->setAttribute('Name',utf8_to_latin1("_".str_replace(" ","_",trim($p_sectionName,"_ "))."_"));
|
|
|
$PP->setAttribute('Alert',utf8_to_latin1($p_showHauptampel));
|
|
|
$PP->appendChild($projectDOM->createElement('Images'));
|
|
|
$projectDOM->getElementsByTagName("Publishes")->item(0)->appendChild($PP);
|
|
|
@@ -61,14 +61,14 @@ class MISConfigurator extends App {
|
|
|
$SS = $projectDOM->createElement("Scorecard");
|
|
|
$SS->setAttribute("ID",$newID);
|
|
|
$SS->setAttribute("Directory",utf8_to_latin1($p_username)."\\");
|
|
|
- $SS->setAttribute("Name",utf8_to_latin1(str_replace(" ","_",$p_sectionName)));
|
|
|
+ $SS->setAttribute("Name",utf8_to_latin1("_".str_replace(" ","_",trim($p_sectionName,"_ "))."_"));
|
|
|
$SS->appendChild($projectDOM->createElement("Reports"));
|
|
|
$projectDOM->getElementsByTagname("Scorecards")->item(0)->appendChild($SS);
|
|
|
|
|
|
$SS = $projectDOM->createElement("Dashboard");
|
|
|
$SS->setAttribute("ID",$newID);
|
|
|
$SS->setAttribute("Directory",utf8_to_latin1($p_username)."\\");
|
|
|
- $SS->setAttribute("Name",utf8_to_latin1(str_replace(" ","_",$p_sectionName)));
|
|
|
+ $SS->setAttribute("Name",utf8_to_latin1("_".str_replace(" ","_",trim($p_sectionName,"_ "))."_"));
|
|
|
$SS->appendChild($projectDOM->createElement("Reviews"));
|
|
|
$projectDOM->getElementsByTagname("Dashboards")->item(0)->appendChild($SS);
|
|
|
|
|
|
@@ -85,7 +85,7 @@ class MISConfigurator extends App {
|
|
|
$emailArr = explode(";",$p_emailStr);
|
|
|
foreach($emailArr as $i => $email) {
|
|
|
$emailExists = $ProjectXpath->query("/Configuration/Emails/Email[. = '".trim($email)."']")->length > 0 ? true : false;
|
|
|
- if(!$emailExists) $MISConfig->setNodeValue("Email",trim($email),$ProjectDOM,$ProjectXpath->query("/Configuration/Emails")->item(0),$ProjectXpath->query("/Configuration/Emails/Email")->length);
|
|
|
+ if(!$emailExists && $email != "") $MISConfig->setNodeValue("Email",trim($email),$ProjectDOM,$ProjectXpath->query("/Configuration/Emails")->item(0),$ProjectXpath->query("/Configuration/Emails/Email")->length);
|
|
|
}
|
|
|
$ProjectDOM->save($MISConfig->getConfigFile());
|
|
|
}
|
|
|
@@ -2188,7 +2188,7 @@ class MISConfigurator extends App {
|
|
|
$ImageEmailArr = explode(";",$Image->getElementsByTagName("Email")->item(0)->nodeValue);
|
|
|
foreach($ImageEmailArr as $email) {
|
|
|
if($email != "") {
|
|
|
- $emailArr[trim($email)] = true;
|
|
|
+ array_push($emailArr,trim($email));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -2200,15 +2200,11 @@ class MISConfigurator extends App {
|
|
|
$ImageEmailArr = explode(";",$iEmailList->item($i)->nodeValue);
|
|
|
foreach($ImageEmailArr as $email) {
|
|
|
if($email != "") {
|
|
|
- $emailArr[trim($email)] = true;
|
|
|
+ array_push($emailArr,trim($email));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- $i=0;
|
|
|
- foreach($emailArr as $email => $value) {
|
|
|
- $MISConfig->setNodeValue("Email", $email, $ProjectDOM, $Emails,$i);
|
|
|
- $i++;
|
|
|
- }
|
|
|
+
|
|
|
$xPublishes = $ProjectXpath->query("./Publish",$Publishes);
|
|
|
foreach($xPublishes as $xPublish) {
|
|
|
$xPublish->setAttribute("parentID",$SectionIDs[str_replace("|"," ",str_replace("_"," ",$xPublish->getAttribute("User")))][$xPublish->getAttribute("parentID")]);
|
|
|
@@ -2254,7 +2250,7 @@ class MISConfigurator extends App {
|
|
|
}
|
|
|
$ProjectXpath->query("/Configuration")->item(0)->setAttribute("Version",self::$version);
|
|
|
$ProjectDOM->save($MISConfig->getConfigFile());
|
|
|
-
|
|
|
+ $this->_registerEmails(implode(";",$emailArr));
|
|
|
$allUsersArr = $MISConfig->getAllUsernames();
|
|
|
|
|
|
foreach($users as $username => $ansicht) {
|
|
|
@@ -2362,7 +2358,7 @@ class MISConfigurator extends App {
|
|
|
private function saveDeleteConfig($p_configFile,$p_deleteUserConfig) {
|
|
|
$MISConfig = new MISConfig();
|
|
|
|
|
|
- $authDOM = new DOMDocument('1.0', 'utf-8');
|
|
|
+ $authDOM = new DOMDocument('1.0', 'iso-8859-1');
|
|
|
$authDOM->load($MISConfig->authFile);
|
|
|
$authXpath = new DOMXpath($authDOM);
|
|
|
if($p_deleteUserConfig == "true") {
|
|
|
@@ -2430,19 +2426,29 @@ class MISConfigurator extends App {
|
|
|
$projectDOM->load($MISConfig->getConfigFile());
|
|
|
$projectXpath = new DOMXpath($projectDOM);
|
|
|
|
|
|
+ $dataDir = $projectXpath->query('/Configuration/General/PublishImagePath')->item(0)->nodeValue;
|
|
|
+
|
|
|
$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,"_ "))));
|
|
|
+
|
|
|
+ @rename(latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name"))."\\",
|
|
|
+ latin1_to_utf8($dataDir.$PP->getAttribute("User"))."\\".
|
|
|
+ "_".str_replace(" ","_",$p_name)."_\\");
|
|
|
+
|
|
|
+ $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_to_latin1($username).'\\"]');
|
|
|
for($i=0;$i<$PSList->length;$i++) {
|
|
|
$PS = $PSList->item($i);
|
|
|
- $PS->setAttribute("Name",utf8_to_latin1("_".str_replace(" ","_",$p_name)));
|
|
|
+ $PS->setAttribute("Name",utf8_to_latin1("_".str_replace(" ","_",trim($p_name,"_ "))."_"));
|
|
|
}
|
|
|
$PSList = $projectXpath->query('/Configuration/Dashboards/Dashboard[./@ID = "'.$ID.'" and ./@Directory = "'.utf8_to_latin1($username).'\\"]');
|
|
|
for($i=0;$i<$PSList->length;$i++) {
|
|
|
$PS = $PSList->item($i);
|
|
|
- $PS->setAttribute("Name",utf8_to_latin1("_".str_replace(" ","_",$p_name)));
|
|
|
+ $PS->setAttribute("Name",utf8_to_latin1("_".str_replace(" ","_",trim($p_name,"_ "))."_"));
|
|
|
}
|
|
|
$projectDOM->save($MISConfig->getConfigFile());
|
|
|
if(count($IDsArr)>0){
|
|
|
@@ -2467,7 +2473,7 @@ class MISConfigurator extends App {
|
|
|
if(count($IDArr)>1) {
|
|
|
$ID = $IDArr[0];
|
|
|
$username = $IDArr[1];
|
|
|
- array_push($PPNames, str_replace("_"," ",trim($projectXpath->query('/Configuration/Publishes/Publish/@Name[./../@ID="'.$ID.'"]')->item(0)->nodeValue))." (".$username.")");
|
|
|
+ array_push($PPNames, str_replace("_"," ",trim($projectXpath->query('/Configuration/Publishes/Publish/@Name[./../@ID="'.$ID.'"]')->item(0)->nodeValue))." (".utf8_to_latin1($username).")");
|
|
|
}else{
|
|
|
$deleteUsers = true;
|
|
|
array_push($newIDsArr,$IDArr[0]);
|
|
|
@@ -2478,7 +2484,7 @@ class MISConfigurator extends App {
|
|
|
$ret.= '<fieldset>';
|
|
|
|
|
|
$ret.= '<legend><img src="img/package.png">'.$this->_getI18N('deleteSection').'</legend>';
|
|
|
- $ret.= '<input type="hidden" name="saveMethod" value="saveDeleteSection"><input type="hidden" name="ID" value="'.$p_ID.'">';
|
|
|
+ $ret.= '<input type="hidden" name="saveMethod" value="saveDeleteSection"><input type="hidden" name="ID" value="'.utf8_to_latin1($p_ID).'">';
|
|
|
$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('deleteSectionInfoMsg1').' <i>'.implode(", ",$PPNames).'</i> '.$this->_getI18N('deleteSectionInfoMsg2').'<hr></td></tr>';
|
|
|
$ret.= '<tr><td colspan="2"><hr><input class="btn" type="button" value="'.$this->_getI18N('abort').'" onclick="';
|
|
|
if($deleteUsers) {
|
|
|
@@ -2535,7 +2541,12 @@ class MISConfigurator extends App {
|
|
|
|
|
|
$PP = $projectXpath->query('/Configuration/Publishes/Publish[./@ID="'.$p_ID.'" and ./@User = "'.utf8_to_latin1($p_username).'"]');
|
|
|
if($PP->length>0) {
|
|
|
+ $dataDir = $projectXpath->query('/Configuration/General/PublishImagePath')->item(0)->nodeValue;
|
|
|
+
|
|
|
$PP = $PP->item(0);
|
|
|
+ $this->deleteDir(latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name"))."\\");
|
|
|
+
|
|
|
$PP->parentNode->removeChild($PP);
|
|
|
$PS = $projectXpath->query('/Configuration/Scorecards/Scorecard[./@ID="'.$p_ID.'" and ./@Directory = "'.utf8_to_latin1($p_username).'\\"]');
|
|
|
for($i=0;$i<$PS->length;$i++){
|
|
|
@@ -2849,7 +2860,7 @@ class MISConfigurator extends App {
|
|
|
$ret.= '<fieldset>';
|
|
|
|
|
|
$ret.= '<legend><img src="img/report.png">'.$PI->getElementsByTagName("Name")->item(0)->nodeValue.' '.$this->_getI18N('editReport').'</legend>';
|
|
|
- $ret.= '<input type="hidden" name="saveMethod" value="saveEditReport"><input type="hidden" name="ID" value="'.$p_ID.'">';
|
|
|
+ $ret.= '<input type="hidden" name="saveMethod" value="saveEditReport"><input type="hidden" name="ID" value="'.utf8_to_latin1($p_ID).'">';
|
|
|
$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('editReportInfoMsg').'<hr></td></tr>';
|
|
|
$ret.= '<tr><td class="label"><label for="inp_name">'.$this->_getI18N('reportName').':</label></td><td><input id="inp_name" name="name" type="text" value="'.$PI->getElementsByTagName("Name")->item(0)->nodeValue.'"></td></tr>';
|
|
|
$ret.= '<tr><td class="label"><label for="inp_description">'.$this->_getI18N('reportDescription').':</label></td><td><textarea id="inp_description" name="description">'.$PI->getElementsByTagName("Description")->item(0)->nodeValue.'</textarea></td></tr>';
|
|
|
@@ -3009,6 +3020,7 @@ class MISConfigurator extends App {
|
|
|
|
|
|
$PIList = $projectXpath->query('/Configuration/Publishes/Publish/Images/Image[./@ID="'.$ID.'"]');
|
|
|
$PI = $projectXpath->query('/Configuration/Publishes/Publish/Images/Image[./@ID="'.$ID.'" and ./Active="J"]')->item(0);
|
|
|
+ $PP = $PI->parentNode->parentNode;
|
|
|
|
|
|
if($PIList->length == 2) {
|
|
|
$previewImage = true;
|
|
|
@@ -3018,6 +3030,8 @@ class MISConfigurator extends App {
|
|
|
$PIpreview = null;
|
|
|
}
|
|
|
|
|
|
+ $dataDir = $projectXpath->query('/Configuration/General/PublishImagePath')->item(0)->nodeValue;
|
|
|
+
|
|
|
$p_gifGenerate = ($p_gifGenerate == "true") ? "J" : "N";
|
|
|
$p_jpgGenerate = ($p_jpgGenerate == "true") ? "J" : "N";
|
|
|
$p_ppxFile = ($p_ppxFile == "true") ? "J" : "N";
|
|
|
@@ -3040,9 +3054,34 @@ class MISConfigurator extends App {
|
|
|
$MISConfig->setNodeValue("Email",$p_email,$projectDOM,$PI);
|
|
|
$MISConfig->setNodeValue("ppx",$p_ppxFile,$projectDOM,$PI);
|
|
|
|
|
|
+
|
|
|
if($previewImage && $p_previewReport == "N") {
|
|
|
+ @unlink(latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name")."\\".$PIpreview->getElementsByTagName("Name")->item(0)->nodeValue.".gif"));
|
|
|
+ @unlink(latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name")."\\".$PIpreview->getElementsByTagName("Name")->item(0)->nodeValue.".jpg"));
|
|
|
+ @unlink(latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name")."\\".$PIpreview->getElementsByTagName("Name")->item(0)->nodeValue.".pdf"));
|
|
|
+ @unlink(latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name")."\\".$PIpreview->getElementsByTagName("Name")->item(0)->nodeValue.".xls"));
|
|
|
$PIpreview->parentNode->removeChild($PIpreview);
|
|
|
} else if($previewImage && $p_previewReport == "J") {
|
|
|
+ @rename(latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name")."\\".$PIpreview->getElementsByTagName("Name")->item(0)->nodeValue.".gif"),
|
|
|
+ latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name"))."\\".$p_reportName.".gif");
|
|
|
+ @rename(latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name")."\\".$PIpreview->getElementsByTagName("Name")->item(0)->nodeValue.".jpg"),
|
|
|
+ latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name"))."\\".$p_reportName.".jpg");
|
|
|
+ @rename(latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name")."\\".$PIpreview->getElementsByTagName("Name")->item(0)->nodeValue.".pdf"),
|
|
|
+ latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name"))."\\".$p_reportName.".pdf");
|
|
|
+ @rename(latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name")."\\".$PIpreview->getElementsByTagName("Name")->item(0)->nodeValue.".xls"),
|
|
|
+ latin1_to_utf8($dataDir.$PP->getAttribute("User")."\\"
|
|
|
+ .$PP->getAttribute("Name"))."\\".$p_reportName.".xls");
|
|
|
$MISConfig->setNodeValue("Name",$p_reportName,$projectDOM,$PIpreview);
|
|
|
$MISConfig->setNodeValue("Description",$p_reportDescription,$projectDOM,$PIpreview);
|
|
|
$MISConfig->setNodeValue("Report",$p_pprReport."_Graf",$projectDOM,$PIpreview);
|
|
|
@@ -3109,6 +3148,9 @@ class MISConfigurator extends App {
|
|
|
}
|
|
|
|
|
|
$projectDOM->save($MISConfig->getConfigFile());
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
$this->_registerEmails($p_email);
|
|
|
if(count($IDArr)>0){
|
|
|
$eval = 'CMgr.getMODEL().getRetrieveInput("MISConfigurator","editReport","'.implode("|",$IDArr).'");';
|
|
|
@@ -3133,7 +3175,7 @@ class MISConfigurator extends App {
|
|
|
$ret.= '<fieldset>';
|
|
|
|
|
|
$ret.= '<legend><img src="img/report.png">'.$PPName.' '.$this->_getI18N('deleteReport').'</legend>';
|
|
|
- $ret.= '<input type="hidden" name="saveMethod" value="saveDeleteReport"><input type="hidden" name="ID" value="'.$p_ID.'">';
|
|
|
+ $ret.= '<input type="hidden" name="saveMethod" value="saveDeleteReport"><input type="hidden" name="ID" value="'.utf8_to_latin1($p_ID).'">';
|
|
|
$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('deleteReportInfoMsg1').' <i>'.$PPName.'</i> '.$this->_getI18N('deleteReportInfoMsg2').'<hr></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>';
|
|
|
@@ -3152,11 +3194,24 @@ class MISConfigurator extends App {
|
|
|
$projectDOM = new DOMDocument('1.0', 'iso-8859-1');
|
|
|
$projectDOM->load($MISConfig->getConfigFile());
|
|
|
$projectXpath = new DOMXpath($projectDOM);
|
|
|
+ $dataDir = $projectXpath->query('/Configuration/General/PublishImagePath')->item(0)->nodeValue;
|
|
|
foreach($IDArr as $ID) {
|
|
|
$ID = explode("_",$ID);
|
|
|
$ID = $ID[0];
|
|
|
$PIList = $projectXpath->query('/Configuration/Publishes/Publish/Images/Image[./@ID="'.$ID.'"]');
|
|
|
for($i=0;$i<$PIList->length;$i++) {
|
|
|
+ @unlink(latin1_to_utf8($dataDir.$PIList->item($i)->getElementsByTagName("Directory")->item(0)->nodeValue
|
|
|
+ .$PIList->item($i)->parentNode->parentNode->getAttribute("Name")."\\"
|
|
|
+ .$PIList->item($i)->getElementsByTagName("Name")->item(0)->nodeValue.".pdf"));
|
|
|
+ @unlink(latin1_to_utf8($dataDir.$PIList->item($i)->getElementsByTagName("Directory")->item(0)->nodeValue
|
|
|
+ .$PIList->item($i)->parentNode->parentNode->getAttribute("Name")."\\"
|
|
|
+ .$PIList->item($i)->getElementsByTagName("Name")->item(0)->nodeValue.".xls"));
|
|
|
+ @unlink(latin1_to_utf8($dataDir.$PIList->item($i)->getElementsByTagName("Directory")->item(0)->nodeValue
|
|
|
+ .$PIList->item($i)->parentNode->parentNode->getAttribute("Name")."\\"
|
|
|
+ .$PIList->item($i)->getElementsByTagName("Name")->item(0)->nodeValue.".gif"));
|
|
|
+ @unlink(latin1_to_utf8($dataDir.$PIList->item($i)->getElementsByTagName("Directory")->item(0)->nodeValue
|
|
|
+ .$PIList->item($i)->parentNode->parentNode->getAttribute("Name")."\\"
|
|
|
+ .$PIList->item($i)->getElementsByTagName("Name")->item(0)->nodeValue.".jpg"));
|
|
|
$PIList->item($i)->parentNode->removeChild($PIList->item($i));
|
|
|
}
|
|
|
}
|
|
|
@@ -3201,7 +3256,7 @@ class MISConfigurator extends App {
|
|
|
$ret.= '<select name="format">';
|
|
|
$PSFormatsArr = $MISConfig->getAllScorcardFormats();
|
|
|
foreach($PSFormatsArr as $key => $PSFormat) {
|
|
|
- $ret.= '<option value="'.$key.'">'.utf8_to_latin1($PSFormat).'</option>';
|
|
|
+ $ret.= '<option value="'.$key.'">'.$PSFormat.'</option>';
|
|
|
}
|
|
|
$ret.= '</select>';
|
|
|
$ret.= '</td></tr>';
|
|
|
@@ -3248,7 +3303,7 @@ class MISConfigurator extends App {
|
|
|
break;
|
|
|
case 2: $format = "Zahl ohne Trennz";
|
|
|
break;
|
|
|
- case 3: $format = "W�hrung";
|
|
|
+ case 3: $format = latin1_to_utf8("Währung");
|
|
|
break;
|
|
|
case 4: $format = "Prozent";
|
|
|
break;
|
|
|
@@ -3296,8 +3351,8 @@ class MISConfigurator extends App {
|
|
|
$ret.= '<legend><img src="img/scorecard.png">'.$PR->getElementsByTagName("Name")->item(0)->nodeValue.' '.$this->_getI18N('editScorecard').'</legend>';
|
|
|
$ret.= '<input type="hidden" name="saveMethod" value="saveEditScorecard"><input type="hidden" name="ID" value="'.$p_ID.'">';
|
|
|
$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('editScorecardInfoMsg').'<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='".$PR->getElementsByTagName("Name")->item(0)->nodeValue."'></td></tr>";
|
|
|
- $ret.= "<tr><td><label for='inp_description'>".$this->_getI18N('scorecardDescription').":</label></td><td><textarea id='inp_description' name='description'>".$PR->getElementsByTagName("Description")->item(0)->nodeValue."</textarea></td></tr>";
|
|
|
+ $ret.= '<tr><td><label for="inp_name">'.$this->_getI18N('scorecardName').':</label></td><td><input id="inp_name" name="name" type="text" value="'.$PR->getElementsByTagName("Name")->item(0)->nodeValue.'"></td></tr>';
|
|
|
+ $ret.= '<tr><td><label for="inp_description">'.$this->_getI18N('scorecardDescription').':</label></td><td><textarea id="inp_description" name="description">'.$PR->getElementsByTagName("Description")->item(0)->nodeValue.'</textarea></td></tr>';
|
|
|
$ret.= '<tr><td><label for="inp_active">'.$this->_getI18N('active').':</label></td><td>';
|
|
|
$ret.= '<select id="inp_active" name="active"><option value="N">'.$this->_getI18N("no").'</option><option value="J"';
|
|
|
if($PR->getElementsByTagName("Active")->item(0)->nodeValue == "J") $ret.= " selected='selected'";
|
|
|
@@ -3333,7 +3388,7 @@ class MISConfigurator extends App {
|
|
|
break;
|
|
|
case "Zahl ohne Trennz": $sec_key = 2;
|
|
|
break;
|
|
|
- case "W�hrung":$sec_key = 3;
|
|
|
+ case "Währung":$sec_key = 3;
|
|
|
break;
|
|
|
case "Prozent":$sec_key = 4;
|
|
|
break;
|
|
|
@@ -3342,7 +3397,7 @@ class MISConfigurator extends App {
|
|
|
foreach($PSFormatsArr as $key => $PSFormat) {
|
|
|
$ret.= '<option value="'.$key.'"';
|
|
|
if($key == $sec_key)$ret.= ' selected="selected"';
|
|
|
- $ret.= '>'.utf8_to_latin1($PSFormat).'</option>';
|
|
|
+ $ret.= '>'.$PSFormat.'</option>';
|
|
|
}
|
|
|
$ret.= '</select>';
|
|
|
$ret.= '</td></tr>';
|
|
|
@@ -3379,7 +3434,7 @@ class MISConfigurator extends App {
|
|
|
break;
|
|
|
case 2: $format = "Zahl ohne Trennz";
|
|
|
break;
|
|
|
- case 3: $format = "W�hrung";
|
|
|
+ case 3: $format = latin1_to_utf8("Währung");
|
|
|
break;
|
|
|
case 4: $format = "Prozent";
|
|
|
break;
|
|
|
@@ -3549,7 +3604,7 @@ foreach($langs as $lang) {
|
|
|
$ret.= '<select id="inp_lang" name="lang">';
|
|
|
$allLangsArr = $MISConfig->getAllLangs();
|
|
|
foreach($allLangsArr as $key => $lang) {
|
|
|
- $ret.= '<option value="'.$key.'">'.utf8_to_latin1($lang).'</option>';
|
|
|
+ $ret.= '<option value="'.$key.'">'.$lang.'</option>';
|
|
|
}
|
|
|
$ret.= '</select>';
|
|
|
$ret.= '</td></tr>';
|
|
|
@@ -3574,7 +3629,7 @@ foreach($langs as $lang) {
|
|
|
if($this->isRole("master")) {
|
|
|
$MISConfig = new MISConfig();
|
|
|
|
|
|
- $authDOM = new DOMDocument('1.0', 'utf-8');
|
|
|
+ $authDOM = new DOMDocument('1.0', 'iso-8859-1');
|
|
|
$authDOM->load($MISConfig->authFile);
|
|
|
$authXpath = new DOMXpath($authDOM);
|
|
|
|
|
|
@@ -3612,7 +3667,7 @@ foreach($langs as $lang) {
|
|
|
$ret="";
|
|
|
$eval="";
|
|
|
if(count($IDArr)==1) {
|
|
|
- $authDOM = new DOMDocument('1.0', 'utf-8');
|
|
|
+ $authDOM = new DOMDocument('1.0', 'iso-8859-1');
|
|
|
$authDOM->load($MISConfig->authFile);
|
|
|
$authXpath = new DOMXpath($authDOM);
|
|
|
|
|
|
@@ -3672,8 +3727,15 @@ foreach($langs as $lang) {
|
|
|
|
|
|
private function saveEditUser($p_ID,$p_newUsername,$p_password,$p_passwordRepeat,$p_lang,$p_view="Info-User",$p_global="false") {
|
|
|
$MISConfig = new MISConfig();
|
|
|
+ $projectDOM = new DOMDocument('1.0', 'iso-8859-1');
|
|
|
+ $projectDOM->load($MISConfig->getConfigFile());
|
|
|
+ $projectXpath = new DOMXpath($projectDOM);
|
|
|
+
|
|
|
$IDsArr = explode("|",$p_ID);
|
|
|
|
|
|
+ $dataDir = $projectXpath->query('/Configuration/General/PublishImagePath')->item(0)->nodeValue;
|
|
|
+
|
|
|
+
|
|
|
|
|
|
$username = utf8_to_latin1(array_shift($IDsArr));
|
|
|
|
|
|
@@ -3683,7 +3745,7 @@ foreach($langs as $lang) {
|
|
|
$projectDOM->load($MISConfig->getConfigFile());
|
|
|
$projectXpath = new DOMXpath($projectDOM);
|
|
|
|
|
|
- $authDOM = new DOMDocument('1.0', 'utf-8');
|
|
|
+ $authDOM = new DOMDocument('1.0', 'iso-8859-1');
|
|
|
$authDOM->load($MISConfig->authFile);
|
|
|
$authXpath = new DOMXpath($authDOM);
|
|
|
|
|
|
@@ -3729,6 +3791,8 @@ foreach($langs as $lang) {
|
|
|
}
|
|
|
$projectDOM->save($MISConfig->getConfigFile());
|
|
|
$authDOM->save($MISConfig->authFile);
|
|
|
+ @rename(latin1_to_utf8($dataDir.$username)."\\",
|
|
|
+ latin1_to_utf8($dataDir.$newUsername)."\\");
|
|
|
if(count($IDsArr)>0){
|
|
|
$eval = 'CMgr.getMODEL().getRetrieveInput("MISConfigurator","editUser","'.implode("|",$IDsArr).'");';
|
|
|
}else{
|
|
|
@@ -3781,7 +3845,7 @@ foreach($langs as $lang) {
|
|
|
$projectDOM->load($MISConfig->getConfigFile());
|
|
|
$projectXpath = new DOMXpath($projectDOM);
|
|
|
|
|
|
- $authDOM = new DOMDocument('1.0', 'utf-8');
|
|
|
+ $authDOM = new DOMDocument('1.0', 'iso-8859-1');
|
|
|
$authDOM->load($MISConfig->authFile);
|
|
|
$authXpath = new DOMXpath($authDOM);
|
|
|
foreach($IDsArr as $IDStr) {
|
|
|
@@ -3946,8 +4010,8 @@ foreach($langs as $lang) {
|
|
|
$ret.= '<legend><img src="img/dashboard.png">'.$PR->getElementsByTagName("Name")->item(0)->nodeValue.' '.$this->_getI18N('editDashboard').'</legend>';
|
|
|
$ret.= '<input type="hidden" name="saveMethod" value="saveEditDashboard"><input type="hidden" name="ID" value="'.$p_ID.'">';
|
|
|
$ret.= '<table><tr><td colspan="2">'.$this->_getI18N('editDashboardInfoMsg').'<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='".$PR->getElementsByTagName("Name")->item(0)->nodeValue."'></td></tr>";
|
|
|
- $ret.= "<tr><td><label for='inp_description'>".$this->_getI18N('dashboardDescription').":</label></td><td><textarea id='inp_description' name='description'>".$PR->getElementsByTagName("Description")->item(0)->nodeValue."</textarea></td></tr>";
|
|
|
+ $ret.= '<tr><td><label for="inp_name">'.$this->_getI18N('dashboardName').':</label></td><td><input id="inp_name" name="name" type="text" value="'.$PR->getElementsByTagName("Name")->item(0)->nodeValue.'"></td></tr>';
|
|
|
+ $ret.= '<tr><td><label for="inp_description">'.$this->_getI18N('dashboardDescription').':</label></td><td><textarea id="inp_description" name="description">'.$PR->getElementsByTagName("Description")->item(0)->nodeValue.'</textarea></td></tr>';
|
|
|
$ret.= '<tr><td><label for="inp_pprname">'.$this->_getI18N('dashboardReport').':</label></td><td>';
|
|
|
$ret.= '<select name="pprname">';
|
|
|
$PPRArr = $this->_getAllDashboards();
|
|
|
@@ -4554,7 +4618,7 @@ foreach($langs as $lang) {
|
|
|
$ProjectDOM->save($MISConfig->getConfigFile());
|
|
|
$this->saveRetrieveInput("dummy");
|
|
|
}else {
|
|
|
- $UserDOM = new DOMDocument('1.0', 'utf-8');
|
|
|
+ $UserDOM = new DOMDocument('1.0', 'iso-8859-1');
|
|
|
$UserDOM->load($this->authFile);
|
|
|
$UserXpath = new DOMXpath($UserDOM);
|
|
|
|
|
|
@@ -4981,5 +5045,29 @@ foreach($langs as $lang) {
|
|
|
print "<script type='text/javascript'>window.history.back();</script>";
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private function info(){
|
|
|
+ $ret = '<form id="administrationForm" name="administrationForm" encoding="utf-8" action="" target="_self" method="post" class="adminListForm" onsubmit="return Form.submit(this,\'MISConfigurator\',\'saveMain\',\'DashboardPath:PATH\',\'WebCreatorPath:PATH\',\'CubePath:PATH\',\'ReportPath:PATH\',\'WebReportPath:PATH\',\'PublishPath:PATH\',\'PublishImagePath:PATH\',\'PublishAlarmPath:PATH\',\'WebServerName\',\'PortalStartPage\',\'PDFURL\',\'ReportURL\',\'CubeURL\',\'GatewayURL\',\'SecURL\');">
|
|
|
+ <fieldset>
|
|
|
+ <legend><label style="font-size:1.2em;">'.$this->_getI18N("info").'</label></legend>
|
|
|
+ <table>';
|
|
|
+ $ret .= '<tr><td class="label">'.$this->_getI18N("info_welcome").'</td></tr>';
|
|
|
+ $ret.= ' </table>
|
|
|
+ </fieldset>
|
|
|
+ </form><br>';
|
|
|
+ $ret.= '<form id="administrationForm" name="administrationForm" encoding="utf-8" action="" target="_self" method="post" class="adminListForm" onsubmit="return Form.submit(this,\'MISConfigurator\',\'saveMain\',\'DashboardPath:PATH\',\'WebCreatorPath:PATH\',\'CubePath:PATH\',\'ReportPath:PATH\',\'WebReportPath:PATH\',\'PublishPath:PATH\',\'PublishImagePath:PATH\',\'PublishAlarmPath:PATH\',\'WebServerName\',\'PortalStartPage\',\'PDFURL\',\'ReportURL\',\'CubeURL\',\'GatewayURL\',\'SecURL\');">
|
|
|
+ <fieldset>
|
|
|
+ <legend><label style="font-size:1.2em;">'.$this->_getI18N("changelog").'</label></legend>
|
|
|
+ <table>';
|
|
|
+ $ret .= '<tr><td class="label">30.11.2011 - New feature - PDF Layer at Email export</td></tr>';
|
|
|
+ $ret .= '<tr><td class="label">30.11.2011 - Fixed bug - Freeze of andministration module</td></tr>';
|
|
|
+ $ret .= '<tr><td class="label">30.11.2011 - New feature - Infoscreen in administration module</td></tr>';
|
|
|
+ $ret .= '<tr><td class="label">30.11.2011 - Fixed bug - Blank screen of administration module on offline systems</td></tr>';
|
|
|
+ $ret .= '<tr><td class="label">15.11.2011 - Fixed bug - Switching between reportpreview YES/NO</td></tr>';
|
|
|
+ $ret.= ' </table>
|
|
|
+ </fieldset>
|
|
|
+ </form>';
|
|
|
+ return array($ret,'');
|
|
|
+ }
|
|
|
}
|
|
|
?>
|