translation update
This commit is contained in:
parent
f6edf82814
commit
63bf69b609
|
@ -233,47 +233,54 @@ function saveUserProfile($account, $profile) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$path = substr(__FILE__, 0, strlen(__FILE__) - 17) . "/config/profiles/users/" . $profile . ".pru";
|
$path = substr(__FILE__, 0, strlen(__FILE__) - 17) . "/config/profiles/users/" . $profile . ".pru";
|
||||||
$file = fopen($path, "w");
|
$file = @fopen($path, "w");
|
||||||
// replace user and group names
|
if ($file) {
|
||||||
$homedir = $account->general_homedir;
|
// replace user and group names
|
||||||
$profpath = $account->smb_profilePath;
|
$homedir = $account->general_homedir;
|
||||||
$scriptPath = $account->smb_scriptPath;
|
$profpath = $account->smb_profilePath;
|
||||||
$smbhome = $account->smb_smbhome;
|
$scriptPath = $account->smb_scriptPath;
|
||||||
if ($account->general_username) {
|
$smbhome = $account->smb_smbhome;
|
||||||
$homedir = str_replace($account->general_username, "\$user", $homedir);
|
if ($account->general_username) {
|
||||||
$profpath = str_replace($account->general_username, "\$user", $profpath);
|
$homedir = str_replace($account->general_username, "\$user", $homedir);
|
||||||
$scriptPath = str_replace($account->general_username, "\$user", $scriptPath);
|
$profpath = str_replace($account->general_username, "\$user", $profpath);
|
||||||
$smbhome = str_replace($account->general_username, "\$user", $smbhome);
|
$scriptPath = str_replace($account->general_username, "\$user", $scriptPath);
|
||||||
|
$smbhome = str_replace($account->general_username, "\$user", $smbhome);
|
||||||
|
}
|
||||||
|
if ($account->general_group) {
|
||||||
|
$homedir = str_replace($account->general_group, "\$group", $homedir);
|
||||||
|
$profpath = str_replace($account->general_group, "\$group", $profpath);
|
||||||
|
$scriptPath = str_replace($account->general_group, "\$group", $scriptPath);
|
||||||
|
$smbhome = str_replace($account->general_group, "\$group", $smbhome);
|
||||||
|
}
|
||||||
|
// write attributes
|
||||||
|
if (isset($account->general_group)) fputs($file, "general_group: " . $account->general_group . "\n");
|
||||||
|
if (isset($account->general_groupadd)) fputs($file, "general_groupadd: " . implode(";", $account->general_groupadd) . "\n");
|
||||||
|
if (isset($account->general_homedir)) fputs($file, "general_homedir: " . $homedir . "\n");
|
||||||
|
if (isset($account->general_shell)) fputs($file, "general_shell: " . $account->general_shell . "\n");
|
||||||
|
if (isset($account->unix_password_no)) fputs($file, "unix_password_no: " . $account->unix_password_no . "\n");
|
||||||
|
if (isset($account->unix_pwdwarn)) fputs($file, "unix_pwdwarn: " . $account->unix_pwdwarn . "\n");
|
||||||
|
if (isset($account->unix_pwdallowlogin)) fputs($file, "unix_pwdallowlogin: " . $account->unix_pwdallowlogin . "\n");
|
||||||
|
if (isset($account->unix_pwdminage)) fputs($file, "unix_pwdminage: " . $account->unix_pwdminage . "\n");
|
||||||
|
if (isset($account->unix_pwdmaxage)) fputs($file, "unix_pwdmaxage: " . $account->unix_pwdmaxage . "\n");
|
||||||
|
if (isset($account->unix_pwdexpire)) fputs($file, "unix_pwdexpire: " . $account->unix_pwdexpire . "\n");
|
||||||
|
if (isset($account->unix_deactivated)) fputs($file, "unix_deactivated: " . $account->unix_deactivated . "\n");
|
||||||
|
if (isset($account->smb_password_no)) fputs($file, "smb_password_no: " . $account->smb_password_no . "\n");
|
||||||
|
if (isset($account->smb_useunixpwd)) fputs($file, "smb_useunixpwd: " . $account->smb_useunixpwd . "\n");
|
||||||
|
if (isset($account->smb_flagsD)) fputs($file, "smb_flagsD: " . $account->smb_flagsD . "\n");
|
||||||
|
if (isset($account->smb_homedrive)) fputs($file, "smb_homedrive: " . $account->smb_homedrive . "\n");
|
||||||
|
if (isset($account->smb_scriptPath)) fputs($file, "smb_scriptPath: " . $scriptPath . "\n");
|
||||||
|
if (isset($account->smb_profilePath)) fputs($file, "smb_profilePath: " . $profpath . "\n");
|
||||||
|
if (isset($account->smb_smbuserworkstations)) fputs($file, "smb_smbuserworkstations: " . $account->smb_smbuserworkstations . "\n");
|
||||||
|
if (isset($account->smb_smbhome)) fputs($file, "smb_smbhome: " . $smbhome . "\n");
|
||||||
|
if (isset($account->smb_domain)) fputs($file, "smb_domain: " . $account->smb_domain . "\n");
|
||||||
|
// close file
|
||||||
|
fclose($file);
|
||||||
}
|
}
|
||||||
if ($account->general_group) {
|
else {
|
||||||
$homedir = str_replace($account->general_group, "\$group", $homedir);
|
StatusMessage("ERROR", _("Unable to save profile!"), $path);
|
||||||
$profpath = str_replace($account->general_group, "\$group", $profpath);
|
return false;
|
||||||
$scriptPath = str_replace($account->general_group, "\$group", $scriptPath);
|
|
||||||
$smbhome = str_replace($account->general_group, "\$group", $smbhome);
|
|
||||||
}
|
}
|
||||||
// write attributes
|
return true;
|
||||||
if (isset($account->general_group)) fputs($file, "general_group: " . $account->general_group . "\n");
|
|
||||||
if (isset($account->general_groupadd)) fputs($file, "general_groupadd: " . implode(";", $account->general_groupadd) . "\n");
|
|
||||||
if (isset($account->general_homedir)) fputs($file, "general_homedir: " . $homedir . "\n");
|
|
||||||
if (isset($account->general_shell)) fputs($file, "general_shell: " . $account->general_shell . "\n");
|
|
||||||
if (isset($account->unix_password_no)) fputs($file, "unix_password_no: " . $account->unix_password_no . "\n");
|
|
||||||
if (isset($account->unix_pwdwarn)) fputs($file, "unix_pwdwarn: " . $account->unix_pwdwarn . "\n");
|
|
||||||
if (isset($account->unix_pwdallowlogin)) fputs($file, "unix_pwdallowlogin: " . $account->unix_pwdallowlogin . "\n");
|
|
||||||
if (isset($account->unix_pwdminage)) fputs($file, "unix_pwdminage: " . $account->unix_pwdminage . "\n");
|
|
||||||
if (isset($account->unix_pwdmaxage)) fputs($file, "unix_pwdmaxage: " . $account->unix_pwdmaxage . "\n");
|
|
||||||
if (isset($account->unix_pwdexpire)) fputs($file, "unix_pwdexpire: " . $account->unix_pwdexpire . "\n");
|
|
||||||
if (isset($account->unix_deactivated)) fputs($file, "unix_deactivated: " . $account->unix_deactivated . "\n");
|
|
||||||
if (isset($account->smb_password_no)) fputs($file, "smb_password_no: " . $account->smb_password_no . "\n");
|
|
||||||
if (isset($account->smb_useunixpwd)) fputs($file, "smb_useunixpwd: " . $account->smb_useunixpwd . "\n");
|
|
||||||
if (isset($account->smb_flagsD)) fputs($file, "smb_flagsD: " . $account->smb_flagsD . "\n");
|
|
||||||
if (isset($account->smb_homedrive)) fputs($file, "smb_homedrive: " . $account->smb_homedrive . "\n");
|
|
||||||
if (isset($account->smb_scriptPath)) fputs($file, "smb_scriptPath: " . $scriptPath . "\n");
|
|
||||||
if (isset($account->smb_profilePath)) fputs($file, "smb_profilePath: " . $profpath . "\n");
|
|
||||||
if (isset($account->smb_smbuserworkstations)) fputs($file, "smb_smbuserworkstations: " . $account->smb_smbuserworkstations . "\n");
|
|
||||||
if (isset($account->smb_smbhome)) fputs($file, "smb_smbhome: " . $smbhome . "\n");
|
|
||||||
if (isset($account->smb_domain)) fputs($file, "smb_domain: " . $account->smb_domain . "\n");
|
|
||||||
// close file
|
|
||||||
fclose($file);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// saves an account object to an group profile with name $profile (without .prg)
|
// saves an account object to an group profile with name $profile (without .prg)
|
||||||
|
@ -291,12 +298,19 @@ function saveHostProfile($account, $profile) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$path = substr(__FILE__, 0, strlen(__FILE__) - 17) . "/config/profiles/hosts/" . $profile . ".prh";
|
$path = substr(__FILE__, 0, strlen(__FILE__) - 17) . "/config/profiles/hosts/" . $profile . ".prh";
|
||||||
$file = fopen($path, "w");
|
$file = @fopen($path, "w");
|
||||||
// write attributes
|
if ($file) {
|
||||||
if (isset($account->general_group)) fputs($file, "general_group: " . $account->general_group . "\n");
|
// write attributes
|
||||||
if (isset($account->smb_domain)) fputs($file, "smb_domain: " . $account->smb_domain . "\n");
|
if (isset($account->general_group)) fputs($file, "general_group: " . $account->general_group . "\n");
|
||||||
// close file
|
if (isset($account->smb_domain)) fputs($file, "smb_domain: " . $account->smb_domain . "\n");
|
||||||
fclose($file);
|
// close file
|
||||||
|
fclose($file);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
StatusMessage("ERROR", _("Unable to save profile!"), $path);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// deletes a user profile
|
// deletes a user profile
|
||||||
|
|
|
@ -170,12 +170,12 @@ echo "</tr>\n";
|
||||||
|
|
||||||
// print filter row
|
// print filter row
|
||||||
echo "<tr align=\"center\" class=\"grouplist\"><td width=22 height=34></td><td>";
|
echo "<tr align=\"center\" class=\"grouplist\"><td width=22 height=34></td><td>";
|
||||||
echo "<input type=\"submit\" name=\"apply_filter\" value=\"" . _("Apply") . "\">";
|
echo "<input type=\"submit\" name=\"apply_filter\" value=\"" . _("Filter") . "\">";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
// print input boxes for filters
|
// print input boxes for filters
|
||||||
for ($k = 0; $k < sizeof ($desc_array); $k++) {
|
for ($k = 0; $k < sizeof ($desc_array); $k++) {
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
echo ("<input type=\"text\" name=\"filter" . strtolower ($attr_array[$k]) .
|
echo ("<input type=\"text\" size=15 name=\"filter" . strtolower ($attr_array[$k]) .
|
||||||
"\" value=\"" . $_POST["filter" . strtolower($attr_array[$k])] . "\">");
|
"\" value=\"" . $_POST["filter" . strtolower($attr_array[$k])] . "\">");
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,12 +176,12 @@ echo "</tr>\n";
|
||||||
|
|
||||||
// print filter row
|
// print filter row
|
||||||
echo "<tr align=\"center\" class=\"hostlist\"><td width=22 height=34></td><td>";
|
echo "<tr align=\"center\" class=\"hostlist\"><td width=22 height=34></td><td>";
|
||||||
echo "<input type=\"submit\" name=\"apply_filter\" value=\"" . _("Apply") . "\">";
|
echo "<input type=\"submit\" name=\"apply_filter\" value=\"" . _("Filter") . "\">";
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
// print input boxes for filters
|
// print input boxes for filters
|
||||||
for ($k = 0; $k < sizeof ($desc_array); $k++) {
|
for ($k = 0; $k < sizeof ($desc_array); $k++) {
|
||||||
echo "<td>";
|
echo "<td>";
|
||||||
echo ("<input type=\"text\" name=\"filter" . strtolower ($attr_array[$k]) .
|
echo ("<input type=\"text\" size=15 name=\"filter" . strtolower ($attr_array[$k]) .
|
||||||
"\" value=\"" . $_POST["filter" . strtolower($attr_array[$k])] . "\">");
|
"\" value=\"" . $_POST["filter" . strtolower($attr_array[$k])] . "\">");
|
||||||
echo "</td>";
|
echo "</td>";
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,13 +192,13 @@ if ($user_count != 0) {
|
||||||
echo "</tr>\n";
|
echo "</tr>\n";
|
||||||
|
|
||||||
echo "<tr class=\"userlist\"><th width=22 height=34></th><th>\n";
|
echo "<tr class=\"userlist\"><th width=22 height=34></th><th>\n";
|
||||||
echo "<input type=\"submit\" name=\"apply_filter\" value=\"" . _("Apply") . "\">";
|
echo "<input type=\"submit\" name=\"apply_filter\" value=\"" . _("Filter") . "\">";
|
||||||
echo "</th>\n";
|
echo "</th>\n";
|
||||||
|
|
||||||
// print input boxes for filters
|
// print input boxes for filters
|
||||||
for ($k = 0; $k < sizeof ($desc_array); $k++) {
|
for ($k = 0; $k < sizeof ($desc_array); $k++) {
|
||||||
echo "<th>";
|
echo "<th>";
|
||||||
echo ("<input type=\"text\" name=\"filter" . strtolower ($attr_array[$k]) .
|
echo ("<input type=\"text\" size=15 name=\"filter" . strtolower ($attr_array[$k]) .
|
||||||
"\" value=\"" . $_POST["filter" . strtolower($attr_array[$k])] . "\">");
|
"\" value=\"" . $_POST["filter" . strtolower($attr_array[$k])] . "\">");
|
||||||
echo "</th>";
|
echo "</th>";
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,11 +27,14 @@ include_once("../../lib/status.inc");
|
||||||
include_once("../../lib/account.inc");
|
include_once("../../lib/account.inc");
|
||||||
include_once("../../lib/profiles.inc");
|
include_once("../../lib/profiles.inc");
|
||||||
include_once("../../lib/ldap.inc");
|
include_once("../../lib/ldap.inc");
|
||||||
|
include_once("../../lib/config.inc");
|
||||||
|
|
||||||
// start session
|
// start session
|
||||||
session_save_path("../../sess");
|
session_save_path("../../sess");
|
||||||
@session_start();
|
@session_start();
|
||||||
|
|
||||||
|
setlanguage();
|
||||||
|
|
||||||
// abort button was pressed in profileuser/~host.php
|
// abort button was pressed in profileuser/~host.php
|
||||||
// back to profile editor
|
// back to profile editor
|
||||||
if ($_POST['abort']) {
|
if ($_POST['abort']) {
|
||||||
|
@ -223,8 +226,9 @@ if ($_GET['type'] == "user") {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
// save profile
|
// save profile
|
||||||
saveUserProfile($acct, $profname);
|
if (saveUserProfile($acct, $profname)) {
|
||||||
echo ("<br><br><p align=\"center\"><big><b>" . _("Profile $profname was saved.") . "</b></big></p>");
|
echo StatusMessage("INFO", _("Profile was saved."), $profname);
|
||||||
|
}
|
||||||
echo ("<br><p><a href=\"profilemain.php\">" . _("Back to Profile Editor") . "</a></p>");
|
echo ("<br><p><a href=\"profilemain.php\">" . _("Back to Profile Editor") . "</a></p>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,8 +253,9 @@ elseif ($_GET['type'] == "host") {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
// save profile
|
// save profile
|
||||||
saveHostProfile($acct, $profname);
|
if (saveHostProfile($acct, $profname)) {
|
||||||
echo ("<br><br><p align=\"center\"><big><b>" . _("Profile $profname was saved.") . "</b></big></p>");
|
echo StatusMessage("INFO", _("Profile was saved."), $profname);
|
||||||
|
}
|
||||||
echo ("<br><p><a href=\"profilemain.php\">" . _("Back to Profile Editor") . "</a></p>");
|
echo ("<br><p><a href=\"profilemain.php\">" . _("Back to Profile Editor") . "</a></p>");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,11 +25,14 @@ $Id$
|
||||||
|
|
||||||
include_once("../../lib/profiles.inc");
|
include_once("../../lib/profiles.inc");
|
||||||
include_once("../../lib/ldap.inc");
|
include_once("../../lib/ldap.inc");
|
||||||
|
include_once("../../lib/config.inc");
|
||||||
|
|
||||||
// start session
|
// start session
|
||||||
session_save_path("../../sess");
|
session_save_path("../../sess");
|
||||||
@session_start();
|
@session_start();
|
||||||
|
|
||||||
|
setlanguage();
|
||||||
|
|
||||||
// check if user is logged in, if not go to login
|
// check if user is logged in, if not go to login
|
||||||
if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
|
if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
|
||||||
echo("<meta http-equiv=\"refresh\" content=\"0; URL=../login.php\">\n");
|
echo("<meta http-equiv=\"refresh\" content=\"0; URL=../login.php\">\n");
|
||||||
|
|
|
@ -26,11 +26,14 @@ $Id$
|
||||||
include_once("../../lib/profiles.inc");
|
include_once("../../lib/profiles.inc");
|
||||||
include_once("../../lib/ldap.inc");
|
include_once("../../lib/ldap.inc");
|
||||||
include_once("../../lib/account.inc");
|
include_once("../../lib/account.inc");
|
||||||
|
include_once("../../lib/config.inc");
|
||||||
|
|
||||||
// start session
|
// start session
|
||||||
session_save_path("../../sess");
|
session_save_path("../../sess");
|
||||||
@session_start();
|
@session_start();
|
||||||
|
|
||||||
|
setlanguage();
|
||||||
|
|
||||||
// check if user is logged in, if not go to login
|
// check if user is logged in, if not go to login
|
||||||
if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
|
if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
|
||||||
echo("<meta http-equiv=\"refresh\" content=\"0; URL=../login.php\">\n");
|
echo("<meta http-equiv=\"refresh\" content=\"0; URL=../login.php\">\n");
|
||||||
|
|
|
@ -25,11 +25,14 @@ $Id$
|
||||||
|
|
||||||
include_once("../../lib/profiles.inc");
|
include_once("../../lib/profiles.inc");
|
||||||
include_once("../../lib/ldap.inc");
|
include_once("../../lib/ldap.inc");
|
||||||
|
include_once("../../lib/config.inc");
|
||||||
|
|
||||||
// start session
|
// start session
|
||||||
session_save_path("../../sess");
|
session_save_path("../../sess");
|
||||||
@session_start();
|
@session_start();
|
||||||
|
|
||||||
|
setlanguage();
|
||||||
|
|
||||||
// check if user is logged in, if not go to login
|
// check if user is logged in, if not go to login
|
||||||
if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
|
if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
|
||||||
echo("<meta http-equiv=\"refresh\" content=\"0; URL=../login.php\">");
|
echo("<meta http-equiv=\"refresh\" content=\"0; URL=../login.php\">");
|
||||||
|
|
|
@ -26,11 +26,14 @@ $Id$
|
||||||
include_once("../../lib/profiles.inc");
|
include_once("../../lib/profiles.inc");
|
||||||
include_once("../../lib/ldap.inc");
|
include_once("../../lib/ldap.inc");
|
||||||
include_once("../../lib/account.inc");
|
include_once("../../lib/account.inc");
|
||||||
|
include_once("../../lib/config.inc");
|
||||||
|
|
||||||
// start session
|
// start session
|
||||||
session_save_path("../../sess");
|
session_save_path("../../sess");
|
||||||
@session_start();
|
@session_start();
|
||||||
|
|
||||||
|
setlanguage();
|
||||||
|
|
||||||
// check if user is logged in, if not go to login
|
// check if user is logged in, if not go to login
|
||||||
if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
|
if (!$_SESSION['ldap'] || !$_SESSION['ldap']->server()) {
|
||||||
echo("<meta http-equiv=\"refresh\" content=\"0; URL=../login.php\">\n");
|
echo("<meta http-equiv=\"refresh\" content=\"0; URL=../login.php\">\n");
|
||||||
|
|
Loading…
Reference in New Issue