added PDF text
This commit is contained in:
parent
543f0d4119
commit
885ef93eaf
|
@ -106,6 +106,8 @@ $helpArray = array (
|
||||||
"Text" => _("This is the time in minutes which LAM caches its LDAP searches. Shorter times will stress LDAP more but decrease the possibility that changes are not identified.")),
|
"Text" => _("This is the time in minutes which LAM caches its LDAP searches. Shorter times will stress LDAP more but decrease the possibility that changes are not identified.")),
|
||||||
"215" => array ("ext" => "FALSE", "Headline" => _("Configuration Wizard") . " - " . _("Password hash type"),
|
"215" => array ("ext" => "FALSE", "Headline" => _("Configuration Wizard") . " - " . _("Password hash type"),
|
||||||
"Text" => _("LAM supports CRYPT, SHA, SSHA, MD5 and SMD5 to generate the hash value of an user password. SSHA and CRYPT are the most common but CRYPT does not support passwords greater than 8 letters. We do not recommend to use plain text passwords.")),
|
"Text" => _("LAM supports CRYPT, SHA, SSHA, MD5 and SMD5 to generate the hash value of an user password. SSHA and CRYPT are the most common but CRYPT does not support passwords greater than 8 letters. We do not recommend to use plain text passwords.")),
|
||||||
|
"216" => array ("ext" => "FALSE", "Headline" => _("Configuration Wizard") . " - " . _("Text for user PDF"),
|
||||||
|
"Text" => _("This text will appear on top of every user PDF file.")),
|
||||||
"230" => array ("ext" => "FALSE", "Headline" => _("Profile management") . " - " . _("Add profile"),
|
"230" => array ("ext" => "FALSE", "Headline" => _("Profile management") . " - " . _("Add profile"),
|
||||||
"Text" => _("Please enter the name of the new profile and the password to change its settings. Profile names may contain letters, numbers and -/_.")),
|
"Text" => _("Please enter the name of the new profile and the password to change its settings. Profile names may contain letters, numbers and -/_.")),
|
||||||
"231" => array ("ext" => "FALSE", "Headline" => _("Profile management") . " - " . _("Rename profile"),
|
"231" => array ("ext" => "FALSE", "Headline" => _("Profile management") . " - " . _("Rename profile"),
|
||||||
|
|
|
@ -291,7 +291,8 @@ class Config {
|
||||||
echo "<b>" . _("Default language") . ": </b>" . $this->defaultLanguage . "<br>";
|
echo "<b>" . _("Default language") . ": </b>" . $this->defaultLanguage . "<br>";
|
||||||
echo "<b>" . _("Path to external script") . ": </b>" . $this->scriptPath . "<br>";
|
echo "<b>" . _("Path to external script") . ": </b>" . $this->scriptPath . "<br>";
|
||||||
echo "<b>" . _("Server of external script") . ": </b>" . $this->scriptServer . "<br>";
|
echo "<b>" . _("Server of external script") . ": </b>" . $this->scriptServer . "<br>";
|
||||||
echo "<b>" . _("List of valid users") . ": </b>" . $this->Admins;
|
echo "<b>" . _("List of valid users") . ": </b>" . $this->Admins . "<br><br>";
|
||||||
|
echo "<b>" . _("Text for user PDF") . ": </b>" . $this->get_pdftext();
|
||||||
}
|
}
|
||||||
|
|
||||||
// functions to read/write preferences
|
// functions to read/write preferences
|
||||||
|
@ -676,7 +677,6 @@ class Config {
|
||||||
function set_pdftext($value) {
|
function set_pdftext($value) {
|
||||||
if (is_string($value)) {
|
if (is_string($value)) {
|
||||||
$pdffile = substr(__FILE__, 0, strlen(__FILE__) - 15) . "/config/pdf/" . $this->file . ".txt";
|
$pdffile = substr(__FILE__, 0, strlen(__FILE__) - 15) . "/config/pdf/" . $this->file . ".txt";
|
||||||
if (is_file($pdffile)) {
|
|
||||||
$file = @fopen($pdffile, "w");
|
$file = @fopen($pdffile, "w");
|
||||||
if ($file) {
|
if ($file) {
|
||||||
@fputs($file, $value);
|
@fputs($file, $value);
|
||||||
|
@ -684,8 +684,6 @@ class Config {
|
||||||
$this->pdftext = $value;
|
$this->pdftext = $value;
|
||||||
}
|
}
|
||||||
else return false;
|
else return false;
|
||||||
}
|
|
||||||
else return false;
|
|
||||||
$this->pdftext = $value;
|
$this->pdftext = $value;
|
||||||
}
|
}
|
||||||
else return false;
|
else return false;
|
||||||
|
|
|
@ -62,8 +62,6 @@ echo $_SESSION['header'];
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>
|
<title>
|
||||||
<?php
|
<?php
|
||||||
echo _("Login");
|
echo _("Login");
|
||||||
|
|
|
@ -62,6 +62,7 @@ if ($_POST['back'] || $_POST['submitconf']){
|
||||||
$_SESSION['conf_pwdhash'] = $_POST['pwdhash'];
|
$_SESSION['conf_pwdhash'] = $_POST['pwdhash'];
|
||||||
$_SESSION['conf_scriptpath'] = $_POST['scriptpath'];
|
$_SESSION['conf_scriptpath'] = $_POST['scriptpath'];
|
||||||
$_SESSION['conf_scriptserver'] = $_POST['scriptserver'];
|
$_SESSION['conf_scriptserver'] = $_POST['scriptserver'];
|
||||||
|
$_SESSION['conf_pdf_usertext'] = $_POST['pdf_usertext'];
|
||||||
$_SESSION['conf_filename'] = $_POST['filename'];
|
$_SESSION['conf_filename'] = $_POST['filename'];
|
||||||
metaRefresh("confsave.php");
|
metaRefresh("confsave.php");
|
||||||
}
|
}
|
||||||
|
@ -95,8 +96,6 @@ if (!(($conf->get_Passwd()) == $passwd)) {
|
||||||
|
|
||||||
echo $_SESSION['header'];
|
echo $_SESSION['header'];
|
||||||
|
|
||||||
echo ("<html>\n");
|
|
||||||
echo ("<head>\n");
|
|
||||||
echo ("<title>" . _("LDAP Account Manager Configuration") . "</title>\n");
|
echo ("<title>" . _("LDAP Account Manager Configuration") . "</title>\n");
|
||||||
echo ("<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n");
|
echo ("<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n");
|
||||||
echo "<meta http-equiv=\"pragma\" content=\"no-cache\">\n";
|
echo "<meta http-equiv=\"pragma\" content=\"no-cache\">\n";
|
||||||
|
@ -303,12 +302,13 @@ echo ("<td><a href=\"../help.php?HelpNumber=209\" target=\"lamhelp\">" . _("Help
|
||||||
|
|
||||||
echo ("</table>\n");
|
echo ("</table>\n");
|
||||||
echo ("</fieldset>\n");
|
echo ("</fieldset>\n");
|
||||||
|
|
||||||
echo ("<p></p>\n");
|
echo ("<p></p>\n");
|
||||||
|
|
||||||
|
// script settings
|
||||||
echo ("<fieldset><legend><b>" . _("Script settings") . "</b></legend>\n");
|
echo ("<fieldset><legend><b>" . _("Script settings") . "</b></legend>\n");
|
||||||
echo ("<table border=0>\n");
|
echo ("<table border=0>\n");
|
||||||
|
|
||||||
// script settings
|
|
||||||
echo ("<tr><td align=\"right\"><b>".
|
echo ("<tr><td align=\"right\"><b>".
|
||||||
_("Path to external script") . ": </b></td>".
|
_("Path to external script") . ": </b></td>".
|
||||||
"<td><input size=50 type=\"text\" name=\"scriptpath\" value=\"" . $conf->get_scriptPath() . "\"></td>\n");
|
"<td><input size=50 type=\"text\" name=\"scriptpath\" value=\"" . $conf->get_scriptPath() . "\"></td>\n");
|
||||||
|
@ -320,6 +320,21 @@ echo ("<td><a href=\"../help.php?HelpNumber=211\" target=\"lamhelp\">" . _("Help
|
||||||
|
|
||||||
echo ("</table>\n");
|
echo ("</table>\n");
|
||||||
echo ("</fieldset>\n");
|
echo ("</fieldset>\n");
|
||||||
|
|
||||||
|
echo ("<p></p>\n");
|
||||||
|
|
||||||
|
// PDF settings
|
||||||
|
echo ("<fieldset><legend><b>" . _("PDF settings") . "</b></legend>\n");
|
||||||
|
echo ("<table border=0>\n");
|
||||||
|
|
||||||
|
echo ("<tr><td align=\"right\"><b>".
|
||||||
|
_("Text for user PDF") . ": </b></td>".
|
||||||
|
"<td><textarea name=\"pdf_usertext\" cols=\"80\" rows=\"5\">" . $conf->get_pdftext() . "</textarea></td>\n");
|
||||||
|
echo ("<td><a href=\"../help.php?HelpNumber=216\" target=\"lamhelp\">" . _("Help") . "</a></td></tr>\n");
|
||||||
|
|
||||||
|
echo ("</table>\n");
|
||||||
|
echo ("</fieldset>\n");
|
||||||
|
|
||||||
echo ("<p></p>\n");
|
echo ("<p></p>\n");
|
||||||
|
|
||||||
// security setings
|
// security setings
|
||||||
|
|
|
@ -59,6 +59,7 @@ $scriptpath = $_SESSION['conf_scriptpath'];
|
||||||
$scriptserver = $_SESSION['conf_scriptserver'];
|
$scriptserver = $_SESSION['conf_scriptserver'];
|
||||||
$samba3 = $_SESSION['conf_samba3'];
|
$samba3 = $_SESSION['conf_samba3'];
|
||||||
$pwdhash = $_SESSION['conf_pwdhash'];
|
$pwdhash = $_SESSION['conf_pwdhash'];
|
||||||
|
$pdftext = $_SESSION['conf_pdf_usertext'];
|
||||||
$filename = $_SESSION['conf_filename'];
|
$filename = $_SESSION['conf_filename'];
|
||||||
|
|
||||||
// check if password is correct
|
// check if password is correct
|
||||||
|
@ -70,7 +71,7 @@ if ($passwd != $conf->get_Passwd()) {
|
||||||
|
|
||||||
echo $_SESSION['header'];
|
echo $_SESSION['header'];
|
||||||
|
|
||||||
echo "<html><head><title>listusers</title>\n";
|
echo "<title>listusers</title>\n";
|
||||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
|
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../../style/layout.css\">\n";
|
||||||
echo "<meta http-equiv=\"pragma\" content=\"no-cache\">\n";
|
echo "<meta http-equiv=\"pragma\" content=\"no-cache\">\n";
|
||||||
echo "<meta http-equiv=\"cache-control\" content=\"no-cache\">\n";
|
echo "<meta http-equiv=\"cache-control\" content=\"no-cache\">\n";
|
||||||
|
@ -196,6 +197,11 @@ if (!$conf->set_pwdhash($pwdhash)) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!$conf->set_pdftext($pdftext)) {
|
||||||
|
echo ("<font color=\"red\"><b>" . _("PDF text is invalid!") . "</b></font>");
|
||||||
|
echo ("\n<br><br><br><a href=\"javascript:history.back()\">" . _("Back to preferences...") . "</a>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// check if password was changed
|
// check if password was changed
|
||||||
|
@ -245,6 +251,7 @@ unset($_SESSION['conf_scriptpath']);
|
||||||
unset($_SESSION['conf_scriptserver']);
|
unset($_SESSION['conf_scriptserver']);
|
||||||
unset($_SESSION['conf_samba3']);
|
unset($_SESSION['conf_samba3']);
|
||||||
unset($_SESSION['conf_pwdhash']);
|
unset($_SESSION['conf_pwdhash']);
|
||||||
|
unset($_SESSION['conf_pdf_usertext']);
|
||||||
unset($_SESSION['conf_filename']);
|
unset($_SESSION['conf_filename']);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -36,8 +36,6 @@ echo $_SESSION['header'];
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>
|
<title>
|
||||||
<?php
|
<?php
|
||||||
echo _("Profile management");
|
echo _("Profile management");
|
||||||
|
|
Loading…
Reference in New Issue