Alternc  3.2
Alternc logiel libre pour l'h├ębergement
 All Data Structures Namespaces Files Functions Variables Pages
quota_show.php
Go to the documentation of this file.
1 <?php
2 /*
3  $Id: quota_show.php,v 1.3 2003/08/13 23:52:24 root 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:
27  Purpose of file:
28  ----------------------------------------------------------------------
29 */
30 require_once("../class/config.php");
31 include_once("head.php");
32 
33 ?>
34 <h3><?php __("Account's quotas"); ?> : </h3>
35 <hr id="topbar"/>
36 <br />
37 <?php
38 $q=$quota->getquota();
39 if (!is_array($q) || empty($q) ) {
40  echo "<p class=\"alert alert-danger\">"._("No quotas for this account, or quotas currently unavailable!")."</p>";
41  include_once("foot.php");
42  die();
43 }
44 
45 echo "<table cellspacing=\"0\" cellpadding=\"4\" class='tlist'>";
46 echo "<tr><th>"._("Quota")."</th><th>"._("Used")."</th><th>"._("Total")."</th></tr>";
47 $qlist=$quota->qlist();
48 reset($qlist);
49  while (list($key,$val)=each($qlist)) {
50  if ( !isset($q[$key]) || !$q[$key]["t"]) continue;
51  echo "<tr class=\"lst\">";
52  echo "<td>";
53  if ($q[$key]["u"] >= $q[$key]["t"]) echo "<font class=\"over\">";
54  echo _($val);
55  if ($q[$key]["u"] >= $q[$key]["t"]) echo "</font>";
56 
57  if ($key == 'bw_web') {
58  echo "&nbsp;</td><td>". format_size($q[$key]["u"]) ."&nbsp;</td><td>". format_size($q[$key]["t"]) ."&nbsp;</td>";
59  } elseif ($key == 'web') {
60  echo "&nbsp;</td><td>". format_size($q[$key]["u"] * 1024) . "&nbsp;</td><td>". format_size($q[$key]["t"] * 1024) ."&nbsp;</td>";
61  } else {
62  echo "&nbsp;</td><td>".$q[$key]["u"]."&nbsp;</td><td>".$q[$key]["t"]."&nbsp;</td>";
63  }
64 
65  echo "</tr>";
66  }
67 echo "</table>";
68 
69 include_once("foot.php");
70 
71 ?>