Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<?php
if(!defined('OSTADMININC') || !$thisstaff || !$thisstaff->isAdmin() || !$config) die('Access Denied');
?>
<h2>Access Control Settings</h2>
<form action="settings.php?t=access" method="post" id="save">
<?php csrf_token(); ?>
<input type="hidden" name="t" value="access" >
<table class="form_table settings_table" width="940" border="0" cellspacing="0" cellpadding="2">
<thead>
<tr>
<th colspan="2">
<h4>Configure Access to this Help Desk</h4>
</th>
</tr>
</thead>
<tbody>
<tr>
<th colspan="2">
<em><b>Staff Authentication Settings</b></em>
</th>
</tr>
<tr><td>Password Expiration Policy:</th>
<td>
<select name="passwd_reset_period">
<option value="0"> — No expiration —</option>
<?php
for ($i = 1; $i <= 12; $i++) {
echo sprintf('<option value="%d" %s>%s%s</option>',
$i,(($config['passwd_reset_period']==$i)?'selected="selected"':''), $i>1?"Every $i ":'', $i>1?' Months':'Monthly');
}
?>
</select>
<font class="error"><?php echo $errors['passwd_reset_period']; ?></font>
<i class="help-tip icon-question-sign" href="#password_reset"></i>
</td>
</tr>
<tr><td>Allow Password Resets:</th>
<td>
<input type="checkbox" name="allow_pw_reset" <?php echo $config['allow_pw_reset']?'checked="checked"':''; ?>>
<em>Enables the <u>Forgot my password</u> link on the staff
control panel</em>
</td>
</tr>
<tr><td>Password Reset Window:</th>
<td>
<input type="text" name="pw_reset_window" size="6" value="<?php
echo $config['pw_reset_window']; ?>">
Maximum time <em>in minutes</em> a password reset token can
be valid.
<font class="error"> <?php echo $errors['pw_reset_window']; ?></font>
</td>
</tr>
<tr><td>Staff Excessive Logins:</td>
<td>
<select name="staff_max_logins">
<?php
for ($i = 1; $i <= 10; $i++) {
echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['staff_max_logins']==$i)?'selected="selected"':''), $i);
}
?>
</select> failed login attempt(s) allowed before a
<select name="staff_login_timeout">
<?php
for ($i = 1; $i <= 10; $i++) {
echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['staff_login_timeout']==$i)?'selected="selected"':''), $i);
}
?>
</select> minute lock-out is enforced.
</td>
</tr>
<tr><td>Staff Session Timeout:</td>
<td>
<input type="text" name="staff_session_timeout" size=6 value="<?php echo $config['staff_session_timeout']; ?>">
Maximum idle time in minutes before a staff member must log in again (enter 0 to disable).
</td>
</tr>
<tr><td>Bind Staff Session to IP:</td>
<td>
<input type="checkbox" name="staff_ip_binding" <?php echo $config['staff_ip_binding']?'checked="checked"':''; ?>>
<em>(binds staff session to originating IP address upon login)</em>
</td>
</tr>
<tr>
<th colspan="2">
<em><b>Client Authentication Settings</b></em>
</th>
</tr>
<tr><td>Registration Required:</td>
<td><input type="checkbox" name="clients_only" <?php
if ($config['clients_only'])
echo 'checked="checked"'; ?>/>
Require registration and login to create tickets
</td>
<tr><td>Registration Method:</td>
<td><select name="client_registration">
<?php foreach (array(
'disabled' => 'Disabled — All users are guests',
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
'public' => 'Public — Anyone can register',
'closed' => 'Private — Only staff can register clients',)
as $key=>$val) { ?>
<option value="<?php echo $key; ?>" <?php
if ($config['client_registration'] == $key)
echo 'selected="selected"'; ?>><?php echo $val;
?></option><?php
} ?>
</select></td>
</tr>
<tr><td>Client Excessive Logins:</td>
<td>
<select name="client_max_logins">
<?php
for ($i = 1; $i <= 10; $i++) {
echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['client_max_logins']==$i)?'selected="selected"':''), $i);
}
?>
</select> failed login attempt(s) allowed before a
<select name="client_login_timeout">
<?php
for ($i = 1; $i <= 10; $i++) {
echo sprintf('<option value="%d" %s>%d</option>', $i,(($config['client_login_timeout']==$i)?'selected="selected"':''), $i);
}
?>
</select> minute lock-out is enforced.
</td>
</tr>
<tr><td>Client Session Timeout:</td>
<td>
<input type="text" name="client_session_timeout" size=6 value="<?php echo $config['client_session_timeout']; ?>">
Maximum idle time in minutes before a client must log in again (enter 0 to disable).
</td>
</tr>
<tr>
<th colspan="2">
<em><b>Authentication and Registration Templates</b></em>
</th>
</tr>
<?php $manage_content = function($title, $content) {
?><a href="#ajax.php/content/<?php echo $content; ?>/manage"
onclick="javascript:
$.dialog($(this).attr('href').substr(1), 200);
return false;"><i class="icon-file-text"></i> <?php
echo Format::htmlchars($title); ?></a><?php
}; ?>
<tr><td>Password Reset Emails</td>
<td><?php $manage_content('Staff Members', 'pwreset-staff'); ?>
— <?php $manage_content('Clients', 'pwreset-client'); ?>
— <?php $manage_content('Guess Ticket Access', 'access-link'); ?>
</td></tr>
<tr><td>Sign-In Pages</td>
<td><?php $manage_content('Staff Login Banner', 'staff-banner'); ?>
— <?php $manage_content('Client Sign-In Page', 'registration-policy'); ?>
<tr><td>Client Account Registration</td>
<td><?php $manage_content('Please Confirm Email Address Page', 'registration-confirm'); ?>
— <?php $manage_content('Confirmation Email', 'registration-client'); ?>
— <?php $manage_content('Account Confirmed Page', 'registration-thanks'); ?>
</td></tr>
<tr><td>Staff Account Registration</td>
<td><?php $manage_content('Staff Welcome Email', 'registration-staff'); ?>
</td></tr>
</tbody>
</table>
<p style="text-align:center">
<input class="button" type="submit" name="submit" value="Save Changes">
<input class="button" type="reset" name="reset" value="Reset Changes">
</p>
</form>