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
)) {
25 if (!isset($config->changepasswordurl
)) {
26 $config->changepasswordurl
= '';
30 <table cellspacing=
"0" cellpadding=
"5" border=
"0">
33 <td align=
"right"><?php print_string('auth_radiushost_key', 'auth') ?>:
</td>
35 <input name=
"host" type=
"text" size=
"30" value=
"<?php echo $config->host ?>" />
38 if (isset($err['host'])) {
39 formerr($err['host']);
44 <td><?php print_string('auth_radiushost', 'auth') ?></td>
48 <td align=
"right"><?php print_string('auth_radiusnasport_key', 'auth') ?>:
</td>
50 <input name=
"nasport" type=
"text" size=
"6" value=
"<?php echo $config->nasport ?>" />
53 if (isset($err['nasport'])) {
54 formerr($err['nasport']);
59 <td><?php print_string('auth_radiusnasport', 'auth') ?></td>
63 <td align=
"right"><?php print_string('auth_radiustype_key', 'auth') ?>:
</td>
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']);
80 <td><?php print_string('auth_radiustype', 'auth') ?></td>
85 <td align=
"right"><?php print_string('auth_radiussecret_key', 'auth') ?>:
</td>
87 <input name=
"secret" type=
"text" size=
"6" value=
"<?php echo $config->secret ?>" />
90 if (isset($err['secret'])) {
91 formerr($err['secret']);
96 <td><?php print_string('auth_radiussecret', 'auth') ?></td>
100 <td align=
"right"><?php print_string('auth_radiuschangepasswordurl_key', 'auth') ?>:
</td>
102 <input name=
"changepasswordurl" type=
"text" value=
"<?php echo $config->changepasswordurl ?>" />
105 if (isset($err['changepasswordurl'])) {
106 formerr($err['changepasswordurl']);
111 <td><?php print_string('changepasswordhelp', 'auth') ?></td>