Updated PaintWeb to the latest snapshot.
[moodle/mihaisucan.git] / auth / radius / config.html
blobd56f9477c9e075e745dcba550e1a08fd7585ef93
1 <?php
3 // Is Auth/RADIUS really there?
4 if (!extension_loaded('radius')) {
5 print '<div class="box errorbox errorboxcontent"><p class="errormessage"><strong>Warning: The PHP RADIUS extension is not present. Please ensure it is installed and enabled.</strong></p></div>';
7 include_once 'Auth/RADIUS.php';
8 if (!class_exists('Auth_RADIUS')) {
9 print '<div class="box errorbox errorboxcontent"><p class="errormessage"><strong>Warning: There is a problem with the PHP Pear Auth_RADIUS package. Please ensure it is installed correctly.</strong></p></div>';
12 // set to defaults if undefined
13 if (!isset($config->host)) {
14 $config->host = '127.0.0.1';
16 if (!isset($config->nasport)) {
17 $config->nasport = '1812';
19 if (!isset($config->radiustype)) {
20 $config->radiustype = 'PAP';
22 if (!isset($config->secret)) {
23 $config->secret = '';
25 if (!isset($config->changepasswordurl)) {
26 $config->changepasswordurl = '';
30 <table cellspacing="0" cellpadding="5" border="0">
32 <tr valign="top">
33 <td align="right"><?php print_string('auth_radiushost_key', 'auth') ?>: </td>
34 <td>
35 <input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
36 <?php
38 if (isset($err['host'])) {
39 formerr($err['host']);
43 </td>
44 <td><?php print_string('auth_radiushost', 'auth') ?></td>
45 </tr>
47 <tr valign="top">
48 <td align="right"><?php print_string('auth_radiusnasport_key', 'auth') ?>: </td>
49 <td>
50 <input name="nasport" type="text" size="6" value="<?php echo $config->nasport ?>" />
51 <?php
53 if (isset($err['nasport'])) {
54 formerr($err['nasport']);
58 </td>
59 <td><?php print_string('auth_radiusnasport', 'auth') ?></td>
60 </tr>
62 <tr valign="top" >
63 <td align="right"><?php print_string('auth_radiustype_key', 'auth') ?>: </td>
64 <td>
65 <?php
67 $radiustype = array();
68 $radiustype['PAP'] = get_string('auth_radiustypepap', 'auth');
69 $radiustype['CHAP_MD5'] = get_string('auth_radiustypechapmd5', 'auth');
70 $radiustype['MSCHAPv1'] = get_string('auth_radiustypemschapv1', 'auth');
71 $radiustype['MSCHAPv2'] = get_string('auth_radiustypemschapv2', 'auth');
72 choose_from_menu($radiustype, 'radiustype', $config->radiustype, '');
74 if (isset($err['radiustype'])) {
75 formerr($err['radiustype']);
79 </td>
80 <td><?php print_string('auth_radiustype', 'auth') ?></td>
81 </tr>
84 <tr valign="top" >
85 <td align="right"><?php print_string('auth_radiussecret_key', 'auth') ?>: </td>
86 <td>
87 <input name="secret" type="text" size="6" value="<?php echo $config->secret ?>" />
88 <?php
90 if (isset($err['secret'])) {
91 formerr($err['secret']);
95 </td>
96 <td><?php print_string('auth_radiussecret', 'auth') ?></td>
97 </tr>
99 <tr valign="top">
100 <td align="right"><?php print_string('auth_radiuschangepasswordurl_key', 'auth') ?>: </td>
101 <td>
102 <input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
103 <?php
105 if (isset($err['changepasswordurl'])) {
106 formerr($err['changepasswordurl']);
110 </td>
111 <td><?php print_string('changepasswordhelp', 'auth') ?></td>
112 </tr>
114 </table>