1
|
<?php
|
2
|
/* $Id$ */
|
3
|
/*
|
4
|
part of pfSense (http://www.pfsense.org/)
|
5
|
|
6
|
Copyright (C) 2007 Bill Marquette <bill.marquette@gmail.com>
|
7
|
All rights reserved.
|
8
|
|
9
|
Redistribution and use in source and binary forms, with or without
|
10
|
modification, are permitted provided that the following conditions are met:
|
11
|
|
12
|
1. Redistributions of source code must retain the above copyright notice,
|
13
|
this list of conditions and the following disclaimer.
|
14
|
|
15
|
2. Redistributions in binary form must reproduce the above copyright
|
16
|
notice, this list of conditions and the following disclaimer in the
|
17
|
documentation and/or other materials provided with the distribution.
|
18
|
|
19
|
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
20
|
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
|
21
|
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
22
|
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
|
23
|
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
24
|
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
25
|
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
26
|
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
27
|
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
28
|
POSSIBILITY OF SUCH DAMAGE.
|
29
|
*/
|
30
|
require("guiconfig.inc");
|
31
|
$pconfig['session_timeout'] = &$config['system']['webgui']['session_timeout'];
|
32
|
|
33
|
// Page title for main admin
|
34
|
$pgtitle = "System: User manager settings";
|
35
|
|
36
|
if ($_POST) {
|
37
|
unset($input_errors);
|
38
|
|
39
|
/* input validation */
|
40
|
$reqdfields = explode(" ", "session_timeout");
|
41
|
$reqdfieldsn = explode(",", "Session Timeout");
|
42
|
|
43
|
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
|
44
|
|
45
|
if ($_POST['session_timeout'] != "" && !is_numeric($_POST['session_timeout']))
|
46
|
$input_errors[] = gettext("Session timeout must be an integer with value 0 or greater.");
|
47
|
|
48
|
/* if this is an AJAX caller then handle via JSON */
|
49
|
if (isAjax() && is_array($input_errors)) {
|
50
|
input_errors2Ajax($input_errors);
|
51
|
exit;
|
52
|
}
|
53
|
|
54
|
|
55
|
if (!$input_errors) {
|
56
|
$pconfig['session_timeout'] = $_POST['session_timeout'];
|
57
|
|
58
|
write_config();
|
59
|
|
60
|
pfSenseHeader("system_usermanager_settings.php");
|
61
|
}
|
62
|
}
|
63
|
|
64
|
include("head.inc");
|
65
|
// XXX billm FIXME
|
66
|
//echo $pfSenseHead->getHTML();
|
67
|
?>
|
68
|
|
69
|
<body link="#000000" vlink="#000000" alink="#000000" onload="<?= $jsevents["body"]["onload"] ?>">
|
70
|
<?php include("fbegin.inc");?>
|
71
|
<p class="pgtitle"><?=$pgtitle;?></p>
|
72
|
<?php if ($input_errors) print_input_errors($input_errors);?>
|
73
|
<?php if ($savemsg) print_info_box($savemsg);?>
|
74
|
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
75
|
<tr>
|
76
|
<td class="tabnavtbl">
|
77
|
<?php
|
78
|
$tab_array = array();
|
79
|
$tab_array[] = array(gettext("Users"), false, "system_usermanager.php");
|
80
|
$tab_array[] = array(gettext("Group"), false, "system_groupmanager.php");
|
81
|
$tab_array[] = array(gettext("Settings"), true, "system_usermanager_settings.php");
|
82
|
display_top_tabs($tab_array);
|
83
|
?>
|
84
|
</td>
|
85
|
<tr>
|
86
|
<td>
|
87
|
<div id="mainarea">
|
88
|
<form id="iform" name="iform" action="system_usermanager_settings.php" method="post">
|
89
|
<table class="tabcont" width="100%" border="0" cellspacing="0" cellpadding="0">
|
90
|
<tr>
|
91
|
<td width="22%" valign="top" class="vncell">Session Timeout</td>
|
92
|
<td width="78%" class="vtable"> <input name="session_timeout" id="session_timeout" type="text"size="20" class="formfld unknown" value="<?=htmlspecialchars($pconfig['session_timeout']);?>" />
|
93
|
<br />
|
94
|
<?=gettext("Time in minutes to expire idle management sessions.");?><br />
|
95
|
</td>
|
96
|
</tr>
|
97
|
|
98
|
<tr>
|
99
|
<td width="22%" valign="top"> </td>
|
100
|
<td width="78%"> <input id="submit" name="Submit" type="submit" class="formbtn" value="<?=gettext("Save");?>" />
|
101
|
</td>
|
102
|
</tr>
|
103
|
</table>
|
104
|
</form>
|
105
|
</div>
|
106
|
</td>
|
107
|
</tr>
|
108
|
</table>
|
109
|
|
110
|
<?php include("fend.inc");?>
|
111
|
</body>
|
112
|
</html>
|