finished implementation of user profiles
This commit is contained in:
parent
bc35660a10
commit
4994c3786b
|
@ -23,4 +23,238 @@ $Id$
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
include_once("../../lib/status.inc");
|
||||||
|
include_once("../../lib/account.inc");
|
||||||
|
include_once("../../lib/profiles.inc");
|
||||||
|
include_once("../../lib/ldap.inc");
|
||||||
|
|
||||||
|
// start session
|
||||||
|
session_save_path("../../sess");
|
||||||
|
@session_start();
|
||||||
|
|
||||||
|
// abort button was pressed in profileuser/~host.php
|
||||||
|
// back to profile editor
|
||||||
|
if ($_POST['abort']) {
|
||||||
|
echo("<meta http-equiv=\"refresh\" content=\"0; URL=profilemain.php\">");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// check if user is logged in, if not go to login
|
||||||
|
if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
|
||||||
|
echo("<meta http-equiv=\"refresh\" content=\"0; URL=../login.php\">\n");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
// print header
|
||||||
|
echo ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
|
||||||
|
echo ("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
|
||||||
|
echo ("<html><head>\n<title></title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n</head><body><br>\n");
|
||||||
|
|
||||||
|
// save user profile
|
||||||
|
if ($_GET['type'] == "user") {
|
||||||
|
$acct = new account();
|
||||||
|
// check input
|
||||||
|
if ($_POST['general_group'] && eregi("^[a-z]([a-z0-9_\\-])*$", $_POST['general_group'])) {
|
||||||
|
$acct->general_group = $_POST['general_group'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", "", _("Primary group name is invalid!") . " " . $_POST['general_group']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['general_groupadd']) {
|
||||||
|
$acct->general_groupadd = $_POST['general_groupadd'];
|
||||||
|
}
|
||||||
|
if ($_POST['general_homedir'] && eregi("^[/]([a-z0-9])+([/][a-z0-9_\\-\\$]+)*$", $_POST['general_homedir'])) {
|
||||||
|
$acct->general_homedir = $_POST['general_homedir'];
|
||||||
|
}
|
||||||
|
elseif ($_POST['general_homedir']) {
|
||||||
|
StatusMessage("ERROR", "", _("Homedir is invalid!") . " " . $_POST['general_homedir']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['general_shell'] && eregi("^[/]([a-z])+([/][a-z]+)*$", $_POST['general_shell'])) {
|
||||||
|
$acct->general_shell = $_POST['general_shell'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", "", _("Shell is invalid!") . " " . $_POST['general_shell']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (($_POST['unix_password_no'] == "1") || ($_POST['unix_password_no'] == "0")) {
|
||||||
|
$acct->unix_password_no = $_POST['unix_password_no'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", "", _("Wrong parameter for login disable!") . " " . $_POST['unix_password_no']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['unix_pwdwarn'] && is_numeric($_POST['unix_pwdwarn'])) {
|
||||||
|
$acct->unix_pwdwarn = $_POST['unix_pwdwarn'];
|
||||||
|
}
|
||||||
|
elseif ($_POST['unix_pwdwarn']) {
|
||||||
|
StatusMessage("ERROR", "", _("Wrong parameter for Unix password warning!") . " " . $_POST['unix_pwdwarn']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['unix_pwdminage'] && is_numeric($_POST['unix_pwdminage'])) {
|
||||||
|
$acct->unix_pwdminage = $_POST['unix_pwdminage'];
|
||||||
|
}
|
||||||
|
elseif ($_POST['unix_pwdminage']) {
|
||||||
|
StatusMessage("ERROR", "", _("Password minimum age is not numeric!") . " " . $_POST['unix_pwdminage']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['unix_pwdmaxage'] && is_numeric($_POST['unix_pwdmaxage'])) {
|
||||||
|
$acct->unix_pwdmaxage = $_POST['unix_pwdmaxage'];
|
||||||
|
}
|
||||||
|
elseif ($_POST['unix_pwdmaxage']) {
|
||||||
|
StatusMessage("ERROR", "", _("Password maximum age is not numeric!") . " " . $_POST['unix_pwdmaxage']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['unix_pwdexpire_day'] && is_numeric($_POST['unix_pwdexpire_day'])) {
|
||||||
|
$acct->unix_pwdexpire_day = $_POST['unix_pwdexpire_day'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", "", _("Wrong parameter for password expiry day!") . " " . $_POST['unix_pwdexpire_day']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['unix_pwdexpire_mon'] && is_numeric($_POST['unix_pwdexpire_mon'])) {
|
||||||
|
$acct->unix_pwdexpire_mon = $_POST['unix_pwdexpire_mon'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", "", _("Wrong parameter for password expiry month!") . " " . $_POST['unix_pwdexpire_mon']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['unix_pwdexpire_yea'] && is_numeric($_POST['unix_pwdexpire_yea'])) {
|
||||||
|
$acct->unix_pwdexpire_yea = $_POST['unix_pwdexpire_yea'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", "", _("Wrong parameter for password expiry year!") . " " . $_POST['unix_pwdexpire_yea']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (($_POST['unix_deactivated'] == "1") || ($_POST['unix_deactivated'] == "0")) {
|
||||||
|
$acct->unix_deactivated = $_POST['unix_deactivated'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", "", _("Wrong parameter for Unix account activation!") . " " . $_POST['unix_deactivated']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['unix_pwdallowlogin'] && is_numeric($_POST['unix_pwdallowlogin'])) {
|
||||||
|
$acct->unix_pwdallowlogin = $_POST['unix_pwdallowlogin'];
|
||||||
|
}
|
||||||
|
elseif ($_POST['unix_pwdallowlogin']) {
|
||||||
|
StatusMessage("ERROR", "", _("Password expiry is not numeric!") . " " . $_POST['unix_pwdallowlogin']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (($_POST['smb_password_no'] == "1") || ($_POST['smb_password_no'] == "0")) {
|
||||||
|
$acct->smb_password_no = $_POST['smb_password_no'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", "", _("Wrong parameter for Samba option: no password!") . " " . $_POST['smb_password_no']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (($_POST['smb_useunixpwd'] == "1") || ($_POST['smb_useunixpwd'] == "0")) {
|
||||||
|
$acct->smb_useunixpwd = $_POST['smb_useunixpwd'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", "", _("Wrong parameter for Samba option: use Unix password!") . " " . $_POST['smb_useunixpwd']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (($_POST['smb_pwdcanchange'] == "1") || ($_POST['smb_pwdcanchange'] == "0")) {
|
||||||
|
$acct->smb_pwdcanchange = $_POST['smb_pwdcanchange'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", "", _("Wrong parameter for Samba option: user can change password!") . " " . $_POST['smb_pwdcanchange']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (($_POST['smb_pwdmustchange'] == "1") || ($_POST['smb_pwdmustchange'] == "0")) {
|
||||||
|
$acct->smb_pwdmustchange = $_POST['smb_pwdmustchange'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", "", _("Wrong parameter for Samba option: user must change password!") . " " . $_POST['smb_pwdmustchange']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['smb_homedrive'] && ereg("^[D-Z]:$", $_POST['smb_homedrive'])) {
|
||||||
|
$acct->smb_homedrive = $_POST['smb_homedrive'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", "", _("Wrong parameter for Samba option: home drive!") . " " . $_POST['smb_homedrive']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['smb_smbhome'] && eregi("^[/]([a-z0-9])+([/][a-z0-9_\\-\\$]+)*$", $_POST['smb_smbhome'])) {
|
||||||
|
$acct->smb_smbhome = $_POST['smb_smbhome'];
|
||||||
|
}
|
||||||
|
elseif ($_POST['smb_smbhome']) {
|
||||||
|
StatusMessage("ERROR", "", _("Samba home directory is invalid!") . " " . $_POST['smb_smbhome']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['smb_profilepath'] && eregi("^[/]([a-z0-9])+([/][a-z0-9_\\-\\$]+)*$", $_POST['smb_profilepath'])) {
|
||||||
|
$acct->smb_profilePath = $_POST['smb_profilepath'];
|
||||||
|
}
|
||||||
|
elseif ($_POST['smb_profilepath']) {
|
||||||
|
StatusMessage("ERROR", "", _("Profile path is invalid!") . " " . $_POST['smb_profilepath']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['smb_scriptpath'] && eregi("^[/]([a-z0-9])+([/][a-z0-9_\\-\\$]+)*$", $_POST['smb_scriptpath'])) {
|
||||||
|
$acct->smb_scriptpath = $_POST['smb_scriptpath'];
|
||||||
|
}
|
||||||
|
elseif ($_POST['smb_scriptpath']) {
|
||||||
|
StatusMessage("ERROR", "", _("Script path is invalid!") . " " . $_POST['smb_scriptpath']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['smb_smbuserworkstations'] && eregi("^[a-z0-9\\.\\-_]+( [a-z0-9\\.\\-_]+)*$", $_POST['smb_smbuserworkstations'])) {
|
||||||
|
$acct->smb_smbuserworkstations = $_POST['smb_smbuserworkstations'];
|
||||||
|
}
|
||||||
|
elseif ($_POST['smb_smbuserworkstations']) {
|
||||||
|
StatusMessage("ERROR", "", _("Samba workstations are invalid!") . " " . $_POST['smb_smbuserworkstations']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['smb_domain'] && eregi("^[a-z0-9_\\-]+$", $_POST['smb_domain'])) {
|
||||||
|
$acct->smb_domain = $_POST['smb_domain'];
|
||||||
|
}
|
||||||
|
elseif ($_POST['smb_domain']) {
|
||||||
|
StatusMessage("ERROR", "", _("Domain name is invalid!") . " " . $_POST['smb_domain']);
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if ($_POST['profname'] && eregi("^[0-9a-z\\-_]+$", $_POST['profname'])) {
|
||||||
|
$profname = $_POST['profname'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", "", _("Invalid profile name!"));
|
||||||
|
echo ("<br><br><a href=\"javascript:history.back()\">" . _("Back to profile editor...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
// save profile
|
||||||
|
saveUserProfile($acct, $profname);
|
||||||
|
echo ("<br><br><p align=\"center\"><big><b>" . _("Profile ") . $profname . _(" was saved.") . "</b></big></p>");
|
||||||
|
echo ("<br><p><a href=\"profilemain.php\">" . _("Back to profile editor") . "</a></p>");
|
||||||
|
}
|
||||||
|
|
||||||
|
// save host profile
|
||||||
|
elseif ($_GET['type'] == "host") {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// error: no or wrong type
|
||||||
|
else echo (StatusMessage("ERROR", "", _("No type specified!")));
|
||||||
|
|
||||||
|
echo ("</body></html>\n");
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -44,6 +44,15 @@ echo ("<html><head>\n<title></title>\n<link rel=\"stylesheet\" type=\"text/css\"
|
||||||
|
|
||||||
$acct = new Account();
|
$acct = new Account();
|
||||||
|
|
||||||
|
// get list of login shells
|
||||||
|
$shelllist = file('../../config/shells');
|
||||||
|
$hells = array();
|
||||||
|
for ($i = 0; $i < sizeof($shelllist); $i++) {
|
||||||
|
$shelllist[$i] = chop($shelllist[$i]);
|
||||||
|
$shelllist[$i] = trim($shelllist[$i]);
|
||||||
|
if ($shelllist[$i] != "") $shells[sizeof($shells)] = $shelllist[$i];
|
||||||
|
}
|
||||||
|
|
||||||
// check if profile should be edited
|
// check if profile should be edited
|
||||||
if ($_GET['edit']) {
|
if ($_GET['edit']) {
|
||||||
$acct = loadUserProfile($_GET['edit']);
|
$acct = loadUserProfile($_GET['edit']);
|
||||||
|
@ -53,7 +62,7 @@ if ($_GET['edit']) {
|
||||||
$groups = findgroups();
|
$groups = findgroups();
|
||||||
|
|
||||||
// display formular
|
// display formular
|
||||||
echo ("<form action=\"profilecreate.php\" method=\"post\">\n");
|
echo ("<form action=\"profilecreate.php?type=user\" method=\"post\">\n");
|
||||||
|
|
||||||
|
|
||||||
// Unix part
|
// Unix part
|
||||||
|
@ -75,9 +84,10 @@ echo ("</tr>\n");
|
||||||
// additional groups
|
// additional groups
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("Additional groups") . ": </b></td>\n");
|
echo ("<td align=\"right\"><b>" . _("Additional groups") . ": </b></td>\n");
|
||||||
echo ("<td><select name=\"general_groupadd\" size=5>\n");
|
echo ("<td><select name=\"general_groupadd[]\" size=5 multiple>\n");
|
||||||
for ($i = 0; $i < sizeof($groups); $i++) {
|
for ($i = 0; $i < sizeof($groups); $i++) {
|
||||||
if ($acct->general_group == $groups[$i]) echo ("<option selected>" . $groups[$i] . "</option>\n");
|
echo "<br>hallo";
|
||||||
|
if (in_array($groups[$i], $acct->general_groupadd)) echo ("<option selected>" . $groups[$i] . "</option>\n");
|
||||||
else echo ("<option>" . $groups[$i] . "</option>\n");
|
else echo ("<option>" . $groups[$i] . "</option>\n");
|
||||||
}
|
}
|
||||||
echo ("</select></td>\n");
|
echo ("</select></td>\n");
|
||||||
|
@ -97,7 +107,12 @@ echo ("</tr>\n");
|
||||||
// login shell
|
// login shell
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("Login Shell") . ": </b></td>\n");
|
echo ("<td align=\"right\"><b>" . _("Login Shell") . ": </b></td>\n");
|
||||||
echo ("<td><input type=\"text\" value=\"" . $acct->general_shell . "\" name=\"general_shell\"></td>\n");
|
echo ("<td><select name=\"general_shell\">\n");
|
||||||
|
for ($i = 0; $i < sizeof($shells); $i++) {
|
||||||
|
if ($shells[$i] == $acct->general_shell) echo ("<option selected>" . $shells[$i] . "</option>\n");
|
||||||
|
else echo ("<option>" . $shells[$i] . "</option>\n");
|
||||||
|
}
|
||||||
|
echo ("</select></td>\n");
|
||||||
echo ("<td><a href=\"../help.php?HelpNumber=333\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
echo ("<td><a href=\"../help.php?HelpNumber=333\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
|
||||||
|
@ -108,31 +123,38 @@ echo ("<tr><td> </td><td> </td><td> </td></tr>\n");
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("Set Unix Password") . ": </b></td>\n");
|
echo ("<td align=\"right\"><b>" . _("Set Unix Password") . ": </b></td>\n");
|
||||||
echo ("<td><select name=\"unix_password_no\">\n");
|
echo ("<td><select name=\"unix_password_no\">\n");
|
||||||
if ($acct->unix_password_no == "on") echo ("<option selected>no</option><option>yes</option>\n");
|
if ($acct->unix_password_no == "1") echo ("<option selected value=1>"._("no")."</option><option value=0>"._("yes")."</option>\n");
|
||||||
else echo ("<option selected>yes</option><option>no</option>\n");
|
else echo ("<option selected value=0>"._("yes")."</option><option value=1>"._("no")."</option>\n");
|
||||||
echo ("</select></td>\n");
|
echo ("</select></td>\n");
|
||||||
echo ("<td><a href=\"../help.php?HelpNumber=334\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
echo ("<td><a href=\"../help.php?HelpNumber=334\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
|
||||||
|
// Unix: password expiry warn
|
||||||
|
echo ("<tr>\n");
|
||||||
|
echo ("<td align=\"right\"><b>" . _("Password warning") . ": </b></td>\n");
|
||||||
|
echo ("<td><input type=\"text\" name=\"unix_pwdwarn\" value=\"" . $acct->unix_pwdwarn . "\"></td>\n");
|
||||||
|
echo ("<td><a href=\"../help.php?HelpNumber=335\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
|
echo ("</tr>\n");
|
||||||
|
|
||||||
// Unix: password expiry
|
// Unix: password expiry
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("Password expiry") . ": </b></td>\n");
|
echo ("<td align=\"right\"><b>" . _("Password expiry") . ": </b></td>\n");
|
||||||
echo ("<td><input type=\"text\" name=\"unix_pwdallowlogin\" value=\"" . $acct->unix_pwdallowlogin . "\"></td>\n");
|
echo ("<td><input type=\"text\" name=\"unix_pwdallowlogin\" value=\"" . $acct->unix_pwdallowlogin . "\"></td>\n");
|
||||||
echo ("<td><a href=\"../help.php?HelpNumber=335\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
echo ("<td><a href=\"../help.php?HelpNumber=336\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
|
||||||
// maximum password age
|
// maximum password age
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("Maximum password age") . ": </b></td>\n");
|
echo ("<td align=\"right\"><b>" . _("Maximum password age") . ": </b></td>\n");
|
||||||
echo ("<td><input type=\"text\" name=\"unix_pwdmaxage\" value=\"" . $acct->unix_pwdmaxage . "\"></td>\n");
|
echo ("<td><input type=\"text\" name=\"unix_pwdmaxage\" value=\"" . $acct->unix_pwdmaxage . "\"></td>\n");
|
||||||
echo ("<td><a href=\"../help.php?HelpNumber=336\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
echo ("<td><a href=\"../help.php?HelpNumber=337\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
|
||||||
// minimum password age
|
// minimum password age
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("Minimum password age") . ": </b></td>\n");
|
echo ("<td align=\"right\"><b>" . _("Minimum password age") . ": </b></td>\n");
|
||||||
echo ("<td><input type=\"text\" name=\"unix_pwdminage\" value=\"" . $acct->unix_pwdminage . "\"></td>\n");
|
echo ("<td><input type=\"text\" name=\"unix_pwdminage\" value=\"" . $acct->unix_pwdminage . "\"></td>\n");
|
||||||
echo ("<td><a href=\"../help.php?HelpNumber=337\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
echo ("<td><a href=\"../help.php?HelpNumber=338\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
|
||||||
// password expire date
|
// password expire date
|
||||||
|
@ -157,7 +179,7 @@ for ( $i=2003; $i<=2030; $i++ ) {
|
||||||
else echo "<option>$i</option>\n";
|
else echo "<option>$i</option>\n";
|
||||||
}
|
}
|
||||||
echo ("</select></td>");
|
echo ("</select></td>");
|
||||||
echo ("<td><a href=\"../help.php?HelpNumber=338\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
echo ("<td><a href=\"../help.php?HelpNumber=339\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
|
||||||
// empty row
|
// empty row
|
||||||
|
@ -167,10 +189,10 @@ echo ("<tr><td> </td><td> </td><td> </td></tr>\n");
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("Account is deactivated") . ": </b></td>\n");
|
echo ("<td align=\"right\"><b>" . _("Account is deactivated") . ": </b></td>\n");
|
||||||
echo ("<td><select name=\"unix_deactivated\">\n");
|
echo ("<td><select name=\"unix_deactivated\">\n");
|
||||||
if ($acct->unix_deactivated == "1") echo ("<option selected>yes</option><option>no</option>\n");
|
if ($acct->unix_deactivated == "1") echo ("<option selected value=1>"._("yes")."</option><option value=0>"._("no")."</option>\n");
|
||||||
else echo ("<option selected>no</option><option>yes</option>\n");
|
else echo ("<option selected value=0>"._("no")."</option><option value=1>"._("yes")."</option>\n");
|
||||||
echo ("</select></td>\n");
|
echo ("</select></td>\n");
|
||||||
echo ("<td><a href=\"../help.php?HelpNumber=339\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
echo ("<td><a href=\"../help.php?HelpNumber=340\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
|
||||||
|
|
||||||
|
@ -188,8 +210,8 @@ echo ("<table border=0>\n");
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("Set Samba Password") . ": </b></td>\n");
|
echo ("<td align=\"right\"><b>" . _("Set Samba Password") . ": </b></td>\n");
|
||||||
echo ("<td><select name=\"smb_password_no\">\n");
|
echo ("<td><select name=\"smb_password_no\">\n");
|
||||||
if ($acct->smb_password_no == "on") echo ("<option selected>no</option><option>yes</option>\n");
|
if ($acct->smb_password_no == "1") echo ("<option selected value=1>"._("no")."</option><option value=0>"._("yes")."</option>\n");
|
||||||
else echo ("<option selected>yes</option><option>no</option>\n");
|
else echo ("<option selected value=0>"._("yes")."</option><option value=1>"._("no")."</option>\n");
|
||||||
echo ("</select></td>\n");
|
echo ("</select></td>\n");
|
||||||
echo ("<td><a href=\"../help.php?HelpNumber=300\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
echo ("<td><a href=\"../help.php?HelpNumber=300\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
@ -198,8 +220,8 @@ echo ("</tr>\n");
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("Set Unix Password for Samba") . ": </b></td>\n");
|
echo ("<td align=\"right\"><b>" . _("Set Unix Password for Samba") . ": </b></td>\n");
|
||||||
echo ("<td><select name=\"smb_useunixpwd\">\n");
|
echo ("<td><select name=\"smb_useunixpwd\">\n");
|
||||||
if ($acct->smb_useunixpwd == "0") echo ("<option selected>no</option><option>yes</option>\n");
|
if ($acct->smb_useunixpwd == "0") echo ("<option selected value=0>"._("no")."</option><option value=1>"._("yes")."</option>\n");
|
||||||
else echo ("<option selected>yes</option><option>no</option>\n");
|
else echo ("<option selected value=1>"._("yes")."</option><option value=0>"._("no")."</option>\n");
|
||||||
echo ("</select></td>\n");
|
echo ("</select></td>\n");
|
||||||
echo ("<td><a href=\"../help.php?HelpNumber=301\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
echo ("<td><a href=\"../help.php?HelpNumber=301\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
@ -208,8 +230,8 @@ echo ("</tr>\n");
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("User can change password") . ": </b></td>\n");
|
echo ("<td align=\"right\"><b>" . _("User can change password") . ": </b></td>\n");
|
||||||
echo ("<td><select name=\"smb_pwdcanchange\">\n");
|
echo ("<td><select name=\"smb_pwdcanchange\">\n");
|
||||||
if ($acct->smb_pwdcanchange == "0") echo ("<option selected>no</option><option>yes</option>\n");
|
if ($acct->smb_pwdcanchange == "0") echo ("<option selected value=0>"._("no")."</option><option value=1>"._("yes")."</option>\n");
|
||||||
else echo ("<option selected>yes</option><option>no</option>\n");
|
else echo ("<option selected value=1>"._("yes")."</option><option value=0>"._("no")."</option>\n");
|
||||||
echo ("</select></td>\n");
|
echo ("</select></td>\n");
|
||||||
echo ("<td><a href=\"../help.php?HelpNumber=302\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
echo ("<td><a href=\"../help.php?HelpNumber=302\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
@ -218,8 +240,8 @@ echo ("</tr>\n");
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("User must change password") . ": </b></td>\n");
|
echo ("<td align=\"right\"><b>" . _("User must change password") . ": </b></td>\n");
|
||||||
echo ("<td><select name=\"smb_pwdmustchange\">\n");
|
echo ("<td><select name=\"smb_pwdmustchange\">\n");
|
||||||
if ($acct->smb_pwdmustchange == "1") echo ("<option selected>yes</option><option>no</option>\n");
|
if ($acct->smb_pwdmustchange == "1") echo ("<option selected value=1>"._("yes")."</option><option value=0>"._("no")."</option>\n");
|
||||||
else echo ("<option selected>no</option><option>yes</option>\n");
|
else echo ("<option selected value=0>"._("no")."</option><option value=1>"._("yes")."</option>\n");
|
||||||
echo ("</select></td>\n");
|
echo ("</select></td>\n");
|
||||||
echo ("<td><a href=\"../help.php?HelpNumber=303\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
echo ("<td><a href=\"../help.php?HelpNumber=303\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
@ -268,14 +290,14 @@ echo ("</tr>\n");
|
||||||
// path to profile
|
// path to profile
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("Profile path") . ": </b></td>\n");
|
echo ("<td align=\"right\"><b>" . _("Profile path") . ": </b></td>\n");
|
||||||
echo ("<td><input type=\"text\" value=\"" . $acct->profilepath . "\" name=\"smb_profilepath\"></td>\n");
|
echo ("<td><input type=\"text\" value=\"" . $acct->smb_profilePath . "\" name=\"smb_profilepath\"></td>\n");
|
||||||
echo ("<td><a href=\"../help.php?HelpNumber=306\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
echo ("<td><a href=\"../help.php?HelpNumber=306\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
|
||||||
// path to logon scripts
|
// path to logon scripts
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td align=\"right\"><b>" . _("Script path") . ": </b></td>\n");
|
echo ("<td align=\"right\"><b>" . _("Script path") . ": </b></td>\n");
|
||||||
echo ("<td><input type=\"text\" value=\"" . $acct->scriptpath . "\" name=\"smb_scriptpath\"></td>\n");
|
echo ("<td><input type=\"text\" value=\"" . $acct->smb_scriptpath . "\" name=\"smb_scriptpath\"></td>\n");
|
||||||
echo ("<td><a href=\"../help.php?HelpNumber=307\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
echo ("<td><a href=\"../help.php?HelpNumber=307\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
|
|
||||||
|
@ -310,6 +332,7 @@ echo ("<table border=0>\n");
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td><b>" . _("Profile Name") . ":</b></td>\n");
|
echo ("<td><b>" . _("Profile Name") . ":</b></td>\n");
|
||||||
echo ("<td><input type=\"text\" name=\"profname\" value=\"" . $_GET['edit'] . "\"></td>\n");
|
echo ("<td><input type=\"text\" name=\"profname\" value=\"" . $_GET['edit'] . "\"></td>\n");
|
||||||
|
echo ("<td><a href=\"../help.php?HelpNumber=360\" target=\"lamhelp\">" . _("Help") . "</a></td>\n");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
echo ("<tr>\n");
|
echo ("<tr>\n");
|
||||||
echo ("<td colspan=2> </td>");
|
echo ("<td colspan=2> </td>");
|
||||||
|
@ -318,6 +341,7 @@ echo ("<tr>\n");
|
||||||
echo ("<td><input type=\"submit\" name=\"submit\" value=\"" . _("Save") . "\"></td>\n");
|
echo ("<td><input type=\"submit\" name=\"submit\" value=\"" . _("Save") . "\"></td>\n");
|
||||||
echo ("<td><input type=\"reset\" name=\"reset\" value=\"" . _("Reset") . "\">\n");
|
echo ("<td><input type=\"reset\" name=\"reset\" value=\"" . _("Reset") . "\">\n");
|
||||||
echo ("<input type=\"submit\" name=\"abort\" value=\"" . _("Abort") . "\"></td>\n");
|
echo ("<input type=\"submit\" name=\"abort\" value=\"" . _("Abort") . "\"></td>\n");
|
||||||
|
echo ("<td> </td>");
|
||||||
echo ("</tr>\n");
|
echo ("</tr>\n");
|
||||||
echo ("</table>\n");
|
echo ("</table>\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue