Alternc  3.2
Alternc logiel libre pour l'hébergement
 All Data Structures Namespaces Files Functions Variables Pages
hta_list.php
Go to the documentation of this file.
1 <?php
2 /*
3  $Id: hta_list.php,v 1.5 2003/08/20 13:08:28 root 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: Franck Missoum
27  Purpose of file: List the users in a protected folder
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31 include_once("head.php");
32 
33 if (!$r=$hta->ListDir()) {
34  $error=$err->errstr();
35 } else {
36  reset($r);
37 }
38 
39 ?>
40 <h3><?php __("Protected folders list"); ?></h3>
41 <hr id="topbar"/>
42 <br />
43 <?php
44  if (isset($error) && $error) {
45  echo "<p class=\"alert alert-danger\">$error</p>";
46  }
47 
48  if (!is_array($r)) {
49  echo "<p><span class=\"ina\"><a href=\"hta_add.php\">"._("Protect a folder")."</a></span><br />";
50  $mem->show_help("hta_list");
51  echo "</p>";
52  include_once("foot.php");
53  exit();
54  }
55 
56 ?>
57 
58 <p>
59 <?php
60 __("You can set passwords to protect some of your folders.<br/>This will create .htaccess and .htpasswd files that restrict access to these directory and to any sub-elements.");
61 // __("help_hta_list");
62 $mem->show_help("hta_list2");
63 ?>
64 </p>
65 
66 <form method="post" action="hta_del.php">
67 <table class="tlist">
68  <tr><th colspan="2"> </th><th><?php __("Folder"); ?></th></tr>
69 <?php
70 
71 
72 for($i=0;$i<count($r);$i++){
73 ?>
74  <tr class="lst">
75  <td align="center"><input type="checkbox" class="inc" name="del_<?php echo $r[$i] ?>" value="<?php echo $r[$i] ?>" /></td>
76  <td>
77 <div class="ina lock"><a href="hta_edit.php?dir=<?php echo $r[$i]?>"><?php __("Edit login and passwords"); ?></a></div>
78 </td>
79  <td><?php echo '<a href="bro_main.php?R='.urlencode($r[$i]).'">'.htmlspecialchars($r[$i]).'</a>'; ?></td>
80  </tr>
81  <?php
82  }
83 ?>
84 </table>
85 <br />
86 <input type="submit" class="ina up" name="submit" value="<?php __("Unprotect the checked folders"); ?>" />
87  <span class="ina add"><a href="hta_add.php"><?php __("Protect a folder"); ?></a></span>
88 </form>
89 
90 <p>
91 <?php $mem->show_help("hta_list"); ?>
92 </p>
93 <?php include_once("foot.php"); ?>