2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
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
|
|
|
|
----------------------------------------------------------------------
|
|
|
|
*/
|
2017-10-11 09:58:04 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Edit a protected folder parameters
|
|
|
|
*
|
|
|
|
* @copyright AlternC-Team 2000-2017 https://alternc.com/
|
|
|
|
*/
|
|
|
|
|
2006-04-26 12:28:53 +00:00
|
|
|
require_once("../class/config.php");
|
2009-09-08 05:29:38 +00:00
|
|
|
include_once("head.php");
|
|
|
|
|
2017-08-16 17:34:32 +00:00
|
|
|
if (!isset($is_include)) {
|
|
|
|
$fields = array (
|
2009-09-08 05:29:38 +00:00
|
|
|
"dir" => array ("request", "string", ""),
|
2017-08-16 17:34:32 +00:00
|
|
|
);
|
|
|
|
getFields($fields);
|
|
|
|
}
|
2006-04-26 12:28:53 +00:00
|
|
|
|
|
|
|
if (!$dir) {
|
2014-03-26 14:36:36 +00:00
|
|
|
echo "<p class=\"alert alert-warning\">"._("No folder selected!")."</p>";
|
|
|
|
require_once('foot.php');
|
|
|
|
die();
|
2006-04-26 12:28:53 +00:00
|
|
|
} else {
|
2013-02-01 17:45:05 +00:00
|
|
|
$r=$hta->get_hta_detail($dir);
|
|
|
|
} // if !$dir
|
2006-04-26 12:28:53 +00:00
|
|
|
|
2017-08-16 17:34:32 +00:00
|
|
|
$c=$admin->listPasswordPolicies();
|
|
|
|
$passwd_classcount = $c['hta']['classcount'];
|
|
|
|
|
2006-04-26 12:28:53 +00:00
|
|
|
?>
|
|
|
|
<h3><?php printf(_("List of authorized user in folder %s"),$dir); ?></h3>
|
2010-04-29 21:31:46 +00:00
|
|
|
<hr id="topbar"/>
|
|
|
|
<br />
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
2013-02-01 17:45:05 +00:00
|
|
|
if (!count($r)) {
|
2017-10-06 16:04:36 +00:00
|
|
|
$msg->raise("INFO", "hta", _("No authorized user in %s"),$dir);
|
2017-08-16 17:34:32 +00:00
|
|
|
echo $msg->msg_html_all();
|
2013-02-01 17:45:05 +00:00
|
|
|
} else {
|
2017-08-16 17:34:32 +00:00
|
|
|
reset($r);
|
|
|
|
echo $msg->msg_html_all();
|
2006-04-26 12:28:53 +00:00
|
|
|
?>
|
|
|
|
<form method="post" action="hta_dodeluser.php">
|
2016-05-20 12:21:47 +00:00
|
|
|
<?php csrf_get(); ?>
|
2013-01-31 17:24:48 +00:00
|
|
|
<table cellspacing="0" cellpadding="4" class='tlist'>
|
2013-02-01 17:45:05 +00:00
|
|
|
<tr>
|
2016-05-22 18:14:26 +00:00
|
|
|
<th colspan="2" ><input type="hidden" name="dir" value="<?php ehe($dir); ?>"> </th>
|
2013-02-01 17:45:05 +00:00
|
|
|
<th><?php __("Username"); ?></th>
|
|
|
|
</tr>
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
2013-05-23 16:18:56 +00:00
|
|
|
for($i=0;$i<count($r);$i++){ ?>
|
|
|
|
<tr class="lst">
|
2016-05-22 18:14:26 +00:00
|
|
|
<td align="center"><input type="checkbox" class="inc" name="d[]" value="<?php ehe($r[$i]); ?>" /></td>
|
2013-02-01 17:45:05 +00:00
|
|
|
<td>
|
2016-05-22 18:14:26 +00:00
|
|
|
<div class="ina"><a href="hta_edituser.php?user=<?php eue($r[$i]); ?>&dir=<?php eue($dir); ?>"><img src="icon/encrypted.png" alt="<?php __("Change this user's password"); ?>" /><?php __("Change this user's password"); ?></a></div>
|
2013-02-01 17:45:05 +00:00
|
|
|
</td>
|
2016-05-22 18:14:26 +00:00
|
|
|
<td><?php ehe($r[$i]); ?></td>
|
2013-02-01 17:45:05 +00:00
|
|
|
</tr>
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
2013-02-01 17:45:05 +00:00
|
|
|
} // for $i
|
2006-04-26 12:28:53 +00:00
|
|
|
?>
|
|
|
|
</table>
|
2013-02-01 17:45:05 +00:00
|
|
|
|
2010-04-06 20:29:08 +00:00
|
|
|
<br />
|
|
|
|
<input type="submit" class="inb" name="submit" value="<?php __("Delete the checked users"); ?>" />
|
2006-04-26 12:28:53 +00:00
|
|
|
</form>
|
|
|
|
|
2013-02-01 17:45:05 +00:00
|
|
|
<?php } // else !count $r ?>
|
2006-04-26 12:28:53 +00:00
|
|
|
<p>
|
2016-05-22 18:14:26 +00:00
|
|
|
<span class="inb"><a href="bro_main.php?R=<?php eue($dir); ?>"><?php __("Show this folder's content in the File Browser"); ?></a></span>
|
2006-04-26 12:28:53 +00:00
|
|
|
</p>
|
2010-04-06 20:29:08 +00:00
|
|
|
|
|
|
|
<p> </p>
|
|
|
|
|
2013-02-01 17:45:05 +00:00
|
|
|
<fieldset>
|
|
|
|
<legend><h3><?php __("Adding an authorized user"); ?></h3></legend>
|
2010-04-06 20:29:08 +00:00
|
|
|
|
2016-01-14 15:24:00 +00:00
|
|
|
<form method="post" action="hta_doadduser.php" name="main" id="main" autocomplete="off">
|
2016-05-20 12:21:47 +00:00
|
|
|
<?php csrf_get(); ?>
|
2016-01-14 15:24:00 +00:00
|
|
|
<!-- honeypot fields -->
|
|
|
|
<input type="text" style="display: none" id="fakeUsername" name="fakeUsername" value="" />
|
|
|
|
<input type="password" style="display: none" id="fakePassword" name="fakePassword" value="" />
|
|
|
|
|
2013-02-01 17:45:05 +00:00
|
|
|
<table class="tedit">
|
|
|
|
<tr>
|
2016-05-22 18:14:26 +00:00
|
|
|
<th><input type="hidden" name="dir" value="<?php ehe($dir); ?>" /><?php __("Folder"); ?></th>
|
|
|
|
<td><?php echo '<a href="bro_main.php?R='.eue($dir,false).'">'.ehe($dir,false).'</a>'; ?></td>
|
2013-02-01 17:45:05 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th><label for="user"><?php __("Username"); ?></label></th>
|
|
|
|
<td><input type="text" class="int" name="user" id="user" value="" size="20" maxlength="64" /></td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th><label for="password"><?php __("Password"); ?></label></th>
|
2017-08-16 17:34:32 +00:00
|
|
|
<td><input type="password" class="int" name="password" autocomplete="off" id="password" value="" size="20" maxlength="64" /><?php display_div_generate_password(DEFAULT_PASS_SIZE,"#password","#passwordconf",$passwd_classcount); ?></td>
|
2013-02-01 17:45:05 +00:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th><label for="passwordconf"><?php __("Confirm password"); ?></label></th>
|
2015-06-16 11:48:13 +00:00
|
|
|
<td><input type="password" class="int" name="passwordconf" autocomplete="off" id="passwordconf" value="" size="20" maxlength="64" /></td>
|
2013-02-01 17:45:05 +00:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<br />
|
2013-10-18 13:31:39 +00:00
|
|
|
<input type="submit" class="inb ok" value="<?php __("Add this user"); ?>" />
|
|
|
|
<input type="button" class="inb cancel" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='hta_list.php';"/>
|
2013-02-01 17:45:05 +00:00
|
|
|
</form>
|
|
|
|
</fieldset>
|
|
|
|
|
2010-04-06 20:29:08 +00:00
|
|
|
<script type="text/javascript">
|
2013-02-01 17:45:05 +00:00
|
|
|
document.forms['main'].user.focus();
|
2010-04-06 20:29:08 +00:00
|
|
|
</script>
|
|
|
|
|
2010-04-29 21:31:46 +00:00
|
|
|
<?php include_once("foot.php"); ?>
|