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-12 15:54:48 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Show the form used to update users' quotas
|
|
|
|
*
|
|
|
|
* @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");
|
2006-04-26 12:28:53 +00:00
|
|
|
|
|
|
|
if (!$admin->enabled) {
|
2017-10-06 16:04:36 +00:00
|
|
|
$msg->raise("ERROR", "admin", _("This page is restricted to authorized staff"));
|
2017-08-15 15:03:56 +00:00
|
|
|
echo $msg->msg_html_all();
|
2009-09-08 05:29:38 +00:00
|
|
|
include_once("foot.php");
|
2006-04-26 12:28:53 +00:00
|
|
|
exit();
|
|
|
|
}
|
|
|
|
|
2009-09-08 05:29:38 +00:00
|
|
|
$fields = array (
|
2016-05-26 16:32:17 +00:00
|
|
|
"uid" => array ("request", "integer", 0),
|
2009-09-08 05:29:38 +00:00
|
|
|
);
|
|
|
|
getFields($fields);
|
|
|
|
|
2017-08-15 15:03:56 +00:00
|
|
|
$us=$admin->get($uid);
|
2006-04-26 12:28:53 +00:00
|
|
|
|
|
|
|
$mem->su($uid);
|
2017-08-15 15:03:56 +00:00
|
|
|
$r=$quota->getquota();
|
2006-04-26 12:28:53 +00:00
|
|
|
$mem->unsu();
|
2009-09-08 05:29:38 +00:00
|
|
|
|
2006-04-26 12:28:53 +00:00
|
|
|
?>
|
|
|
|
<h3><?php __("Editing the quotas of a member"); ?></h3>
|
2010-06-02 22:20:39 +00:00
|
|
|
<hr id="topbar"/>
|
|
|
|
<br />
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
2017-08-15 15:03:56 +00:00
|
|
|
echo $msg->msg_html_all();
|
2006-04-26 12:28:53 +00:00
|
|
|
?>
|
|
|
|
<form method="post" action="adm_quotadoedit.php">
|
2016-05-20 12:21:47 +00:00
|
|
|
<?php csrf_get(); ?>
|
2010-04-29 10:43:32 +00:00
|
|
|
<table class="tedit">
|
2016-05-22 18:14:26 +00:00
|
|
|
<tr><th><input type="hidden" name="uid" value="<?php ehe($uid); ?>" />
|
|
|
|
<?php __("Username"); ?></th><td colspan="3"><code><big><?php ehe($us["login"]); ?></big></code> </td></tr>
|
2010-04-29 10:43:32 +00:00
|
|
|
<tr><th><?php __("Quota"); ?></th><th style="text-align: right"><?php __("Total"); ?></th><th><?php __("Used"); ?></th></tr>
|
2006-04-26 12:28:53 +00:00
|
|
|
<?php
|
|
|
|
$ql=$quota->qlist();
|
|
|
|
reset($ql);
|
|
|
|
while (list($key,$val)=each($ql)) {
|
2012-08-23 14:25:04 +00:00
|
|
|
if (!isset($r[$key])) continue;
|
2006-04-26 12:28:53 +00:00
|
|
|
echo "<tr>";
|
|
|
|
echo "<td>";
|
2009-09-08 05:29:38 +00:00
|
|
|
if ($r[$key]["t"]==$r[$key]["u"] && $r[$key]["u"]) echo "<span style=\"color: red;\">";
|
2012-08-26 11:13:44 +00:00
|
|
|
echo "<label for=\"q_$key\">" . $val . "</label>";
|
2009-09-08 05:29:38 +00:00
|
|
|
if ($r[$key]["t"]==$r[$key]["u"] && $r[$key]["u"]) echo "</span>";
|
|
|
|
echo "</td>";
|
2010-09-01 18:53:08 +00:00
|
|
|
echo "<td align=\"center\"><input type=\"text\" class=\"int\" style=\"text-align: right\" size=\"10\" maxlength=\"20\" value=\"".$r[$key]["t"]."\" name=\"q_".$key."\" id=\"q_".$key."\" /></td>";
|
2006-04-26 12:28:53 +00:00
|
|
|
echo "<td align=\"right\"><code><label for=\"q_$key\">".$r[$key]["u"]."</label></code> </td>";
|
|
|
|
echo "</tr>";
|
|
|
|
}
|
|
|
|
?>
|
2010-04-29 10:43:32 +00:00
|
|
|
<tr class="trbtn"><td colspan="3">
|
2013-10-18 13:40:34 +00:00
|
|
|
<input class="inb ok" type="submit" name="submit" value="<?php __("Edit the quotas"); ?>" />
|
|
|
|
<input type="button" class="inb cancel" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='adm_list.php'" />
|
2010-04-29 10:43:32 +00:00
|
|
|
|
2006-04-26 12:28:53 +00:00
|
|
|
</td></tr>
|
|
|
|
</table>
|
|
|
|
</form>
|
2009-09-08 05:29:38 +00:00
|
|
|
<?php include_once("foot.php"); ?>
|