_("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; } if ($action == "disable") { if ($service == "smb") { exec("/usr/bin/sudo /sbin/service smb stop"); exec("/usr/bin/sudo /sbin/chkconfig smb off"); } else if ($service == "nfsv3") { exec("/usr/bin/sudo /sbin/service nfs stop"); exec("/usr/bin/sudo /sbin/chkconfig nfs off"); } else if ($service == "atalk") { exec("/usr/bin/sudo /sbin/service atalk stop"); exec("/usr/bin/sudo /sbin/chkconfig atalk off"); } else if ($service == "ftp") { exec("/usr/bin/sudo /sbin/service xinetd stop"); exec("/usr/bin/sudo /sbin/chkconfig xinetd off"); } else if ($service == "http") { exec("/usr/bin/sudo /sbin/service httpd stop"); exec("/usr/bin/sudo /sbin/chkconfig httpd off"); } header("Location: ./services.html"); exit; } else if ($action == "enable") { if ($service == "smb") { exec("/usr/bin/sudo /sbin/service smb start"); exec("/usr/bin/sudo /sbin/chkconfig smb on"); } else if ($service == "nfsv3") { exec("/usr/bin/sudo /sbin/service nfs start"); exec("/usr/bin/sudo /sbin/chkconfig nfs on"); } else if ($service == "atalk") { exec("/usr/bin/sudo /sbin/service atalk start"); exec("/usr/bin/sudo /sbin/chkconfig atalk on"); } else if ($service == "http") { exec("/usr/bin/sudo /sbin/service httpd start"); exec("/usr/bin/sudo /sbin/chkconfig httpd on"); } header("Location: ./services.html"); exit; } /* $smb = (strstr(exec("/usr/bin/sudo /sbin/service smb status"), "running") ? 1 : 0); $nfsv3 = (strstr(exec("/usr/bin/sudo /sbin/service nfs status"), "running") ? 1 : 0); $atalk = (strstr(exec("/usr/bin/sudo /sbin/service atalk status"), "running") ? 1 : 0); */ $smb = (strstr(exec("/usr/bin/sudo /sbin/chkconfig --list smb"), "3:on") ? 1 : 0); $nfsv3 = (strstr(exec("/usr/bin/sudo /sbin/chkconfig --list nfs"), "3:on") ? 1 : 0); $atalk = (strstr(exec("/usr/bin/sudo /sbin/chkconfig --list atalk"), "3:on") ? 1 : 0); $ftp = (strstr(exec("/usr/bin/sudo /sbin/chkconfig --list xinetd"), "3:on") ? 1 : 0); $http = (strstr(exec("/usr/bin/sudo /sbin/chkconfig --list httpd"), "3:on") ? 1 : 0); generic_header(array("title" => _("Administration Section"))); single_begin(array()); print("Welcome Administrator. The following are various system information and preferences, arranged into tabs. Please click on a tab to open up that category.
Enable/Disable services\n"); print("Service Name | \n"); print("\tStatus | \n"); print("\tModification | \n"); print("
SMB/CIFS | \n"); print("\t" . (($smb != 0) ? "Enabled" : "Disabled") . " | \n"); print("\t" . (($smb != 0) ? "Disable" : "Enable") . " | \n"); print("
NFSv3 | \n"); print("\t" . (($nfsv3 != 0) ? "Enabled" : "Disabled") . " | \n"); print("\t" . (($nfsv3 != 0) ? "Disable" : "Enable") . " | \n"); print("