<?php
    require_once('languages.php');
    // Initialize vars
    if (!isset ($config->cas_hostname)) {
        $config->cas_hostname = "";
    }
    if (!isset ($config->cas_port)) {
        $config->cas_port = "";
    }
    if (!isset ($config->cas_version)) {
        $config->cas_version = "";
    }
    if (!isset ($config->cas_baseuri)) {
        $config->cas_baseuri = "";
    }
    if (!isset ($config->cas_language)) {
        $config->cas_language = "";
    }
    if (!isset ($config->cas_use_cas)) {
        $config->cas_use_cas = "";
    }
    if (!isset ($config->cas_create_user)) {
        $config->cas_create_user = "0";
    }
?>


<tr>
   <td colspan="2">
        <h4><?php print_string("auth_cas_server_settings", "auth") ?> </h4>
   </td>
</tr>
<tr valign="top"  class="required">
    <td align="right">cas_enabled:</td>
    <td>
    <?php
       unset($options);
       $options[1] = get_string("yes");

       choose_from_menu ($options, "cas_enabled", $config->cas_enabled, get_string("no"),"","");?>
    </td><td>
    <?php  print_string("auth_cas_enabled","auth") ?>
    </td>
</tr>
<tr valign="top"  class="required">
    <td align="right">cas_hostname:</td>
    <td>
        <input name="cas_hostname" type="text" size="30" value="<?php echo $config->cas_hostname?>" />
    <?php  if (isset($err["cas_hostname"])) formerr($err["cas_hostname"]); ?>
    </td>
    <td>
    <?php  print_string("auth_cas_hostname","auth") ?>
    </td>
</tr>

<tr valign="top"  class="required">
    <td align="right">cas_baseuri:</td>
    <td>
        <input name="cas_baseuri" type="text" size="30" value="<?php echo $config->cas_baseuri?>" />
    <?php  if (isset($err["cas_baseuri"])) formerr($err["cas_baseuri"]); ?>
    </td>
    <td>
    <?php  print_string("auth_cas_baseuri","auth") ?>
    </td>
</tr>
<tr valign="top"  class="required">
    <td align="right">cas_port:</td>
    <td>
        <input name="cas_port" type="text" size="30" value="<?php echo $config->cas_port?>" />
    <?php  if (isset($err["cas_port"])) formerr($err["cas_port"]); ?>
    </td>
    <td>
    <?php  print_string("auth_cas_port","auth") ?>
    </td>
</tr>

<tr valign="top"  class="required">
    <td align="right">cas_version:</td>
    <td>
        <input name="cas_version" type="text" size="30" value="<?php echo $config->cas_version?>" />
    <?php  if (isset($err["cas_version"])) formerr($err["cas_version"]); ?>
    </td>
    <td>
    <?php  print_string("auth_cas_version","auth") ?>
    </td>
</tr>

<tr valign="top"  class="required">
    <td align="right">cas_language:</td>
    <td>
        <?php choose_from_menu ($CASLANGUAGES, "cas_language", $config->cas_language, "");?>
    </td>
    <td>
    <?php  print_string("auth_cas_language","auth") ?>
    </td>
</tr>

<tr valign="top"  class="required">
    <td align="right">cas_create_user:</td>
    <td>
    <?php
       unset($options);
       $options[0] = get_string("no");
       $options[1] = get_string("yes");

       choose_from_menu ($options, "cas_create_user", $config->cas_create_user, "");?>
    </td><td>
    <?php  print_string("auth_cas_create_user","auth") ?>
    </td>
</tr>

<?php
    include($CFG->dirroot.'/auth/ldap/config.html');
?>




