_("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 $cluster_enabled, $cluster_nodename, $cluster_resource; $cluster_enabled = false; $cluster_nodename = ""; $cluster_resource = array(); function cluster_startelement($parser, $name, $attrs) { global $cluster_enabled, $cluster_nodename, $cluster_resource; if ($name == "CLUSTERING") { if ($attrs["STATE"] == "on") $cluster_enabled = true; else $cluster_enabled = false; } else if ($name == "NODENAME") $cluster_nodename = $attrs["VALUE"]; else if ($name == "RESOURCE") array_push($cluster_resource, $attrs["VALUE"]); } function cluster_endelement($parser, $name) { } $cluster_parser = xml_parser_create(); xml_set_element_handler($cluster_parser, "cluster_startelement", "cluster_endelement"); $cluster_fp = fopen("/opt/openfiler/etc/cluster.xml", "r"); while ($cluster_data = fread($cluster_fp, 4096)) xml_parse($cluster_parser, $cluster_data, feof($cluster_fp)); fclose($cluster_fp); xml_parser_free($cluster_parser); if ($action == "setclusterresources") { $fp = popen("/usr/bin/sudo /usr/bin/tee /opt/openfiler/etc/cluster.xml", "w"); fputs($fp, "\n"); fputs($fp, "\n"); if ($cluster_enabled) fputs($fp, "\t\n"); else fputs($fp, "\t\n"); for ($i = 0; $i < count($cluster_resource); $i++) if (${(sha1($cluster_resource[$i]) . "delete")} != "on") fputs($fp, "\t\n"); if (strlen(trim($newresource)) > 0) fputs($fp, "\t\n"); fputs($fp, "\n"); fputs($fp, "\n"); pclose($fp); // commented out for now // apply_configuration(); header("Location: ./general_cluster.html"); 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.

HA cluster resources\n"); if ($cluster_enabled) print("

Cluster mode is currently enabled.

\n"); else print("

Cluster mode is currently disabled.

\n"); print("

Node name is " . ((strlen($cluster_nodename) > 0) ? $cluster_nodename : "currently unset") . "

\n"); print("
\n"); print("\n"); print("
\n"); print("\n"); ?> \n"); print("\t\n"); print("\t\n"); print("\n"); } $dvalue = $GLOBALS["color_table_heading"]; print("\n"); print("\t\n"); print("\t\n"); print("\n"); print("
" align="center">Delete ">Resource
" . htmlentities($cluster_resource[$i]) . "
New
\n"); print("
\n"); print("

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