From 8a4bb431a7e239bd0173a3923a84000eb326bdb9 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Wed, 7 Jan 2015 17:16:35 +0000 Subject: [PATCH] added $pdfKeys to get_pdfEntries --- lam/lib/baseModule.inc | 5 +++-- lam/lib/modules.inc | 9 +++++---- lam/lib/modules/account.inc | 5 +++-- lam/lib/modules/asteriskAccount.inc | 11 +++++++---- lam/lib/modules/asteriskExtension.inc | 11 +++++++---- lam/lib/modules/asteriskVoicemail.inc | 9 ++++++--- lam/lib/modules/authorizedServiceObject.inc | 13 +++++++------ lam/lib/modules/ddns.inc | 13 +++++++------ lam/lib/modules/dhcp_settings.inc | 13 +++++++------ lam/lib/modules/eduPerson.inc | 13 +++++++------ lam/lib/modules/fixed_ip.inc | 13 +++++++------ lam/lib/modules/freeRadius.inc | 13 +++++++------ lam/lib/modules/hostObject.inc | 13 +++++++------ lam/lib/modules/ieee802device.inc | 13 +++++++------ lam/lib/modules/inetLocalMailRecipient.inc | 13 +++++++------ lam/lib/modules/inetOrgPerson.inc | 13 +++++++------ lam/lib/modules/kolabGroup.inc | 11 +++++++---- lam/lib/modules/kolabSharedFolder.inc | 11 +++++++---- lam/lib/modules/kolabUser.inc | 13 +++++++------ lam/lib/modules/ldapPublicKey.inc | 11 +++++++---- lam/lib/modules/nisMailAlias.inc | 13 +++++++------ lam/lib/modules/nisMailAliasUser.inc | 13 +++++++------ lam/lib/modules/nisnetgroup.inc | 11 +++++++---- lam/lib/modules/posixAccount.inc | 13 +++++++------ lam/lib/modules/posixGroup.inc | 14 ++++++++------ lam/lib/modules/puppetClient.inc | 13 +++++++------ lam/lib/modules/pykotaBillingCode.inc | 11 +++++++---- lam/lib/modules/pykotaGroup.inc | 11 +++++++---- lam/lib/modules/pykotaPrinter.inc | 11 +++++++---- lam/lib/modules/pykotaUser.inc | 11 +++++++---- lam/lib/modules/quota.inc | 13 +++++++------ lam/lib/modules/range.inc | 13 +++++++------ lam/lib/modules/sambaDomain.inc | 13 +++++++------ lam/lib/modules/sambaGroupMapping.inc | 13 +++++++------ lam/lib/modules/sambaSamAccount.inc | 13 +++++++------ lam/lib/modules/shadowAccount.inc | 13 +++++++------ lam/lib/modules/systemQuotas.inc | 11 +++++++---- lam/lib/modules/windowsGroup.inc | 11 +++++++---- lam/lib/modules/windowsHost.inc | 11 +++++++---- lam/lib/modules/windowsUser.inc | 11 +++++++---- lam/lib/pdf.inc | 19 +++++++++++++++++-- 41 files changed, 287 insertions(+), 201 deletions(-) diff --git a/lam/lib/baseModule.inc b/lam/lib/baseModule.inc index e797acde..f542e1c5 100644 --- a/lam/lib/baseModule.inc +++ b/lam/lib/baseModule.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2003 - 2014 Roland Gruber + Copyright (C) 2003 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -807,9 +807,10 @@ abstract class baseModule { /** * Returns the PDF entries for this module. * + * @param array $pdfKeys list of PDF keys that are included in document * @return array list of possible PDF entries */ - public function get_pdfEntries() { + public function get_pdfEntries($pdfKeys) { return array(); } diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 354be269..f6795dcd 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2003 - 2014 Roland Gruber + Copyright (C) 2003 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1951,12 +1951,13 @@ class accountContainer { /** * Returns a list of possible PDF entries for this account. * - * @return list of PDF entries (array( => )) + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) */ - function get_pdfEntries() { + function get_pdfEntries($pdfKeys) { $return = array(); while(($current = current($this->module)) != null) { - $return = array_merge($return,$current->get_pdfEntries()); + $return = array_merge($return,$current->get_pdfEntries($pdfKeys)); next($this->module); } $dn = $this->dn_orig; diff --git a/lam/lib/modules/account.inc b/lam/lib/modules/account.inc index 8284b858..11ce5e82 100644 --- a/lam/lib/modules/account.inc +++ b/lam/lib/modules/account.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Tilo Lutz - 2005 - 2014 Roland Gruber + 2005 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -222,9 +222,10 @@ class account extends baseModule { /** * Returns the PDF entries for this module. * + * @param array $pdfKeys list of PDF keys that are included in document * @return array list of possible PDF entries */ - function get_pdfEntries() { + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'description', _('Description')); $this->addSimplePDFField($return, 'uid', _('User name')); diff --git a/lam/lib/modules/asteriskAccount.inc b/lam/lib/modules/asteriskAccount.inc index 68c0f866..570620af 100644 --- a/lam/lib/modules/asteriskAccount.inc +++ b/lam/lib/modules/asteriskAccount.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam) Copyright (C) 2009 - 2012 Pavel Pozdnyak - 2009 - 2014 Roland Gruber + 2009 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -975,9 +975,12 @@ class asteriskAccount extends baseModule implements passwordService { } /** - * Returns a list of PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'AstAccountCallerID', _('Caller ID')); $this->addSimplePDFField($return, 'AstAccountContext', _('Account context')); diff --git a/lam/lib/modules/asteriskExtension.inc b/lam/lib/modules/asteriskExtension.inc index 8196e925..aa83f6cd 100644 --- a/lam/lib/modules/asteriskExtension.inc +++ b/lam/lib/modules/asteriskExtension.inc @@ -794,10 +794,13 @@ class asteriskExtension extends baseModule { return $suggeted_extension; } - /** - * Returns a list of PDF entries - */ - function get_pdfEntries() { + /** + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $a = $this->attributes; $o = $this->orig; $return = array(); diff --git a/lam/lib/modules/asteriskVoicemail.inc b/lam/lib/modules/asteriskVoicemail.inc index cfb51f10..34aba12d 100644 --- a/lam/lib/modules/asteriskVoicemail.inc +++ b/lam/lib/modules/asteriskVoicemail.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam) Copyright (C) 2010 Pavel Pozdnyak - 2010 - 2014 Roland Gruber + 2010 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -362,9 +362,12 @@ class asteriskVoicemail extends baseModule implements passwordService { } /** - * Returns a list of PDF entries + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) */ - function get_pdfEntries() { + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'AstVoicemailMailbox', _('Mailbox')); $this->addSimplePDFField($return, 'AstContext', _('Account context')); diff --git a/lam/lib/modules/authorizedServiceObject.inc b/lam/lib/modules/authorizedServiceObject.inc index 10b2a251..eaaa0f62 100644 --- a/lam/lib/modules/authorizedServiceObject.inc +++ b/lam/lib/modules/authorizedServiceObject.inc @@ -4,7 +4,7 @@ $Id$ This code is not yet part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2011 J de Jong - 2012 - 2014 Roland Gruber + 2012 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -233,11 +233,12 @@ class authorizedServiceObject extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); if (in_array('authorizedServiceObject', $this->attributes['objectClass'])) { $this->addSimplePDFField($return, 'authorizedService', _('Authorized Services')); diff --git a/lam/lib/modules/ddns.inc b/lam/lib/modules/ddns.inc index 372023e3..192ab441 100644 --- a/lam/lib/modules/ddns.inc +++ b/lam/lib/modules/ddns.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2008 Thomas Manninger - 2008 - 2014 Roland Gruber + 2008 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -403,11 +403,12 @@ class ddns extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - public function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + public function get_pdfEntries($pdfKeys) { // attributes are taken from DHCP server object $this->attributes = &$this->getAccountContainer()->getAccountModule('dhcp_settings')->attributes; $this->orig = &$this->getAccountContainer()->getAccountModule('dhcp_settings')->orig; diff --git a/lam/lib/modules/dhcp_settings.inc b/lam/lib/modules/dhcp_settings.inc index f65ffbce..ac3cfe89 100644 --- a/lam/lib/modules/dhcp_settings.inc +++ b/lam/lib/modules/dhcp_settings.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2008 Thomas Manninger - 2008 - 2014 Roland Gruber + 2008 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -655,11 +655,12 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $nodeType = $this->getDHCPOption('netbios-node-type'); $nodeTypeValue = ''; if (isset($this->all_netbios_node_types[$nodeType])) { diff --git a/lam/lib/modules/eduPerson.inc b/lam/lib/modules/eduPerson.inc index 120bf3ea..fecf5316 100644 --- a/lam/lib/modules/eduPerson.inc +++ b/lam/lib/modules/eduPerson.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2009 - 2014 Roland Gruber + Copyright (C) 2009 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -572,11 +572,12 @@ class eduPerson extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'primaryAffiliation', _('Primary affiliation'), 'eduPersonPrimaryAffiliation'); $this->addSimplePDFField($return, 'scopedAffiliation', _('Scoped affiliations'), 'eduPersonScopedAffiliation'); diff --git a/lam/lib/modules/fixed_ip.inc b/lam/lib/modules/fixed_ip.inc index dad8ce86..f5837acb 100644 --- a/lam/lib/modules/fixed_ip.inc +++ b/lam/lib/modules/fixed_ip.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2008 Thomas Manninger - 2008 - 2014 Roland Gruber + 2008 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -728,11 +728,12 @@ class fixed_ip extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); if (is_array($this->fixed_ip) && (sizeof($this->fixed_ip) > 0)) { $return[get_class($this) . '_IPlist'] = array( diff --git a/lam/lib/modules/freeRadius.inc b/lam/lib/modules/freeRadius.inc index 47203290..b5e568b0 100644 --- a/lam/lib/modules/freeRadius.inc +++ b/lam/lib/modules/freeRadius.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2011 - 2014 Roland Gruber + Copyright (C) 2011 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -685,11 +685,12 @@ class freeRadius extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'radiusFramedIPAddress', _('IP address')); $this->addSimplePDFField($return, 'radiusFramedIPNetmask', _('Net mask')); diff --git a/lam/lib/modules/hostObject.inc b/lam/lib/modules/hostObject.inc index e6cd87e1..37b0612a 100644 --- a/lam/lib/modules/hostObject.inc +++ b/lam/lib/modules/hostObject.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2011 - 2012 Roland Gruber + Copyright (C) 2011 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -208,11 +208,12 @@ class hostObject extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'hosts', _('Host list'), 'host'); return $return; diff --git a/lam/lib/modules/ieee802device.inc b/lam/lib/modules/ieee802device.inc index 3c6c78e0..72006da5 100644 --- a/lam/lib/modules/ieee802device.inc +++ b/lam/lib/modules/ieee802device.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2004 - 2014 Roland Gruber + Copyright (C) 2004 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -153,11 +153,12 @@ class ieee802device extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'macAddress', _('MAC addresses')); return $return; diff --git a/lam/lib/modules/inetLocalMailRecipient.inc b/lam/lib/modules/inetLocalMailRecipient.inc index 6a9f1af3..330eb21a 100644 --- a/lam/lib/modules/inetLocalMailRecipient.inc +++ b/lam/lib/modules/inetLocalMailRecipient.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2004 - 2014 Roland Gruber + Copyright (C) 2004 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -283,11 +283,12 @@ class inetLocalMailRecipient extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'routingAdr', _('Routing address'), 'mailRoutingAddress'); $this->addSimplePDFField($return, 'localAdr', _('Local address list'), 'mailLocalAddress'); diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index 10e0f2e9..f158d240 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Tilo Lutz - 2005 - 2014 Roland Gruber + 2005 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1916,11 +1916,12 @@ class inetOrgPerson extends baseModule implements passwordService { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'description', _('Description')); $this->addSimplePDFField($return, 'title', _('Job title')); diff --git a/lam/lib/modules/kolabGroup.inc b/lam/lib/modules/kolabGroup.inc index 957e15da..0dbd3c3e 100644 --- a/lam/lib/modules/kolabGroup.inc +++ b/lam/lib/modules/kolabGroup.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2013 Roland Gruber + Copyright (C) 2013 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -416,9 +416,12 @@ class kolabGroup extends baseModule { } /** - * Returns a list of PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'mail', _('Email address')); $this->addSimplePDFField($return, 'kolabAllowSMTPRecipient', _('Allowed recipients')); diff --git a/lam/lib/modules/kolabSharedFolder.inc b/lam/lib/modules/kolabSharedFolder.inc index 8d769fea..2b290b16 100644 --- a/lam/lib/modules/kolabSharedFolder.inc +++ b/lam/lib/modules/kolabSharedFolder.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2013 - 2014 Roland Gruber + Copyright (C) 2013 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -550,9 +550,12 @@ class kolabSharedFolder extends baseModule { // TODO folder type } /** - * Returns a list of PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'cn', _('Name')); $this->addSimplePDFField($return, 'mail', _('Email address')); diff --git a/lam/lib/modules/kolabUser.inc b/lam/lib/modules/kolabUser.inc index 81bfa112..f1ad22ff 100644 --- a/lam/lib/modules/kolabUser.inc +++ b/lam/lib/modules/kolabUser.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2004 - 2014 Roland Gruber + Copyright (C) 2004 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -736,11 +736,12 @@ class kolabUser extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'mailHost', _('Mailbox home server')); // invitation policies diff --git a/lam/lib/modules/ldapPublicKey.inc b/lam/lib/modules/ldapPublicKey.inc index f03efc50..9e144145 100644 --- a/lam/lib/modules/ldapPublicKey.inc +++ b/lam/lib/modules/ldapPublicKey.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2005 - 2014 Roland Gruber + Copyright (C) 2005 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -189,9 +189,12 @@ class ldapPublicKey extends baseModule { } /** - * Returns a list of PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); if (sizeof($this->attributes['sshPublicKey']) > 0) { $return['ldapPublicKey_sshPublicKey'][0] = '' . _('SSH public keys') . '' . $this->attributes['sshPublicKey'][0] . ''; diff --git a/lam/lib/modules/nisMailAlias.inc b/lam/lib/modules/nisMailAlias.inc index a1c53719..1b9be906 100644 --- a/lam/lib/modules/nisMailAlias.inc +++ b/lam/lib/modules/nisMailAlias.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2004 - 2014 Roland Gruber + Copyright (C) 2004 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -466,11 +466,12 @@ class nisMailAlias extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'alias', _('Alias name'), 'cn'); $this->addSimplePDFField($return, 'recipients', _('Recipient list'), 'rfc822MailMember'); diff --git a/lam/lib/modules/nisMailAliasUser.inc b/lam/lib/modules/nisMailAliasUser.inc index f00d5ccf..7bd54878 100644 --- a/lam/lib/modules/nisMailAliasUser.inc +++ b/lam/lib/modules/nisMailAliasUser.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2014 Roland Gruber + Copyright (C) 2014 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -512,11 +512,12 @@ class nisMailAliasUser extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $aliases = $this->getMailAliasList(); $foundAliases = array(); diff --git a/lam/lib/modules/nisnetgroup.inc b/lam/lib/modules/nisnetgroup.inc index fad48136..c1baefb5 100644 --- a/lam/lib/modules/nisnetgroup.inc +++ b/lam/lib/modules/nisnetgroup.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2009 - 2014 Roland Gruber + Copyright (C) 2009 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -572,9 +572,12 @@ class nisnetgroup extends baseModule { } /** - * Returns a list of PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'cn', _('Group name')); $this->addSimplePDFField($return, 'description', _('Description')); diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 163ee535..cfd69454 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -4,7 +4,7 @@ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Tilo Lutz - Copyright (C) 2005 - 2014 Roland Gruber + Copyright (C) 2005 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1834,11 +1834,12 @@ class posixAccount extends baseModule implements passwordService { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $uidLabel = _('User name'); if ($this->get_scope() == 'host') { $uidLabel = _('Host name'); diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc index 91767fe4..1ab50698 100644 --- a/lam/lib/modules/posixGroup.inc +++ b/lam/lib/modules/posixGroup.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Tilo Lutz - 2007 - 2014 Roland Gruber + 2007 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -422,6 +422,7 @@ class posixGroup extends baseModule implements passwordService { ); if (!$this->isBooleanConfigOptionSet('posixGroup_hidememberUid')) { $return['PDF_fields']['memberUid'] = _('Group members'); + $return['PDF_fields']['memberUidPrimary'] = _('Group members (incl. primary members)'); } if ($this->manageCnAttribute) { $return['PDF_fields']['cn'] = _('Group name'); @@ -560,11 +561,12 @@ class posixGroup extends baseModule implements passwordService { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'memberUid', _('Group members')); $this->addSimplePDFField($return, 'cn', _('Group name')); diff --git a/lam/lib/modules/puppetClient.inc b/lam/lib/modules/puppetClient.inc index 50a49315..8ac7ff77 100644 --- a/lam/lib/modules/puppetClient.inc +++ b/lam/lib/modules/puppetClient.inc @@ -3,7 +3,7 @@ $Id$ This code is not yet part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2012 - 2014 Roland Gruber + Copyright (C) 2012 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -418,11 +418,12 @@ class puppetClient extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); if (!in_array('puppetClient', $this->attributes['objectClass'])) { return $return; diff --git a/lam/lib/modules/pykotaBillingCode.inc b/lam/lib/modules/pykotaBillingCode.inc index 18735f8c..26c4813d 100644 --- a/lam/lib/modules/pykotaBillingCode.inc +++ b/lam/lib/modules/pykotaBillingCode.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2013 - 2014 Roland Gruber + Copyright (C) 2013 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -253,9 +253,12 @@ class pykotaBillingCode extends baseModule { } /** - * Returns a list of PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->loadCodeCache(); $this->addSimplePDFField($return, 'pykotaBillingCode', _('Billing code')); diff --git a/lam/lib/modules/pykotaGroup.inc b/lam/lib/modules/pykotaGroup.inc index 5ccc5577..744ed6dc 100644 --- a/lam/lib/modules/pykotaGroup.inc +++ b/lam/lib/modules/pykotaGroup.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2013 - 2014 Roland Gruber + Copyright (C) 2013 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -459,9 +459,12 @@ class pykotaGroup extends baseModule { } /** - * Returns a list of PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'cn', _('Common name')); $this->addSimplePDFField($return, 'pykotaGroupName', _('PyKota group name')); diff --git a/lam/lib/modules/pykotaPrinter.inc b/lam/lib/modules/pykotaPrinter.inc index f150834e..cf1233ab 100644 --- a/lam/lib/modules/pykotaPrinter.inc +++ b/lam/lib/modules/pykotaPrinter.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2013 - 2014 Roland Gruber + Copyright (C) 2013 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -576,9 +576,12 @@ class pykotaPrinter extends baseModule { } /** - * Returns a list of PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->loadPrinterNameCache(); $this->addSimplePDFField($return, 'cn', _('Printer name')); diff --git a/lam/lib/modules/pykotaUser.inc b/lam/lib/modules/pykotaUser.inc index fb183c93..c8a3c68e 100644 --- a/lam/lib/modules/pykotaUser.inc +++ b/lam/lib/modules/pykotaUser.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2013 - 2014 Roland Gruber + Copyright (C) 2013 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -881,9 +881,12 @@ class pykotaUser extends baseModule { } /** - * Returns a list of PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'cn', _('Common name')); $this->addSimplePDFField($return, 'uid', _('User name')); diff --git a/lam/lib/modules/quota.inc b/lam/lib/modules/quota.inc index 92d9a644..adaf7b1a 100644 --- a/lam/lib/modules/quota.inc +++ b/lam/lib/modules/quota.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Tilo Lutz - 2007 - 2014 Roland Gruber + 2007 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -608,11 +608,12 @@ class quota extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $this->initQuotas(); if (!isset($this->quota) || !is_array($this->quota)) return array(); if (sizeof($this->quota) > 0) { diff --git a/lam/lib/modules/range.inc b/lam/lib/modules/range.inc index a8f02d2c..fcbbfa66 100644 --- a/lam/lib/modules/range.inc +++ b/lam/lib/modules/range.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2008 Thomas Manninger - 2008 - 2014 Roland Gruber + 2008 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -761,11 +761,12 @@ class range extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); if (is_array($this->ranges) && (sizeof($this->ranges) > 0)) { $start = $this->ranges[0]['range_start']; diff --git a/lam/lib/modules/sambaDomain.inc b/lam/lib/modules/sambaDomain.inc index 3e4a2700..4aa00402 100644 --- a/lam/lib/modules/sambaDomain.inc +++ b/lam/lib/modules/sambaDomain.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2005 - 2014 Roland Gruber + Copyright (C) 2005 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -590,11 +590,12 @@ class sambaDomain extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'domainName', _('Domain name'), 'sambaDomainName'); $this->addSimplePDFField($return, 'domainSID', _('Domain SID'), 'sambaSID'); diff --git a/lam/lib/modules/sambaGroupMapping.inc b/lam/lib/modules/sambaGroupMapping.inc index 7dc11f88..5f707d4a 100644 --- a/lam/lib/modules/sambaGroupMapping.inc +++ b/lam/lib/modules/sambaGroupMapping.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Tilo Lutz - 2007 - 2014 Roland Gruber + 2007 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -529,11 +529,12 @@ class sambaGroupMapping extends baseModule { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'gidNumber', _('GID number')); $this->addSimplePDFField($return, 'sambaSID', _('Windows group')); diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index 0c7b33f7..fba486d9 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Tilo Lutz - 2005 - 2014 Roland Gruber + 2005 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1897,11 +1897,12 @@ class sambaSamAccount extends baseModule implements passwordService { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'displayName', _('Display name')); $this->addSimplePDFField($return, 'sambaHomePath', _('Home path')); diff --git a/lam/lib/modules/shadowAccount.inc b/lam/lib/modules/shadowAccount.inc index ea82db13..a7ffe5fe 100644 --- a/lam/lib/modules/shadowAccount.inc +++ b/lam/lib/modules/shadowAccount.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2006 Tilo Lutz - Copyright (C) 2007 - 2014 Roland Gruber + Copyright (C) 2007 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -482,11 +482,12 @@ class shadowAccount extends baseModule implements passwordService { } /** - * Returns the PDF entries for this module. - * - * @return array list of possible PDF entries - */ - function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + function get_pdfEntries($pdfKeys) { $shadowLastChange = ''; if (isset($this->attributes['shadowLastChange'][0])) { $shadowLastChange = date('d. m. Y',$this->attributes['shadowLastChange'][0]*24*3600); diff --git a/lam/lib/modules/systemQuotas.inc b/lam/lib/modules/systemQuotas.inc index 5c5bd7e9..f33a86fe 100644 --- a/lam/lib/modules/systemQuotas.inc +++ b/lam/lib/modules/systemQuotas.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2011 - 2012 Roland Gruber + Copyright (C) 2011 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -373,9 +373,12 @@ class systemQuotas extends baseModule { } /** - * Returns a list of PDF entries - */ - public function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + public function get_pdfEntries($pdfKeys) { $return = array(); if (isset($this->attributes['quota'][0])) { $quotas[] = '' . diff --git a/lam/lib/modules/windowsGroup.inc b/lam/lib/modules/windowsGroup.inc index 3bd2243e..e63f206e 100644 --- a/lam/lib/modules/windowsGroup.inc +++ b/lam/lib/modules/windowsGroup.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2013 - 2014 Roland Gruber + Copyright (C) 2013 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -738,9 +738,12 @@ class windowsGroup extends baseModule { } /** - * Returns a list of PDF entries - */ - public function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + public function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'cn', _('Group name')); $this->addSimplePDFField($return, 'description', _('Description')); diff --git a/lam/lib/modules/windowsHost.inc b/lam/lib/modules/windowsHost.inc index 28e32fdd..8ade25b6 100644 --- a/lam/lib/modules/windowsHost.inc +++ b/lam/lib/modules/windowsHost.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2013 - 2014 Roland Gruber + Copyright (C) 2013 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -281,9 +281,12 @@ class windowsHost extends baseModule { } /** - * Returns a list of PDF entries - */ - public function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + public function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'cn', _('Host name')); $this->addSimplePDFField($return, 'description', _('Description')); diff --git a/lam/lib/modules/windowsUser.inc b/lam/lib/modules/windowsUser.inc index fbf411c2..ab4ac8ce 100644 --- a/lam/lib/modules/windowsUser.inc +++ b/lam/lib/modules/windowsUser.inc @@ -3,7 +3,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) - Copyright (C) 2013 - 2014 Roland Gruber + Copyright (C) 2013 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1586,9 +1586,12 @@ class windowsUser extends baseModule implements passwordService { } /** - * Returns a list of PDF entries - */ - public function get_pdfEntries() { + * Returns a list of possible PDF entries for this account. + * + * @param array $pdfKeys list of PDF keys that are included in document + * @return list of PDF entries (array( => )) + */ + public function get_pdfEntries($pdfKeys) { $return = array(); $this->addSimplePDFField($return, 'userPrincipalName', _('User name')); $this->addSimplePDFField($return, 'cn', _('Common name')); diff --git a/lam/lib/pdf.inc b/lam/lib/pdf.inc index 72228c35..0594362e 100644 --- a/lam/lib/pdf.inc +++ b/lam/lib/pdf.inc @@ -4,7 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.ldap-account-manager.org/) Copyright (C) 2003 - 2004 Michael Duergner - 2003 - 2013 Roland Gruber + 2003 - 2015 Roland Gruber This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -69,6 +69,21 @@ function createModulePDF($accounts, $pdf_structure="default", $returnAsString = // Get PDF structure from xml file $load = loadPDFStructureDefinitions($account_type,$pdf_structure); $structure = $load['structure']; + // get list of PDF keys + $pdfKeys = array(); + foreach($structure as $entry) { + if ($entry['tag'] == "SECTION" && $entry['type'] == "open") { + $key = $entry['attributes']['NAME']; + // only values with a starting "_" are keys + if (strpos($key, '_') === 0) { + $pdfKeys[] = substr($key, 1); + } + } + if ($entry['tag'] == "ENTRY") { + $pdfKeys[] = $entry['attributes']['NAME']; + } + } + $pdfKeys = array_unique($pdfKeys); // The decimal separator must be a dot in order to write pdf-files setlocale(LC_NUMERIC, "C"); @@ -85,7 +100,7 @@ function createModulePDF($accounts, $pdf_structure="default", $returnAsString = $pdf->AddPage(); // Get PDF entries for the current account - $entries = $account->get_pdfEntries(); + $entries = $account->get_pdfEntries($pdfKeys); // Now create the PDF file acording to the structure with the submitted values foreach($structure as $entry) {