本文整理汇总了PHP中TPage::onPreInit方法的典型用法代码示例。如果您正苦于以下问题:PHP TPage::onPreInit方法的具体用法?PHP TPage::onPreInit怎么用?PHP TPage::onPreInit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPage
的用法示例。
在下文中一共展示了TPage::onPreInit方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onPreInit
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;
}
示例2: OnPreInit
public function OnPreInit($param)
{
parent::onPreInit($param);
//instantiasi database
$this->DB = $this->Application->getModule('db')->getLink();
//instantiasi fungsi setup
$this->setup = $this->getLogic('Setup');
//setting templaces yang aktif
$this->MasterClass = 'Application.layouts.MainTemplate';
$this->Theme = 'cube';
}
示例3: onPreInit
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;
}
示例4: onPreInit
/**
* (non-PHPdoc)
* @see TPage::render()
*/
public function onPreInit($param)
{
parent::onPreInit($param);
if (isset($_REQUEST['blanklayout']) && intval($_REQUEST['blanklayout']) === 1) {
$this->getPage()->setMasterClass("Application.layout.BlankLayout");
}
$this->_Load3rdPartyJs();
$this->getClientScript()->registerPradoScript('ajax');
$this->_loadPageJsClass();
$cScripts = self::getLastestJS(get_class($this));
if (isset($cScripts['js']) && ($lastestJs = trim($cScripts['js'])) !== '') {
$this->getPage()->getClientScript()->registerScriptFile('pageJs', $this->publishAsset($lastestJs));
}
if (isset($cScripts['css']) && ($lastestCss = trim($cScripts['css'])) !== '') {
$this->getPage()->getClientScript()->registerStyleSheetFile('pageCss', $this->publishAsset($lastestCss));
}
}
示例5: onPreInit
public function onPreInit($param)
{
parent::onPreInit($param);
if (isset($_GET['idtm_activity'])) {
$openItem = $_GET['idtm_activity'];
} else {
$openItem = 1;
}
if (isset($_GET['idta_activity_type'])) {
if ($_GET['idta_activity_type'] != '') {
$mySQLcond1 = "idta_activity_type = " . $_GET['idta_activity_type'] . " AND ";
} else {
$mySQLcond1 = '';
}
} else {
$mySQLcond1 = '';
}
if (isset($_GET['idtm_activity_start'])) {
$this->setUserStartId($_GET['idtm_activity_start']);
} else {
$this->setUserStartId($this->user->getStartNode($this->user->getUserId($this->user->Name), "tm_activity"));
}
// $this->DBConnection = new TDbConnection($this->Application->getModule('db1')->database->getConnectionString(),$this->Application->getModule('db1')->database->getUsername(),$this->Application->getModule('db1')->database->getPassword());
// $this->DBConnection->Active = true;
$res = mysql_connect($this->Application->Parameters['Host'], $this->Application->getModule('db1')->database->getUsername(), $this->Application->getModule('db1')->database->getPassword());
mysql_select_db($this->Application->Parameters['Database']);
//$tree = new TreeConnector($this->DBConnection);
$tree = new TreeConnector($res);
$tree->set_encoding("UTF-8");
$tree->enable_log("temp.log", false);
$mySQL = "SELECT idtm_activity,parent_idtm_activity,act_name,idta_activity_type FROM tm_activity";
$mySQLOrderBy = " ORDER BY parent_idtm_activity ASC,act_name ASC,act_step";
$this->load_all_cats($mySQL . $mySQLOrderBy);
//the start ID
$mySQLcond1 .= "idtm_activity IN (" . $this->subCategory_list($this->subcats, $this->UserStartId) . "," . $this->parentCategory_list($this->parentcats, $this->UserStartId) . ")";
function custom_format($data)
{
$data->set_image("s" . $data->get_value("idta_activity_type") . ".gif");
//$data->setUserData("open",$data->get_value("idtm_organisation")==$openItem?"1":"0");
}
$tree->event->attach("beforeRender", custom_format);
$SQLComp = $mySQL . " WHERE " . $mySQLcond1 . $mySQLOrderBy;
$tree->dynamic_loading(true);
//$tree->render_table("tm_struktur", "idtm_struktur", "struktur_name", "parent_idtm_struktur");
$tree->render_sql($SQLComp, "idtm_activity", "act_name,idta_activity_type", "", "parent_idtm_activity");
}
示例6: onPreInit
public function onPreInit($param)
{
parent::onPreInit($param);
$this->Theme = $this->Application->Parameters['ThemeName'];
}
示例7: onPreInit
public function onPreInit($param)
{
$myTheme = $this->User->getUserTheme($this->User->getUserId(), 'mod_theme');
$this->setTheme($myTheme);
parent::onPreInit($param);
$this->workbook = new PHPExcel();
$this->sheet = $this->workbook->getActiveSheet();
$this->sheet->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT);
$this->sheet->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
if ($this->Request['periode'] != '') {
$this->Periode = $this->Request['periode'];
}
if ($this->Request['idtm_struktur'] != '') {
$this->idtm_struktur = $this->Request['idtm_struktur'];
} else {
$this->idtm_struktur = $this->user->getStartNode($this->user->getUserId($this->user->Name), "idtm_struktur");
$this->idtm_struktur == '' ? $this->idtm_struktur = 1 : '';
}
if ($this->Request['per_single'] != '') {
$this->SinglePeriode = $this->Request['per_single'];
}
if ($this->Request['idta_variante'] != '') {
$this->Variante = $this->Request['idta_variante'];
}
if ($this->Request['idta_struktur_bericht'] != '') {
$this->idta_struktur_bericht = $this->Request['idta_struktur_bericht'];
} else {
$this->idta_struktur_bericht = StrukturBerichtRecord::finder()->findBysb_startbericht(1)->idta_struktur_bericht;
}
//setting up the db-connection
$myDBConnection = new TDbConnection($this->Application->getModule('db1')->database->getConnectionString(), $this->Application->getModule('db1')->database->getUsername(), $this->Application->getModule('db1')->database->getPassword());
$myDBConnection->Active = true;
//this calculator is used to build the subcats
$mySubcatsCalculator = new PFCalculator();
$mySubcatsCalculator->setDBConnection($myDBConnection);
$mySubcatsCalculator->setStartNode($this->idtm_struktur, 1);
if (!$this->Nested) {
$mySubcatsCalculator->load_all_cats();
$mySubcatsCalculator->setsubcats($mySubcatsCalculator->getsubcats());
}
//THE REPORT HEADER
$this->sheetrow++;
$local_column = $this->sheetleftgap;
$local_cell = '';
$local_cell = $this->ColumnArray[$local_column] . $this->sheetrow;
$this->sheet->setCellValue($local_cell, $mySubcatsCalculator->getCurrentPath($this->idtm_struktur));
$this->workbook->getActiveSheet()->getStyle($local_cell)->getFont()->setSize(14);
$this->workbook->getActiveSheet()->getStyle($local_cell)->getFont()->getColor()->setRGB('999900');
$this->sheetrow++;
//Adjusting the size
$this->sheet->getColumnDimension($this->ColumnArray[$local_column])->setWidth(30);
$local_column++;
for ($ii = $local_column; $ii < count($this->ColumnArray); $ii++) {
$this->sheet->getColumnDimension($this->ColumnArray[$ii])->setWidth(12);
}
//here we build the statements nthat a stored inside the database
$Report = StrukturBerichtRecord::finder()->findByPK($this->idta_struktur_bericht);
$this->sheet->setTitle($Report->pivot_struktur_name);
$ReportColumns = StrukturBerichtSpaltenRecord::finder()->findAllByidta_struktur_bericht($this->idta_struktur_bericht);
$idta_struktur_bericht_spalten = array();
foreach ($ReportColumns as $ReportColumn) {
$this->GraphOffset++;
$this->InputBericht = $ReportColumn->sbs_input;
//$this->StrukturBerichtSaveButton->Visible = $this->InputBericht;
//wenn die Variante fix uebergeben wurde
if ($ReportColumn->sbs_idta_variante_fix) {
$this->Variante = $ReportColumn->idta_variante;
}
//hier befuelle ich die variablenliste pro
if ($ReportColumn->sbs_struktur_switch_type == 1) {
$mySubcatsCalculator->setStartNode($ReportColumn->sbs_idtm_struktur, $this->Nested);
} else {
$mySubcatsCalculator->setStartNode($this->idtm_struktur, $this->Nested);
}
//das brauchen wir, fuer den fall dass wir die nested informationen noch nicht im modell haben
if (!$this->Nested) {
$ChildrenNodes[$ReportColumn->idta_struktur_bericht_spalten] = $mySubcatsCalculator->ChildrenNodes;
$tmpInString = '';
if (count($ChildrenNodes[$ReportColumn->idta_struktur_bericht_spalten]) > 0) {
$counter = 0;
foreach ($ChildrenNodes[$ReportColumn->idta_struktur_bericht_spalten] as $key => $value) {
if ($value != '') {
$counter == 0 ? $tmpInString .= "'" . $value . "' " : ($tmpInString .= ",'" . $value . "' ");
$counter++;
$this->STRcounter == 0 ? $this->ReportIDsInStringAll .= "'" . $value . "' " : ($this->ReportIDsInStringAll .= ",'" . $value . "' ");
$this->STRcounter++;
}
}
}
$this->ReportIDsInString[$ReportColumn->idta_struktur_bericht_spalten] = $tmpInString;
} else {
if ($ReportColumn->sbs_struktur_switch_type == 1) {
$StartRecord = StrukturRecord::finder()->findByidtm_struktur($ReportColumn->sbs_idtm_struktur);
} else {
$StartRecord = StrukturRecord::finder()->findByidtm_struktur($this->idtm_struktur);
}
$this->ReportIDsLeft[$ReportColumn->idta_struktur_bericht_spalten] = $StartRecord->struktur_lft;
$this->ReportIDsRight[$ReportColumn->idta_struktur_bericht_spalten] = $StartRecord->struktur_rgt;
}
//falls eine zeitliche abweichung festgestellt wurde
//.........这里部分代码省略.........
示例8: onPreInit
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;
}
示例9: onPreInit
protected function onPreInit($param)
{
if (!strlen($this->masterPageName)) {
$this->masterPageName = $this->getDefinition(get_class($this))->getMasterPageName();
}
if (strlen($this->masterPageName)) {
$this->masterPage = pradoGetApplication()->loadPage($this->masterPageName);
$this->masterPage->onPreInit($param);
}
}
示例10: onPreInit
public function onPreInit($param)
{
parent::onPreInit($param);
$completeCounter = 1;
$this->idtm_termin = $_GET['idtm_termin'];
$this->idtm_protokoll = $_GET['idtm_protokoll'];
$idtm_termin = $this->idtm_termin;
$idtm_protokoll = $this->idtm_protokoll;
$this->workbook = new PHPExcel();
$sheet = $this->workbook->getActiveSheet();
$sheet->setTitle('Protokoll');
$sheet->getPageSetup()->setOrientation(PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT);
$sheet->getPageSetup()->setPaperSize(PHPExcel_Worksheet_PageSetup::PAPERSIZE_A4);
$sheet->getRowDimension('1')->setRowHeight(40);
$sheet->getColumnDimension('A')->setWidth(5);
$sheet->getColumnDimension('B')->setWidth(30);
$sheet->getColumnDimension('C')->setWidth(20);
$sheet->getColumnDimension('D')->setWidth(5);
$sheet->getColumnDimension('E')->setWidth(20);
$sheet->getColumnDimension('F')->setWidth(20);
$this->workbook->getActiveSheet()->getStyle('A1')->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);
$this->workbook->getActiveSheet()->getStyle('A1')->getFill()->getStartColor()->setRGB('898989');
$this->workbook->getActiveSheet()->getStyle('A1')->getFont()->setSize(16);
$this->workbook->getActiveSheet()->getStyle('A1')->getFont()->getColor()->setRGB('FFFFFF');
$sheet->mergeCells('A1:B1');
$sheet->setCellValue('A1', "Protokoll");
$this->workbook->getActiveSheet()->duplicateStyle($this->workbook->getActiveSheet()->getStyle('A1'), 'A' . $completeCounter . ':H' . $completeCounter);
$counter = 5;
$completeCounter = $counter;
$this->workbook->getActiveSheet()->getStyle('B5')->applyFromArray(array('font' => array('bold' => true, 'size' => 12, 'color' => array('argb' => 'FFFFFFFF')), 'alignment' => array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_LEFT), 'borders' => array('top' => array('style' => PHPExcel_Style_Border::BORDER_THIN)), 'fill' => array('type' => PHPExcel_Style_Fill::FILL_SOLID, 'startcolor' => array('argb' => 'FFA0A0A0'))));
$this->workbook->getActiveSheet()->duplicateStyle($this->workbook->getActiveSheet()->getStyle('B5'), 'B' . $counter . ':C' . $counter);
$this->workbook->getActiveSheet()->duplicateStyle($this->workbook->getActiveSheet()->getStyle('B5'), 'E' . $counter . ':G' . $counter);
//der header fuer den Bereich
$sheet->setCellValue('B' . $counter, "Name");
$sheet->setCellValue('C' . $counter, "Projektrolle");
$sheet->setCellValue('E' . $counter, "Name");
$sheet->setCellValue('F' . $counter, "Kommentar");
$sheet->setCellValue('G' . $counter, "AV");
$counter++;
$criteria = new TActiveRecordCriteria();
$criteria->Condition = "idtm_termin = :suchtext";
$criteria->Parameters[':suchtext'] = $idtm_termin;
$criteria->OrdersBy["idtm_organisation"] = 'asc';
$Records = TerminOrganisationView::finder()->findAll($criteria);
foreach ($Records as $Record) {
$sheet->setCellValue('B' . $counter, htmlentities($Record->org_name));
$sheet->setCellValue('C' . $counter, htmlentities($Record->user_role_name));
$counter++;
}
$counter2 = $completeCounter;
$counter2++;
$criteria2 = new TActiveRecordCriteria();
$criteria2->Condition = "idtm_activity = :suchtext";
$criteria2->Parameters[':suchtext'] = $idtm_termin;
$Records2 = ActivityParticipantsView::finder()->findAll($criteria2);
foreach ($Records2 as $Record) {
$sheet->setCellValue('E' . $counter2, htmlentities($Record->org_name));
$sheet->setCellValue('F' . $counter2, htmlentities($Record->act_part_notiz));
$sheet->setCellValue('G' . $counter2, htmlentities($Record->act_part_anwesend));
$counter2++;
}
$counter >= $counter2 ? $completeCounter = $counter : ($completeCounter = $counter2);
$completeCounter++;
$counter3 = $completeCounter;
$counter3++;
$this->workbook->getActiveSheet()->getStyle('B' . $completeCounter)->getAlignment()->setWrapText(true);
$this->workbook->getActiveSheet()->getStyle('B' . $completeCounter)->getAlignment()->setShrinkToFit(true);
$this->workbook->getActiveSheet()->getStyle('B' . $completeCounter)->getFont()->setSize(12);
$this->workbook->getActiveSheet()->getStyle('B' . $completeCounter)->getFont()->getColor()->setRGB('232323');
$SQL = "SELECT a.* FROM `vv_protokoll_detail_aufgabe` a INNER JOIN ta_protokoll_detail_group b ON a.idta_protokoll_detail_group = b.idta_protokoll_detail_group";
$SQL .= " WHERE idtm_protokoll = " . $idtm_protokoll;
$Records3 = ProtokollDetailAufgabeView::finder()->findAllBySQL($SQL);
foreach ($Records3 as $Record) {
$sheet->setCellValue('B' . $counter3, htmlentities($Record->idta_protokoll_detail_group));
$sheet->mergeCells('C' . $counter3 . ':D' . $counter3);
$sheet->setCellValue('C' . $counter3, htmlentities($Record->prtdet_cdate));
$sheet->setCellValue('E' . $counter3, htmlentities($Record->prtdet_topic));
$this->workbook->getActiveSheet()->getStyle('B' . $counter3)->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);
$this->workbook->getActiveSheet()->getStyle('B' . $counter3)->getFill()->getStartColor()->setRGB('A9AB78');
$this->workbook->getActiveSheet()->duplicateStyle($this->workbook->getActiveSheet()->getStyle('B' . $counter3), 'B' . $counter3 . ':G' . $counter3);
$counter3++;
$sheet->mergeCells('B' . $counter3 . ':G' . $counter3);
$sheet->setCellValue('B' . $counter3, utf8_decode(strip_tags($Record->prtdet_descr)));
$this->workbook->getActiveSheet()->duplicateStyle($this->workbook->getActiveSheet()->getStyle('B' . $completeCounter), 'B' . $counter3 . ':G' . $counter3);
$counter3++;
}
$this->generate('Excel2007', 'risklogiq2009');
}
示例11: onPreInit
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"));
//.........这里部分代码省略.........