| 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 | } |
|---|
| 36 | else { |
|---|
| 37 | reset($r); |
|---|
| 38 | } |
|---|
| 39 | |
|---|
| 40 | ?> |
|---|
| 41 | <h3><?php __("Protected folders list"); ?></h3> |
|---|
| 42 | <hr id="topbar"/> |
|---|
| 43 | <br /> |
|---|
| 44 | <?php |
|---|
| 45 | if ($error) { |
|---|
| 46 | echo "<p class=\"error\">$error</p>"; |
|---|
| 47 | } |
|---|
| 48 | |
|---|
| 49 | if (!is_array($r)) { |
|---|
| 50 | echo "<p><span class=\"ina\"><a href=\"hta_add.php\">"._("Protect a folder")."</a></span><br />"; |
|---|
| 51 | $mem->show_help("hta_list"); |
|---|
| 52 | echo "</p>"; |
|---|
| 53 | include_once("foot.php"); |
|---|
| 54 | exit(); |
|---|
| 55 | } |
|---|
| 56 | |
|---|
| 57 | ?> |
|---|
| 58 | |
|---|
| 59 | <p> |
|---|
| 60 | <?php __("help_hta_list"); |
|---|
| 61 | $mem->show_help("hta_list2"); |
|---|
| 62 | ?> |
|---|
| 63 | </p> |
|---|
| 64 | |
|---|
| 65 | <form method="post" action="hta_del.php"> |
|---|
| 66 | <table class="tlist"> |
|---|
| 67 | <tr><th colspan="2"> </th><th><?php __("Folder"); ?></th></tr> |
|---|
| 68 | <?php |
|---|
| 69 | $col=1; |
|---|
| 70 | |
|---|
| 71 | |
|---|
| 72 | for($i=0;$i<count($r);$i++){ |
|---|
| 73 | $col=3-$col; |
|---|
| 74 | ?> |
|---|
| 75 | <tr class="lst<?php echo $col; ?>"> |
|---|
| 76 | <td align="center"><input type="checkbox" class="inc" name="del_<?php echo $r[$i] ?>" value="<?php echo $r[$i] ?>" /></td> |
|---|
| 77 | <td> |
|---|
| 78 | <div class="ina"><a href="hta_edit.php?dir=<?php echo $r[$i]?>"><img src="icon/encrypted.png" alt="<?php __("Edit login and passwords"); ?>" /><?php __("Edit login and passwords"); ?></a></div> |
|---|
| 79 | </td> |
|---|
| 80 | <td><code><?php echo "$r[$i]"?></code></td> |
|---|
| 81 | </tr> |
|---|
| 82 | <?php |
|---|
| 83 | } |
|---|
| 84 | ?> |
|---|
| 85 | </table> |
|---|
| 86 | <br /> |
|---|
| 87 | <input type="submit" class="ina" name="submit" value="<?php __("Unprotect the checked folders"); ?>" /> |
|---|
| 88 | <span class="ina"><a href="hta_add.php"><?php __("Protect a folder"); ?></a></span> |
|---|
| 89 | </form> |
|---|
| 90 | |
|---|
| 91 | <p> |
|---|
| 92 | <?php $mem->show_help("hta_list"); ?> |
|---|
| 93 | </p> |
|---|
| 94 | <?php include_once("foot.php"); ?> |
|---|