_("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; } global $volumes_id; global $volumes_name; global $volumes_mountpoint; global $volumes_vg; global $volumes_fstype; $volumes_id = array(); $volumes_name = array(); $volumes_mountpoint = array(); $volumes_vg = array(); $volumes_fstype = array(); function volumes_startelement($parser, $name, $attrs) { global $volumes_id, $volumes_name, $volumes_mountpoint, $volumes_vg, $volumes_fstype; 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"]); array_push($volumes_fstype, $attrs["FSTYPE"]); } } 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 ($action == "createfolder") { if (is_valid_foldername($newfolderid)) if ((!is_dir($sourcepath . $newfolderid)) && (strcasecmp($newfolderid, "global") != 0) && (strcasecmp($newfolderid, "homes") != 0) && (strcasecmp($newfolderid, "printers") != 0)) { exec("/usr/bin/sudo /bin/mkdir " . escapeshellarg($sourcepath . $newfolderid)); $fp = popen("/usr/bin/sudo /usr/bin/tee " . escapeshellarg($sourcepath . $newfolderid . ".info.xml"), "w"); fputs($fp, "\n"); fputs($fp, "\n"); fputs($fp, "\t\n"); fputs($fp, "\t\n"); fputs($fp, "\t\n"); fputs($fp, "\n"); fputs($fp, "\n"); pclose($fp); if ((strlen($prevpath) > 0) && (strlen($prevfolder) > 0) && is_file($prevpath . $prevfolder . ".info.xml")) { $fp = popen("/usr/bin/sudo /usr/bin/tee " . escapeshellarg($prevpath . $prevfolder . ".info.xml"), "w"); fputs($fp, "\n"); fputs($fp, "\n"); fputs($fp, "\t\n"); fputs($fp, "\t\n"); fputs($fp, "\t\n"); fputs($fp, "\n"); fputs($fp, "\n"); pclose($fp); } } header("Location: ./shares.html"); exit; } else if ($action == "deletefolder") { if (is_valid_foldername($folderid)) if (is_dir($sourcepath . $folderid . "/")) { exec("/usr/bin/sudo /bin/rm -rf " . escapeshellarg($sourcepath . $folderid . "/")); exec("/usr/bin/sudo /bin/rm -f " . escapeshellarg($sourcepath . $folderid . ".info.xml")); $parent_dir = ""; for ($i = (strlen($sourcepath) - 2); $i >= 0; $i--) if ($sourcepath[$i] == '/') { $parent_dir = substr($sourcepath, 0, $i); $child_dir = substr($sourcepath, $i + 1, (strlen($sourcepath) - $i - 2)); break; } if ((strlen($parent_dir) > 0) && (strlen($child_dir) > 0)) { $parent_dir_type = ""; $parent_dir_description = ""; $parent_dir_count = 0; function parent_dir_startelement($parser, $name, $attrs) { global $parent_dir_type, $parent_dir_description, $parent_dir_count; if ($name == "KEY") { if ($attrs["NAME"] == "dirtype") $parent_dir_type = $attrs["VALUE"]; else if ($attrs["NAME"] == "description") $parent_dir_description = $attrs["VALUE"]; else if ($attrs["NAME"] == "dircount") $parent_dir_count = $attrs["VALUE"]; } } function parent_dir_endelement($parser, $name) { } if (is_file($parent_dir . "/" . $child_dir . ".info.xml")) { $parent_dir_parser = xml_parser_create(); xml_set_element_handler($parent_dir_parser, "parent_dir_startelement", "parent_dir_endelement"); $parent_dir_fp = fopen($parent_dir . "/" . $child_dir . ".info.xml", "r"); while ($parent_dir_data = fread($parent_dir_fp, 4096)) xml_parse($parent_dir_parser, $parent_dir_data, feof($parent_dir_fp)); fclose($parent_dir_fp); xml_parser_free($parent_dir_parser); $parent_dir_count--; if ($parent_dir_count < 0) $parent_dir_count = 0; if ($parent_dir_count == 0) $parent_dir_type = "leaf"; $fp = popen("/usr/bin/sudo /usr/bin/tee " . escapeshellarg($parent_dir . "/" . $child_dir . ".info.xml"), "w"); fputs($fp, "\n"); fputs($fp, "\n"); fputs($fp, "\t\n"); fputs($fp, "\t\n"); fputs($fp, "\t\n"); fputs($fp, "\n"); fputs($fp, "\n"); pclose($fp); } } if ($regenerateconfig == "yes") apply_configuration(array("services" => "reload", "chmod" => "no", "chmod_path" => "")); } header("Location: ./shares.html"); exit; } else if ($action == "renamefolder") { if (is_valid_foldername($foldername)) if (is_dir($folderpath . $foldername) && is_file($folderpath . $foldername . ".info.xml") && (!strstr($newfoldername, '/')) && (!(is_dir($folderpath . $newfoldername)))) { exec("/usr/bin/sudo /bin/mv -f " . escapeshellarg($folderpath . $foldername) . " " . escapeshellarg($folderpath . $newfoldername)); exec("/usr/bin/sudo /bin/rm -f " . escapeshellarg($folderpath . $foldername . ".info.xml")); $fp = popen("/usr/bin/sudo /usr/bin/tee " . escapeshellarg($folderpath . $newfoldername . ".info.xml"), "w"); fputs($fp, "\n"); fputs($fp, "\n"); fputs($fp, "\t\n"); fputs($fp, "\t\n"); fputs($fp, "\t\n"); fputs($fp, "\n"); fputs($fp, "\n"); pclose($fp); } header("Location: ./shares.html"); exit; } else if ($action == "renamedescription") { if (is_valid_foldername($foldername)) if (is_dir($folderpath . $foldername) && is_file($folderpath . $foldername . ".info.xml")) { $fp = popen("/usr/bin/sudo /usr/bin/tee " . escapeshellarg($folderpath . $foldername . ".info.xml"), "w"); fputs($fp, "\n"); fputs($fp, "\n"); fputs($fp, "\t\n"); fputs($fp, "\t\n"); fputs($fp, "\t\n"); fputs($fp, "\n"); fputs($fp, "\n"); pclose($fp); } header("Location: ./shares.html"); exit; } else if ($action == "makeshare") { if (is_valid_foldername($foldername) && ($dirtype == "leaf")) if (is_dir($folderpath . $foldername) && is_file($folderpath . $foldername . ".info.xml")) { $fp = popen("/usr/bin/sudo /usr/bin/tee " . escapeshellarg($folderpath . $foldername . ".info.xml"), "w"); fputs($fp, "\n"); fputs($fp, "\n"); fputs($fp, "\t\n"); fputs($fp, "\t\n"); fputs($fp, "\t\n"); fputs($fp, "\n"); fputs($fp, "\n"); pclose($fp); } header("Location: ./shares_edit.html?sharepath=" . urlencode($folderpath . $foldername . "/")); exit; } generic_header(array("title" => _("Administration Section"))); single_begin(array()); print("

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

\n"); $curcolor = $GLOBALS["color_table_row2"]; $imgid = $GLOBALS["color_table_row2_colstr"]; function getcolor() { global $curcolor, $imgid; if ($curcolor == $GLOBALS["color_table_row1"]) { $curcolor = $GLOBALS["color_table_row2"]; $imgid = $GLOBALS["color_table_row2_colstr"]; } else { $curcolor = $GLOBALS["color_table_row1"]; $imgid = $GLOBALS["color_table_row1_colstr"]; } return $curcolor; } ?>

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

; color: ;">
List of current shares
0) { global $unique_descriptions, $unique_description_counts; $tr_found = false; for ($tr_i = 0; $tr_i < count($unique_descriptions); $tr_i++) if ($unique_descriptions[$tr_i] == $share_smb_sharename) { $tr_found = true; $unique_description_index = $tr_i; break; } if ($tr_found) { $unique_description_counts[$unique_description_index]++; $dir_description_suffix = " [DUPLICATE SMB: " . $share_smb_sharename . " " . $unique_description_counts[$unique_description_index] . "]"; } else { array_push($unique_descriptions, $share_smb_sharename); array_push($unique_description_counts, 1); $dir_description_suffix = " [SMB: " . $share_smb_sharename . "]"; } } ?>
\n"); else if ($dir_type == "leaf") print("\t\"\"\n"); else if ($dir_type == "closed") print("\t\"\"\n"); ?> ">" . htmlentities($mountpoint . $file . "/") . ")") : ""); ?> " . htmlentities($mountpoint . $file . "/") . ")") : ""); ?>
" onclick="event.cancelBubble = true;" class="sharespopup">
Folder name:  
Close Window
', event);">
', event);">" . $volumes_mountpoint[$volume_index] . ")") : ""); ?>
There are no existing volume groups.
Please create some volume groups.

"); else for ($i = 0; $i < count($vgds); $i++) { $vginfo = explode(":", trim($vgds[$i], " ")); if ($vginfo[11] <= 0) break; ?>
/mnt/" . $vginfo[0] . "/)") : ""); ?>