Ignore:
Timestamp:
02/27/2006 06:39:19 AM (6 years ago)
Author:
cirrus
Message:

Add: Delete buttons for nameserver view, range view, dnszone view and user.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/pages/hostmaster/hostmaster_dnszone.php

    r137 r148  
    175175        function output() { 
    176176                if ($_SERVER['REQUEST_METHOD'] == 'POST' && method_exists($this, 'output_onpost_'.$_POST['form_name'])) return call_user_func(array($this, 'output_onpost_'.$_POST['form_name'])); 
    177                 global $construct, $db; 
     177                global $construct, $db, $main; 
     178                if(get('action') === "delete") 
     179                { 
     180                        $ret = $db->del("dns_zones", "id = '".get('zone')."'"); 
     181                        if ($ret) { 
     182                                $main->message->set_fromlang('info', 'delete_success', makelink(array("page" => "hostmaster", "subpage" => "dnszones"))); 
     183                        } else { 
     184                                $main->message->set_fromlang('error', 'generic');                
     185                        } 
     186                        return ; 
     187                } 
    178188                $this->tpl['form_zone'] = $construct->form($this->form_zone(), __FILE__); 
    179189                $this->tpl['table_node_info'] = $construct->table($this->table_node_info(), __FILE__); 
     
    182192                $this->tpl['table_ip_ranges'] = $construct->table($this->table_ip_ranges(), __FILE__); 
    183193                $this->tpl['table_dns'] = $construct->table($this->table_dns(), __FILE__); 
     194                $this->tpl['link_dnszone_delete'] = makelink (array("action" => "delete"),TRUE); 
    184195                return template($this->tpl, __FILE__); 
    185196        } 
Note: See TracChangeset for help on using the changeset viewer.