From 9890c959374135fb3d5fd65be94faa9548fc4722 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 29 Dec 2008 17:22:06 +0000 Subject: [PATCH] added PDF support --- lam/lib/modules/dhcp_settings.inc | 49 ++++++++++++++++++++++++++----- 1 file changed, 42 insertions(+), 7 deletions(-) diff --git a/lam/lib/modules/dhcp_settings.inc b/lam/lib/modules/dhcp_settings.inc index 00441761..a3f01492 100644 --- a/lam/lib/modules/dhcp_settings.inc +++ b/lam/lib/modules/dhcp_settings.inc @@ -4,6 +4,7 @@ $Id$ This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam) Copyright (C) 2008 Thomas Manninger + 2008 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 @@ -27,12 +28,7 @@ $Id$ * @package modules * * @author Thomas Manninger -*/ - -/** -* Manages DHCP entries. -* -* @package modules +* @author Roland Gruber */ /** @@ -68,6 +64,11 @@ if (!function_exists('check_ip')) { } } +/** +* Manages DHCP entries. +* +* @package modules +*/ class dhcp_settings extends baseModule { // Netbios node type: @@ -168,6 +169,19 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I "Headline" => _("Net mask"), "Text" => _("The net mask is derived from the subnet mask. If you leave this field empty then LAM will calculate it for you.") ) ); + // available PDF fields + $return['PDF_fields'] = array( + 'subnet', + 'domainName', + 'leaseTime', + 'maxLeaseTime', + 'DNSserver', + 'gateway', + 'netbiosServer', + 'netbiosType', + 'subnetMask', + 'netMask' + ); return $return; } @@ -857,5 +871,26 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I $this->attributes['dhcpNetMask'][0] = $num; } } + + /** + * Returns the PDF entries for this module. + * + * @return array list of possible PDF entries + */ + function get_pdfEntries() { + return array( + get_class($this) . '_subnet' => array('' . _('Subnet') . '' . $this->attributes['cn'][0] . ''), + get_class($this) . '_domainName' => array('' . _('Domain name') . '' . $this->dhcpSettings['domainname'] . ''), + get_class($this) . '_leaseTime' => array('' . _('Lease time') . '' . $this->dhcpStatements['lease_time'] . ''), + get_class($this) . '_maxLeaseTime' => array('' . _('Maximum lease time') . '' . $this->dhcpStatements['max_lease_time'] . ''), + get_class($this) . '_DNSserver' => array('' . _('DNS') . '' . $this->dhcpSettings['dns'] . ''), + get_class($this) . '_gateway' => array('' . _('Default gateway') . '' . $this->dhcpSettings['routers'] . ''), + get_class($this) . '_netbiosServer' => array('' . _('Netbios name server') . '' . $this->dhcpSettings['netbios'] . ''), + get_class($this) . '_netbiosType' => array('' . _('Netbios node type') . '' . $this->netbios_node_type . ''), + get_class($this) . '_subnetMask' => array('' . _('Subnet mask') . '' . $this->subnet . ''), + get_class($this) . '_netMask' => array('' . _('Net mask') . '' . $this->attributes['dhcpNetMask'][0] . ''), + ); + } + } -?> \ No newline at end of file +?>