_("Your account"))); dual_begin(array()); 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 (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]; $volume_id = $volumes_id[$i]; $volume_vg = $volumes_vg[$i]; break; } endpwent(); while ($user_info = getpwent()) { if ($user_info["pw_name"] == $usercookie) $user_uid = $user_info["pw_uid"]; } endpwent(); $user_groups_gid = array(); $user_groups_name = array(); endgrent(); while ($group_info = getgrent()) { if (in_array($usercookie, $group_info["gr_mem"])) { array_push($user_groups_gid, $group_info["gr_gid"]); array_push($user_groups_name, $group_info["gr_name"]); } } endgrent(); generic_header(array("title" => _("Your account"))); single_begin(array()); print("Hi ! The following are your account information and preferences, arranged into tabs. Please click on a tab to open up that category.
Select a volume below to bring up quota for that particular
volume in the list below.
" align="center">Total Space (blocks) | " align="center">Used Space (blocks) | " align="center">Free Space (blocks) | " align="center">Total Files | " align="center">Used Files | " align="center">Free Files |
" align="center"> | " align="center"> | " align="center"> 0) ? (intval($qline[3]) - intval($qline[2])) : "N/A")); ?> | " align="center"> | " align="center"> | " align="center"> 0) ? (intval($qline[7]) - intval($qline[6])) : "N/A")); ?> |
" align="center">GID | " align="center">Group Name | " align="center">Total Space (blocks) | " align="center">Used Space (blocks) | " align="center">Free Space (blocks) | " align="center">Total Files | " align="center">Used Files | " align="center">Free Files | " . htmlentities($user_groups_gid[$i]) . " | \n"); print("\t" . htmlentities($user_groups_name[$i]) . " | \n"); print("\t\n"); print("\t" . intval($qline[3]) . "\n"); print("\t | \n"); print("\t0) && (intval($qline[2]) > intval($qline[3]))) ? "#ff8080" : $dvalue) . "\">\n"); print("\t" . intval($qline[2]) . "\n"); print("\t | \n"); print("\t0) && ((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" . intval($qline[7]) . "\n"); print("\t | \n"); print("\t0) && (intval($qline[6]) > intval($qline[7]))) ? "#ff8080" : $dvalue) . "\">\n"); print("\t" . intval($qline[6]) . "\n"); print("\t | \n"); print("\t0) && ((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("\n"); } ?>