⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 edit_group_quota.cgi

📁 Unix下基于Web的管理工具
💻 CGI
字号:
#!/usr/local/bin/perl# edit_group_quota.cgi# Display a form for editing the quotas for a group on some filesystemrequire './quota-lib.pl';&ReadParse();$u = $in{'group'}; $fs = $in{'filesys'};&can_edit_group($u) ||	&error("You are not allowed to edit quotas for '$u'");&can_edit_filesys($fs) ||	&error("You are not allowed to edit quotas on this filesystem");&header("Edit Quota", "", "edit_group_quota");print "<hr>\n";@quot = &group_quota($u, $fs);$first = (@quot == 0);print "<table border width=100%>\n";print "<form action=save_group_quota.cgi>\n";print "<input type=hidden name=group value=\"$u\">\n";print "<input type=hidden name=filesys value=\"$fs\">\n";print "<input type=hidden name=source value=$in{'source'}>\n";print "<tr $tb> <td colspan=2><b>Quota for <tt>$u</tt> ",      "on <tt>$fs</tt></b></td> </tr>\n";print "<tr $cb> <td width=50%><table width=100%>\n";if (!$first) {	print "<tr> <td><b>Blocks Used</b></td> <td>$quot[0]</td> </tr>\n",	}print "<tr> <td><b>Soft Block Limit</b></td> <td>\n";&quota_input("sblocks", $quot[1]);print "<tr> <td><b>Hard Block Limit</b></td> <td>\n";&quota_input("hblocks", $quot[2]);print "</table></td><td width=50%><table width=100%>\n";if (!$first) {	print "<tr> <td><b>Files Used</b></td> <td>$quot[3]</td> </tr>\n",	}print "<tr> <td><b>Soft File Limit</b></td> <td>\n";&quota_input("sfiles", $quot[4]);print "<tr> <td><b>Hard File Limit</b></td> <td>\n";&quota_input("hfiles", $quot[5]);print "</table></td></tr></table>\n";print "<table width=100%><tr>\n";print "<td><input type=submit value=Update></td>\n";print "</form><form action=group_filesys.cgi>\n";print "<input type=hidden name=group value=\"$u\">\n";print "<td align=right><input type=submit value=\"List All Quotas\"></td>\n";print "</form></tr></table>\n";print "<hr>\n";if ($in{'source'}) { &footer("group_filesys.cgi?group=$u", "filesystem list"); }else { &footer("list_groups.cgi?$fs", "group list"); }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -