_("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; } $serverstring = ""; $workgroup = ""; $winbind_enabled = false; $winbind_uid_begin = 10000; $winbind_uid_end = 20000; $winbind_gid_begin = 10000; $winbind_gid_end = 20000; $winbind_pdc = ""; $winbind_admin_username = ""; $winbind_admin_password = ""; function smb_startelement($parser, $name, $attrs) { global $serverstring, $workgroup; global $winbind_enabled, $winbind_uid_begin, $winbind_uid_end, $winbind_gid_begin, $winbind_gid_end; global $winbind_pdc, $winbind_admin_username, $winbind_admin_password; if ($name == "SERVERSTRING") $serverstring = $attrs["VALUE"]; else if ($name == "WORKGROUP") $workgroup = $attrs["VALUE"]; else if ($name == "WINBIND") { $winbind_enabled = ($attrs["ENABLED"] == "on"); $winbind_uid_begin = $attrs["UIDBEGIN"]; $winbind_uid_end = $attrs["UIDEND"]; $winbind_gid_begin = $attrs["GIDBEGIN"]; $winbind_gid_end = $attrs["GIDEND"]; $winbind_pdc = $attrs["PDC"]; $winbind_admin_username = $attrs["ADMINUSERNAME"]; $winbind_admin_password = $attrs["ADMINPASSWORD"]; } } function smb_endelement($parser, $name) { } $smb_parser = xml_parser_create(); xml_set_element_handler($smb_parser, "smb_startelement", "smb_endelement"); $smb_fp = fopen("/opt/openfiler/etc/smb_settings.xml", "r"); while ($smb_data = fread($smb_fp, 4096)) xml_parse($smb_parser, $smb_data, feof($smb_fp)); fclose($smb_fp); xml_parser_free($smb_parser); if ($actionnewserverstring == "Change") { $fp = popen("/usr/bin/sudo /usr/bin/tee /opt/openfiler/etc/smb_settings.xml", "w"); fputs($fp, "\n"); fputs($fp, "Welcome Administrator. The following are various system information and preferences, arranged into tabs. Please click on a tab to open up that category.
SMB settings\n"); print("