26 require_once(
"../class/config.php");
28 if (!$admin->enabled) {
29 $msg->raise(
"ERROR",
"admin", _(
"This page is restricted to authorized staff"));
30 echo
$msg->msg_html_all();
34 "synchronise" => array (
"get",
"integer",
"0"),
38 include_once (
"head.php");
41 <h3><?php
__(
"Change the default quotas"); ?></h3>
45 if ($synchronise==
true) {
46 $quota->synchronise_user_profile();
47 echo
"<p class=\"alert alert-info\">";
__(
"User's quotas synchronised");echo
"</p>";
50 $quota->create_missing_quota_profile();
52 echo
$msg->msg_html_all();
54 <form method=
"post" action=
"adm_dodefquotas.php">
57 <input type=
"hidden" name=
"action" value=
"add" />
58 <input type=
"text" name=
"type" class=
"int" />
59 <input type=
"submit" class=
"inb" value=
"<?php __("Add account type
"); ?>" />
65 <form method=
"post" action=
"adm_dodefquotas.php">
67 <table border=
"0" cellpadding=
"4" cellspacing=
"0">
70 <input type=
"hidden" name=
"action" value=
"delete" />
71 <select name=
"type" id=
"type" class=
"inl">
73 foreach($quota->listtype() as $type) {
74 if ($type==
"default")
continue;
75 echo
"<option value=\"$type\">$type</option>\n";
78 </td><td><input type=
"submit" class=
"inb" value=
"<?php __("Delete account type
"); ?>" /></td>
83 <?php
__(
"Here is the list of the quotas on the server for the new accounts. If you want to change them, enter new values"); ?>
85 <span
class=
"inb"><a href=
"adm_defquotas.php?synchronise=1"><?php
__(
"Synchronise user's quota (only to upper value)"); ?></a></span>
87 <form method=
"post" action=
"adm_dodefquotas.php">
90 <input type=
"hidden" name=
"action" value=
"modify" />
97 <div
class=
"info-toggle">
98 <h4
class=
"toggle-next"><?php echo _(
"Accounts of type").
" \"$type\"" ?>â–¼</h4>
99 <div
class=
"info-hide" id=
"div-quot-<?php echo md5($type);?>">
100 <table border=
"0" cellpadding=
"4" cellspacing=
"0" class=
'tlist'>
101 <tr><th><?php
__(
"Quotas") ?></th><th><?php
__(
"Default Value"); ?></th></tr>
104 if (!isset(
$qarray[$name]))
continue;
105 $key = $type .
":" . $name;
109 <td><label
for=
"<?php echo $key; ?>"><?php echo
$qarray[$name] ; ?></label></td>
110 <td><input type=
"text" class=
"int" size=
"16" maxlength=
"16" name=
"<?php ehe($key); ?>" id=
"<?php ehe($key); ?>" value=
"<?php ehe($value); ?>" /></td></tr>
118 <script type=
"text/javascript">
119 $(
"#div-quot-<?php echo md5($type);?>").toggle();
126 <input type=
"submit" class=
"inb ok" value=
"<?php __("Edit the
default quotas
"); ?>" />
129 <script type=
"text/javascript">
131 $(
".toggle-next").on(
"click",
function(){
132 var next = $(
this).next();
137 <?php include_once(
"foot.php"); ?>
if(! $admin->enabled) $fields
Administrator page to manage default quotas for users.
getFields($fields, $requestOnly=false)
Get the Fields of the posted form from $_REQUEST or POST or GET and check their type.
csrf_get($return=false)
Give a new CSRF uniq token for a form the session must be up since the CSRF is linked to the session ...
if(empty($_POST['key'])||empty($_POST['val'])) $key