source: alternc/trunk/bureau/admin/adm_quotaedit.php @ 2680

Revision 2680, 3.1 KB checked in by chantal, 5 years ago (diff)

modifs liste des admins, debut d'ergo pour cette partie

Line 
1<?php
2/*
3 $Id: adm_quotaedit.php,v 1.4 2004/10/24 20:09:21 anonymous Exp $
4 ----------------------------------------------------------------------
5 AlternC - Web Hosting System
6 Copyright (C) 2002 by the AlternC Development Team.
7 http://alternc.org/
8 ----------------------------------------------------------------------
9 Based on:
10 Valentin Lacambre's web hosting softwares: http://altern.org/
11 ----------------------------------------------------------------------
12 LICENSE
13
14 This program is free software; you can redistribute it and/or
15 modify it under the terms of the GNU General Public License (GPL)
16 as published by the Free Software Foundation; either version 2
17 of the License, or (at your option) any later version.
18
19 This program is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22 GNU General Public License for more details.
23
24 To read the license please visit http://www.gnu.org/copyleft/gpl.html
25 ----------------------------------------------------------------------
26 Original Author of file: Benjamin Sonntag
27 Purpose of file: Show the form to edit the user's quota
28 ----------------------------------------------------------------------
29*/
30require_once("../class/config.php");
31include_once("head.php");
32
33if (!$admin->enabled) {
34        __("This page is restricted to authorized staff");
35        include_once("foot.php");
36        exit();
37}
38
39$fields = array (
40        "uid"    => array ("request", "integer", 0),
41);
42getFields($fields);
43
44if (!$us=$admin->get($uid)) {
45        $error=$err->errstr();
46}
47
48$mem->su($uid);
49if (!$r=$quota->getquota()) {
50        $error=$err->errstr();
51}
52$mem->unsu();
53
54?>
55<h3><?php __("Editing the quotas of a member"); ?></h3>
56<?php
57        if ($error) {
58          echo "<p class=\"error\">$error</p>";
59          include_once("foot.php");
60          exit();
61        }
62?>
63<form method="post" action="adm_quotadoedit.php">
64<table class="tedit">
65<tr><th><input type="hidden" name="uid" value="<?php echo $uid ?>" />
66<?php __("Username"); ?></th><td colspan="3"><code><big><?php echo $us["login"]; ?></big></code>&nbsp;</td></tr>
67<tr><th><?php __("Quota"); ?></th><th style="text-align: right"><?php __("Total"); ?></th><th><?php __("Used"); ?></th></tr>
68<?php
69$ql=$quota->qlist();
70reset($ql);
71while (list($key,$val)=each($ql)) {
72        echo "<tr>";
73        echo "<td>";
74        if ($r[$key]["t"]==$r[$key]["u"] && $r[$key]["u"]) echo "<span style=\"color: red;\">";
75        echo "<label for=\"q_$key\">" . _("quota_".$key) . "</label>";
76        if ($r[$key]["t"]==$r[$key]["u"] && $r[$key]["u"]) echo "</span>";
77        echo "</td>";
78        echo "<td align=\"center\"><input type=\"text\" class=\"int\" style=\"text-align: right\" size=\"10\" maxlength=\"10\" value=\"".$r[$key]["t"]."\" name=\"q_".$key."\" id=\"q_".$key."\" /></td>";
79        echo "<td align=\"right\"><code><label for=\"q_$key\">".$r[$key]["u"]."</label></code>&nbsp;</td>";
80        echo "</tr>";
81}
82?>
83<tr class="trbtn"><td colspan="3">
84  <input class="inb" type="submit" name="submit" value="<?php __("Edit the quotas"); ?>" />
85  <input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='adm_list.php'" />
86
87</td></tr>
88</table>
89</form>
90<?php include_once("foot.php"); ?>
Note: See TracBrowser for help on using the repository browser.