1 <?php 2 include('./inc/_prepend.php'); 3 include('./inc/panel_filter.php'); 4 5 if($oma->authenticated_user->a_admin_domains > 0) { 6 if(isset($_POST['frm']) && $_POST['frm'] == 'domains') { 7 if(!isset($_POST['action'])) { 8 error(txt('112')); 9 } else if($_POST['action'] != 'new' 10 && !(isset($_POST['dom']) && count($_POST['dom']) > 0) ) { 11 error(txt('11')); 12 } else { 13 switch($_POST['action']) { 14 case 'new': 15 $oma->domain_add($_POST['domain'], $_POST); 16 break; 17 case 'delete': 18 $oma->domain_remove($_POST['dom']); 19 break; 20 case 'change': 21 $oma->domain_change($_POST['dom'], $_POST['change'], $_POST); 22 break; 23 } 24 25 if($ErrorHandler->errors_occured()) { 26 error($ErrorHandler->errors_get()); 27 } 28 if($ErrorHandler->info_occured()) { 29 info($ErrorHandler->info_get()); 30 } 31 } 32 } 33 } 34 35 // DATA 36 $domains = $oma->get_domains(); 37 38 // DISPLAY 39 include('./templates/'.$cfg['theme'].'/domains/list.tpl'); 40 41 if($oma->authenticated_user->a_admin_domains > 0) { 42 // ADMIN PANEL 43 include('./templates/'.$cfg['theme'].'/domains/admin.tpl'); 44 } 45 46 include('./inc/_append.php'); 47 ?>