[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/auth/radius/ -> config.html (source)

   1  <?php
   2  
   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>';
   6  }
   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>';
  10  }
  11  
  12  // set to defaults if undefined
  13  if (!isset($config->host)) {
  14      $config->host = '127.0.0.1';
  15  }
  16  if (!isset($config->nasport)) {
  17      $config->nasport = '1812';
  18  }
  19  if (!isset($config->radiustype)) {
  20      $config->radiustype = 'PAP';
  21  }
  22  if (!isset($config->secret)) {
  23      $config->secret = '';
  24  }
  25  if (!isset($config->changepasswordurl)) {
  26      $config->changepasswordurl = '';
  27  }
  28  
  29  ?>
  30  <table cellspacing="0" cellpadding="5" border="0">
  31  
  32  <tr valign="top">
  33      <td align="right"><label for="host"><?php print_string('auth_radiushost_key', 'auth_radius') ?>: </label></td>
  34      <td>
  35          <input name="host" id="host" type="text" size="30" value="<?php echo $config->host ?>" />
  36          <?php
  37  
  38          if (isset($err['host'])) {
  39              echo $OUTPUT->error_text($err['host']);
  40          }
  41  
  42          ?>
  43          </td>
  44      <td><?php print_string('auth_radiushost', 'auth_radius') ?></td>
  45  </tr>
  46  
  47  <tr valign="top">
  48      <td align="right"><label for="nasport"><?php print_string('auth_radiusnasport_key', 'auth_radius') ?>: </label></td>
  49      <td>
  50          <input name="nasport" id="nasport" type="text" size="6" value="<?php echo $config->nasport ?>" />
  51          <?php
  52  
  53          if (isset($err['nasport'])) {
  54              echo $OUTPUT->error_text($err['nasport']);
  55          }
  56  
  57          ?>
  58      </td>
  59      <td><?php print_string('auth_radiusnasport', 'auth_radius') ?></td>
  60  </tr>
  61  
  62  <tr valign="top" >
  63      <td align="right"><?php echo html_writer::label(get_string('auth_radiustype_key', 'auth_radius') . ':', 'menuradiustype'); ?> </td>
  64      <td>
  65  <?php
  66  
  67      $radiustype = array();
  68      $radiustype['PAP']      = get_string('auth_radiustypepap', 'auth_radius');
  69      $radiustype['CHAP_MD5'] = get_string('auth_radiustypechapmd5', 'auth_radius');
  70      $radiustype['MSCHAPv1'] = get_string('auth_radiustypemschapv1', 'auth_radius');
  71      $radiustype['MSCHAPv2'] = get_string('auth_radiustypemschapv2', 'auth_radius');
  72      echo html_writer::select($radiustype, 'radiustype', $config->radiustype, false);
  73  
  74      if (isset($err['radiustype'])) {
  75          echo $OUTPUT->error_text($err['radiustype']);
  76      }
  77  
  78  ?>
  79      </td>
  80      <td><?php print_string('auth_radiustype', 'auth_radius') ?></td>
  81  </tr>
  82  
  83  
  84  <tr valign="top" >
  85      <td align="right"><label for="secret"><?php print_string('auth_radiussecret_key', 'auth_radius') ?>: </label></td>
  86      <td>
  87          <input name="secret" id="secret" type="text" size="6" value="<?php echo $config->secret ?>" />
  88          <?php
  89  
  90          if (isset($err['secret'])) {
  91              echo $OUTPUT->error_text($err['secret']);
  92          }
  93  
  94          ?>
  95      </td>
  96      <td><?php print_string('auth_radiussecret', 'auth_radius') ?></td>
  97  </tr>
  98  
  99  <tr valign="top">
 100      <td align="right"><label for="changepasswordurl"><?php print_string('auth_radiuschangepasswordurl_key', 'auth_radius') ?>: </label></td>
 101      <td>
 102          <input name="changepasswordurl" id="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
 103          <?php
 104  
 105          if (isset($err['changepasswordurl'])) {
 106              echo $OUTPUT->error_text($err['changepasswordurl']);
 107          }
 108  
 109          ?>
 110      </td>
 111      <td><?php print_string('changepasswordhelp', 'auth') ?></td>
 112  </tr>
 113  
 114  </table>


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1