_("Your account"))); dual_begin(array()); print("

" . _("Home") . " / " . _("Your account") . "

\n"); print("

" . _("You have not authenticated yourself to the system yet with your") . " " . _("username") . " " . _("and") . " " . _("password") . ". " . _("You will not be able to use this section of the website without authenticating yourself first. So, please continue and login using the form on the right hand side.") . "

\n"); dual_middle(array()); show_account_details(array()); dual_end(array()); generic_footer(array()); exit; } $volumes_id = array(); $volumes_name = array(); $volumes_mountpoint = array(); $volumes_vg = array(); function volumes_startelement($parser, $name, $attrs) { global $volumes_id, $volumes_name, $volumes_mountpoint, $volumes_vg; if ($name == "VOLUME") { array_push($volumes_id, $attrs["ID"]); array_push($volumes_name, $attrs["NAME"]); array_push($volumes_mountpoint, $attrs["MOUNTPOINT"]); array_push($volumes_vg, $attrs["VG"]); } } function volumes_endelement($parser, $name) { } $volumes_parser = xml_parser_create(); xml_set_element_handler($volumes_parser, "volumes_startelement", "volumes_endelement"); $volumes_fp = fopen("/opt/openfiler/etc/volumes.xml", "r"); while ($volumes_data = fread($volumes_fp, 4096)) xml_parse($volumes_parser, $volumes_data, feof($volumes_fp)); fclose($volumes_fp); xml_parser_free($volumes_parser); if (count($volumes_name) <= 0) { header("Location: ./volumes.html"); exit; } if (strlen($volume) <= 0) $volume = $volumes_id[0]; $fstype = ""; for ($fsj = 0; $fsj < count($volumes_id); $fsj++) { if (($vgname == $volumes_vg[$fsj]) && ($volume == $volumes_id[$fsj])) { $fstype = $volumes_fstype[$fsj]; break; } } $fs = 0; $fsfound = false; for ($fsi = 0; $fsi < count($fs_info); $fsi++) { if ($fs_info[$fsi]["type"] == $fstype) { $fs = $fsi; $fsfound = true; break; } } if ($fsfound == false) $fs = 0; if (isset($volumeinfo)) { for ($i = 0; $i < count($volumes_name); $i++) if ($volumeinfo == ("#!@-" . $volumes_id[$i] . "-#!@-" . $volumes_vg[$i] . "-#!@")) { $volume_mountpoint = $volumes_mountpoint[$i]; $volume_name = $volumes_name[$i]; $volume = $volumes_id[$i]; $volume_vg = $volumes_vg[$i]; break; } } else { for ($i = 0; $i < count($volumes_name); $i++) if (($volumes_id[$i] == $volume) && ($volumes_vg[$i] == $volume_vg)) { $volume_mountpoint = $volumes_mountpoint[$i]; $volume_name = $volumes_name[$i]; break; } } $quota = array(); $quotap = popen("/usr/bin/sudo /usr/sbin/repquota -v -g -n " . escapeshellarg($volume_mountpoint), "r"); while (!feof($quotap)) { $string = trim(fgets($quotap, 4096)); $strarray = explode(" ", $string); $qarray = array(); foreach ($strarray as $strelement) { $element = trim($strelement); if (strlen($element) == 0) continue; else array_push($qarray, $element); } array_push($quota, $qarray); } pclose($quotap); if (count($HTTP_POST_VARS) > 0) { if ($HTTP_POST_VARS["request96"] == "Save") { exec("/usr/bin/sudo /usr/sbin/setquota -g 96 " . escapeshellarg(intval(round($HTTP_POST_VARS["gblocks96"] * $fs_info[$fs]["fs_block_size"]))) . " " . escapeshellarg(intval(round($HTTP_POST_VARS["gblocks96"] * $fs_info[$fs]["fs_block_size"]))) . " " . escapeshellarg($HTTP_POST_VARS["ginodes96"]) . " " . escapeshellarg($HTTP_POST_VARS["ginodes96"]) . " " . escapeshellarg($volume_mountpoint)); header("Location: ./quota_guest.html?sort=" . $sortorder . "&volume=" . urlencode($volume) . "&volume_vg=" . urlencode($volume_vg)); exit; } } generic_header(array("title" => _("Administration Section"))); single_begin(array()); print("

" . _("Home") . " / " . _("Administration Section") . "

\n"); ?>

Welcome Administrator. The following are various system information and preferences, arranged into tabs. Please click on a tab to open up that category.

Select Volume

Select a volume below to bring up group quota for that particular
volume in the list below.

 

 


\n"); print("\n"); print("\n"); ?>

Edit guest account's quota

Click on Save after entering new quota values to change the guest account's quota
for the volume.

" align="center">Total Space in MB " align="center">Used Space in MB " align="center">Free Space in MB " align="center">Total Files " align="center">Used Files " align="center">Free Files " align="center">Save
" align="center">" /> " align="center"> " align="center"> 0) ? printf("%.02f", (intval($qline[3]) - intval($qline[2])) / $fs_info[$fs]["fs_block_size"]) : "N/A")); ?> " align="center"> " align="center"> " align="center"> 0) ? (intval($qline[7]) - intval($qline[6])) : "N/A")); ?> " align="center">

 

\n"); nested_tab_end(); single_end(array()); generic_footer(array()); ?>