index da5a12a289d495b0d930351b724dac0f9539b8fa..e7dae441a4c59574777d5c5b71015b61a7151a70 100644 (file)
var $dhcp_server_list = array("ENTRIES"=> array(),"FOR_LIST"=> array());
var $take_over_id = -1;
+ var $display_warning = TRUE;
function servdhcp ($config, $dn= NULL, $parent= NULL)
{
}
- function get_dhcp_info_string($id)
- {
- $ret = "";
- $ldap = $this->config->get_ldap_link();
- $ldap->cd("cn=dhcp,".$this->dhcp_server_list['ENTRIES'][$id]['dn']);
- $ldap->search("(|(objectClass=dhcpSharedNetwork)(objectClass=dhcpSubnet)(objectClass=dhcpPool)(objectClass=dhcpGroup)(objectClass=dhcpHost))",array("dn","cn"));
- $ldap->search("(objectClass=*)",array("dn","cn"));
- while($attrs = $ldap->fetch()){
- $ret .= $attrs['dn']."\n";
- }
- return($ret);
- }
-
-
function execute()
{
/* Call parent execute */
if($this->take_over_id != -1){
$this->dialog = FALSE;
$id = $this->take_over_id;
- $info = $this->get_dhcp_info_string($id);
$smarty->assign("dns_take_over",TRUE);
- $smarty->assign("info",$info);
- $warning = sprintf(_("You are going to migrate the DHCP setup from server '%s'."),$this->dhcp_server_list['ENTRIES'][$id]['cn'][0]);
- $warning2 = _("The migration will be startet when you save this system. To cancel this action, use the cancel button below.");
- $smarty->assign("warning",$warning);
- $smarty->assign("warning2",$warning2);
+
+ $warning = sprintf(_("You are going to migrate the DHCP setup from server '%s'."),$this->dhcp_server_list['ENTRIES'][$id]['cn'][0]);
+ $warning.= _("The migration will be startet when you save this system. To cancel this action, use the cancel button below.");
+
+ if($this->display_warning){
+ print_red($warning);
+ $this->display_warning = FALSE;
+ }
return($smarty->fetch(get_template_path('servdhcp.tpl', TRUE)));
}