/
configure_quota.php
188 lines (172 loc) · 9.55 KB
/
configure_quota.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
<table class="box">
<tr>
<td class="box-headline">>> <?php echo $GLOBALS['language']['configure']['menu_quota']; ?></td>
</tr>
<tr>
<td>
<form name="config_quota" action="configure.php?section=quota" method="POST">
<table class="box" style="border-style: none;">
<tr>
<td width="*" class="box-sel-head"><?php echo $GLOBALS['language']['configure']['quota_activate']; ?>:</td>
<td width="*" class="box-sel" align="left">
<table width="100%">
<td width="30%"><input class="radio" type="radio" name="frm_quota_turn" value="1" <? if ($config_ext['quota']['enabled'] == 1){?> checked <?}?>> <?php echo $GLOBALS['language']['general']['yes']; ?></td>
<td width="70%"><input class="radio" type="radio" name="frm_quota_turn" value="0" <?php if ($config_ext['quota']['enabled'] == 0){?> checked <?php } ?>> <?php echo $GLOBALS['language']['general']['no']; ?></td>
</table>
</td>
<td width="*" class="box-sel-head"><?php echo $GLOBALS['language']['configure']['quota_whattype']; ?>:</td>
<td width="*" class="box-sel" align="right">
<select name="frm_quota_turndefaulttype" style="width: 190px;">
<?php
foreach($config_quota_quotatypes as $qtype) {
echo '<option value="' . $qtype . '"';
if ($qtype == $config_ext['quota']['type']) echo ' selected';
echo '>' . $qtype;
}
?>
</select>
</td>
</tr>
<tr>
<td width="*" class="box-sel-head"><?php echo $GLOBALS['language']['configure']['quota_whatlimit']; ?>:</td>
<td width="*" class="box-sel" align="left">
<table width="100%">
<td width="30%"><input class="radio" type="radio" name="frm_quota_turndefaultlimit" value="soft" <?php if ($config_ext['quota']['limittype'] == 'soft'){ ?> checked <?php }?>> soft</td>
<td width="70%"><input class="radio" type="radio" name="frm_quota_turndefaultlimit" value="hard" <? if ($config_ext['quota']['limittype'] == 'hard'){?> checked <?}?>> hard</td>
</table>
</td>
<td width="*" class="box-sel-head"><?php echo $GLOBALS['language']['configure']['quota_whatsession']; ?>:</td>
<td width="*" class="box-sel" align="left">
<table width="100%">
<td width="30%"><input class="radio" type="radio" name="frm_quota_turndefaultpersession" value="1" <? if ($config_ext['quota']['per_session'] == 1){?> checked <?}?>> <?php echo $GLOBALS['language']['general']['yes']; ?></td>
<td width="70%"><input class="radio" type="radio" name="frm_quota_turndefaultpersession" value="0" <? if ($config_ext['quota']['per_session'] == 0){?> checked <?}?>> <?php echo $GLOBALS['language']['general']['no']; ?></td>
</table>
</td>
</tr>
<tr><td colspan="4" class="box-subheadspace" style="line-height: 10px;"> </td></tr>
<tr><td colspan="4" class="box-subheadline"><?php echo $GLOBALS['language']['configure']['quota_details']; ?></td></tr>
<tr>
<td width="*" class="box-sel-head"><?php echo $GLOBALS['language']['configure']['quota_down_mb']; ?>:</td>
<td width="*" class="box-sel" align="center">
<?php
if (!isset($config_ext['quota']['select_quota']) || $config_ext['quota']['select_quota'] == 0) {
echo '<input type="text" size="35" name="frm_quota_down_mb" value="' . @$config_ext['quota']['down_mb'] . '" align="right" style="width: 190px;">';
} else {
echo '<select name="frm_quota_down_mb" style="width: 192px;">';
if (@$config_ext['quota']['down_mb'] == 0) echo '<option value="0" selected>' . $language['configure']['quota_no_limit'] . '</option>';
else echo '<option value="0">' . $language['configure']['quota_no_limit'] . '</option>';
foreach ($config_quota_select_datasize as $count) {
echo '<option value="' . $count['v'] . '"';
if (float2int(mb2byte(@$config_ext['quota']['down_mb'])) == $count['v']) echo ' selected';
echo '>' . $count['d'] . '</option>';
}
echo '</select>';
}
?>
</td>
<td width="*" class="box-sel-head"><?php echo $GLOBALS['language']['configure']['quota_down_files']; ?>:</td>
<td width="*" class="box-sel" align="right">
<?php
if (!isset($config_ext['quota']['select_quota']) || $config_ext['quota']['select_quota'] == 0) {
echo '<input type="text" size="35" name="frm_quota_down_files" value="' . @$config_ext['quota']['down_files'] . '" align="right" style="width: 190px;">';
} else {
echo '<select name="frm_quota_down_files" style="width: 192px;">';
if (@$config_ext['quota']['down_files'] == 0) echo '<option value="0" selected>' . $language['configure']['quota_no_limit'] . '</option>';
else echo '<option value="0">' . $language['configure']['quota_no_limit'] . '</option>';
foreach ($config_quota_select_filecount as $count) {
echo '<option value="' . $count . '"';
if (@$config_ext['quota']['down_files'] == $count) echo ' selected';
echo '>' . $count . '</option>';
}
echo '</select>';
}
?>
</td>
</tr>
<tr>
<td width="*" class="box-sel-head"><?php echo $GLOBALS['language']['configure']['quota_up_mb']; ?>:</td>
<td width="*" class="box-sel" align="center">
<?php
if (!isset($config_ext['quota']['select_quota']) || $config_ext['quota']['select_quota'] == 0) {
echo '<input type="text" size="35" name="frm_quota_up_mb" value="' . @$config_ext['quota']['up_mb'] . '" align="right" style="width: 190px;">';
} else {
echo '<select name="frm_quota_up_mb" style="width: 192px;">';
if (@$config_ext['quota']['up_mb'] == 0) echo '<option value="0" selected>' . $language['configure']['quota_no_limit'] . '</option>';
else echo '<option value="0">' . $language['configure']['quota_no_limit'] . '</option>';
foreach ($config_quota_select_datasize as $count) {
echo '<option value="' . $count['v'] . '"';
if (float2int(mb2byte(@$config_ext['quota']['up_mb'])) == $count['v']) echo ' selected';
echo '>' . $count['d'] . '</option>';
}
echo '</select>';
}
?>
</td>
<td width="*" class="box-sel-head"><?php echo $GLOBALS['language']['configure']['quota_up_files']; ?>:</td>
<td width="*" class="box-sel" align="right">
<?php
if (!isset($config_ext['quota']['select_quota']) || $config_ext['quota']['select_quota'] == 0) {
echo '<input type="text" size="35" name="frm_quota_up_files" value="' . @$config_ext['quota']['up_files'] . '" align="right" style="width: 190px;">';
} else {
echo '<select name="frm_quota_up_files" style="width: 192px;">';
if (@$config_ext['quota']['up_files'] == 0) echo '<option value="0" selected>' . $language['configure']['quota_no_limit'] . '</option>';
else echo '<option value="0">' . $language['configure']['quota_no_limit'] . '</option>';
foreach ($config_quota_select_filecount as $count) {
echo '<option value="' . $count . '"';
if (@$config_ext['quota']['up_files'] == $count) echo ' selected';
echo '>' . $count . '</option>';
}
echo '</select>';
}
?>
</td>
</tr>
<tr><td colspan="4" class="box-subheadspace" style="line-height: 10px;"> </td></tr>
<tr>
<td width="*" class="box-sel-head"><?php echo $GLOBALS['language']['configure']['quota_trans_mb']; ?>:</td>
<td width="*" class="box-sel" align="center">
<?php
if (!isset($config_ext['quota']['select_quota']) || $config_ext['quota']['select_quota'] == 0) {
echo '<input type="text" size="35" name="frm_quota_trans_mb" value="' . @$config_ext['quota']['trans_mb'] . '" align="right" style="width: 190px;">';
} else {
echo '<select name="frm_quota_trans_mb" style="width: 192px;">';
if (@$config_ext['quota']['trans_mb'] == 0) echo '<option value="0" selected>' . $language['configure']['quota_no_limit'] . '</option>';
else echo '<option value="0">' . $language['configure']['quota_no_limit'] . '</option>';
foreach ($config_quota_select_datasize as $count) {
echo '<option value="' . $count['v'] . '"';
if (float2int(mb2byte(@$config_ext['quota']['trans_mb'])) == $count['v']) echo ' selected';
echo '>' . $count['d'] . '</option>';
}
echo '</select>';
}
?>
</td>
<td width="*" class="box-sel-head"><?php echo $GLOBALS['language']['configure']['quota_trans_files']; ?>:</td>
<td width="*" class="box-sel" align="right">
<?php
if (!isset($config_ext['quota']['select_quota']) || $config_ext['quota']['select_quota'] == 0) {
echo '<input type="text" size="35" name="frm_quota_trans_files" value="' . @$config_ext['quota']['trans_files'] . '" align="right" style="width: 190px;">';
} else {
echo '<select name="frm_quota_trans_files" style="width: 192px;">';
if (@$config_ext['quota']['trans_files'] == 0) echo '<option value="0" selected>' . $language['configure']['quota_no_limit'] . '</option>';
else echo '<option value="0">' . $language['configure']['quota_no_limit'] . '</option>';
foreach ($config_quota_select_filecount as $count) {
echo '<option value="' . $count . '"';
if (@$config_ext['quota']['trans_files'] == $count) echo ' selected';
echo '>' . $count . '</option>';
}
echo '</select>';
}
?>
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<?php
$alter_menu[$GLOBALS['language']['menu']['reset']] = 'javascript:document.config_quota.reset()';
$alter_menu[$GLOBALS['language']['menu']['submit']] = 'javascript:document.config_quota.submit()';
doMenu($alter_menu);
?>