2006-04-26 12:28:53 +00:00
< ? php
/*
$Id : hta_list . php , v 1.5 2003 / 08 / 20 13 : 08 : 28 root Exp $
----------------------------------------------------------------------
AlternC - Web Hosting System
Copyright ( C ) 2002 by the AlternC Development Team .
http :// alternc . org /
----------------------------------------------------------------------
Based on :
Valentin Lacambre ' s web hosting softwares : http :// altern . org /
----------------------------------------------------------------------
LICENSE
This program is free software ; you can redistribute it and / or
modify it under the terms of the GNU General Public License ( GPL )
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
To read the license please visit http :// www . gnu . org / copyleft / gpl . html
----------------------------------------------------------------------
Original Author of file : Franck Missoum
Purpose of file : List the users in a protected folder
----------------------------------------------------------------------
*/
require_once ( " ../class/config.php " );
2009-09-08 05:29:38 +00:00
include_once ( " head.php " );
2006-04-26 12:28:53 +00:00
if ( ! $r = $hta -> ListDir ()) {
$error = $err -> errstr ();
2013-05-23 16:18:56 +00:00
} else {
2006-04-26 12:28:53 +00:00
reset ( $r );
}
?>
< h3 >< ? php __ ( " Protected folders list " ); ?> </h3>
2010-04-29 21:31:46 +00:00
< hr id = " topbar " />
< br />
2006-04-26 12:28:53 +00:00
< ? php
2012-05-25 13:08:44 +00:00
if ( isset ( $error ) && $error ) {
2013-10-18 09:59:03 +00:00
echo " <p class= \" alert alert-danger \" > $error </p> " ;
2006-04-26 12:28:53 +00:00
}
if ( ! is_array ( $r )) {
2011-06-04 14:28:57 +00:00
echo " <p><span class= \" ina \" ><a href= \" hta_add.php \" > " . _ ( " Protect a folder " ) . " </a></span><br /> " ;
2006-04-26 12:28:53 +00:00
$mem -> show_help ( " hta_list " );
2009-09-08 05:29:38 +00:00
echo " </p> " ;
include_once ( " foot.php " );
2006-04-26 12:28:53 +00:00
exit ();
}
?>
< p >
2013-01-28 10:01:09 +00:00
< ? php
2013-01-28 15:05:00 +00:00
__ ( " 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. " );
2013-01-28 10:01:09 +00:00
// __("help_hta_list");
2006-04-26 12:28:53 +00:00
$mem -> show_help ( " hta_list2 " );
?>
</ p >
< form method = " post " action = " hta_del.php " >
2016-05-20 12:21:47 +00:00
< ? php csrf_get (); ?>
2010-04-06 20:29:08 +00:00
< table class = " tlist " >
2011-02-09 08:37:23 +00:00
< tr >< th colspan = " 2 " > </ th >< th >< ? php __ ( " Folder " ); ?> </th></tr>
2006-04-26 12:28:53 +00:00
< ? php
for ( $i = 0 ; $i < count ( $r ); $i ++ ){
?>
2013-05-23 16:18:56 +00:00
< tr class = " lst " >
2006-04-26 12:28:53 +00:00
< td align = " center " >< input type = " checkbox " class = " inc " name = " del_<?php echo $r[$i] ?> " value = " <?php echo $r[$i] ?> " /></ td >
2010-04-06 20:29:08 +00:00
< td >
2013-04-25 12:39:24 +00:00
< div class = " ina lock " >< a href = " hta_edit.php?dir=<?php echo $r[$i] ?> " >< ? php __ ( " Edit login and passwords " ); ?> </a></div>
2010-04-06 20:29:08 +00:00
</ td >
2013-04-18 14:54:58 +00:00
< td >< ? php echo '<a href="bro_main.php?R=' . urlencode ( $r [ $i ]) . '">' . htmlspecialchars ( $r [ $i ]) . '</a>' ; ?> </td>
2006-04-26 12:28:53 +00:00
</ tr >
< ? php
}
?>
</ table >
2010-04-06 20:29:08 +00:00
< br />
2013-04-25 16:06:50 +00:00
< input type = " submit " class = " ina up " name = " submit " value = " <?php __( " Unprotect the checked folders " ); ?> " />
< span class = " ina add " >< a href = " hta_add.php " >< ? php __ ( " Protect a folder " ); ?> </a></span>
2006-04-26 12:28:53 +00:00
</ form >
2010-04-06 20:29:08 +00:00
2006-04-26 12:28:53 +00:00
< p >
< ? php $mem -> show_help ( " hta_list " ); ?>
</ p >
2010-04-29 21:31:46 +00:00
< ? php include_once ( " foot.php " ); ?>