Alternc  latest
Alternc logiel libre pour l'hébergement
hta_dodeluser.php
Go to the documentation of this file.
1 <?php
2 /*
3  ----------------------------------------------------------------------
4  LICENSE
5 
6  This program is free software; you can redistribute it and/or
7  modify it under the terms of the GNU General Public License (GPL)
8  as published by the Free Software Foundation; either version 2
9  of the License, or (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  To read the license please visit http://www.gnu.org/copyleft/gpl.html
17  ----------------------------------------------------------------------
18 */
19 
20 /**
21  * Delete a username from a protected folder
22  *
23  * @copyright AlternC-Team 2000-2017 https://alternc.com/
24  */
25 
26 require_once("../class/config.php");
27 
28 $fields = array (
29  "d" => array ("post", "array", array()),
30  "dir" => array ("post", "string", ""),
31  "confirm_del" => array ("post", "string", ""),
32 );
34 
35 if (!empty($confirm_del)) {
36  reset($d);
37  if ($hta->del_user($d,$dir)) {
38  foreach ($d as $v) {
39  $msg->raise("INFO", "hta", _("The user '%s' was successfully deleted"), $v);
40  }
41  }
42  $is_include=true;
43  include_once("hta_edit.php");
44  exit();
45 }
46 include_once('head.php');
47 ?>
48 <h3><?php __("Authorized user deletion confirm"); ?></h3>
49 <hr id="topbar"/>
50 <br />
51  <?php __("Do you really want to delete those users ?");?>
52  <ul>
53  <?php foreach($d as $t) {
54  echo "<li><b>".ehe($t,false)."</b></li>\n";
55  } ?>
56  </ul>
57 
58  <form method="post" action="hta_dodeluser.php" name="main" id="main">
59  <?php csrf_get(); ?>
60  <input type="hidden" name="dir" value="<?php ehe($dir); ?>" >
61  <?php foreach($d as $t) {
62  echo '<input type="hidden" name="d['.ehe($t,false).']" value="'.ehe($t,false).'" >'."\n";
63  } ?>
64  <input type="submit" class="inb" name="confirm_del" value="<?php __("Delete")?>" />
65  <input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='/hta_edit.php?dir=<?php echo urlencode($dir);?>'" />
66  </form>
67 
68 <?php
69 include_once('foot.php');
70 exit();
71 ?>
exit
Definition: adm_doadd.php:70
$msg
Definition: bootstrap.php:75
$d
ehe($str, $display=TRUE)
Echo the HTMLSpecialChars version of a value.
Definition: functions.php:647
__($str)
Definition: functions.php:404
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
Definition: functions.php:688
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...
Definition: functions.php:1159
$fields
Delete a username from a protected folder.
foreach($domaines_user as $domaine) $t
if($error) $is_include
Definition: ssl_donew.php:55