added PDF text for users
This commit is contained in:
		
							parent
							
								
									ac919a161e
								
							
						
					
					
						commit
						9ff6f56a3b
					
				|  | @ -137,6 +137,9 @@ class Config { | ||||||
|   // password hash algorithm
 |   // password hash algorithm
 | ||||||
|   var $pwdhash; |   var $pwdhash; | ||||||
| 
 | 
 | ||||||
|  |   // text to include in user PDF files
 | ||||||
|  |   var $pdftext; | ||||||
|  | 
 | ||||||
|   // name of configuration file
 |   // name of configuration file
 | ||||||
|   var $file; |   var $file; | ||||||
| 
 | 
 | ||||||
|  | @ -182,6 +185,14 @@ class Config { | ||||||
| 		else { | 		else { | ||||||
| 			StatusMessage("ERROR", "", _("Unable to load configuration!") . " (" . $conffile . ")"); | 			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
 | 	// saves preferences to config file
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue