translation update

This commit is contained in:
Roland Gruber 2003-08-03 11:05:40 +00:00
parent f6edf82814
commit 63bf69b609
9 changed files with 86 additions and 55 deletions

View File

@ -233,7 +233,8 @@ 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");
if ($file) {
// replace user and group names // replace user and group names
$homedir = $account->general_homedir; $homedir = $account->general_homedir;
$profpath = $account->smb_profilePath; $profpath = $account->smb_profilePath;
@ -275,6 +276,12 @@ function saveUserProfile($account, $profile) {
// close file // close file
fclose($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) // saves an account object to an group profile with name $profile (without .prg)
// file is created, if needed // file is created, if needed
@ -291,13 +298,20 @@ 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");
if ($file) {
// write attributes // write attributes
if (isset($account->general_group)) fputs($file, "general_group: " . $account->general_group . "\n"); 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"); if (isset($account->smb_domain)) fputs($file, "smb_domain: " . $account->smb_domain . "\n");
// close file // close file
fclose($file); fclose($file);
} }
else {
StatusMessage("ERROR", _("Unable to save profile!"), $path);
return false;
}
return true;
}
// deletes a user profile // deletes a user profile
function delUserProfile($file) { function delUserProfile($file) {

View File

@ -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>";
} }

View File

@ -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>";
} }

View File

@ -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>";
} }

View File

@ -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>");
} }

View File

@ -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");

View File

@ -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");

View File

@ -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\">");

View File

@ -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");