在线增减.htpasswd内的用户
<?php
include("./class.Htpasswd.php3");
/* 请修改此.htpasswd文件路径
*/
$htpasswdfile = "/usr2/amitc/.htpasswd";
// 此行请勿修改
echo '<FORM ACTION="'.$PHP_SELF . '" METHOD=POST>';
?>
<Table BORDER><TR>
<TD>Username: </TD>
<TD><INPUT TYPE=text name="username"></TD>
</TR><TR>
<TD>Password: </TD>
<TD><INPUT TYPE=text name="password"></TD>
</TR><TR>
<TD>
<INPUT TYPE=radio NAME=doop VALUE="verify" CHECKED> Verify Password <BR>
<INPUT TYPE=radio NAME=doop VALUE="add" > 加入新用户<BR>
<INPUT TYPE=radio NAME=doop VALUE="delete" > 删除用户 <BR>
<INPUT TYPE=radio NAME=doop VALUE="change" > 更改密码 <BR>
</TD>
<TD>
<INPUT TYPE=submit name="operation">
</TD></TR>
</TR>
</TABLE>
</FORM>
<?php
if(!isset($operation)) {
}
else {
echo "<FONT COLOR=RED> <HR>";
echo "您刚进行了此项操作,请核查 <BR><HR>";
echo "您要对用户 $username 及密码 $password 进行 = [$doop] <BR>";
$handle = new Htpasswd($htpasswdfile);
switch ($doop) {
case 'add':
print "用户<BR>";
$retval = $handle->addUser($username, $password);
if($retval) {
print "用户 [$username] 加入成功!<BR>";
} else {
print "加入用户 [$username] 失败.<BR>";
}
break;
case 'change':
print '修改密码<BR>';
$retval = $handle->changePass($username, $password);
if($retval) {
print "[$username] 的密码修改成功.<BR>";
} else {
print "[$username] 的密码修改失败.<BR>";
}
break;
case 'delete':
print '删除用户<BR>';
$retval = $handle->deleteUser($username);
if($retval) {
print "[$username] 被删除.<BR>";
} else {
print "删除 [$username]时发生错误.<BR>";
}
break;
case 'verify':
print 'Code to verify user's password<BR>';
$retval = $handle->verifyUser($username, $password);
if($retval) {
print "[$username] verifies okay with password [$password]<BR>";
} else {
print "Verify Error for [$username] with [$password] (wrong password or user doesn't exist!) <BR>";
}
break;
default:
print '您要中断? <BR>';
}
echo "</FONT>";
}
?>
<?php
include("./class.Htpasswd.php3");
/* 请修改此.htpasswd文件路径
*/
$htpasswdfile = "/usr2/amitc/.htpasswd";
// 此行请勿修改
echo '<FORM ACTION="'.$PHP_SELF . '" METHOD=POST>';
?>
<Table BORDER><TR>
<TD>Username: </TD>
<TD><INPUT TYPE=text name="username"></TD>
</TR><TR>
<TD>Password: </TD>
<TD><INPUT TYPE=text name="password"></TD>
</TR><TR>
<TD>
<INPUT TYPE=radio NAME=doop VALUE="verify" CHECKED> Verify Password <BR>
<INPUT TYPE=radio NAME=doop VALUE="add" > 加入新用户<BR>
<INPUT TYPE=radio NAME=doop VALUE="delete" > 删除用户 <BR>
<INPUT TYPE=radio NAME=doop VALUE="change" > 更改密码 <BR>
</TD>
<TD>
<INPUT TYPE=submit name="operation">
</TD></TR>
</TR>
</TABLE>
</FORM>
<?php
if(!isset($operation)) {
}
else {
echo "<FONT COLOR=RED> <HR>";
echo "您刚进行了此项操作,请核查 <BR><HR>";
echo "您要对用户 $username 及密码 $password 进行 = [$doop] <BR>";
$handle = new Htpasswd($htpasswdfile);
switch ($doop) {
case 'add':
print "用户<BR>";
$retval = $handle->addUser($username, $password);
if($retval) {
print "用户 [$username] 加入成功!<BR>";
} else {
print "加入用户 [$username] 失败.<BR>";
}
break;
case 'change':
print '修改密码<BR>';
$retval = $handle->changePass($username, $password);
if($retval) {
print "[$username] 的密码修改成功.<BR>";
} else {
print "[$username] 的密码修改失败.<BR>";
}
break;
case 'delete':
print '删除用户<BR>';
$retval = $handle->deleteUser($username);
if($retval) {
print "[$username] 被删除.<BR>";
} else {
print "删除 [$username]时发生错误.<BR>";
}
break;
case 'verify':
print 'Code to verify user's password<BR>';
$retval = $handle->verifyUser($username, $password);
if($retval) {
print "[$username] verifies okay with password [$password]<BR>";
} else {
print "Verify Error for [$username] with [$password] (wrong password or user doesn't exist!) <BR>";
}
break;
default:
print '您要中断? <BR>';
}
echo "</FONT>";
}
?>
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“在线增减.htpasswd内的用户”评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。