__COMPONENT(); } private function _createSection($projectDOM,$projectXpath,$p_ID,$p_parentID,$p_username,$p_sectionName,$p_showHauptampel){ $MISConfig = new MISConfig(); if($projectXpath->query('/Configuration/Publishes/Publish[./@ID = "'.$p_ID.'"]')->length > 0 || in_array($p_ID,self::$generatedSectionIDs)) { $ID = null; while($ID == null) { $temp = mt_rand(0,99999); if($projectXpath->query('/Configuration/Publishes/Publish[./@ID = "'.$temp.'"]')->length == 0 && !in_array($temp,self::$generatedSectionIDs)) { self::$generatedSectionIDs[] = $temp; $ID = $temp; } } $p_ID = $ID; } if(empty($p_ID)) $newID = $this->_generateSectionID(); else $newID = $p_ID; $PP = $projectDOM->createElement('Publish'); $PP->setAttribute('ID',$newID); $PP->setAttribute('parentID',$p_parentID); $PP->setAttribute('User',utf8_encode($p_username)); $PP->setAttribute('Name',utf8_encode("_".str_replace(" ","_",trim($p_sectionName,"_ "))."_")); $PP->setAttribute('Alert',utf8_encode($p_showHauptampel)); $PP->appendChild($projectDOM->createElement('Images')); $projectDOM->getElementsByTagName("Publishes")->item(0)->appendChild($PP); $SS = $projectDOM->createElement("Scorecard"); $SS->setAttribute("ID",$newID); $SS->setAttribute("Directory",utf8_encode($p_username)."\\"); $SS->setAttribute("Name",utf8_encode("_".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_encode($p_username)."\\"); $SS->setAttribute("Name",utf8_encode("_".str_replace(" ","_",trim($p_sectionName,"_ "))."_")); $SS->appendChild($projectDOM->createElement("Reviews")); $projectDOM->getElementsByTagname("Dashboards")->item(0)->appendChild($SS); $projectDOM->save($MISConfig->getConfigFile()); return $newID; } private function _registerEmails($p_emailStr) { $MISConfig = new MISConfig(); $ProjectDOM = new DOMDocument('1.0', 'iso-8859-1'); $ProjectDOM->load($MISConfig->getConfigFile()); $ProjectXpath = new DOMXpath($ProjectDOM); $emailArr = explode(";",$p_emailStr); foreach($emailArr as $i => $email) { $emailExists = $ProjectXpath->query("/Configuration/Emails/Email[. = '".trim($email)."']")->length > 0 ? true : false; 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()); } public function _getAllDashboards() { $MISConfig = new MISConfig(); $projectDOM = new DOMDocument('1.0', 'iso-8859-1'); $projectDOM->load($MISConfig->getConfigFile()); $projectXpath = new DOMXpath($projectDOM); $PPRPath = $projectXpath->query("/Configuration/General/DashboardPath")->item(0)->nodeValue; $PPRArr = array(); $handle = opendir($PPRPath); while ($file = readdir ($handle)) { if($file != "." && $file != "..") { if(is_file($PPRPath."/".$file)) { $filename = substr($file,0,strripos($file,".")); array_push($PPRArr,$filename); } } } if(!$this->isRole("admin")) return array(); return $PPRArr; } public function getMain($p_section = null) { if($this->getAuth()) { if($this->isRole("admin")) { $p_args = func_get_args(); $p_section = array_shift($p_args); if(!$this->isRole("admin") && $p_section == "configSettings")$p_section="general"; $eval = array(); //if($p_section=="configSettings") { $menu = new Tree("configuratorMenu"); $this->getConfiguratorMenu($menu); array_push($eval,'CMgr.getMODEL().setNavContainer(\''.addslashes(''.$menu.'').'\')'); array_push($eval,'Tree.setToUserView(Browser.getElementById("configuratorMenu"))'); if($this->isRole("master")) array_push($eval,'if(DEBUG_LEVEL != 0){Browser.getElementById("debug").getElementsByTagName("td")[0].style.color="#ff0000";}else{Browser.getElementById("debug").getElementsByTagName("td")[0].style.color="#000053";};'); //} $ret = '