public function onPreInit($param)
 {
     parent::onPreInit($param);
     $docname = "tempXML";
     $ext = "xml";
     $header = "application/xml";
     $doc = new TXmlDocument('1.0', 'ISO-8859-1');
     $doc->TagName = 'menu';
     $doc->setAttribute('id', "0");
     $QVFile = new TXmlElement('item');
     $QVFile->setAttribute('id', "new_Element");
     $QVFile->setAttribute('img', "plus5.gif");
     $QVFile->setAttribute('text', "new element");
     $ActivityElements = ActivityTypeRecord::finder()->findAll();
     foreach ($ActivityElements as $Activitytype) {
         $ST = new TXmlElement('item');
         $ST->setAttribute('id', $Activitytype->idta_activity_type);
         $ST->setAttribute('img', 's' . $Activitytype->idta_activity_type . ".gif");
         $ST->setAttribute('text', utf8_encode($Activitytype->act_type_name));
         //hier muss die logik fuer die basiswerte aus den dimensionen hin...
         //hier hole ich mir die Dimensionsgruppen
         $QVFile->Elements[] = $ST;
     }
     $doc->Elements[] = $QVFile;
     //        $CMdelete=new TXmlElement('item');
     //        $CMdelete->setAttribute('id',"delete_Element");
     //        $CMdelete->setAttribute('img',"minus.gif");
     //        $CMdelete->setAttribute('text',"delete element");
     //
     //        $doc->Elements[]=$CMdelete;
     $this->getResponse()->appendHeader("Content-Type:" . $header);
     $this->getResponse()->appendHeader("Content-Disposition:inline;filename=" . $docName . '.' . $ext);
     $doc->saveToFile('php://output');
     exit;
 }
 public function onPreInit($param)
 {
     parent::onPreInit($param);
     $docname = "tempXML";
     $ext = "xml";
     $header = "application/xml";
     $doc = new TXmlDocument('1.0', 'ISO-8859-1');
     $doc->TagName = 'menu';
     $doc->setAttribute('id', "0");
     $QVFile = new TXmlElement('item');
     $QVFile->setAttribute('id', "new_Element");
     $QVFile->setAttribute('img', "plus5.gif");
     $QVFile->setAttribute('text', "new element");
     $StrukturElements = StrukturTypeRecord::finder()->findAll();
     foreach ($StrukturElements as $Strukturtype) {
         $ST = new TXmlElement('item');
         $ST->setAttribute('id', 'idta_struktur_type_' . $Strukturtype->idta_struktur_type);
         $ST->setAttribute('img', 's' . $Strukturtype->idta_struktur_type . ".gif");
         $ST->setAttribute('text', $Strukturtype->struktur_type_name);
         //hier muss die logik fuer die basiswerte aus den dimensionen hin...
         //hier hole ich mir die Dimensionsgruppen
         $fstsql = "SELECT stammdaten_group_name, (ta_stammdaten_group.idta_stammdaten_group) AS parent_idta_stammdaten_group FROM ta_stammdaten_group INNER JOIN tm_stammdaten ON tm_stammdaten.idta_stammdaten_group = ta_stammdaten_group.idta_stammdaten_group WHERE idta_struktur_type = " . $Strukturtype->idta_struktur_type . " GROUP BY stammdaten_group_name, parent_idta_stammdaten_group";
         $BaseGroupElements = StammdatenGroupRecord::finder()->findAllBySQL($fstsql);
         foreach ($BaseGroupElements as $BaseGroupElement) {
             $BGE = new TXmlElement('item');
             $BGE->setAttribute('id', 'idta_stammdaten_group_' . $BaseGroupElement->parent_idta_stammdaten_group);
             $BGE->setAttribute('img', 's' . $Strukturtype->idta_struktur_type . ".gif");
             $BGE->setAttribute('text', $BaseGroupElement->stammdaten_group_name);
             //zuerst hole ich alle Basiselement, die den aktuellen Strukturtypen haben
             $sql = "SELECT idtm_stammdaten,stammdaten_name, tm_stammdaten.idta_stammdaten_group FROM tm_stammdaten INNER JOIN ta_stammdaten_group ON tm_stammdaten.idta_stammdaten_group = ta_stammdaten_group.idta_stammdaten_group WHERE idta_struktur_type = " . $Strukturtype->idta_struktur_type . " AND ta_stammdaten_group.idta_stammdaten_group = " . $BaseGroupElement->parent_idta_stammdaten_group . " ORDER BY idta_stammdaten_group";
             $BaseElements = StammdatenRecord::finder()->findAllBySQL($sql);
             foreach ($BaseElements as $BaseElement) {
                 $BE = new TXmlElement('item');
                 $BE->setAttribute('id', 'idtm_stammdaten_' . $BaseElement->idtm_stammdaten);
                 $BE->setAttribute('img', 'str' . $Strukturtype->idta_struktur_type . ".gif");
                 $BE->setAttribute('text', $BaseElement->stammdaten_name);
                 $BGE->Elements[] = $BE;
             }
             $ST->Elements[] = $BGE;
         }
         $QVFile->Elements[] = $ST;
     }
     $doc->Elements[] = $QVFile;
     $CMdelete = new TXmlElement('item');
     $CMdelete->setAttribute('id', "delete_Element");
     $CMdelete->setAttribute('img', "minus.gif");
     $CMdelete->setAttribute('text', "delete element");
     $doc->Elements[] = $CMdelete;
     $docName = "temp";
     $this->getResponse()->appendHeader("Content-Type:" . $header);
     $this->getResponse()->appendHeader("Content-Disposition:inline;filename=" . $docName . '.' . $ext);
     $doc->saveToFile('php://output');
     exit;
 }
예제 #3
0
 public function testSaveToFile()
 {
     $file = dirname(__FILE__) . '/data/tmp.xml';
     if (!is_writable(dirname($file))) {
         self::markTestSkipped(dirname($file) . ' must be writable for this test');
     }
     $xmldoc = new TXmlDocument('1.0', 'utf-8');
     $xmldoc->setTagName('root');
     $node = new TXmlElement('node');
     $node->setAttribute('param', 'attribute1');
     $xmldoc->getElements()->add($node);
     $xmldoc->saveToFile($file);
     self::assertTrue(is_file($file));
     if (is_file($file)) {
         unlink($file);
     }
 }
예제 #4
0
 public function saveButtonClicked($sender, $param)
 {
     $dom = new TXmlDocument();
     $dom->Encoding = 'utf-8';
     $dom->TagName = 'parameters';
     $elements = $dom->Elements;
     $elements[] = $this->createParameter('SiteTitle', $this->SiteTitle->Text);
     $elements[] = $this->createParameter('SiteSubtitle', $this->SiteSubtitle->Text);
     $elements[] = $this->createParameter('SiteOwner', $this->SiteOwner->Text);
     $elements[] = $this->createParameter('AdminEmail', $this->AdminEmail->Text);
     $elements[] = $this->createParameter('MultipleUser', $this->MultipleUser->Checked);
     $elements[] = $this->createParameter('AccountApproval', $this->AccountApproval->Checked);
     $elements[] = $this->createParameter('PostPerPage', $this->PostPerPage->Text);
     $elements[] = $this->createParameter('RecentComments', $this->RecentComments->Text);
     $elements[] = $this->createParameter('PostApproval', $this->PostApproval->Checked);
     $themeName = $this->ThemeName->SelectedItem->Text;
     $elements[] = $this->createParameter('ThemeName', $themeName);
     $dom->saveToFile(Prado::getPathOfNamespace(self::CONFIG_FILE, '.xml'));
     if ($themeName !== $this->Theme->Name) {
         $this->Response->reload();
     }
 }
 protected function saveData()
 {
     $key = $this->Request->getKeys();
     $res = array();
     for ($i = 0; $i < count($key); $i++) {
         if (strpos($key[$i], "hidden_") !== FALSE) {
             $res[$this->Request[$key[$i]]] = $this->Request[$key[$i + 1]];
         }
     }
     $id = $this->Request["id"];
     $cmd = $this->db->createCommand("SELECT i.name FROM hr_install AS i LEFT JOIN hr_component AS c ON c.id_install=i.id WHERE i.id=:id AND c.parentmenu=0");
     $cmd->bindValue(":id", $id, PDO::PARAM_INT);
     $cmd = $cmd->query();
     $data = $cmd->read();
     $this->cname->Text = $data["name"];
     $xml = "." . DIRECTORY_SEPARATOR . "protected" . DIRECTORY_SEPARATOR . "pages" . DIRECTORY_SEPARATOR . "components" . DIRECTORY_SEPARATOR . $data["name"] . DIRECTORY_SEPARATOR . "config.xml";
     if (file_exists($xml)) {
         $doc = new TXmlDocument();
         $doc->loadFromFile($xml);
         $parameters = $doc->getElementByTagName('parameters');
         $parameters = $parameters->getElements();
         foreach ($parameters as $parameter) {
             $k = $parameter->getAttribute('id');
             $parameter->setAttribute('value', $res[$k]);
         }
         $doc->saveToFile($xml);
     }
     return true;
 }
 public function onPreInit($param)
 {
     parent::onPreInit($param);
     $docname = "tempXML";
     $ext = "xml";
     $header = "application/xml";
     $target_encoding = "UTF-8";
     if (!isset($_GET['idta_berichte'])) {
         $this->idta_berichte = 0;
     } else {
         $this->idta_berichte = $_GET['idta_berichte'];
     }
     if ($this->idta_berichte == 0) {
         $myRecords = BerichteRecord::finder()->findAll();
         $doc = new TXmlDocument('1.0', $target_encoding);
         $doc->TagName = 'Reporting';
         foreach ($myRecords as $SingleReport) {
             $Report = new TXmlElement('Reports');
             $QVFile = new TXmlElement('QlikViewFile');
             $QVFile->Value = mb_convert_encoding($SingleReport->ber_local_path, $target_encoding);
             $Report->Elements[] = $QVFile;
             $BerName = new TXmlElement('ReportName');
             $BerName->Value = mb_convert_encoding($SingleReport->ber_name, $target_encoding);
             $Report->Elements[] = $BerName;
             $BerID = new TXmlElement('ReportId');
             $BerID->Value = mb_convert_encoding($SingleReport->ber_id, $target_encoding);
             $Report->Elements[] = $BerID;
             $BerMailSub = new TXmlElement('MailSubject');
             $BerMailSub->Value = mb_convert_encoding($SingleReport->ber_mail_subject, $target_encoding);
             $Report->Elements[] = $BerMailSub;
             $BerMailBody = new TXmlElement('MailBody');
             $BerMailBody->Value = mb_convert_encoding(htmlspecialchars_decode($SingleReport->ber_mail_body), $target_encoding);
             $Report->Elements[] = $BerMailBody;
             $Recipients = new TXmlElement('Recipients');
             $RCPS = BerichteOrganisationRecord::finder()->findAllByidta_berichte($SingleReport->idta_berichte);
             //schleife für alle empfänger
             foreach ($RCPS as $RCP) {
                 $USER = OrganisationRecord::finder()->findByPK($RCP->idtm_organisation);
                 $Mailer = new TXmlElement('Recipient');
                 $Mailer->setAttribute('ID', $RCP->bho_id);
                 $Mailer->setAttribute('TABLE', $RCP->bho_modul);
                 $Mailer->setAttribute('NTNAME', $USER->org_ntuser);
                 $Mailer->Value = mb_convert_encoding(htmlspecialchars_decode(KommunikationRecord::finder()->find('idtm_organisation=? AND kom_ismain=1 AND kom_type = 3', $RCP->idtm_organisation)->kom_information), $target_encoding);
                 $Recipients->Elements[] = $Mailer;
                 unset($Mailer);
             }
             $Report->Elements[] = $Recipients;
             $doc->Elements[] = $Report;
         }
     } else {
         $doc = new TXmlDocument('1.0', 'utf-8');
         $SingleReport = BerichteRecord::finder()->findByidta_berichte($this->idta_berichte);
         $doc->TagName = 'Reporting';
         $Report = new TXmlElement('Reports');
         $QVFile = new TXmlElement('QlikViewFile');
         $QVFile->Value = mb_convert_encoding($SingleReport->ber_local_path, $target_encoding);
         $Report->Elements[] = $QVFile;
         $BerName = new TXmlElement('ReportName');
         $BerName->Value = mb_convert_encoding($SingleReport->ber_name, $target_encoding);
         $Report->Elements[] = $BerName;
         $BerID = new TXmlElement('ReportId');
         $BerID->Value = mb_convert_encoding($SingleReport->ber_id, $target_encoding);
         $Report->Elements[] = $BerID;
         $BerMailSub = new TXmlElement('MailSubject');
         $BerMailSub->Value = mb_convert_encoding($SingleReport->ber_mail_subject, $target_encoding);
         $Report->Elements[] = $BerMailSub;
         $BerMailBody = new TXmlElement('MailBody');
         $BerMailBody->Value = mb_convert_encoding(htmlspecialchars_decode($SingleReport->ber_mail_body), $target_encoding);
         $Report->Elements[] = $BerMailBody;
         $Recipients = new TXmlElement('Recipients');
         $RCPS = BerichteOrganisationRecord::finder()->findAllByidta_berichte($SingleReport->idta_berichte);
         //schleife für alle empfänger
         foreach ($RCPS as $RCP) {
             $USER = OrganisationRecord::finder()->findByPK($RCP->idtm_organisation);
             $Mailer = new TXmlElement('Recipient');
             $Mailer->setAttribute('ID', $RCP->bho_id);
             $Mailer->setAttribute('TABLE', $RCP->bho_modul);
             $Mailer->setAttribute('NTNAME', $USER->org_ntuser);
             $Mailer->Value = mb_convert_encoding(htmlspecialchars_decode(KommunikationRecord::finder()->find('idtm_organisation=? AND kom_ismain=1 AND kom_type = 3', $RCP->idtm_organisation)->kom_information), $target_encoding);
             $Recipients->Elements[] = $Mailer;
             unset($Mailer);
         }
         $Report->Elements[] = $Recipients;
         $doc->Elements[] = $Report;
     }
     # $query=new TXmlElement('Query');
     # $query->setAttribute('ID','xxxx');
     # $proc->Elements[]=$query;
     #
     # $attr=new TXmlElement('Attr');
     # $attr->setAttribute('Name','aaa');
     # $attr->Value='1';
     # $query->Elements[]=$attr;
     $this->getResponse()->appendHeader("Content-Type:" . $header);
     $this->getResponse()->appendHeader("Content-Disposition:inline;filename=" . $docName . '.' . $ext);
     $doc->saveToFile('php://output');
     exit;
 }
예제 #7
0
 public function onPreInit($param)
 {
     parent::onPreInit($param);
     $docname = "tempXML";
     $ext = "xml";
     $header = "application/xml";
     $doc = new TXmlDocument('1.0', 'ISO-8859-1');
     $doc->TagName = 'menu';
     $doc->setAttribute('id', "0");
     $QVFile = new TXmlElement('item');
     $QVFile->setAttribute('id', "Main_App");
     $QVFile->setAttribute('img', "help_book.gif");
     $QVFile->setAttribute('text', "planlogIQ");
     $Home = new TXmlElement('item');
     $Home->setAttribute('id', 'Home');
     $Home->setAttribute('img', 'xpMyComp.gif');
     $Home->setAttribute('text', utf8_encode("Startpage"));
     $QVFile->Elements[] = $Home;
     if (!$this->User->isGuest) {
         $mod_user = new TXmlElement('item');
         $mod_user->setAttribute('id', 'mod_user');
         $mod_user->setAttribute('img', 'org5.gif');
         $mod_user->setAttribute('text', utf8_encode("Mein Konto"));
         $ComMyAccount = new TXmlElement('item');
         $ComMyAccount->setAttribute('id', 'user.myaccount');
         $ComMyAccount->setAttribute('img', 'oJornal.gif');
         $ComMyAccount->setAttribute('text', utf8_encode("Mein Konto"));
         $mod_user->Elements[] = $ComMyAccount;
         if ($this->User->isInRole('Administrator')) {
             $ComADMyAccount = new TXmlElement('item');
             $ComADMyAccount->setAttribute('id', 'user.user');
             $ComADMyAccount->setAttribute('img', 'org1.gif');
             $ComADMyAccount->setAttribute('text', utf8_encode("Alle Benutzer"));
             $mod_user->Elements[] = $ComADMyAccount;
         }
         $QVFile->Elements[] = $mod_user;
     }
     $SepMan = new TXmlElement('item');
     $SepMan->setAttribute('id', 'sep_modMan');
     $SepMan->setAttribute('type', 'seperator');
     $QVFile->Elements[] = $SepMan;
     $Manual = new TXmlElement('item');
     $Manual->setAttribute('id', 'Handbuch');
     $Manual->setAttribute('img', 'memobook.gif');
     $Manual->setAttribute('text', utf8_encode("Handbuch"));
     $ManualLink = new TXmlElement('href');
     $ManualLink->setAttribute('target', '_blank');
     $ManualLink->setValue('http://wiki.planlogiq.com');
     $Manual->Elements[] = $ManualLink;
     $QVFile->Elements[] = $Manual;
     $ST = new TXmlElement('item');
     $ST->setAttribute('id', 'user.logoutuser');
     $ST->setAttribute('img', 'radio_off.gif');
     $ST->setAttribute('text', utf8_encode("Logout"));
     $QVFile->Elements[] = $ST;
     $doc->Elements[] = $QVFile;
     if (!$this->User->isGuest) {
         if ($this->User->getModulRights('mod_organisation')) {
             $ModOrganisation = new TXmlElement('item');
             $ModOrganisation->setAttribute('id', "mod_organisation");
             $ModOrganisation->setAttribute('img', "org6.gif");
             $ModOrganisation->setAttribute('text', "Organisation");
             $ComOrganisation = new TXmlElement('item');
             $ComOrganisation->setAttribute('id', 'organisation.orgworkspace');
             $ComOrganisation->setAttribute('img', 'org6.gif');
             $ComOrganisation->setAttribute('text', utf8_encode("Organisation"));
             $ModOrganisation->Elements[] = $ComOrganisation;
             $ComTermine = new TXmlElement('item');
             $ComTermine->setAttribute('id', 'termin.terworkspace');
             $ComTermine->setAttribute('img', 'oJornal.gif');
             $ComTermine->setAttribute('text', utf8_encode("Termine"));
             $ModOrganisation->Elements[] = $ComTermine;
             if ($this->User->getModulRights('mod_zeiterfassung')) {
                 $ComZeiterfassung = new TXmlElement('item');
                 $ComZeiterfassung->setAttribute('id', 'organisation.zeiterfassung');
                 $ComZeiterfassung->setAttribute('img', 'oJornal.gif');
                 $ComZeiterfassung->setAttribute('text', utf8_encode("Zeiterfassung"));
                 $ModOrganisation->Elements[] = $ComZeiterfassung;
                 if ($this->User->getModulRights('mod_zeiterfassung_reports')) {
                     $SepRepZeit = new TXmlElement('item');
                     $SepRepZeit->setAttribute('id', 'sep_modRepZeit');
                     $SepRepZeit->setAttribute('type', 'seperator');
                     $ModOrganisation->Elements[] = $SepRepZeit;
                     $ComZeiterfassungRepMB = new TXmlElement('item');
                     $ComZeiterfassungRepMB->setAttribute('id', 'reports.zeiterfassung.a_Zeiterfassung_Mitarbeiter');
                     $ComZeiterfassungRepMB->setAttribute('img', 'org7.gif');
                     $ComZeiterfassungRepMB->setAttribute('text', utf8_encode("REP: Zeiterfassung MB"));
                     $ModOrganisation->Elements[] = $ComZeiterfassungRepMB;
                 }
             }
             $ComOrgBelegung = new TXmlElement('item');
             $ComOrgBelegung->setAttribute('id', 'organisation.organisationbelegung');
             $ComOrgBelegung->setAttribute('img', 'oJornal.gif');
             $ComOrgBelegung->setAttribute('text', utf8_encode("Organisation Belegung"));
             $ModOrganisation->Elements[] = $ComOrgBelegung;
             if ($this->User->getModulRights('mod_process')) {
                 $ModProzess = new TXmlElement('item');
                 $ModProzess->setAttribute('id', 'mod_process');
                 $ModProzess->setAttribute('img', 'oJornal.gif');
                 $ModProzess->setAttribute('text', utf8_encode("Prozesse"));
                 $ComProzess = new TXmlElement('item');
                 $ComProzess->setAttribute('id', 'prozess.proworkspace');
                 $ComProzess->setAttribute('img', 'org7.gif');
                 $ComProzess->setAttribute('text', utf8_encode("Definition"));
                 $ModProzess->Elements[] = $ComProzess;
                 $ModOrganisation->Elements[] = $ModProzess;
             }
             if ($this->User->isInRole('Administrator')) {
                 $SepImporter = new TXmlElement('item');
                 $SepImporter->setAttribute('id', 'sep_modImporter');
                 $SepImporter->setAttribute('type', 'seperator');
                 $ModOrganisation->Elements[] = $SepImporter;
                 $ModImporter = new TXmlElement('item');
                 $ModImporter->setAttribute('id', 'mod_importer');
                 $ModImporter->setAttribute('img', 'oOutlook.gif');
                 $ModImporter->setAttribute('text', utf8_encode("Import"));
                 $ModOrganisation->Elements[] = $ModImporter;
                 $ComImportImmo = new TXmlElement('item');
                 $ComImportImmo->setAttribute('id', 'importer.ImportImmo');
                 $ComImportImmo->setAttribute('img', 'oOutlook.gif');
                 $ComImportImmo->setAttribute('text', utf8_encode("Import NPF"));
                 $ModImporter->Elements[] = $ComImportImmo;
                 $ComImportHTC = new TXmlElement('item');
                 $ComImportHTC->setAttribute('id', 'importer.ImportHTC');
                 $ComImportHTC->setAttribute('img', 'oOutlook.gif');
                 $ComImportHTC->setAttribute('text', utf8_encode("Import HTC"));
                 $ModImporter->Elements[] = $ComImportHTC;
                 $ComImportTasks = new TXmlElement('item');
                 $ComImportTasks->setAttribute('id', 'importer.ImportTasks');
                 $ComImportTasks->setAttribute('img', 'oOutlook.gif');
                 $ComImportTasks->setAttribute('text', utf8_encode("Import Tasks"));
                 $ModImporter->Elements[] = $ComImportTasks;
             }
             $doc->Elements[] = $ModOrganisation;
         }
         if ($this->User->getModulRights('mod_risiko')) {
             $ModRisiko = new TXmlElement('item');
             $ModRisiko->setAttribute('id', "mod_risiko");
             $ModRisiko->setAttribute('img', "org1.gif");
             $ModRisiko->setAttribute('text', "Risiken");
             $ComRisikoarten = new TXmlElement('item');
             $ComRisikoarten->setAttribute('id', 'risiko.risworkspace');
             $ComRisikoarten->setAttribute('img', 'oOutlook.gif');
             $ComRisikoarten->setAttribute('text', utf8_encode("Risikoarten"));
             $ModRisiko->Elements[] = $ComRisikoarten;
             $doc->Elements[] = $ModRisiko;
         }
         if ($this->User->getModulRights('mod_activity')) {
             $ModActivity = new TXmlElement('item');
             $ModActivity->setAttribute('id', "mod_activity");
             $ModActivity->setAttribute('img', "oInboxF.gif");
             $ModActivity->setAttribute('text', "Projektmanagement");
             $ComActivity = new TXmlElement('item');
             $ComActivity->setAttribute('id', 'activity.actworkspace');
             $ComActivity->setAttribute('img', 'BookY.gif');
             $ComActivity->setAttribute('text', utf8_encode("Projektstruktur"));
             $ModActivity->Elements[] = $ComActivity;
             $ComZiele = new TXmlElement('item');
             $ComZiele->setAttribute('id', 'ziele.zieworkspace');
             $ComZiele->setAttribute('img', 'watch.gif');
             $ComZiele->setAttribute('text', utf8_encode("Ziele"));
             $ModActivity->Elements[] = $ComZiele;
             $ComNetplan = new TXmlElement('item');
             $ComNetplan->setAttribute('id', 'activity.actlistview');
             $ComNetplan->setAttribute('img', 'BookY.gif');
             $ComNetplan->setAttribute('text', utf8_encode("Netzplan"));
             $ModActivity->Elements[] = $ComNetplan;
             $ComTimeplan = new TXmlElement('item');
             $ComTimeplan->setAttribute('id', 'activity.actterminlistview');
             $ComTimeplan->setAttribute('img', 'watch.gif');
             $ComTimeplan->setAttribute('text', utf8_encode("Zeitplan"));
             $ModActivity->Elements[] = $ComTimeplan;
             $SepRess = new TXmlElement('item');
             $SepRess->setAttribute('id', 'sep_comRess');
             $SepRess->setAttribute('type', 'seperator');
             $ModActivity->Elements[] = $SepRess;
             $ComRess = new TXmlElement('item');
             $ComRess->setAttribute('id', 'organisation.ressourcenworkspace');
             $ComRess->setAttribute('img', 'org4.gif');
             $ComRess->setAttribute('text', utf8_encode("Ressourcen"));
             $ModActivity->Elements[] = $ComRess;
             $ComRessPlan = new TXmlElement('item');
             $ComRessPlan->setAttribute('id', 'organisation.ressourcenbelegung');
             $ComRessPlan->setAttribute('img', 'org5.gif');
             $ComRessPlan->setAttribute('text', utf8_encode("Ressourcen Plan"));
             $ModActivity->Elements[] = $ComRessPlan;
             $doc->Elements[] = $ModActivity;
         }
         if ($this->User->getModulRights('mod_protokoll')) {
             $ModProtokoll = new TXmlElement('item');
             $ModProtokoll->setAttribute('id', "mod_protokoll");
             $ModProtokoll->setAttribute('img', "org6.gif");
             $ModProtokoll->setAttribute('text', "Dokumentation");
             $ComProtokoll = new TXmlElement('item');
             $ComProtokoll->setAttribute('id', 'protokoll.prtworkspace');
             $ComProtokoll->setAttribute('img', 'book.gif');
             $ComProtokoll->setAttribute('text', utf8_encode("Protokolle"));
             $ModProtokoll->Elements[] = $ComProtokoll;
             $ComChangeManagement = new TXmlElement('item');
             $ComChangeManagement->setAttribute('id', 'changemanagement.rfcworkspace');
             $ComChangeManagement->setAttribute('img', 'book.gif');
             $ComChangeManagement->setAttribute('text', utf8_encode("Changemanagement"));
             $ModProtokoll->Elements[] = $ComChangeManagement;
             $doc->Elements[] = $ModProtokoll;
         }
         if ($this->User->getModulRights('mod_planung')) {
             $ModPlanung = new TXmlElement('item');
             $ModPlanung->setAttribute('id', "mod_planung");
             $ModPlanung->setAttribute('img', "oDrafts.gif");
             $ModPlanung->setAttribute('text', "Planung");
             $ComPlanung = new TXmlElement('item');
             $ComPlanung->setAttribute('id', 'reports.StrukturBerichtViewer');
             $ComPlanung->setAttribute('img', 'oDrafts.gif');
             $ComPlanung->setAttribute('text', utf8_encode("Planung"));
             $ModPlanung->Elements[] = $ComPlanung;
             if ($this->User->isInRole('Administrator')) {
                 $SepPlaOne = new TXmlElement('item');
                 $SepPlaOne->setAttribute('id', 'sep_plaone');
                 $SepPlaOne->setAttribute('type', 'seperator');
                 $ModPlanung->Elements[] = $SepPlaOne;
                 $ModPlanungAdmin = new TXmlElement('item');
                 $ModPlanungAdmin->setAttribute('id', "mod_planung_admin");
                 $ModPlanungAdmin->setAttribute('img', "tree.gif");
                 $ModPlanungAdmin->setAttribute('text', "Administration");
                 $ModPlanung->Elements[] = $ModPlanungAdmin;
                 $ComDimensionen = new TXmlElement('item');
                 $ComDimensionen->setAttribute('id', 'struktur.dimmappingview');
                 $ComDimensionen->setAttribute('img', 'org7.gif');
                 $ComDimensionen->setAttribute('text', utf8_encode("Dimensionsmanager"));
                 $ModPlanungAdmin->Elements[] = $ComDimensionen;
                 $ComStrtypen = new TXmlElement('item');
                 $ComStrtypen->setAttribute('id', 'struktur.strukturtypen');
                 $ComStrtypen->setAttribute('img', 'org6.gif');
                 $ComStrtypen->setAttribute('text', utf8_encode("Strukturtypen"));
                 $ModPlanungAdmin->Elements[] = $ComStrtypen;
                 $ComSplash = new TXmlElement('item');
                 $ComSplash->setAttribute('id', 'struktur.splasherworkspace');
                 $ComSplash->setAttribute('img', 'org7.gif');
                 $ComSplash->setAttribute('text', utf8_encode("Splashing"));
                 $ModPlanungAdmin->Elements[] = $ComSplash;
                 $SepPlaTree = new TXmlElement('item');
                 $SepPlaTree->setAttribute('id', 'sep_platree');
                 $SepPlaTree->setAttribute('type', 'seperator');
                 $ModPlanung->Elements[] = $SepPlaTree;
                 $ComStrElemente = new TXmlElement('item');
                 $ComStrElemente->setAttribute('id', 'struktur.strworkspace');
                 $ComStrElemente->setAttribute('img', 'org1.gif');
                 $ComStrElemente->setAttribute('text', utf8_encode("Struktur manuell"));
                 $ModPlanung->Elements[] = $ComStrElemente;
                 $ComBerWorkspace = new TXmlElement('item');
                 $ComBerWorkspace->setAttribute('id', 'protokoll.berichteworkspace');
                 $ComBerWorkspace->setAttribute('img', 'book.gif');
                 $ComBerWorkspace->setAttribute('text', utf8_encode("Berichtsmanager"));
                 $ModPlanung->Elements[] = $ComBerWorkspace;
                 $SepPlaTwo = new TXmlElement('item');
                 $SepPlaTwo->setAttribute('id', 'sep_platwo');
                 $SepPlaTwo->setAttribute('type', 'seperator');
                 $ModPlanung->Elements[] = $SepPlaTwo;
                 $ModStrImporter = new TXmlElement('item');
                 $ModStrImporter->setAttribute('id', 'mod_strimporter');
                 $ModStrImporter->setAttribute('img', 'oOutlook.gif');
                 $ModStrImporter->setAttribute('text', utf8_encode("Import"));
                 $ModPlanung->Elements[] = $ModStrImporter;
                 $ComImportStruktur = new TXmlElement('item');
                 $ComImportStruktur->setAttribute('id', 'importer.importerworkspace');
                 $ComImportStruktur->setAttribute('img', 'oOutlook.gif');
                 $ComImportStruktur->setAttribute('text', utf8_encode("Import Saldenliste"));
                 $ModStrImporter->Elements[] = $ComImportStruktur;
                 $ComImportDimStruktur = new TXmlElement('item');
                 $ComImportDimStruktur->setAttribute('id', 'importer.importerworkspacedim');
                 $ComImportDimStruktur->setAttribute('img', 'oOutlook.gif');
                 $ComImportDimStruktur->setAttribute('text', utf8_encode("Import 2 Dimensionen"));
                 $ModStrImporter->Elements[] = $ComImportDimStruktur;
             }
             $ComPivots = new TXmlElement('item');
             $ComPivots->setAttribute('id', 'struktur.pivotworkspace');
             $ComPivots->setAttribute('img', 'org1.gif');
             $ComPivots->setAttribute('text', utf8_encode("Pivotberichte (beta)"));
             $ModPlanung->Elements[] = $ComPivots;
             $doc->Elements[] = $ModPlanung;
         }
     }
     //hier muss die logik fuer die basiswerte aus den dimensionen hin...
     //hier hole ich mir die Dimensionsgruppen
     $docName = "temp";
     $this->getResponse()->appendHeader("Content-Type:" . $header);
     $this->getResponse()->appendHeader("Content-Disposition:inline;filename=" . $docName . '.' . $ext);
     $doc->saveToFile('php://output');
     exit;
 }