/** * Constructor creates the table element * @param string $id Id of the table * @param object $htmlPage (optional) A HtmlPage object that will be used to add javascript code * or files to the html output page. * @param bool $hoverRows (optional) If set to @b true then the active selected row will be marked with special css code * @param bool $datatables (optional) If set to @b true then the jQuery plugin Datatables will be used to create the table. * Then column sort, search within the table and other features are possible. * @param string $class (optional) An additional css classname. The class @b table * is set as default and need not set with this parameter. */ public function __construct($id, $htmlPage = null, $hoverRows = true, $datatables = false, $class = '') { global $g_root_path, $gL10n; if ($class === '') { $class = 'table'; } if ($hoverRows) { $class .= ' table-hover'; } parent::__construct($id, $class); // initialize class member parameters $this->messageNoRowsFound = $gL10n->get('SYS_NO_DATA_FOUND'); $this->id = $id; $this->datatables = $datatables; $this->datatablesInitParameters = array(); $this->groupedColumn = -1; $this->columnCount = 0; $this->rowsPerPage = 25; $this->orderColumns = array(); $this->datatablesColumnDefs = array(); // when using DataTables we must set the width attribute so that all columns will change // dynamic their width if the browser window size change. if ($datatables) { $this->addAttribute('width', '100%'); $this->datatablesInitParameters[] = '"language": {"url": "' . $g_root_path . '/adm_program/libs/datatables/language/datatables.' . $gL10n->getLanguageIsoCode() . '.lang"}'; } if (is_object($htmlPage)) { $this->htmlPage =& $htmlPage; } }
$tableParticipants = ''; } // Configure table body contents $body_1[$numElement]['dat_highlight'] = $buffer['dat_highlight']; $body_1[$numElement]['dat_details'] = array($buffer['dat_begin'], $buffer['dat_end'], $buffer['dat_starttime'], $buffer['dat_endtime'], $buffer['dat_headline'], $buffer['dat_location'], $buffer['room_name'], $buffer['dat_num_leaders'], $buffer['dat_participation']); $body_2[$numElement]['dat_highlight'] = $buffer['dat_highlight']; $body_2[$numElement]['dat_details'] = array($buffer['dat_begin'], $buffer['dat_end'], $buffer['dat_starttime'], $buffer['dat_endtime'], $buffer['dat_headline'], $buffer['dat_description']); $body_3[$numElement]['dat_highlight'] = $buffer['dat_highlight']; $body_3[$numElement]['dat_details'] = array($buffer['dat_begin'], $buffer['dat_end'], $buffer['dat_starttime'], $buffer['dat_endtime'], $buffer['dat_headline'], $tableParticipants); $numElement++; unset($buffer); } // end foreach } // Create table object $datePrint = new HtmlTableBasic('PrintViewDates', 'tableDateList', 1); $datePrint->addAttribute('cellpadding', '3', 'table'); $datePrint->addAttribute('summary', 'Printview of dates', 'table'); // Define thead $datePrint->addTableHeader(); $datePrint->addRow(); $datePrint->addColumn($tableHead, array('colspan' => '10'), 'td'); // Define tfoot $datePrint->addTableFooter(); $datePrint->addRow(); $datePrint->addColumn(); $datePrint->addAttribute('colspan', '9', 'td'); $datePrint->addAttribute('style', 'text-align: right;', 'td'); $datePrint->addData($tableFooter); // Define tbody $datePrint->addTableBody('id', 'style0', $bodyHeadline_1, 'th');