delete_user.php
changeset 2 9a485c41cfcf
parent 1 58094faf794d
child 3 64525a2eb098
equal deleted inserted replaced
1:58094faf794d 2:9a485c41cfcf
    49 		
    49 		
    50                 delete_user($id);
    50                 delete_user($id);
    51                 clean_page($BASE_URL . $BASE_PATH . "users.php");
    51                 clean_page($BASE_URL . $BASE_PATH . "users.php");
    52         }
    52         }
    53         include_once("inc/header.inc.php");
    53         include_once("inc/header.inc.php");
    54         ?><H2>Delete user "<?= get_fullname_from_userid($id) ?>"</H2>
    54         ?><H2><? echo _('Delete user'); ?> "<?= get_fullname_from_userid($id) ?>"</H2>
    55         <FORM METHOD="post">
    55         <FORM METHOD="post">
    56         <?
    56         <?
    57         $domains = get_domains_from_userid($id);
    57         $domains = get_domains_from_userid($id);
    58         if (count($domains) > 0) 
    58         if (count($domains) > 0) 
    59         {
    59         {
    60         	?>This user has access to the following domain(s):<BR><?
    60         	echo _('This user has access to the following domain(s)'); ?> :<BR><?
    61                 $users = show_users($id);
    61                 $users = show_users($id);
    62                 if(count($users) < 1) 
    62                 if(count($users) < 1) 
    63                 {
    63                 {
    64                         $add = " CHECKED DISABLED";
    64                         $add = " CHECKED DISABLED";
    65                         $no_users = 1;
    65                         $no_users = 1;
    88                         ?></TR><?
    88                         ?></TR><?
    89                 }
    89                 }
    90                 ?></TABLE><?
    90                 ?></TABLE><?
    91         }
    91         }
    92         
    92         
    93         $message = "You are going to delete this user, are you sure?";
    93         $message = _('You are going to delete this user, are you sure?');
    94         if(($numrows = $db->getOne("select count(id) from zones where owner=$id")) != 0)
    94         if(($numrows = $db->getOne("select count(id) from zones where owner=$id")) != 0)
    95         {
    95         {
    96         	$message .= " This user has access to $numrows domain(s), by deleting him you will also delete these domains";
    96         	$message .= " " . _('This user has access to $numrows domain(s), by deleting him you will also delete these domains');
    97         }
    97         }
    98 
    98 
    99         ?>
    99         ?>
   100         <BR><FONT CLASS="warning"><?= $message ?></FONT><BR><BR>
   100         <BR><FONT CLASS="warning"><?= $message ?></FONT><BR><BR>
   101         <INPUT TYPE="hidden" NAME="id" VALUE="<?=$id ?>">
   101         <INPUT TYPE="hidden" NAME="id" VALUE="<?=$id ?>">
   102         <INPUT TYPE="hidden" NAME="confirm" VALUE="1">
   102         <INPUT TYPE="hidden" NAME="confirm" VALUE="1">
   103         <INPUT TYPE="submit" CLASS="button" VALUE="Yes"> <INPUT TYPE="button" CLASS="button" OnClick="location.href='users.php'" VALUE="No"></FORM>
   103         <INPUT TYPE="submit" CLASS="button" VALUE="<? echo _('Yes'); ?>"> <INPUT TYPE="button" CLASS="button" OnClick="location.href='users.php'" VALUE="<? echo _('No'); ?>"></FORM>
   104         <?
   104         <?
   105         include_once("inc/footer.inc.php");
   105         include_once("inc/footer.inc.php");
   106 } 
   106 } 
   107 else 
   107 else 
   108 {
   108 {