| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
| 2 |
<html> |
| 3 |
<head> |
| 4 |
<meta content="text/html; charset=ISO-8859-15" |
| 5 |
http-equiv="content-type"> |
| 6 |
<title>config.inc</title> |
| 7 |
<link rel="stylesheet" type="text/css" href="style/layout.css"> |
| 8 |
<link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico"> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<h1 style="text-align: center;">config.inc</h1> |
| 12 |
<br> |
| 13 |
<br> |
| 14 |
This file includes all functions needed to manage configuration |
| 15 |
profiles. It includes classes for the profiles itself and the master |
| 16 |
configuration (default profile, master password, etc.).<br> |
| 17 |
<br> |
| 18 |
There are also two global functions for general use: <span |
| 19 |
style="font-style: italic;">setlanguage</span> and <span |
| 20 |
style="font-style: italic;">metarefresh</span><br> |
| 21 |
<br> |
| 22 |
<h2>Meta refresh</h2> |
| 23 |
The global function <span |
| 24 |
style="font-weight: bold; font-style: italic;">metaRefresh()</span> |
| 25 |
takes an URL as argument and prints all HTML code needed for a meta |
| 26 |
refresh to this URL.<br> |
| 27 |
<br> |
| 28 |
<h2>Language</h2> |
| 29 |
LAM uses <span style="font-style: italic;">gettext</span> to translate |
| 30 |
the HTML pages to the different languages. Therefore some preferences |
| 31 |
need to be set on every page load. This is done by <span |
| 32 |
style="font-style: italic; font-weight: bold;">setlanguage()</span>.<br> |
| 33 |
The function should be called directly after starting the session.<br> |
| 34 |
<br> |
| 35 |
The list of possible languages is stored in <span |
| 36 |
style="font-style: italic;">config/language</span>. It includes the |
| 37 |
locale name, the character encoding an the language name.<br> |
| 38 |
All languages use UTF-8 as encoding because LDAP also stores values in |
| 39 |
this format.<br> |
| 40 |
<br> |
| 41 |
<h2>Configuration profiles</h2> |
| 42 |
Each configuration profile is saved in a single file in <span |
| 43 |
style="font-weight: bold;">config/</span>.<br> |
| 44 |
<br> |
| 45 |
There are two types of configuration options:<br> |
| 46 |
<ul> |
| 47 |
<li>Static options (LDAP server settings, etc.)<br> |
| 48 |
</li> |
| 49 |
<li>Module options (UID/GID ranges)<br> |
| 50 |
</li> |
| 51 |
</ul> |
| 52 |
All static options have a describing comment in the configuration file |
| 53 |
to make it easier for the user to modify the values. The dynamic |
| 54 |
options provided by the modules do not include a comment.<br> |
| 55 |
<br> |
| 56 |
<h2>Master configuration file</h2> |
| 57 |
LAM stores the default configuration profile and a master password in <span |
| 58 |
style="font-style: italic;">config/config.cfg</span>.<br> |
| 59 |
The master password is verified when the user wants to create/delete |
| 60 |
configuration profiles.<br> |
| 61 |
</body> |
| 62 |
</html> |