added PDF text for users

This commit is contained in:
Roland Gruber 2003-11-08 10:33:12 +00:00
parent ac919a161e
commit 9ff6f56a3b
1 changed files with 11 additions and 0 deletions

View File

@ -137,6 +137,9 @@ class Config {
// password hash algorithm
var $pwdhash;
// text to include in user PDF files
var $pdftext;
// name of configuration file
var $file;
@ -182,6 +185,14 @@ class Config {
else {
StatusMessage("ERROR", "", _("Unable to load configuration!") . " (" . $conffile . ")");
}
// load user PDF text
$pdffile = substr(__FILE__, 0, strlen(__FILE__) - 15) . "/config/pdf/" . $this->file . ".txt";
if (is_file($pdffile) == True) {
$pdfstring = @file($pdffile);
$pdfstring = @implode("", $pdfstring);
if ($pdfstring) $this->pdftext = $pdfstring;
else $this->pdftext = "";
}
}
// saves preferences to config file