public function onPreInit($param) { //error_reporting(E_ALL ^ E_NOTICE); $request_user = $_GET['user']; $request_password = $_GET['pass']; $authManager = $this->Application->getModule('auth'); if (!$authManager->login($request_user, $request_password)) { exit; } $this->getResponse()->appendHeader("Content-Type:" . $this->header); echo '<?xml version="1.0" ?><tm_organisation>'; $SQL = "SELECT * FROM tm_organisation"; $Results = OrganisationRecord::finder()->findAllBySQL($SQL); foreach ($Results as $Result) { echo "<row idtm_organisation='" . $Result->idtm_organisation . "'>"; echo "<parent_idtm_organisation>" . $Result->parent_idtm_organisation . "</parent_idtm_organisation>"; if ($Result->org_name == '') { echo "<org_name>ERROR_NO_ORGNAME</org_name>"; } else { echo "<org_name>" . $Result->org_name . "</org_name>"; } if ($Result->org_matchkey == '') { echo "<org_matchkey>empty</org_matchkey>"; } else { echo "<org_matchkey>" . $Result->org_matchkey . "</org_matchkey>"; } echo "</row>"; } echo '</tm_organisation>'; exit; }
public function importTASK($data) { $Aufgabe = new AufgabenRecord(); $Aufgabe->auf_tdate = $data[0]; $Aufgabe->auf_cdate = date($data[0]); $Aufgabe->auf_tag = $data[3]; $Aufgabe->auf_name = 'AC Imp'; $Aufgabe->auf_zeichen_eigen = utf8_encode($data[7]); $Aufgabe->auf_zeichen_fremd = ''; $Aufgabe->idta_aufgaben_type = 1; $Aufgabe->idtm_organisation = $this->responsible_idtm_organisation->Text; $Aufgabe->auf_tabelle = "tm_organisation"; if ($data[2] * 1 < 1000) { $data[2] = '0' . $data[2]; } $Organisation = OrganisationRecord::finder()->findByorg_fk_internal('0' . trim($data[2])); if (count($Organisation) == 1) { $Aufgabe->auf_id = $Organisation->idtm_organisation; } else { $Aufgabe->auf_id = $this->responsible_idtm_organisation->Text; } $Aufgabe->auf_done = $data[6]; if ($data[5] != '') { $Aufgabe->auf_ddate = $data[5]; } else { $Aufgabe->auf_ddate = $data[0]; } $html_string = "<b>" . utf8_encode($data[8]) . "</b><br/>"; $html_string .= utf8_encode($data[9]) . "<br/>"; $html_string .= "<b>" . utf8_encode($data[10]) . "</b><br/>"; $html_string .= utf8_encode($data[11]); $Aufgabe->auf_beschreibung = $html_string; $Aufgabe->save(); unset($Aufgabe, $Organisation); }
private function generateListFields() { $this->idtm_organisation->DataSource = PFH::build_SQLPullDown(OrganisationRecord::finder(), "tm_organisation", array("idtm_organisation", "org_name"), "idta_organisation_type = 4"); $this->idtm_organisation->dataBind(); $this->idta_protokoll_ergebnistype->DataSource = PFH::build_SQLPullDown(ProtokollErgebnistypeRecord::finder(), "ta_protokoll_ergebnistype", array("idta_protokoll_ergebnistype", "prt_ergtype_name")); $this->idta_protokoll_ergebnistype->dataBind(); }
public function bindListBelegungsplan() { $criteria = new TActiveRecordCriteria(); $criteria->Condition = "idtm_user > 0 "; $this->Belegungsplan->DataSource = OrganisationRecord::finder()->findAll($criteria); $this->Belegungsplan->dataBind(); }
public function PFMailSend($sender, $param) { $Aufgabe = ProtokollDetailAufgabeView::finder()->findByidtm_protokoll_detail($param->CallbackParameter); $MailEmpfaenger = OrganisationRecord::finder()->findByPk($Aufgabe->idtm_organisation); $mail = new PHPMailer(); $mail->From = "*****@*****.**"; $mail->FromName = "planlogIQ"; $mail->Host = "smtp.1und1.de"; $mail->Mailer = "smtp"; $mail->SMTPAuth = true; $mail->IsSendmail(); //nur bei 1und1 $mail->Username = "******"; $mail->Password = ""; $mail->AddAddress(KommunikationRecord::finder()->find('idtm_organisation=? AND kom_ismain=1 AND kom_type = 3', $Aufgabe->idtm_organisation)->kom_information, $MailEmpfaenger->org_name); $mail->Subject = $Aufgabe->prtdet_topic; $HTMLMessage = "Sehr geehrte(r) Frau/Herr " . $MailEmpfaenger->org_name . ",<br/><br/>"; $HTMLMessage .= "die folgende Aufgabe wurde Ihnen zugeordnet:<br/>"; $HTMLMessage .= "<p><table><tr><td bgcolor='#efefef'>TOP Nr.:</td><td>" . $Aufgabe->idtm_protokoll_detail_group . " </td><td bgcolor='#efefef'>Thema: </td><td>" . utf8_decode($Aufgabe->prtdet_topic) . "</td></tr>"; $HTMLMessage .= "<tr><td bgcolor='#efefef'>Bis:</td><td colspan='3'><b>" . $Aufgabe->auf_tdate . "</b></td></tr></table>"; $HTMLMessage .= "<p style='background-color:#efefef'><hr/>" . utf8_decode($Aufgabe->prtdet_descr) . "</p>"; $HTMLMessage .= "<p style='background-color:#efefef'><hr/>" . utf8_decode($Aufgabe->auf_beschreibung) . "<hr/></p>"; $HTMLMessage .= "Bitte nicht Antworten! Diese Mail wurde automatisch generiert..."; $mail->MsgHTML($HTMLMessage); if (!$mail->Send()) { $this->PFMAILER->TEXT = "error sending the message"; } else { $this->PFMAILER->TEXT = "..done.."; } }
private function load_all_cats($TTSQL) { $rows = OrganisationRecord::finder()->findAllbySQL($TTSQL); foreach ($rows as $row) { $this->subcats[$row->parent_idtm_organisation][] = $row->idtm_organisation; $this->parentcats[$row->idtm_organisation] = $row->parent_idtm_organisation; } }
public function bindListOrgListe() { $criteria = new TActiveRecordCriteria(); $criteria->Condition = "idtm_organisation = :suchtext1"; $criteria->Parameters[':suchtext1'] = $this->idtm_organisation; $this->OrgListe->DataSource = OrganisationRecord::finder()->findAll($criteria); $this->OrgListe->dataBind(); }
public function onLoad($param) { parent::onLoad($param); //Globale definition f�r dieses Dokument $this->finder = TTZieleRecord::finder(); $this->MASTERRECORD = new TTZieleRecord(); if (!$this->isPostBack && !$this->isCallback) { switch ($this->Request['modus']) { case 0: //hier checken wir, wieviele schritte noch den gleichen Vater haben $myPreStepOne = TTZieleRecord::finder()->findAllBySql("SELECT idtm_prozess FROM tt_ziele WHERE idtt_ziele = '" . $this->Request[$this->primarykey] . "'"); $prozess_counter = count(TTZieleRecord::finder()->findAllBySql("SELECT idtt_ziele FROM tt_ziele WHERE idtm_ziele = '" . $myPreStepOne[0]->idtm_ziele . "'")); $this->idtm_prozess->DataSource = PFH::build_SQLPullDown(ProzessRecord::finder(), "tm_prozess", array("idtm_prozess", "pro_name"), "idta_prozess_type = 3"); $this->idtm_prozess->dataBind(); $HRKEYTest = new PFHierarchyPullDown(); $HRKEYTest->setStructureTable("tm_ziele"); $HRKEYTest->setRecordClass(ZieleRecord::finder()); $HRKEYTest->setPKField("idtm_ziele"); $HRKEYTest->setField("zie_name"); $HRKEYTest->setSQLCondition("idta_ziele_type = 3 OR idta_ziele_type=1 OR idta_ziele_type=2"); $HRKEYTest->letsrun(); $this->idtm_ziele->DataSource = $HRKEYTest->myTree; $this->idtm_ziele->dataBind(); $sql = "SELECT idtm_organisation, org_name FROM tm_organisation WHERE idta_organisation_type = 4"; $data = PFH::convertdbObjectArray(OrganisationRecord::finder()->findAllBySql($sql), array("idtm_organisation", "org_name")); $this->idtm_organisation->DataSource = $data; $this->idtm_organisation->dataBind(); break; case 1: //hier checken wir, wieviele schritte noch den gleichen Vater haben $myPreStepOne = TTZieleRecord::finder()->findAllBySql("SELECT idtm_ziele FROM tt_ziele WHERE idtt_ziele = '" . $this->Request[$this->primarykey] . "'"); $prozess_counter = count(TTZieleRecord::finder()->findAllBySql("SELECT * FROM tt_ziele WHERE idtm_ziele = '" . $myPreStepOne[0]->idtm_ziele . "'")); $this->edidtm_prozess->DataSource = PFH::build_SQLPullDown(ProzessRecord::finder(), "tm_prozess", array("idtm_prozess", "pro_name"), "idta_prozess_type = 3"); $this->edidtm_prozess->dataBind(); $this->edidtm_organisation->DataSource = PFH::build_SQLPullDown(OrganisationRecord::finder(), "tm_organisation", array("idtm_organisation", "org_name"), "idta_organisation_type=4"); $this->edidtm_organisation->dataBind(); $HRKEYTest = new PFHierarchyPullDown(); $HRKEYTest->setStructureTable("tm_ziele"); $HRKEYTest->setRecordClass(ZieleRecord::finder()); $HRKEYTest->setPKField("idtm_ziele"); $HRKEYTest->setField("zie_name"); $HRKEYTest->setSQLCondition("idta_ziele_type = 3 OR idta_ziele_type=1 OR idta_ziele_type=2"); $HRKEYTest->letsrun(); $this->edidtm_ziele->DataSource = $HRKEYTest->myTree; $this->edidtm_ziele->dataBind(); $this->fillValues($this->getSelected($this->Request[$this->primarykey])); $this->Tedauf_id->Text = $this->Request[$this->primarykey]; //the parameters for the RiskValueContainer $this->RiskValueContainer->RCedrcv_tabelle->Text = "tt_ziele"; $this->RiskValueContainer->RCedrcv_id->Text = $this->Request[$this->primarykey]; break; default: break; } $this->viewPanel->ActiveViewIndex = $this->Request['modus']; } }
public function callback_MyCallbackDrop($sender, $param) { if ($this->page->isCallback) { $theObjectContainingParameters = $param->CallbackParameter; $Record = OrganisationRecord::finder()->findBy_idtm_organisation($theObjectContainingParameters->idtm_organisation); $Record->parent_idtm_organisation = $theObjectContainingParameters->parent_idtm_organisation; $Record->save(); } }
public function dtgList_sortCommand($sender, $param) { $criteria = new TActiveRecordCriteria(); $criteria->Condition = "idta_organisation_type = :suchtext1"; $criteria->Parameters[':suchtext1'] = $this->WINOrgaidta_organisation_type->Text; $criteria->OrdersBy[$param->SortExpression] = 'ASC'; $this->PrtListe->DataSource = OrganisationRecord::finder()->findAll($criteria); $this->PrtListe->dataBind(); }
public function onLoad($param) { parent::onLoad($param); if (!$this->isPostBack && !$this->isCallback) { $criteria = new TActiveRecordCriteria(); $criteria->Condition = "idta_organisation_type LIKE 4"; $this->generateStakeMap(OrganisationRecord::finder()->findAll($criteria), "Stakeholder-Map"); $this->bindListStake(OrganisationRecord::finder()->findAll($criteria)); } }
public function loadPartei($sender, $param) { $MeinRecord = RechnungRecord::finder()->findByPK($param->Item->idtm_rechnung->Text); $OrganisationFrom = OrganisationRecord::finder()->findByPK($MeinRecord->idtm_organisation_from); $OrganisationTo = OrganisationRecord::finder()->findByPK($MeinRecord->idtm_organisation_to); $this->idtm_organisation_from->Text = $MeinRecord->idtm_organisation_from; $this->idtm_organisation_to->Text = $MeinRecord->idtm_organisation_to; $this->TO_org_uid->Text = $OrganisationTo->org_uid; $this->FROM_org_uid->Text = $OrganisationFrom->org_uid; }
public function onLoad($param) { //Globale definition f�r dieses Dokument $this->finder = VerteilerRecord::finder(); $this->MASTERRECORD = new VerteilerRecord(); parent::onLoad($param); if (!$this->isPostBack && !$this->isCallback) { $this->ttidtm_organisation->DataSource = PFH::build_SQLPullDown(OrganisationRecord::finder(), "tm_organisation", array("idtm_organisation", "org_name"), "idta_organisation_type=4"); $this->ttidtm_organisation->dataBind(); $this->bindListVerteiler(); } }
public function bindRepeaterOrganisation5($sender, $param) { $item = $param->Item; if ($item->ItemType === 'Item' || $item->ItemType === 'AlternatingItem') { $criteria = new TActiveRecordCriteria(); $criteria->Condition = "idta_organisation_type = :suchtext1 AND parent_idtm_organisation = :suchtext2"; $criteria->Parameters[':suchtext1'] = 4; $criteria->Parameters[':suchtext2'] = $item->Data->idtm_organisation; $item->RepOrganisation4->DataSource = OrganisationRecord::finder()->findAll($criteria); $item->RepOrganisation4->dataBind(); } }
public function createRfCPullDown() { //Als erstes die Organisation $this->RfCedsuggest_idtm_organisation->DataSource = PFH::build_SQLPullDown(OrganisationRecord::finder(), "tm_organisation", array("idtm_organisation", "org_name"), "idta_organisation_type = 4"); $this->RfCedsuggest_idtm_organisation->dataBind(); //Als erstes die Organisation $this->RfCedgenemigt_idtm_organisation->DataSource = PFH::build_SQLPullDown(OrganisationRecord::finder(), "tm_organisation", array("idtm_organisation", "org_name"), "idta_organisation_type = 4"); $this->RfCedgenemigt_idtm_organisation->dataBind(); //einlesen der aktivitaeten $this->RfCedidtm_activity->DataSource = PFH::build_SQLPullDownAdvanced(ActivityRecord::finder(), "tm_activity", array("idtm_activity", "act_pspcode", "act_name")); $this->RfCedidtm_activity->dataBind(); }
public function edbuildZielePullDown() { foreach ($this->edProtokollDetailGroupList->Items as $Gitem) { //if($Gitem->ItemType==='Item' || $Gitem->ItemType==='AlternatingItem'){ foreach ($Gitem->edProtokollDetailList->Items as $item) { $item->edidtm_activity->DataSource = PFH::build_SQLPullDown(TTZieleRecord::finder(), "tt_ziele", array("idtm_activity", "ttzie_name")); $item->edidtm_activity->dataBind(); $item->edidta_protokoll_ergebnistype->DataSource = PFH::build_SQLPullDown(ProtokollErgebnistypeRecord::finder(), "ta_protokoll_ergebnistype", array("idta_protokoll_ergebnistype", "prt_ergtype_name")); $item->edidta_protokoll_ergebnistype->dataBind(); $item->Aedidtm_organisation->DataSource = PFH::build_SQLPullDown(OrganisationRecord::finder(), "tm_organisation", array("idtm_organisation", "org_name"), "idta_organisation_type = 4"); $item->Aedidtm_organisation->dataBind(); } //} } }
public function onLoad($param) { parent::onLoad($param); if (!$this->isPostBack && !$this->isCallback) { $this->idtm_termin = $this->Request['idtm_termin']; $this->idtm_protokoll = $this->Request['idtm_protokoll']; $this->getSelected(); $this->thema->Text = $this->ProtokollRecord->prt_name; $this->prttyp->Text = ProtokollTypeRecord::finder()->findByPK($this->ProtokollRecord->idta_protokoll_type)->prt_type_name; $this->moderator->Text = OrganisationRecord::finder()->findByPK($this->ProtokollRecord->idtm_organisation)->org_name; $this->datum->Text = $this->ProtokollRecord->prt_cdate; $this->edTerminParticipantbindList(); $this->edParticipantbindList(); $this->bindRepProtokollDetail(); } }
public function onLoad($param) { parent::onLoad($param); //Globale definition f�r dieses Dokument $this->finder = TTZieleRecord::finder(); $this->MASTERRECORD = new TTZieleRecord(); if (!$this->isPostBack && !$this->isCallback) { switch ($this->Request['modus']) { case 0: //hier checken wir, wieviele schritte noch den gleichen Vater haben $myPreStepOne = TTZieleRecord::finder()->findAllBySql("SELECT idtm_prozess FROM tt_ziele WHERE idtt_ziele = '" . $this->Request[$this->primarykey] . "'"); $prozess_counter = count(TTZieleRecord::finder()->findAllBySql("SELECT idtt_ziele FROM tt_ziele WHERE idtm_ziele = '" . $myPreStepOne[0]->idtm_ziele . "'")); $this->idtm_prozess->DataSource = PFH::build_SQLPullDown(ProzessRecord::finder(), "tm_prozess", array("idtm_prozess", "pro_name"), "idta_prozess_type = 3"); $this->idtm_prozess->dataBind(); $this->idtm_ziele->DataSource = PFH::build_SQLPullDown(ZieleRecord::finder(), "tm_ziele", array("idtm_ziele", "zie_name"), "(idta_ziele_type = 1 OR idta_ziele_type = 3)"); $this->idtm_ziele->dataBind(); $sql = "SELECT idtm_organisation, org_name FROM tm_organisation WHERE idta_organisation_type = 4"; $data = PFH::convertdbObjectArray(OrganisationRecord::finder()->findAllBySql($sql), array("idtm_organisation", "org_name")); $this->idtm_organisation->DataSource = $data; $this->idtm_organisation->dataBind(); break; case 1: //hier checken wir, wieviele schritte noch den gleichen Vater haben $myPreStepOne = TTZieleRecord::finder()->findAllBySql("SELECT idtm_ziele FROM tt_ziele WHERE idtt_ziele = '" . $this->Request[$this->primarykey] . "'"); $prozess_counter = count(TTZieleRecord::finder()->findAllBySql("SELECT * FROM tt_ziele WHERE idtm_ziele = '" . $myPreStepOne[0]->idtm_ziele . "'")); $this->edidtm_prozess->DataSource = PFH::build_SQLPullDown(ProzessRecord::finder(), "tm_prozess", array("idtm_prozess", "pro_name"), "idta_prozess_type = 3"); $this->edidtm_prozess->dataBind(); $this->edidtm_organisation->DataSource = PFH::build_SQLPullDown(OrganisationRecord::finder(), "tm_organisation", array("idtm_organisation", "org_name"), "idta_organisation_type=4"); $this->edidtm_organisation->dataBind(); $this->edidtm_ziele->DataSource = PFH::build_SQLPullDown(ZieleRecord::finder(), "tm_ziele", array("idtm_ziele", "zie_name"), "(idta_ziele_type = 1 OR idta_ziele_type = 3)"); $this->edidtm_ziele->dataBind(); $this->Aedidtm_organisation->DataSource = PFH::build_SQLPullDown(OrganisationRecord::finder(), "tm_organisation", array("idtm_organisation", "org_name"), "idta_organisation_type=4"); $this->Aedidtm_organisation->dataBind(); $this->fillValues($this->getSelected($this->Request[$this->primarykey])); $this->Aedauf_id->Text = $this->Request[$this->primarykey]; $this->bindListAufgaben(); break; default: break; } $this->viewPanel->ActiveViewIndex = $this->Request['modus']; } }
public function onLoad($param) { parent::onLoad($param); if (!$this->isPostBack && !$this->isCallback) { $this->idtm_activity = $this->Request['idtm_activity']; $this->getSelected(); $this->ActivityZielebindList(); $this->bindListAufgaben(); $this->bindListInput(); $this->bindListOutput(); $this->bindListProtokollDetail(); $this->act_pspcode->Text = $this->ActivityRecord->act_pspcode; $this->act_name->Text = $this->ActivityRecord->act_name; $this->act_dauer->Text = $this->ActivityRecord->act_dauer; $this->act_descr->Text = $this->ActivityRecord->act_descr; $this->act_dauerIST->Text = "0"; $this->idtm_organisation->Text = OrganisationRecord::finder()->findByPk($this->ActivityRecord->idtm_organisation)->org_name; $this->act_startdate->Text = $this->ActivityRecord->act_startdate; $this->act_enddate->Text = $this->ActivityRecord->act_enddate; } }
public function bindDropDown() { $this->idta_bericht_type->DataSource = PFH::build_SQLPullDown(BerichtTypeRecord::finder(), "ta_bericht_type", array("idta_bericht_type", "ber_type_name")); $this->idta_bericht_type->dataBind(); $HRKEYTest = new PFHierarchyPullDown(); $HRKEYTest->setStructureTable("tm_organisation"); $HRKEYTest->setRecordClass(OrganisationRecord::finder()); $HRKEYTest->setPKField("idtm_organisation"); $HRKEYTest->setField("org_name"); $HRKEYTest->letsrun(); $this->rcidtm_organisation->DataSource = $HRKEYTest->myTree; $this->rcidtm_organisation->dataBind(); $ar_ber_zyklus = array(0 => 'select', 1 => 'daily', 2 => 'weekly', 3 => 'monthly'); $ar_ber_zyklus_gap = array(1 => 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'); // for($i=0;$i<=30;$i++){ // $ar_ber_zyklus_gap[$i]=$i+1; // } $this->ber_zyklus->DataSource = $ar_ber_zyklus; $this->ber_zyklus->dataBind(); $this->ber_zyklus_gap->DataSource = $ar_ber_zyklus_gap; $this->ber_zyklus_gap->dataBind(); }
private function AdressHeader($idtm_organisation) { $Organisation = OrganisationRecord::finder()->findBy_idtm_organisation($idtm_organisation); $sql = "SELECT ta_adresse.* FROM ta_adresse INNER JOIN tm_organisation_has_ta_adresse ON ta_adresse.idta_adresse = tm_organisation_has_ta_adresse.idta_adresse WHERE tm_organisation_has_ta_adresse.idtm_organisation = " . $idtm_organisation . " AND adresse_ismain = 1"; $Adresse = AdresseRecord::finder()->findBySQL($sql); $this->pdf->SetY(48); $this->pdf->SetX(24); $this->pdf->SetFont('Arial', '', 7); $this->pdf->Cell(85, 4, 'Philipp Frenzel, Biberstrasse 8/23, 1010 Wien', 'B', 1); $this->pdf->SetX(28); $this->pdf->SetFont('Arial', 'B', 12); $this->pdf->Cell(0, 10, utf8_decode($Organisation->org_name)); $this->pdf->Ln(5); $this->pdf->SetX(28); $this->pdf->SetFont('Arial', '', 11); $this->pdf->Cell(0, 10, utf8_decode($Adresse->adresse_street)); $this->pdf->Ln(5); $this->pdf->SetX(28); $this->pdf->SetFont('Arial', '', 11); $this->pdf->Cell(0, 10, utf8_decode($Adresse->adresse_zip) . " " . utf8_decode($Adresse->adresse_town)); $this->pdf->Ln(9); }
public function PFMailSend($sender, $param) { $Aufgabe = AufgabenRecord::finder()->findByPK($sender->CommandParameter); $mail = new PHPMailer(); $mail->From = "*****@*****.**"; $mail->FromName = "planlogIQ"; $mail->Host = "smtp.1und1.de"; $mail->Mailer = "smtp"; $mail->SMTPAuth = true; $mail->IsSendmail(); //nur bei 1und1 $mail->Username = "******"; $mail->Password = ""; $mail->AddAddress(KommunikationRecord::finder()->find('idtm_organisation=? AND kom_ismain=1 AND kom_type = 3', $Aufgabe->auf_idtm_organisation)->kom_information, OrganisationRecord::finder()->findByPK($Aufgabe->auf_idtm_organisation)->org_name); $mail->Subject = $Aufgabe->auf_name; $mail->MsgHTML($Aufgabe->auf_beschreibung); if (!$mail->Send()) { $this->PFMAILER->TEXT = "There was an error sending the message"; } else { $this->PFMAILER->TEXT = "..done.."; } }
public function RCSavedButtonClicked($sender, $param) { $tempus = 'RCed' . $this->RCprimarykey; if ($this->RCedorganisation_edit_status->Text == '1') { $RCEditRecord = OrganisationRecord::finder()->findByPK($this->{$tempus}->Text); } else { $RCEditRecord = new OrganisationRecord(); } //HIDDEN foreach ($this->RChiddenfields as $recordfield) { $edrecordfield = 'RCed' . $recordfield; $RCEditRecord->{$recordfield} = $this->{$edrecordfield}->Value; } //DATUM foreach ($this->RCdatfields as $recordfield) { $edrecordfield = 'RCed' . $recordfield; $RCEditRecord->{$recordfield} = date('Y-m-d', $this->{$edrecordfield}->TimeStamp); } //BOOL foreach ($this->RCboolfields as $recordfield) { $edrecordfield = 'RCed' . $recordfield; $RCEditRecord->{$recordfield} = $this->{$edrecordfield}->Checked ? 1 : 0; } foreach ($this->RCtimefields as $recordfield) { $edrecordfield = 'RCed' . $recordfield; $RCEditRecord->{$recordfield} = $this->{$edrecordfield}->Text; } foreach ($this->RCfields as $recordfield) { $edrecordfield = 'RCed' . $recordfield; $RCEditRecord->{$recordfield} = $this->{$edrecordfield}->Text; } $RCEditRecord->save(); $this->saveBankkonto($RCEditRecord->idtm_organisation); $this->saveObjekt($RCEditRecord->idtm_organisation); if ($this->RCedorganisation_edit_status->Text == '0') { $org_name = $RCEditRecord->org_name; $this->getPage()->getClientScript()->registerEndScript('X', "tree.insertNewChild(tree.getSelectedItemId()||0,{$RCEditRecord->idtm_organisation},'{$org_name}')"); } $this->view_Organisation($RCEditRecord->idtm_organisation); // if($RCEditRecord->parent_idtm_organisation!=1){ // $this->bindListChildOrgListe(); // } //$this->bindListOrgListe(); }
private function ProtokollHeader($idtm_protokoll) { $Protokoll = ProtokollRecord::finder()->findBy_idtm_protokoll($idtm_protokoll); $this->pdf->SetXY(25, 60); $this->pdf->SetDrawColor(43, 51, 43); $this->pdf->SetFont('Helvetica', '', 10); $this->pdf->Cell(185, 5, strtoupper('Protokollnotiz zum Termin am ' . date('j.n.Y', strtotime($Protokoll->prt_cdate))), 0, 0, 'B', 0); $this->pdf->Ln(); $this->pdf->SetX(25); $this->pdf->SetDrawColor(43, 51, 43); $this->pdf->SetFont('Helvetica', '', 10); $this->pdf->Cell(185, 5, strtoupper('Projekt: ' . utf8_decode($Protokoll->idtm_termin)), 0, 0, 'B', 0); $this->pdf->Ln(); //$this->pdf->SetX(28); $this->pdf->SetXY(25, 105); $this->pdf->SetDrawColor(43, 51, 43); $this->pdf->SetFont('Arial', '', 10); $this->pdf->Cell(50, 5, 'Thema ', 'B'); $this->pdf->Cell(100, 5, utf8_decode($Protokoll->prt_name), 'B', 1); $this->pdf->SetX(25); $this->pdf->SetFont('Arial', '', 10); $this->pdf->Cell(50, 5, 'Moderator ', 'B'); $this->pdf->SetFont('Arial', '', 10); $this->pdf->Cell(100, 5, utf8_decode(OrganisationRecord::finder()->findByidtm_organisation($Protokoll->idtm_organisation)->org_name), 'B', 1); $this->pdf->SetX(25); $this->pdf->SetFont('Arial', '', 10); $this->pdf->Cell(50, 5, 'Typ ', 'B'); $this->pdf->SetFont('Arial', '', 10); $this->pdf->Cell(100, 5, utf8_decode(ProtokollTypeRecord::finder()->findByPK($Protokoll->idta_protokoll_type)->prt_type_name), 'B', 1); $this->pdf->SetX(25); $this->pdf->SetFont('Arial', '', 10); $this->pdf->Cell(50, 5, 'Ort ', 'B'); $this->pdf->SetFont('Arial', '', 10); $this->pdf->Cell(100, 5, utf8_decode($Protokoll->prt_location), 'B', 1); $this->pdf->SetX(25); $this->pdf->SetFont('Arial', '', 10); $this->pdf->Cell(50, 5, 'Datum ', 'B'); $this->pdf->SetFont('Arial', '', 10); $this->pdf->Cell(100, 5, utf8_decode($Protokoll->prt_cdate), 'B', 1); $this->pdf->Ln(); $this->pdf->SetX(25); $this->pdf->SetFont('Arial', '', 10); $this->pdf->Cell(50, 5, 'Eingeladen ', 'B', 0); $this->pdf->SetFont('Arial', '', 10); $criteria = new TActiveRecordCriteria(); $criteria->Condition = "idtm_activity = :suchtext"; $criteria->Parameters[':suchtext'] = $Protokoll->idtm_termin; $criteria->OrdersBy["idtm_organisation"] = 'asc'; $AnwesendPP = ActivityParticipantsView::finder()->findAll($criteria); $i = 0; foreach ($AnwesendPP as $InvitedP) { if ($i > 0) { $this->pdf->SetX(25); $this->pdf->SetFont('Arial', '', 10); $this->pdf->Cell(50, 5, ' ', 'B'); } $this->pdf->Cell(50, 5, utf8_decode(OrganisationRecord::finder()->findByPK($InvitedP->idtm_organisation)->org_vorname) . ' ' . utf8_decode($InvitedP->org_name), 'B', 0); $this->pdf->Cell(50, 5, $InvitedP->act_part_anwesend == 1 ? 'anwesend' : '', 'B', 1); $i++; } $this->pdf->Ln(); }
public function setText($text) { $SelectedOrga = OrganisationRecord::finder()->findByPK($text); $this->XXXsuggest_idtm_organisation->Text = $SelectedOrga->org_vorname . ' ' . $SelectedOrga->org_name; return $this->setViewState('Text', $text, ''); }
public function checkOrganisationName($sender, $param) { // valid if the username is not found in the database $param->IsValid = OrganisationRecord::finder()->findByidtm_organisation($this->Tedsuggest_idtm_organisation->Text) === null; }
public function editPrtAufgabe($sender, $param) { if ($param->CommandName == "edit") { $this->prtAufgabenDialog->setDisplay("Dynamic"); $this->initPullDowns(); $AufgabeRecord = AufgabenRecord::finder()->findByPK($param->CommandParameter); $this->Tedidtm_aufgaben->Text = $AufgabeRecord->idtm_aufgaben; $this->Tedauf_tabelle->Text = $AufgabeRecord->auf_tabelle; $this->Tedauf_id->Text = $AufgabeRecord->auf_id; $this->idtm_organisation->Text = $AufgabeRecord->idtm_organisation; $this->auf_idtm_organisation->Text = $AufgabeRecord->auf_idtm_organisation; $this->auf_priority->Text = $AufgabeRecord->auf_priority; $this->auf_dauer->Text = $AufgabeRecord->auf_dauer; //$AEditRecord->auf_name = $this->prtdet_topic->Text; $this->auf_beschreibung->Text = $AufgabeRecord->auf_beschreibung; $this->auf_tdate->setDate($AufgabeRecord->auf_tdate); $this->auf_ddate->setDate($AufgabeRecord->auf_ddate); $this->auf_done->setChecked($AufgabeRecord->auf_done); $this->Tedauf_edit_status->Text = 1; $this->AddOrSaveButtonPRTAUF->Text = "speichern"; $this->getPage()->getClientScript()->registerEndScript('XCOL', "constructCollapsableFieldsets();"); } if ($param->CommandName == "taskdone") { $tmpstartdate = new DateTime(); $AufgabenRecord = AufgabenRecord::finder()->findByPK($param->CommandParameter); $AufgabenRecord->auf_done = 1; $AufgabenRecord->auf_ddate = $tmpstartdate->format("Y-m-d"); $AufgabenRecord->save(); $this->bindListPrtAufgaben(); } if ($param->CommandName == "mail") { $Aufgabe = AufgabenRecord::finder()->findByPK($param->CommandParameter); $MailEmpfaenger = OrganisationRecord::finder()->findByPk($Aufgabe->idtm_organisation); $mail = new PHPMailer(); $mail->From = "*****@*****.**"; $mail->FromName = "planlogIQ"; $mail->Host = "smtp.1und1.de"; $mail->Mailer = "smtp"; $mail->SMTPAuth = true; $mail->IsSendmail(); //nur bei 1und1 $mail->Username = "******"; $mail->Password = ""; $mail->AddAddress(KommunikationRecord::finder()->find('idtm_organisation=? AND kom_ismain=1 AND kom_type = 3', $Aufgabe->idtm_organisation)->kom_information, $MailEmpfaenger->org_name); $mail->Subject = $Aufgabe->auf_name; $HTMLMessage = "Sehr geehrte(r) Frau/Herr " . $MailEmpfaenger->org_name . ",<br/><br/>"; $HTMLMessage .= "die folgende Aufgabe wurde Ihnen zugeordnet:<br/>"; $HTMLMessage .= "<p><table><tr><td bgcolor='#efefef'>Task Nr.:</td><td>" . $Aufgabe->idtm_aufgaben . " </td><td bgcolor='#efefef'>Thema: </td><td>" . utf8_decode($Aufgabe->auf_name) . "</td></tr>"; $HTMLMessage .= "<tr><td bgcolor='#efefef'>Bis:</td><td colspan='3'><b>" . $Aufgabe->auf_tdate . "</b></td></tr></table>"; //$HTMLMessage.="<p style='background-color:#efefef'><hr/>".utf8_decode($Aufgabe->prtdet_descr)."</p>"; $HTMLMessage .= "<p style='background-color:#efefef'><hr/>" . utf8_decode($Aufgabe->auf_beschreibung) . "<hr/></p>"; $HTMLMessage .= "Bitte nicht Antworten! Diese Mail wurde automatisch generiert..."; $mail->MsgHTML($HTMLMessage); if (!$mail->Send()) { $this->getPage()->getClientScript()->registerEndScript('XER', "alert('Fehler!');"); } else { $this->getPage()->getClientScript()->registerEndScript('XER', "alert('Done')"); } } }
public static function initOrganisationStruktur() { $OrganisationType = OrganisationTypeRecord::finder()->findAll(); if (count($OrganisationType) >= 1) { foreach ($OrganisationType as $OrgType) { $Organisation = OrganisationRecord::finder()->findByorg_fk_internal($OrgType->org_type_name); if (count($Organisation) != 1) { $Organisation = new OrganisationRecord(); } $Organisation->idta_organisation_type = 1; $Organisation->idta_organisation_art = 1; $Organisation->idtm_ressource = 1; $Organisation->org_name = $OrgType->org_type_name; $Organisation->org_fk_internal = $OrgType->org_type_name; $Organisation->parent_idtm_organisation = 1; $Organisation->save(); /*foreach(range('A','Z') as $i){ $OrgChild = OrganisationRecord::finder()->findByorg_fk_internal($OrgType->org_type_name.$i); if(count($OrgChild)!=1){ $OrgChild = new OrganisationRecord(); } $OrgChild->idta_organisation_type = 1; $OrgChild->idta_organisation_art = 1; $OrgChild->idtm_ressource = 1; $OrgChild->org_name = $i; $OrgChild->org_fk_internal = $OrgType->org_type_name.$i; $OrgChild->parent_idtm_organisation = $Organisation->idtm_organisation; $OrgChild->save(); }*/ unset($Organisation); } } }
public function getUserOrgId($userId) { $UserRecord = OrganisationRecord::finder()->findByidtm_user($userId); if (count($UserRecord) == 1) { return $UserRecord->idtm_organisation; } else { return 0; } }
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; }