Exemplo n.º 1
0
        }
        echo '</select>';
    }
    ?>
						</td>
					</tr>
					<tr><td colspan="4" class="box-subheadspace" style="line-height: 10px;">&nbsp;</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="' . byte2mb(@$quota_data['total']['bytes_xfer_avail']) . '" align="right" style="width: 190px;">';
    } else {
        echo '<select name="frm_quota_trans_mb" style="width: 192px;">';
        if (@$quota_data['total']['bytes_xfer_avail'] == 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(@$quota_data['total']['bytes_xfer_avail']) == $count['v']) {
                echo ' selected';
            }
            echo '>' . $count['d'] . '</option>';
        }
        echo '</select>';
 *
 * Except from the first option all of these options are only the default
 * values and can be altered on a per-user basis after a quota has been added
 * to a user.
 */
$config_ext['quota']['enabled'] = 0;
// '1'=on, '0'=off
$config_ext['quota']['type'] = 'user';
$config_ext['quota']['limittype'] = 'soft';
// 'soft' or 'hard'
$config_ext['quota']['per_session'] = 0;
$config_ext['quota']['down_files'] = 10;
$config_ext['quota']['up_files'] = 10;
$config_ext['quota']['trans_files'] = 20;
$config_ext['quota']['down_mb'] = byte2mb(1048576000);
// 1000.00 MB
$config_ext['quota']['up_mb'] = byte2mb(1048576000);
// 1000.00 MB
$config_ext['quota']['trans_mb'] = byte2mb(2097152000);
// 2000.00 MB
/* For use alongwith Virtual Hosts for Apache2. At the moment this function is
 * undocumented and virtually untested - leave it off for now.
 */
$config_ext['vhosts']['enabled'] = 0;
// '1'=on, '0'=off
/* Adds support for administrating PowerDNS from within this user interface.
 * Untested, undocumented and requires that you add additional tables to your
 * database - to do so you must import "powerdns.sql".
 */
$config_ext['pdns']['enabled'] = 0;
// '1'=on, '0'=off
Exemplo n.º 3
0
				<?php 
if ($config_ext['quota']['enabled'] == 1 && $quota_data['have_quota'] == true && ($quota_data['total']['bytes_in_avail'] > 0 || $quota_data['total']['bytes_out_avail'] > 0 || $quota_data['total']['bytes_xfer_avail'] > 0 || $quota_data['total']['files_in_avail'] > 0 || $quota_data['total']['files_out_avail'] > 0 || $quota_data['total']['files_xfer_avail'] > 0)) {
    ?>
					<tr><td colspan="8" class="box-subheadline"><?php 
    echo $GLOBALS['language']['userv']['quota_used'];
    ?>
</td></tr>
					<?php 
    if ($quota_data['total']['bytes_out_avail'] > 0) {
        make_quota_graph($GLOBALS['language']['configure']['quota_down_mb'], byte2mb($quota_data['used']['bytes_out_used']), byte2mb($quota_data['total']['bytes_out_avail']));
    }
    if ($quota_data['total']['bytes_in_avail'] > 0) {
        make_quota_graph($GLOBALS['language']['configure']['quota_up_mb'], byte2mb($quota_data['used']['bytes_in_used']), byte2mb($quota_data['total']['bytes_in_avail']));
    }
    if ($quota_data['total']['bytes_xfer_avail'] > 0) {
        make_quota_graph($GLOBALS['language']['configure']['quota_trans_mb'], byte2mb($quota_data['used']['bytes_xfer_used']), byte2mb($quota_data['total']['bytes_xfer_avail']));
    }
    if ($quota_data['total']['files_out_avail'] > 0) {
        make_quota_graph($GLOBALS['language']['configure']['quota_down_files'], $quota_data['used']['files_out_used'], $quota_data['total']['files_out_avail']);
    }
    if ($quota_data['total']['files_in_avail'] > 0) {
        make_quota_graph($GLOBALS['language']['configure']['quota_up_files'], $quota_data['used']['files_in_used'], $quota_data['total']['files_in_avail']);
    }
    if ($quota_data['total']['files_xfer_avail'] > 0) {
        make_quota_graph($GLOBALS['language']['configure']['quota_trans_files'], $quota_data['used']['files_xfer_used'], $quota_data['total']['files_xfer_avail']);
    }
}
?>
			</table>
			</td>
		</tr>
Exemplo n.º 4
0
    $config_path_to_kernel_config = @$configuration['file_paths']['generic']['kernel_configuration'];
    $config_path_to_ftpwho = @$configuration['file_paths']['generic']['ftpwho'];
    $config_path_to_proftpd = @$configuration['file_paths']['generic']['proftpd'];
    $path_to_ftpadmin_utils = @$configuration['file_paths']['generic']['ftpadmin_utils'];
    $config_ext['pdns']['enabled'] = @$configuration['extensions']['pdns']['enabled'];
    $config_ext['vhosts']['enabled'] = @$configuration['extensions']['vhosts']['enabled'];
    $config_ext['quota']['enabled'] = @$configuration['extensions']['quota']['enabled'];
    $config_ext['quota']['select_quota'] = @$configuration['extensions']['quota']['select_quota'];
    $config_ext['quota']['type'] = @$configuration['extensions']['quota']['type'];
    $config_ext['quota']['limittype'] = @$configuration['extensions']['quota']['limit_type'];
    $config_ext['quota']['per_session'] = @$configuration['extensions']['quota']['per_session'];
    $config_ext['quota']['down_files'] = @$configuration['extensions']['quota']['download_file_limit'];
    $config_ext['quota']['up_files'] = @$configuration['extensions']['quota']['upload_file_limit'];
    $config_ext['quota']['trans_files'] = @$configuration['extensions']['quota']['transferred_file_limit'];
    $config_ext['quota']['down_mb'] = byte2mb(@$configuration['extensions']['quota']['download_byte_limit']);
    $config_ext['quota']['up_mb'] = byte2mb(@$configuration['extensions']['quota']['upload_byte_limit']);
    $config_ext['quota']['trans_mb'] = byte2mb(@$configuration['extensions']['quota']['transferred_byte_limit']);
}
function isOldPHP()
{
    global $config_enforce_oldstyle_config;
    if ($config_enforce_oldstyle_config == true) {
        return true;
    }
    $version = explode('.', phpversion());
    if ($version[0] < 5) {
        return true;
    } else {
        return false;
    }
}