moodle/auth/db/config.html
2004-09-12 01:34:24 +00:00

236 lines
7.4 KiB
HTML

<?php
if (!isset($config->auth_dbhost)) {
$config->auth_dbhost = "localhost";
}
if (!isset($config->auth_dbtype)) {
$config->auth_dbtype = "mysql";
}
if (!isset($config->auth_dbname)) {
$config->auth_dbname = "";
}
if (!isset($config->auth_dbuser)) {
$config->auth_dbuser = "";
}
if (!isset($config->auth_dbpass)) {
$config->auth_dbpass = "";
}
if (!isset($config->auth_dbtable)) {
$config->auth_dbtable = "";
}
if (!isset($config->auth_dbfielduser)) {
$config->auth_dbfielduser = "";
}
if (!isset($config->auth_dbfieldpass)) {
$config->auth_dbfieldpass = "";
}
if (!isset($config->auth_dbpasstype)) {
$config->auth_dbpasstype = "plaintext";
}
?>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbhost:</td>
<td>
<input name="auth_dbhost" type="text" size="30" value="<?php echo $config->auth_dbhost?>" />
<?php if (isset($err["auth_dbhost"])) formerr($err["auth_dbhost"]); ?>
</td>
<td>
<?php print_string("auth_dbhost","auth") ?>
</td>
</tr>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbtype:</td>
<td>
<?php $dbtypes = array("access","ado_access", "ado", "ado_mssql", "borland_ibase", "csv", "db2", "fbsql", "firebird", "ibase", "informix72", "informix", "mssql", "mysql", "mysqlt", "oci805", "oci8", "oci8po", "odbc", "odbc_mssql", "odbc_oracle", "oracle", "postgres64", "postgres7", "postgres", "proxy", "sqlanywhere", "sybase", "vfp");
foreach ($dbtypes as $dbtype) {
$dboptions[$dbtype] = $dbtype;
}
choose_from_menu($dboptions, "auth_dbtype", $config->auth_dbtype, "");
?>
</td>
<td>
<?php print_string("auth_dbtype","auth") ?>
</td>
</tr>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbname:</td>
<td>
<input name="auth_dbname" type="text" size="30" value="<?php echo $config->auth_dbname?>" />
<?php if (isset($err["auth_dbname"]))formerr($err["auth_dbname"]); ?>
</td>
<td>
<?php print_string("auth_dbname","auth") ?>
</td>
</tr>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbuser:</td>
<td>
<input name="auth_dbuser" type="text" size="30" value="<?php echo $config->auth_dbuser?>" />
<?php if (isset($err["auth_dbuser"])) formerr($err["auth_dbuser"]); ?>
</td>
<td>
<?php print_string("auth_dbuser","auth") ?>
</td>
</tr>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbpass:</td>
<td>
<input name="auth_dbpass" type="text" size="30" value="<?php echo $config->auth_dbpass?>" />
<?php if (isset($err["auth_dbpass"])) formerr($err["auth_dbpass"]); ?>
</td>
<td>
<?php print_string("auth_dbpass","auth") ?>
</td>
</tr>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbtable:</td>
<td>
<input name="auth_dbtable" type="text" size="30" value="<?php echo $config->auth_dbtable?>" />
<?php if (isset($err["auth_dbtable"])) formerr($err["auth_dbtable"]); ?>
</td>
<td>
<?php print_string("auth_dbtable","auth") ?>
</td>
</tr>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbfielduser:</td>
<td>
<input name="auth_dbfielduser" type="text" size="30" value="<?php echo $config->auth_dbfielduser?>" />
<?php if (isset($err["auth_dbfielduser"])) formerr($err["auth_dbfielduser"]); ?>
</td>
<td>
<?php print_string("auth_dbfielduser","auth") ?>
</td>
</tr>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbfieldpass:</td>
<td>
<input name="auth_dbfieldpass" type="text" size="30" value="<?php echo $config->auth_dbfieldpass?>" />
<?php if (isset($err["auth_dbfieldpass"])) formerr($err["auth_dbfieldpass"]); ?>
</td>
<td>
<?php print_string("auth_dbfieldpass","auth") ?>
</td>
</tr>
<tr valign="top" bgcolor="<?php echo $THEME->cellheading2 ?>">
<td align="right"><p>auth_dbpasstype:</td>
<td>
<?php $passtype["plaintext"] = get_string("plaintext", "auth");
$passtype["md5"] = get_string("md5", "auth");
choose_from_menu($passtype, "auth_dbpasstype", $config->auth_dbpasstype, "");
?>
</td>
<td>
<?php print_string("auth_dbpasstype","auth") ?>
</td>
</tr>
<tr>
<td align="right"><p><?php print_string("firstname") ?>:</td>
<td>
<input name="auth_user_firstname" type="text" size="30" value="<?php echo $config->auth_user_firstname?>" />
</td>
<td rowspan="12" valign="center">
<?php print_string("auth_dbextrafields","auth") ?>
</td>
</tr>
<tr valign="top">
<td align="right"><p><?php print_string("lastname") ?>:</td>
<td>
<input name="auth_user_lastname" type="text" size="30" value="<?php echo $config->auth_user_lastname?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><p><?php print_string("email") ?>:</td>
<td>
<input name="auth_user_email" type="text" size="30" value="<?php echo $config->auth_user_email?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><p><?php print_string("phone") ?> 1:</td>
<td>
<input name="auth_user_phone1" type="text" size="30" value="<?php echo $config->auth_user_phone1?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><p><?php print_string("phone") ?> 2:</td>
<td>
<input name="auth_user_phone2" type="text" size="30" value="<?php echo $config->auth_user_phone2?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><p><?php print_string("department") ?>:</td>
<td>
<input name="auth_user_department" type="text" size="30" value="<?php echo $config->auth_user_department?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><p><?php print_string("address") ?>:</td>
<td>
<input name="auth_user_address" type="text" size="30" value="<?php echo $config->auth_user_address?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><p><?php print_string("city") ?>:</td>
<td>
<input name="auth_user_city" type="text" size="30" value="<?php echo $config->auth_user_city?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><p><?php print_string("country") ?>:</td>
<td>
<input name="auth_user_country" type="text" size="30" value="<?php echo $config->auth_user_country?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><p><?php print_string("description") ?>:</td>
<td>
<input name="auth_user_description" type="text" size="30" value="<?php echo $config->auth_user_description?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><p><?php print_string("idnumber") ?>:</td>
<td>
<input name="auth_user_idnumber" type="text" size="30" value="<?php echo $config->auth_user_idnumber?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><p><?php print_string("language") ?>:</td>
<td>
<input name="auth_user_lang" type="text" size="30" value="<?php echo $config->auth_user_lang?>" />
</td>
</tr>
<tr valign="top">
<td align="right"><p><?php print_string("instructions", "auth") ?>:</td>
<td>
<textarea name="auth_instructions" cols="30" rows="10" wrap="virtual"><?php p($config->auth_instructions) ?></textarea>
</td>
<td>
<?php print_string("authinstructions","auth") ?>
<?php helpbutton("text", get_string("helptext")) ?>
</td>
</tr>