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