added PDFTable
This commit is contained in:
parent
cf9c5c9f70
commit
25ff82f545
|
@ -988,7 +988,7 @@ function extractRDNAttribute($dn) {
|
|||
* @return String RDN attribute value
|
||||
*/
|
||||
function extractRDNValue($dn) {
|
||||
if ($dn == null) return null;
|
||||
if (empty($dn)) return null;
|
||||
$parts = explode("=", substr($dn, 0, strpos($dn, ',')));
|
||||
return $parts[1];
|
||||
}
|
||||
|
|
|
@ -736,14 +736,14 @@ class fixed_ip extends baseModule {
|
|||
function get_pdfEntries($pdfKeys) {
|
||||
$return = array();
|
||||
if (is_array($this->fixed_ip) && (sizeof($this->fixed_ip) > 0)) {
|
||||
$return[get_class($this) . '_IPlist'] = array(
|
||||
'<block><tr>' .
|
||||
'<td width="20%" align=\"L\"><b>' . _('PC name') . "</b></td>" .
|
||||
"<td width=\"20%\" align=\"L\"><b>" . _('IP address') . "</b></td>" .
|
||||
"<td width=\"20%\" align=\"L\"><b>" . _('MAC address') . '</b></td>' .
|
||||
"<td width=\"10%\" align=\"L\"><b>" . _('Active') . '</b></td>' .
|
||||
"<td width=\"30%\" align=\"L\"><b>" . _('Description') . '</b></td>' .
|
||||
'</tr></block>');
|
||||
$pdfTable = new PDFTable();
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell(_('PC name'), '20%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('IP address'), '20%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('MAC address'), '20%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Active'), '10%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Description'), '30%', null, true);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
for ($i = 0; $i < sizeof($this->fixed_ip); $i++) {
|
||||
$name = $this->fixed_ip[$i]['cn'];
|
||||
$mac = $this->fixed_ip[$i]['mac'];
|
||||
|
@ -753,14 +753,15 @@ class fixed_ip extends baseModule {
|
|||
$active = _('no');
|
||||
}
|
||||
$description = $this->fixed_ip[$i]['description'];
|
||||
$return[get_class($this) . '_IPlist'][] = '<block><tr>' .
|
||||
'<td width="20%" align=\"L\">' . $name . "</td>" .
|
||||
"<td width=\"20%\" align=\"L\">" . $ip . " </td>" .
|
||||
"<td width=\"20%\" align=\"L\">" . $mac . '</td>'.
|
||||
"<td width=\"10%\" align=\"L\">" . $active . '</td>'.
|
||||
"<td width=\"30%\" align=\"L\">" . $description . ' </td>'.
|
||||
'</tr></block>';
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($name, '20%');
|
||||
$pdfRow->cells[] = new PDFTableCell($ip, '20%');
|
||||
$pdfRow->cells[] = new PDFTableCell($mac, '20%');
|
||||
$pdfRow->cells[] = new PDFTableCell($active, '10%');
|
||||
$pdfRow->cells[] = new PDFTableCell($description, '30%');
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
$this->addPDFTable($return, 'IPlist', $pdfTable);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
|
|
@ -754,13 +754,19 @@ class kolabUser extends baseModule {
|
|||
break;
|
||||
}
|
||||
}
|
||||
$return['kolabUser_invPol'][0] = '<block><key>' . _('Invitation policy') . '</key><tr><td align=\"L\">' . _('Anyone') . ": " . $this->invitationPolicies[$default] . '</td></tr></block>';
|
||||
$pdfTable = new PDFTable(_('Invitation policy'));
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Anyone') . ": " . $this->invitationPolicies[$default]);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
for ($i = 0; $i < sizeof($this->attributes['kolabInvitationPolicy']); $i++) {
|
||||
$parts = explode(':', $this->attributes['kolabInvitationPolicy'][$i]);
|
||||
if (sizeof($parts) == 2) {
|
||||
$return['kolabUser_invPol'][] = '<block><tr><td align=\"L\">' . $parts[0] . ": " . $this->invitationPolicies[$parts[1]] . '</td></tr></block>';
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($parts[0] . ": " . $this->invitationPolicies[$parts[1]]);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
}
|
||||
$this->addPDFTable($return, 'invPol', $pdfTable);
|
||||
}
|
||||
$this->addSimplePDFField($return, 'aliases', _('Email aliases'), 'alias');
|
||||
$this->addSimplePDFField($return, 'delegate', _('Delegates'), 'kolabDelegate');
|
||||
|
|
|
@ -449,15 +449,20 @@ class nisNetGroupUser extends baseModule {
|
|||
*/
|
||||
function get_pdfEntries($pdfKeys) {
|
||||
$return = array();
|
||||
$return[get_class($this) . '_memberships'][0] = '<block>'
|
||||
. '<tr><td width="25%" align=\"L\"><b>' . _('Group') . '</b></td>'
|
||||
. '<td width="25%" align=\"L\"><b>' . _('Host name') . '</b></td>'
|
||||
. '<td width="25%" align=\"L\"><b>' . _('Domain name') . '</b></td></tr></block>';
|
||||
$pdfTable = new PDFTable();
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Group'), '25%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Host name'), '25%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Domain name'), '25%', null, true);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
foreach ($this->groups as $group) {
|
||||
$return[get_class($this) . '_memberships'][] = '<block><tr><td width="25%" align=\"L\">' . $group['name'] . '</td>'
|
||||
. '<td width="25%" align=\"L\">' . $group['host'] . ' </td>'
|
||||
. '<td width="25%" align=\"L\">' . $group['domain'] . ' </td></tr></block>';
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($group['name'], '25%');
|
||||
$pdfRow->cells[] = new PDFTableCell($group['host'], '25%');
|
||||
$pdfRow->cells[] = new PDFTableCell($group['domain'], '25%');
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
$this->addPDFTable($return, 'memberships', $pdfTable);
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
|
|
@ -583,22 +583,22 @@ class nisnetgroup extends baseModule {
|
|||
$this->addSimplePDFField($return, 'description', _('Description'));
|
||||
$this->addSimplePDFField($return, 'subgroups', _('Subgroups'), 'memberNisNetgroup');
|
||||
if (sizeof($this->attributes['nisNetgroupTriple']) > 0) {
|
||||
$return[get_class($this) . '_members'] = array('<block><tr><td width="80%"><b>' . _('Members') . '</b></td></tr></block>');
|
||||
$return[get_class($this) . '_members'][] = '<block><tr>' .
|
||||
'<td width="20%"><b>' . _('Host') . '</b></td>' .
|
||||
'<td width="20%"><b>' . _('User') . '</b></td>' .
|
||||
'<td width="30%"><b>' . _('Domain') . '</b></td>' .
|
||||
'</tr></block>';
|
||||
$pdfTable = new PDFTable(_('Members'));
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Host'), '20%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('User'), '20%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Domain'), '20%', null, true);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
for ($i = 0; $i < sizeof($this->attributes['nisNetgroupTriple']); $i++) {
|
||||
$triple = substr($this->attributes['nisNetgroupTriple'][$i], 1, strlen($this->attributes['nisNetgroupTriple'][$i]) - 2);
|
||||
$triple = explode(',', $triple);
|
||||
$return[get_class($this) . '_members'][] = '<block><tr>' .
|
||||
'<td width="20%" align=\"L\">' . $triple[0] . ' </td>' .
|
||||
'<td width="20%" align=\"L\">' . $triple[1] . ' </td>' .
|
||||
'<td width="30%" align=\"L\">' . $triple[2] . ' </td>' .
|
||||
'</tr></block>';
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($triple[0], '20%');
|
||||
$pdfRow->cells[] = new PDFTableCell($triple[1], '20%');
|
||||
$pdfRow->cells[] = new PDFTableCell($triple[2], '30%');
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
$return[get_class($this) . '_members'][] = '<block><tr><td width="80%"> </td></tr></block>';
|
||||
$this->addPDFTable($return, 'members', $pdfTable);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
|
|
@ -431,16 +431,22 @@ class puppetClient extends baseModule {
|
|||
$this->addSimplePDFField($return, 'environment', _('Environment'));
|
||||
$this->addSimplePDFField($return, 'parentnode', _('Parent node'));
|
||||
if (isset($this->attributes['puppetclass'][0])) {
|
||||
$return['puppetClient_puppetclass'][0] = '<block><key>' . _('Classes') . '</key><tr><td align=\"L\">' . $this->attributes['puppetclass'][0] . '</td></tr></block>';
|
||||
for ($i = 1; $i < sizeof($this->attributes['puppetclass']); $i++) {
|
||||
$return['puppetClient_puppetclass'][] = '<block><tr><td align=\"L\">' . $this->attributes['puppetclass'][$i] . '</td></tr></block>';
|
||||
$pdfTable = new PDFTable(_('Classes'));
|
||||
for ($i = 0; $i < sizeof($this->attributes['puppetclass']); $i++) {
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($this->attributes['puppetclass'][$i]);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
$this->addPDFTable($return, 'puppetclass', $pdfTable);
|
||||
}
|
||||
if (isset($this->attributes['puppetvar'][0])) {
|
||||
$return['puppetClient_puppetvar'][0] = '<block><key>' . _('Variables') . '</key><tr><td align=\"L\">' . $this->attributes['puppetvar'][0] . '</td></tr></block>';
|
||||
for ($i = 1; $i < sizeof($this->attributes['puppetvar']); $i++) {
|
||||
$return['puppetClient_puppetvar'][] = '<block><tr><td align=\"L\">' . $this->attributes['puppetvar'][$i] . '</td></tr></block>';
|
||||
$pdfTable = new PDFTable(_('Variables'));
|
||||
for ($i = 0; $i < sizeof($this->attributes['puppetvar']); $i++) {
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($this->attributes['puppetvar'][$i]);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
$this->addPDFTable($return, 'puppetvar', $pdfTable);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
|
|
@ -904,22 +904,25 @@ class pykotaUser extends baseModule {
|
|||
$this->addSimplePDFField($return, 'pykotaLifeTimePaid', _('Total paid'));
|
||||
// payment history
|
||||
if (!empty($this->attributes['pykotaPayments'][0])) {
|
||||
$history[] = '<block><tr>' .
|
||||
'<td width="20%"><b>' . _('Date') . '</b></td>' .
|
||||
'<td width="10%"><b>' . _('Amount') . '</b></td>' .
|
||||
'<td width="70%"><b>' . _('Comment') . '</b></td></tr></block>';
|
||||
$pdfTable = new PDFTable();
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Date'), '20%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Amount'), '10%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Comment'), '70%', null, true);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
for ($i = 0; $i < sizeof($this->attributes['pykotaPayments']); $i++) {
|
||||
$parts = explode(' # ', $this->attributes['pykotaPayments'][$i]);
|
||||
$comment = ' ';
|
||||
if (!empty($parts[2])) {
|
||||
$comment = base64_decode($parts[2]);
|
||||
}
|
||||
$history[] = '<block><tr>' .
|
||||
'<td width="20%" align=\"L\">' . $parts[0] . '</td>' .
|
||||
'<td width="10%" align=\"R\">' . $parts[1] . '</td>' .
|
||||
'<td width="70%" align=\"L\">' . $comment . '</td></tr></block>';
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($parts[0], '20%');
|
||||
$pdfRow->cells[] = new PDFTableCell($parts[1], '10%', PDFTableCell::ALIGN_RIGHT);
|
||||
$pdfRow->cells[] = new PDFTableCell($comment, '70%');
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
$return[get_class($this) . '_pykotaPayments'] = $history;
|
||||
$this->addPDFTable($return, 'pykotaPayments', $pdfTable);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
|
|
@ -617,7 +617,7 @@ class quota extends baseModule {
|
|||
$this->initQuotas();
|
||||
if (!isset($this->quota) || !is_array($this->quota)) return array();
|
||||
if (sizeof($this->quota) > 0) {
|
||||
$quotas = array();
|
||||
$pdfTable = new PDFTable();
|
||||
// get list of lamdaemon servers
|
||||
$lamdaemonServers = explode(";", $_SESSION['config']->get_scriptServers());
|
||||
for ($s = 0; $s < sizeof($lamdaemonServers); $s++) {
|
||||
|
@ -626,27 +626,32 @@ class quota extends baseModule {
|
|||
$description = $server;
|
||||
if (isset($temp[1])) $description = $temp[1] . " (" . $server . ")";
|
||||
if (!isset($this->quota[$server]) || (sizeof($this->quota[$server]) < 1)) continue;
|
||||
|
||||
$quotas[] = '<block><tr>' .
|
||||
'<td width="80%"><b>' . $description . '</b></td>' .
|
||||
'</tr></block>';
|
||||
$quotas[] = '<block><tr>' .
|
||||
'<td width="20%"><b>' . _('Mountpoint') . '</b></td>' .
|
||||
'<td width="20%"><b>' . _('Soft block') . '</b></td>' .
|
||||
'<td width="20%"><b>' . _('Hard block') . '</b></td>' .
|
||||
'<td width="20%"><b>' . _('Soft inode') . '</b></td>' .
|
||||
'<td width="20%"><b>' . _('Hard inode') . '</b></td></tr></block>';
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($description, null, null, true);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Mountpoint'), '28%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Soft block'), '18%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Hard block'), '18%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Soft inode'), '18%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Hard inode'), '18%', null, true);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
for ($i = 0; $i < sizeof($this->quota[$server]); $i++) {
|
||||
$quotas[] = '<block><tr>' .
|
||||
'<td width="20%" align=\"L\">' . $this->quota[$server][$i][0] . '</td>' .
|
||||
'<td width="20%" align=\"L\">' . $this->quota[$server][$i][2] . '</td>' .
|
||||
'<td width="20%" align=\"L\">' . $this->quota[$server][$i][3] . '</td>' .
|
||||
'<td width="20%" align=\"L\">' . $this->quota[$server][$i][6] . '</td>' .
|
||||
'<td width="20%" align=\"L\">' . $this->quota[$server][$i][7] . '</td></tr></block>';
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($this->quota[$server][$i][0], '28%');
|
||||
$pdfRow->cells[] = new PDFTableCell($this->quota[$server][$i][2], '18%');
|
||||
$pdfRow->cells[] = new PDFTableCell($this->quota[$server][$i][3], '18%');
|
||||
$pdfRow->cells[] = new PDFTableCell($this->quota[$server][$i][6], '18%');
|
||||
$pdfRow->cells[] = new PDFTableCell($this->quota[$server][$i][7], '18%');
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
$quotas[] = '<block><tr><td width="80%"> </td></tr></block>';
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell(' ');
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
return array('quota_quotas' => $quotas);
|
||||
$return = array();
|
||||
$this->addPDFTable($return, 'quotas', $pdfTable);
|
||||
return $return;
|
||||
}
|
||||
else {
|
||||
return array();
|
||||
|
|
|
@ -769,14 +769,42 @@ class range extends baseModule {
|
|||
function get_pdfEntries($pdfKeys) {
|
||||
$return = array();
|
||||
if (is_array($this->ranges) && (sizeof($this->ranges) > 0)) {
|
||||
$start = $this->ranges[0]['range_start'];
|
||||
$end = $this->ranges[0]['range_end'];
|
||||
$return[get_class($this) . '_ranges'] = array('<block><key>' . _('Ranges') . '</key><tr><td align=\"L\">' . $start . " - " . $end . '</td></tr></block>');
|
||||
for ($i = 1; $i < sizeof($this->ranges); $i++) {
|
||||
$pdfTable = new PDFTable(_('Ranges'));
|
||||
for ($i = 0; $i < sizeof($this->ranges); $i++) {
|
||||
$start = $this->ranges[$i]['range_start'];
|
||||
$end = $this->ranges[$i]['range_end'];
|
||||
$return[get_class($this) . '_ranges'][] = '<block><tr><td align=\"L\">' . $start . " - " . $end . '</td></tr></block>';
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($start . " - " . $end);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
|
||||
|
||||
if (!empty($this->poolsNew)) {
|
||||
foreach ($this->poolsNew as $index => $poolAttrs) {
|
||||
$cn = !empty($poolAttrs['cn'][0]) ? $poolAttrs['cn'][0] : '';
|
||||
$peer = '';
|
||||
if (!empty($poolAttrs['dhcpstatements'])) {
|
||||
foreach ($poolAttrs['dhcpstatements'] as $statement) {
|
||||
if (strpos($statement, 'failover peer "') === 0) {
|
||||
$peer = ' (' . substr($statement, strlen('failover peer "'), -1) . ')';
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!empty($poolAttrs['dhcprange'])) {
|
||||
foreach ($poolAttrs['dhcprange'] as $rIndex => $range) {
|
||||
$range = explode(' ', $range);
|
||||
$from = !empty($range[0]) ? $range[0] : '';
|
||||
$to = !empty($range[1]) ? $range[1] : '';
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($cn . $peer . ': ' . $from . " - " . $to);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$this->addPDFTable($return, 'ranges', $pdfTable);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
|
|
@ -381,22 +381,25 @@ class systemQuotas extends baseModule {
|
|||
public function get_pdfEntries($pdfKeys) {
|
||||
$return = array();
|
||||
if (isset($this->attributes['quota'][0])) {
|
||||
$quotas[] = '<block><tr>' .
|
||||
'<td width="20%"><b>' . _('Mountpoint') . '</b></td>' .
|
||||
'<td width="20%"><b>' . _('Soft block') . '</b></td>' .
|
||||
'<td width="20%"><b>' . _('Hard block') . '</b></td>' .
|
||||
'<td width="20%"><b>' . _('Soft inode') . '</b></td>' .
|
||||
'<td width="20%"><b>' . _('Hard inode') . '</b></td></tr></block>';
|
||||
$pdfTable = new PDFTable();
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Mountpoint'), '28%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Soft block'), '18%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Hard block'), '18%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Soft inode'), '18%', null, true);
|
||||
$pdfRow->cells[] = new PDFTableCell(_('Hard inode'), '18%', null, true);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
for ($i = 0; $i < sizeof($this->attributes['quota']); $i++) {
|
||||
$parts = explode(',', $this->attributes['quota'][$i]);
|
||||
$quotas[] = '<block><tr>' .
|
||||
'<td width="20%" align=\"L\">' . $parts[0] . '</td>' .
|
||||
'<td width="20%" align=\"L\">' . $parts[1] . '</td>' .
|
||||
'<td width="20%" align=\"L\">' . $parts[2] . '</td>' .
|
||||
'<td width="20%" align=\"L\">' . $parts[3] . '</td>' .
|
||||
'<td width="20%" align=\"L\">' . $parts[4] . '</td></tr></block>';
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($parts[0], '28%');
|
||||
$pdfRow->cells[] = new PDFTableCell($parts[1], '18%');
|
||||
$pdfRow->cells[] = new PDFTableCell($parts[2], '18%');
|
||||
$pdfRow->cells[] = new PDFTableCell($parts[3], '18%');
|
||||
$pdfRow->cells[] = new PDFTableCell($parts[4], '18%');
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
$return['systemQuotas_quota'] = $quotas;
|
||||
$this->addPDFTable($return, 'quota', $pdfTable);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
|
|
@ -914,10 +914,13 @@ class windowsGroup extends baseModule {
|
|||
$memberList = $this->attributes['member'];
|
||||
}
|
||||
usort($memberList, 'compareDN');
|
||||
$return[get_class($this) . '_member'][0] = '<block><key>' . _('Members') . '</key><tr><td align=\"L\">' . $memberList[0] . '</td></tr></block>';
|
||||
for ($i = 1; $i < sizeof($memberList); $i++) {
|
||||
$return[get_class($this) . '_member'][] = '<block><tr><td align=\"L\">' . $memberList[$i] . '</td></tr></block>';
|
||||
$pdfTable = new PDFTable(_('Members'));
|
||||
for ($i = 0; $i < sizeof($memberList); $i++) {
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($memberList[$i]);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
$this->addPDFTable($return, 'member', $pdfTable);
|
||||
}
|
||||
// member of
|
||||
if (!empty($this->attributes['memberOf'])) {
|
||||
|
@ -926,10 +929,13 @@ class windowsGroup extends baseModule {
|
|||
$memberOfList = $this->attributes['memberOf'];
|
||||
}
|
||||
usort($memberOfList, 'compareDN');
|
||||
$return[get_class($this) . '_memberOf'][0] = '<block><key>' . _('Member of') . '</key><tr><td align=\"L\">' . $memberOfList[0] . '</td></tr></block>';
|
||||
for ($i = 1; $i < sizeof($memberOfList); $i++) {
|
||||
$return[get_class($this) . '_memberOf'][] = '<block><tr><td align=\"L\">' . $memberOfList[$i] . '</td></tr></block>';
|
||||
$pdfTable = new PDFTable(_('Member of'));
|
||||
for ($i = 0; $i < sizeof($memberOfList); $i++) {
|
||||
$pdfRow = new PDFTableRow();
|
||||
$pdfRow->cells[] = new PDFTableCell($memberOfList[$i]);
|
||||
$pdfTable->rows[] = $pdfRow;
|
||||
}
|
||||
$this->addPDFTable($return, 'memberOf', $pdfTable);
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue