translation update
This commit is contained in:
parent
f6edf82814
commit
63bf69b609
|
@ -233,7 +233,8 @@ function saveUserProfile($account, $profile) {
|
|||
exit;
|
||||
}
|
||||
$path = substr(__FILE__, 0, strlen(__FILE__) - 17) . "/config/profiles/users/" . $profile . ".pru";
|
||||
$file = fopen($path, "w");
|
||||
$file = @fopen($path, "w");
|
||||
if ($file) {
|
||||
// replace user and group names
|
||||
$homedir = $account->general_homedir;
|
||||
$profpath = $account->smb_profilePath;
|
||||
|
@ -274,6 +275,12 @@ function saveUserProfile($account, $profile) {
|
|||
if (isset($account->smb_domain)) fputs($file, "smb_domain: " . $account->smb_domain . "\n");
|
||||
// close file
|
||||
fclose($file);
|
||||
}
|
||||
else {
|
||||
StatusMessage("ERROR", _("Unable to save profile!"), $path);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// saves an account object to an group profile with name $profile (without .prg)
|
||||
|
@ -291,12 +298,19 @@ function saveHostProfile($account, $profile) {
|
|||
exit;
|
||||
}
|
||||
$path = substr(__FILE__, 0, strlen(__FILE__) - 17) . "/config/profiles/hosts/" . $profile . ".prh";
|
||||
$file = fopen($path, "w");
|
||||
$file = @fopen($path, "w");
|
||||
if ($file) {
|
||||
// write attributes
|
||||
if (isset($account->general_group)) fputs($file, "general_group: " . $account->general_group . "\n");
|
||||
if (isset($account->smb_domain)) fputs($file, "smb_domain: " . $account->smb_domain . "\n");
|
||||
// close file
|
||||
fclose($file);
|
||||
}
|
||||
else {
|
||||
StatusMessage("ERROR", _("Unable to save profile!"), $path);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// deletes a user profile
|
||||
|
|
|
@ -170,12 +170,12 @@ echo "</tr>\n";
|
|||
|
||||
// print filter row
|
||||
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>";
|
||||
// print input boxes for filters
|
||||
for ($k = 0; $k < sizeof ($desc_array); $k++) {
|
||||
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])] . "\">");
|
||||
echo "</td>";
|
||||
}
|
||||
|
|
|
@ -176,12 +176,12 @@ echo "</tr>\n";
|
|||
|
||||
// print filter row
|
||||
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>";
|
||||
// print input boxes for filters
|
||||
for ($k = 0; $k < sizeof ($desc_array); $k++) {
|
||||
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])] . "\">");
|
||||
echo "</td>";
|
||||
}
|
||||
|
|
|
@ -192,13 +192,13 @@ if ($user_count != 0) {
|
|||
echo "</tr>\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";
|
||||
|
||||
// print input boxes for filters
|
||||
for ($k = 0; $k < sizeof ($desc_array); $k++) {
|
||||
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])] . "\">");
|
||||
echo "</th>";
|
||||
}
|
||||
|
|
|
@ -27,11 +27,14 @@ include_once("../../lib/status.inc");
|
|||
include_once("../../lib/account.inc");
|
||||
include_once("../../lib/profiles.inc");
|
||||
include_once("../../lib/ldap.inc");
|
||||
include_once("../../lib/config.inc");
|
||||
|
||||
// start session
|
||||
session_save_path("../../sess");
|
||||
@session_start();
|
||||
|
||||
setlanguage();
|
||||
|
||||
// abort button was pressed in profileuser/~host.php
|
||||
// back to profile editor
|
||||
if ($_POST['abort']) {
|
||||
|
@ -223,8 +226,9 @@ if ($_GET['type'] == "user") {
|
|||
exit;
|
||||
}
|
||||
// save profile
|
||||
saveUserProfile($acct, $profname);
|
||||
echo ("<br><br><p align=\"center\"><big><b>" . _("Profile $profname was saved.") . "</b></big></p>");
|
||||
if (saveUserProfile($acct, $profname)) {
|
||||
echo StatusMessage("INFO", _("Profile was saved."), $profname);
|
||||
}
|
||||
echo ("<br><p><a href=\"profilemain.php\">" . _("Back to Profile Editor") . "</a></p>");
|
||||
}
|
||||
|
||||
|
@ -249,8 +253,9 @@ elseif ($_GET['type'] == "host") {
|
|||
exit;
|
||||
}
|
||||
// save profile
|
||||
saveHostProfile($acct, $profname);
|
||||
echo ("<br><br><p align=\"center\"><big><b>" . _("Profile $profname was saved.") . "</b></big></p>");
|
||||
if (saveHostProfile($acct, $profname)) {
|
||||
echo StatusMessage("INFO", _("Profile was saved."), $profname);
|
||||
}
|
||||
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/ldap.inc");
|
||||
include_once("../../lib/config.inc");
|
||||
|
||||
// start session
|
||||
session_save_path("../../sess");
|
||||
@session_start();
|
||||
|
||||
setlanguage();
|
||||
|
||||
// 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");
|
||||
|
|
|
@ -26,11 +26,14 @@ $Id$
|
|||
include_once("../../lib/profiles.inc");
|
||||
include_once("../../lib/ldap.inc");
|
||||
include_once("../../lib/account.inc");
|
||||
include_once("../../lib/config.inc");
|
||||
|
||||
// start session
|
||||
session_save_path("../../sess");
|
||||
@session_start();
|
||||
|
||||
setlanguage();
|
||||
|
||||
// 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");
|
||||
|
|
|
@ -25,11 +25,14 @@ $Id$
|
|||
|
||||
include_once("../../lib/profiles.inc");
|
||||
include_once("../../lib/ldap.inc");
|
||||
include_once("../../lib/config.inc");
|
||||
|
||||
// start session
|
||||
session_save_path("../../sess");
|
||||
@session_start();
|
||||
|
||||
setlanguage();
|
||||
|
||||
// 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\">");
|
||||
|
|
|
@ -26,11 +26,14 @@ $Id$
|
|||
include_once("../../lib/profiles.inc");
|
||||
include_once("../../lib/ldap.inc");
|
||||
include_once("../../lib/account.inc");
|
||||
include_once("../../lib/config.inc");
|
||||
|
||||
// start session
|
||||
session_save_path("../../sess");
|
||||
@session_start();
|
||||
|
||||
setlanguage();
|
||||
|
||||
// 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");
|
||||
|
|
Loading…
Reference in New Issue