added support for sessions
user is warned if lam.conf is not writable
This commit is contained in:
parent
5f1d8483b5
commit
f49efa989f
|
@ -276,8 +276,14 @@ class Config {
|
||||||
if (!$save_defShell == True) array_push($file_array, "\n\n# default shell when creating new user\n" . "defaultShell: " . $this->DefaultShell);
|
if (!$save_defShell == True) array_push($file_array, "\n\n# default shell when creating new user\n" . "defaultShell: " . $this->DefaultShell);
|
||||||
if (!$save_shellList == True) array_push($file_array, "\n\n# list of possible shells\n" . "shellList: " . $this->ShellList);
|
if (!$save_shellList == True) array_push($file_array, "\n\n# list of possible shells\n" . "shellList: " . $this->ShellList);
|
||||||
$file = fopen($conffile, "w");
|
$file = fopen($conffile, "w");
|
||||||
for ($i = 0; $i < sizeof($file_array); $i++) fputs($file, $file_array[$i]);
|
if ($file) {
|
||||||
fclose($file);
|
for ($i = 0; $i < sizeof($file_array); $i++) fputs($file, $file_array[$i]);
|
||||||
|
fclose($file);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
echo _("<br><font color=\"red\">Cannot open config file!</font>");
|
||||||
|
exit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ $Id$
|
||||||
|
|
||||||
Login page to change the preferences.
|
Login page to change the preferences.
|
||||||
*/
|
*/
|
||||||
|
session_start();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
|
|
@ -24,6 +24,8 @@ $Id$
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
// check if password was entered
|
// check if password was entered
|
||||||
// if not: load login page
|
// if not: load login page
|
||||||
if (! $passwd) {
|
if (! $passwd) {
|
||||||
|
|
|
@ -24,6 +24,8 @@ $Id$
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
session_start();
|
||||||
|
|
||||||
include_once ('config.php');
|
include_once ('config.php');
|
||||||
$conf = new Config();
|
$conf = new Config();
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,6 @@ $Id$
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
session_start();
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<html>
|
<html>
|
||||||
|
|
Loading…
Reference in New Issue