root/alternc/trunk/bureau/admin/adm_dodel.php

Revision 1711, 2.7 kB (checked in by nahuel, 3 years ago)

Rajout de la confirmation de suppresion d'un compte
Il manque maintenant la traduction
References: #687

Line 
1 <?php
2 /*
3  $Id: adm_dodel.php,v 1.2 2004/05/19 14:23:06 benjamin Exp $
4  ----------------------------------------------------------------------
5  AlternC - Web Hosting System
6  Copyright (C) 2002 by the AlternC Development Team.
7  http://alternc.org/
8  ----------------------------------------------------------------------
9  Based on:
10  Valentin Lacambre's web hosting softwares: http://altern.org/
11  ----------------------------------------------------------------------
12  LICENSE
13
14  This program is free software; you can redistribute it and/or
15  modify it under the terms of the GNU General Public License (GPL)
16  as published by the Free Software Foundation; either version 2
17  of the License, or (at your option) any later version.
18
19  This program is distributed in the hope that it will be useful,
20  but WITHOUT ANY WARRANTY; without even the implied warranty of
21  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22  GNU General Public License for more details.
23
24  To read the license please visit http://www.gnu.org/copyleft/gpl.html
25  ----------------------------------------------------------------------
26  Original Author of file: Benjamin Sonntag
27  Purpose of file: Delete a member
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31
32 if (!$admin->enabled) {
33   __("This page is restricted to authorized staff");
34   exit();
35 }
36
37 if($_POST["del_confirm"] == "y"){
38   if (!is_array($d)) {
39     $d[]=$d;
40   }
41
42   reset($d);
43   while (list($key,$val)=each($d)) {
44     if (!$admin->checkcreator($val)) {
45       __("This page is restricted to authorized staff");
46       exit();
47     }
48     if (!($u=$admin->get($val)) || !$admin->del_mem($val)) {
49       $error.=sprintf(_("Member '%s' does not exist"),$val)."<br />";
50     } else {
51       $error.=sprintf(_("Member %s successfully deleted"),$u["login"])."<br />";
52     }
53   }
54   include("adm_list.php");
55   exit();
56 }else{
57     include("head.php");
58     ?>
59     </head>
60     <body>
61     <h3><?php printf(_("Deleting users")); ?> : </h3>
62     <form action="adm_dodel.php" method="post">
63       <input type="hidden" name="action" value="delete" />
64       <input type="hidden" name="del_confirm" value="y" />
65       <p class="error"><?php __("WARNING : Confirm the deletion of the users"); ?></p>
66       <p>
67       <?php
68         foreach($d as $userid){
69           $membre=$admin->get($userid);
70           echo "<input type=\"hidden\" name=\"d[]\" value=\"$userid\" />".$membre['login']."<br/>";
71         }
72       ?>
73       </p>
74       <blockquote>
75         <input type="submit" class="inb" name="confirm" value="<?php __("Yes"); ?>" />&nbsp;&nbsp;
76         <input type="button" class="inb" name="cancel" value="<?php __("No"); ?>" onclick="document.location='adm_list.php';" />
77       </blockquote>
78     </form>
79     </body>
80     </html>
81     <?php 
82 }
83
84 ?>
85
Note: See TracBrowser for help on using the browser.