_("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]; for ($i = 0; $i < count($volumes_name); $i++) if ($volumes_id[$i] == $volume) { $volume_mountpoint = $volumes_mountpoint[$i]; $volume_name = $volumes_name[$i]; break; } if (($HTTP_GET_VARS["sort"] == "uid") || ($HTTP_POST_VARS["sort"] == "uid")) $sortorder = "uid"; else if (($HTTP_GET_VARS["sort"] == "uname") || ($HTTP_POST_VARS["sort"] == "uname")) $sortorder = "uname"; else if (($HTTP_GET_VARS["sort"] == "utype") || ($HTTP_POST_VARS["sort"] == "utype")) $sortorder = "utype"; else $sortorder = "none"; if (count($HTTP_POST_VARS) > 0) if ($HTTP_POST_VARS["request"] == "Save") { if (is_valid_user($HTTP_GET_VARS["uname"])) system("/usr/bin/sudo /usr/sbin/setquota -u " . $HTTP_POST_VARS["uid"] . " " . $HTTP_POST_VARS["ublocks"] . " " . $HTTP_POST_VARS["ublocks"] . " " . $HTTP_POST_VARS["uinodes"] . " " . $HTTP_POST_VARS["uinodes"] . " " . $volume_mountpoint); header("Location: ./quotas_user.html?sort=" . $sortorder . "&volume=" . $volume); 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.

= 500) && ($user_info["pw_uid"] <= 65000)) { array_push($users_uid, $user_info["pw_uid"]); array_push($users_name, $user_info["pw_name"]); array_push($users_properties, "Unknown"); } } endpwent(); if (strncasecmp($aresult[9], "YES", 3) == 0) { // add NIS users $nis_command = "/usr/bin/sudo /usr/bin/ypcat passwd"; $userp = popen($nis_command, "r"); $i = 0; while (!feof($userp)) { $uresult[$i] = explode(":", fgets($userp, 4096)); foreach (($uresult[$i]) as $uresultitem) $uresultitem = trim($uresultitem); if ((strlen($uresult[$i][0]) > 0) && ($uresult[$i][2] >= 500) && ($uresult[$i][2] <= 65000)) { for ($j = 0; $j < count($users_uid); $j++) if (($users_uid[$j] == $uresult[$i][2]) && ($users_name[$j] == $uresult[$i][0]) && ($users_properties[$j] == "Unknown")) $users_properties[$j] = "NIS"; } $i++; } pclose($userp); } if (strncasecmp($aresult[5], "YES", 3) == 0) { // add LDAP users } if (strncasecmp($aresult[2], "YES", 3) == 0) { // add Hesiod users } // add local users $userp = popen("/usr/bin/sudo /bin/cat /etc/passwd", "r"); $i = 0; while (!feof($userp)) { $uresult[$i] = explode(":", fgets($userp, 4096)); foreach (($uresult[$i]) as $uresultitem) $uresultitem = trim($uresultitem); if ((strlen($uresult[$i][0]) > 0) && ($uresult[$i][2] >= 500) && ($uresult[$i][2] <= 65000)) { for ($j = 0; $j < count($users_uid); $j++) if (($users_uid[$j] == $uresult[$i][2]) && ($users_name[$j] == $uresult[$i][0]) && ($users_properties[$j] == "Unknown")) $users_properties[$j] = "Local"; } $i++; } pclose($userp); if ($sortorder == "uname") array_multisort($users_name, $users_properties, $users_uid); else if ($sortorder == "uid") array_multisort($users_uid, $users_name, $users_properties); else if ($sortorder == "utype") array_multisort($users_properties, $users_uid, $users_name); $quotas = array(); $quotap = popen("/usr/bin/sudo /usr/sbin/repquota -v -n " . $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($quotas, $qarray); } pclose($quotap); ?>

Select Volume

Select a volume below to bring up user quotas for that particular
volume in the list below.

 

 


Edit quota

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

\n"); print("\n"); print("\n"); print("\n"); print("\n"); print("\t\n"); print("\t\n"); print("\t\n"); for ($j = 0; $j < count($quotas); $j++) { $qline = $quotas[$j]; if ($qline[0] == "#" . $users_uid[$i]) break; } print("\t\n"); print("\t\n"); print("\t\n"); print("\t\n"); print("\t\n"); print("\t\n"); print("\t\n"); print("\n"); print("\n"); } ?>
">UID ">Name ">Type ">Total Space (blocks) ">Used Space (blocks) ">Free Space (blocks) ">Total Files ">Used Files ">Free Files ">Save
" . $users_uid[$i] . "" . $users_name[$i] . "" . $users_properties[$i] . "\n"); print("\t\n"); print("\t 0) && (intval($qline[2]) > intval($qline[3]))) ? "#ff8080" : $dvalue) . "\">\n"); print("\t" . intval($qline[2]) . "\n"); print("\t 0) && ((intval($qline[3]) - intval($qline[2])) < 0)) ? "#ff8080" : $dvalue) . "\">\n"); print("\t" . ((intval($qline[3]) > 0) ? (intval($qline[3]) - intval($qline[2])) : "N/A") . "\n"); print("\t\n"); print("\t\n"); print("\t 0) && (intval($qline[6]) > intval($qline[7]))) ? "#ff8080" : $dvalue) . "\">\n"); print("\t" . intval($qline[6]) . "\n"); print("\t 0) && ((intval($qline[7]) - intval($qline[6])) < 0)) ? "#ff8080" : $dvalue) . "\">\n"); print("\t" . ((intval($qline[7]) > 0) ? (intval($qline[7]) - intval($qline[6])) : "N/A") . "\n"); print("\t\n"); print("\t\n"); print("\t