-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathauth_config_servers.html
68 lines (62 loc) · 2.53 KB
/
auth_config_servers.html
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
<tr>
<td>
<h4><?php print_string('auth_openid_servers_settings', 'auth_openid') ?> </h4>
</td>
</tr>
<tr>
<td>
<?php print_string('auth_openid_servers_description','auth_openid') ?>
</td>
</tr>
<tr valign="top">
<td>
<input id="openid_add_server" name="openid_add_server" type="text" value="" size="40" />
<select name="openid_add_listtype">
<option value="<?php echo OPENID_GREYLIST; ?>">Confirm</option>
<option value="<?php echo OPENID_BLACKLIST; ?>">Deny</option>
<option value="<?php echo OPENID_WHITELIST; ?>">Allow</option>
</select>
<input type="submit" name="add_server" value="Add" />
</td>
</tr>
<tr>
<td>
<table class="openid_servers" cellspacing="5" cellpadding="10" border="1" width="100%">
<tr class="openid_servers">
<th class="openid_servers">Server</th>
<th class="openid_servers">Confirm</th>
<th class="openid_servers">Deny</th>
<th class="openid_servers">Allow</th>
<th class="openid_servers">Delete</th>
</tr>
<?php
global $DB;
$str = '
<tr class="openid_servers">
<td class="openid_servers" align="center">%s</td>
<td class="openid_servers" align="center"><input type="radio" name="servers[%d]" value="'.OPENID_GREYLIST.'"%s /></td>
<td class="openid_servers" align="center"><input type="radio" name="servers[%d]" value="'.OPENID_BLACKLIST.'"%s /></td>
<td class="openid_servers" align="center"><input type="radio" name="servers[%d]" value="'.OPENID_WHITELIST.'"%s /></td>
<td class="openid_servers" align="center"><input type="radio" name="servers[%d]" value="-1" /></td>
</tr>
';
$checked = ' checked="checked"';
if ( ($records = $DB->get_records('openid_servers')) ) {
foreach ($records as $record) {
printf(
$str,
format_string($record->server),
$record->id,
(($record->listtype==OPENID_GREYLIST)?$checked:''),
$record->id,
(($record->listtype==OPENID_BLACKLIST)?$checked:''),
$record->id,
(($record->listtype==OPENID_WHITELIST)?$checked:''),
$record->id
);
}
}
?>
</table>
</td>
</tr>