delete_user.php
changeset 13 2ff220cfde13
parent 8 47dd15d8bb8c
child 47 ae140472d97c
--- a/delete_user.php	Sun Apr 22 16:27:45 2007 +0000
+++ b/delete_user.php	Mon Jun 04 18:43:11 2007 +0000
@@ -1,23 +1,4 @@
 <?php
-
-// +--------------------------------------------------------------------+
-// | PowerAdmin								|
-// +--------------------------------------------------------------------+
-// | Copyright (c) 1997-2002 The PowerAdmin Team			|
-// +--------------------------------------------------------------------+
-// | This source file is subject to the license carried by the overal	|
-// | program PowerAdmin as found on http://poweradmin.sf.net		|
-// | The PowerAdmin program falls under the QPL License:		|
-// | http://www.trolltech.com/developer/licensing/qpl.html		|
-// +--------------------------------------------------------------------+
-// | Authors: Roeland Nieuwenhuis <trancer <AT> trancer <DOT> nl>	|
-// |          Sjeemz <sjeemz <AT> sjeemz <DOT> nl>			|
-// +--------------------------------------------------------------------+
-
-//
-// $Id: delete_user.php,v 1.9 2003/01/01 22:33:46 azurazu Exp $
-//
-
 require_once("inc/toolkit.inc.php");
 
 $id = ($_POST["id"]) ? $_POST["id"] : $_GET["id"];
@@ -51,13 +32,15 @@
                 clean_page($BASE_URL . $BASE_PATH . "users.php");
         }
         include_once("inc/header.inc.php");
-        ?><H2><? echo _('Delete user'); ?> "<?= get_fullname_from_userid($id) ?>"</H2>
-        <FORM METHOD="post">
+        ?>
+	
+    <h3><? echo _('Delete user'); ?> "<? echo get_fullname_from_userid($id) ?>"</h3>
+     <form method="post">
         <?
         $domains = get_domains_from_userid($id);
         if (count($domains) > 0) 
         {
-        	echo _('This user has access to the following domain(s)'); ?> :<BR><?
+        	echo _('This user has access to the following zone(s)'); ?> :<BR><?
                 $users = show_users($id);
                 if(count($users) < 1) 
                 {
@@ -65,42 +48,50 @@
                         $no_users = 1;
                 }
                 ?>
-                <TABLE BORDER="0" CELLSPACING="4">
-                <TR STYLE="font-weight: Bold"><TD WIDTH="50" CLASS="tdbg">Delete</TD><TD CLASS="tdbg">Name</TD><? if (!$no_users) { ?><TD CLASS="tdbg">New owner</TD><? } ?></TR>
+                <table>
+                 <tr>
+		  <td class="n">Delete</td>
+		  <td class="n">Name</td>
+		<? if (!$no_users) { ?>
+		  <td class="n">New owner</td>
+		<? } ?>
+		 </tr>
                 <?
                 foreach ($domains as $d) 
                 {
-                        ?><TR><TD CLASS="tdbg" ALIGN="center"><?
+                        ?>
+                 <tr>
+		  <td class="n" align="center"><?
                         if ($no_users) 
                      	{ 
-                     		?><INPUT TYPE="hidden" NAME="delete[]" VALUE="<?= $d["id"] ?>"><?
+                     		?><input type="hidden" name="delete[]" value="<? echo $d["id"] ?>"><?
                         } 
-                        ?><INPUT TYPE="checkbox"<?= $add ?> NAME="delete[]" VALUE="<?= $d["id"] ?>"></TD><TD CLASS="tdbg"><?= $d["name"] ?></TD><TD CLASS="tdbg"><? 
+                        ?><input type="checkbox"<? echo $add ?> name="delete[]" value="<? echo $d["id"] ?>"></td><td class="n"><? echo $d["name"] ?></td><td class="n"><? 
                         if (!$no_users) 
                         { 
-                        	?><SELECT NAME="domain[<?= $d["id"] ?>]"><?
+                        	?><select name="domain[<? echo $d["id"] ?>]"><?
                         	foreach($users as $u) 
                         	{
-                        	        ?><OPTION VALUE="<?= $u["id"] ?>"><?= $u["fullname"] ?></OPTION><?
+                        	        ?><option value="<? echo $u["id"] ?>"><? echo $u["fullname"] ?></option><?
                         	}
-                        	?></SELECT></TD><? 
+                        	?></select></td><? 
                         } 
-                        ?></TR><?
+                        ?></tr><?
                 }
-                ?></TABLE><?
+                ?></table><?
         }
         
         $message = _('You are going to delete this user, are you sure?');
         if(($numrows = $db->queryOne("select count(id) from zones where owner=$id")) != 0)
         {
-        	$message .= " " . _('This user has access to ') . $numrows . _('domain(s), by deleting him you will also delete these domains');
+        	$message .= " " . _('This user has access to ') . $numrows . _(' zones, by deleting him you will also delete these zones.');
         }
 
         ?>
-        <BR><FONT CLASS="warning"><?= $message ?></FONT><BR><BR>
-        <INPUT TYPE="hidden" NAME="id" VALUE="<?=$id ?>">
-        <INPUT TYPE="hidden" NAME="confirm" VALUE="1">
-        <INPUT TYPE="submit" CLASS="button" VALUE="<? echo _('Yes'); ?>"> <INPUT TYPE="button" CLASS="button" OnClick="location.href='users.php'" VALUE="<? echo _('No'); ?>"></FORM>
+        <font class="warning"><? echo $message ?></font><br>
+        <input type="hidden" name="id" value="<? echo $id ?>">
+        <input type="hidden" name="confirm" value="1">
+        <input type="submit" class="button" value="<? echo _('Yes'); ?>"> <input type="button" class="button" OnClick="location.href='users.php'" value="<? echo _('No'); ?>"></FORM>
         <?
         include_once("inc/footer.inc.php");
 }