new){
$this->dhcpDnsZoneServer= $attrs['dhcpDnsZoneServer'][0];
$this->dhcpKeyDN= base64_encode($attrs['dhcpKeyDN'][0]);
}
// Prepare LDAP link
$ldap= $config->get_ldap_link();
$ldap->cd($config->current['BASE']);
/* Search for all objects, recursive, that match the given ldap filter.
each dyndns zoen have to depent of an alreday DNS Zone created so we search it
*/
// Search for domain
$ldap->search("(&(objectClass=dNSZone)(relativeDomainName=@))",array("zoneName"));
while($attrs = $ldap->fetch()){
$this->drop_down_domain[$attrs["zoneName"][0]]= $attrs["zoneName"][0];
}
$ldap->search("(&(objectClass=dNSZone)(relativeDomainName=@))",array("nSRecord"));
while($attrs = $ldap->fetch()){
$this->drop_down_nameserver[$attrs["nSRecord"][0]]=$attrs["nSRecord"][0];
}
$ldap->search("(objectClass=dhcpTSigKey)",array("dn","cn"));
if ($ldap->count() != 0){
while($attrs = $ldap->fetch()){
$this->drop_down_tsigkey[base64_encode($attrs["dn"])]=$attrs["cn"][0];
}
}
}
function execute()
{
$smarty= get_smarty();
$smarty->assign("cn", set_post($this->cn));
$smarty->assign("cns", set_post($this->drop_down_domain));
$smarty->assign("dhcpDnsZoneServer", set_post($this->dhcpDnsZoneServer));
$smarty->assign("dhcpDnsZoneServers", set_post($this->drop_down_nameserver));
$smarty->assign("dhcpKeyDN", set_post($this->dhcpKeyDN));
$smarty->assign("dhcpKeyDNs", set_post($this->drop_down_tsigkey));
/* Assign ACLs */
$smarty->assign("acl",$this->parent->getacl(""));
/* Show main page */
$display= $smarty->fetch(get_template_path('dhcp_dnszone.tpl', TRUE,dirname(__FILE__)));
/* Add footer */
$display.= "