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_range.php

    r132 r148  
    150150        function output() { 
    151151                if ($_SERVER['REQUEST_METHOD'] == 'POST' && method_exists($this, 'output_onpost_'.$_POST['form_name'])) return call_user_func(array($this, 'output_onpost_'.$_POST['form_name'])); 
    152                 global $construct; 
     152                global $construct,$db,$main; 
     153                if(get('action') === "delete") 
     154                { 
     155                        $ret = $db->del("ip_ranges", "id = '".get('iprange')."'"); 
     156                        if ($ret) { 
     157                                $main->message->set_fromlang('info', 'delete_success', makelink(array("page" => "hostmaster", "subpage" => "ranges"))); 
     158                        } else { 
     159                                $main->message->set_fromlang('error', 'generic');                
     160                        } 
     161                        return ; 
     162                } 
    153163                $this->tpl['form_range'] = $construct->form($this->form_range(), __FILE__); 
    154164                $this->tpl['table_node_info'] = $construct->table($this->table_node_info(), __FILE__); 
     
    156166                $this->tpl['table_links'] = $construct->table($this->table_links(), __FILE__); 
    157167                $this->tpl['table_ip_ranges'] = $construct->table($this->table_ip_ranges(), __FILE__); 
     168                $this->tpl['link_range_delete'] = makelink (array("action" => "delete"),TRUE); 
    158169                return template($this->tpl, __FILE__); 
    159170        } 
Note: See TracChangeset for help on using the changeset viewer.