1 <?php
3 class ldifViewer extends plugin
4 {
5 private $ldif;
7 function __construct($config, $dn)
8 {
9 $this->config = &$config;
10 $this->dn = $dn;
11 $ldap = $this->config->get_ldap_link();
12 $this->ldif=$ldap->generateLdif(LDAP::fix($this->dn),'(objectClass=*)',array(),'base');
13 }
15 function execute()
16 {
17 $smarty = get_smarty();
18 $smarty->assign('ldif', set_post($this->ldif));
19 return($smarty->fetch(get_template_path('ldifViewer.tpl')));
20 }
21 }
23 ?>