diff --git a/lam/lib/modules/fixed_ip.inc b/lam/lib/modules/fixed_ip.inc
index 5773fca1..c7e05203 100644
--- a/lam/lib/modules/fixed_ip.inc
+++ b/lam/lib/modules/fixed_ip.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
@@ -28,6 +29,7 @@ $Id$
* @package modules
*
* @author Thomas Manninger
+* @author Roland Gruber
*/
/**
@@ -90,8 +92,7 @@ class fixed_ip extends baseModule {
"Text" => _("Adds input fields for a new fixed IP address.")
) );
// available PDF fields
- $return['PDF_fields'] = array();
-
+ $return['PDF_fields'] = array('IPlist');
return $return;
}
@@ -176,7 +177,7 @@ class fixed_ip extends baseModule {
$ex_subnet = explode(".", $_SESSION['account']->getAccountModule('dhcp_settings')->attributes['cn'][0]);
$ip_edit = false; // Range were edit?
foreach ($this->fixed_ip AS $id=>$arr) {
- if (!empty($this->fixed_ip[$id]['ip']) && !$_SESSION['account']->getAccountModule('range')->check_subnet_range($this->fixed_ip[$id]['ip'],$_SESSION['account']->getAccountModule('dhcp_settings')->$this->attributes['cn'][0])) {
+ if (!empty($this->fixed_ip[$id]['ip']) && !$_SESSION['account']->getAccountModule('range')->check_subnet_range($this->fixed_ip[$id]['ip'],$_SESSION['account']->getAccountModule('dhcp_settings')->attributes['cn'][0])) {
// Range anpassen:
$ex = explode(".", $this->fixed_ip[$id]['ip']);
$tmp = $this->fixed_ip[$id]['ip'];
@@ -498,5 +499,26 @@ class fixed_ip extends baseModule {
}
}
}
+
+ /**
+ * Returns the PDF entries for this module.
+ *
+ * @return array list of possible PDF entries
+ */
+ function get_pdfEntries() {
+ $return = array();
+ if (is_array($this->fixed_ip) && (sizeof($this->fixed_ip) > 0)) {
+ $return[get_class($this) . '_IPlist'] = array('' . _('PC name') . " | " . _('IP address') . " | " . _('MAC address') . ' |
');
+ for ($i = 0; $i < sizeof($this->fixed_ip); $i++) {
+ $name = $this->fixed_ip[$i]['cn'];
+ $mac = $this->fixed_ip[$i]['mac'];
+ $ip = $this->fixed_ip[$i]['ip'];
+ $return[get_class($this) . '_IPlist'][] = '' . $name . " | " . $ip . " | " . $mac . ' |
';
+ }
+ }
+ return $return;
+ }
+
}
-?>
\ No newline at end of file
+
+?>