moodle/auth/db/config.html

155 lines
4.9 KiB
HTML
Raw Normal View History

2004-09-12 01:34:24 +00:00
<?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";
}
$pluginconfig = get_config('auth/db');
?>
<tr valign="top" class="required">
2005-05-16 19:38:21 +00:00
<td align="right">auth_dbhost:</td>
<td>
2004-09-12 01:34:24 +00:00
<input name="auth_dbhost" type="text" size="30" value="<?php echo $config->auth_dbhost?>" />
2005-05-16 19:38:21 +00:00
<?php if (isset($err["auth_dbhost"])) formerr($err["auth_dbhost"]); ?>
</td>
2004-09-12 01:34:24 +00:00
<td>
2003-09-09 05:37:39 +00:00
<?php print_string("auth_dbhost","auth") ?>
2004-09-12 01:34:24 +00:00
</td>
</tr>
<tr valign="top" class="required">
2005-05-16 19:38:21 +00:00
<td align="right">auth_dbtype:</td>
<td>
<?php $dbtypes = array("access","ado_access", "ado", "ado_mssql", "borland_ibase", "csv", "db2", "fbsql", "firebird", "ibase", "informix72", "informix", "mssql", "mssql_n", "mysql", "mysqlt", "oci805", "oci8", "oci8po", "odbc", "odbc_mssql", "odbc_oracle", "oracle", "postgres64", "postgres7", "postgres", "proxy", "sqlanywhere", "sybase", "vfp");
2002-11-21 11:12:55 +00:00
foreach ($dbtypes as $dbtype) {
$dboptions[$dbtype] = $dbtype;
}
choose_from_menu($dboptions, "auth_dbtype", $config->auth_dbtype, "");
?>
2004-09-12 01:34:24 +00:00
</td>
<td>
2003-09-09 05:37:39 +00:00
<?php print_string("auth_dbtype","auth") ?>
2004-09-12 01:34:24 +00:00
</td>
</tr>
<tr valign="top" class="required">
2005-05-16 19:38:21 +00:00
<td align="right">auth_dbname:</td>
<td>
2004-09-12 01:34:24 +00:00
<input name="auth_dbname" type="text" size="30" value="<?php echo $config->auth_dbname?>" />
2003-09-09 05:37:39 +00:00
<?php if (isset($err["auth_dbname"]))formerr($err["auth_dbname"]); ?>
2004-09-12 01:34:24 +00:00
</td>
<td>
2003-09-09 05:37:39 +00:00
<?php print_string("auth_dbname","auth") ?>
2004-09-12 01:34:24 +00:00
</td>
</tr>
<tr valign="top" class="required">
2005-05-16 19:38:21 +00:00
<td align="right">auth_dbuser:</td>
<td>
2004-09-12 01:34:24 +00:00
<input name="auth_dbuser" type="text" size="30" value="<?php echo $config->auth_dbuser?>" />
2003-09-09 05:37:39 +00:00
<?php if (isset($err["auth_dbuser"])) formerr($err["auth_dbuser"]); ?>
2004-09-12 01:34:24 +00:00
</td>
<td>
2003-09-09 05:37:39 +00:00
<?php print_string("auth_dbuser","auth") ?>
2004-09-12 01:34:24 +00:00
</td>
</tr>
<tr valign="top" class="required">
2005-05-16 19:38:21 +00:00
<td align="right">auth_dbpass:</td>
<td>
2004-09-12 01:34:24 +00:00
<input name="auth_dbpass" type="text" size="30" value="<?php echo $config->auth_dbpass?>" />
2003-09-09 05:37:39 +00:00
<?php if (isset($err["auth_dbpass"])) formerr($err["auth_dbpass"]); ?>
2004-09-12 01:34:24 +00:00
</td>
<td>
2003-09-09 05:37:39 +00:00
<?php print_string("auth_dbpass","auth") ?>
2004-09-12 01:34:24 +00:00
</td>
</tr>
<tr valign="top" class="required">
2005-05-16 19:38:21 +00:00
<td align="right">auth_dbtable:</td>
<td>
2004-09-12 01:34:24 +00:00
<input name="auth_dbtable" type="text" size="30" value="<?php echo $config->auth_dbtable?>" />
2003-09-09 05:37:39 +00:00
<?php if (isset($err["auth_dbtable"])) formerr($err["auth_dbtable"]); ?>
2004-09-12 01:34:24 +00:00
</td>
<td>
2003-09-09 05:37:39 +00:00
<?php print_string("auth_dbtable","auth") ?>
2004-09-12 01:34:24 +00:00
</td>
</tr>
<tr valign="top" class="required">
2005-05-16 19:38:21 +00:00
<td align="right">auth_dbfielduser:</td>
<td>
2004-09-12 01:34:24 +00:00
<input name="auth_dbfielduser" type="text" size="30" value="<?php echo $config->auth_dbfielduser?>" />
2003-09-09 05:37:39 +00:00
<?php if (isset($err["auth_dbfielduser"])) formerr($err["auth_dbfielduser"]); ?>
2004-09-12 01:34:24 +00:00
</td>
<td>
2003-09-09 05:37:39 +00:00
<?php print_string("auth_dbfielduser","auth") ?>
2004-09-12 01:34:24 +00:00
</td>
</tr>
<tr valign="top" class="required">
2005-05-16 19:38:21 +00:00
<td align="right">auth_dbfieldpass:</td>
<td>
2004-09-12 01:34:24 +00:00
<input name="auth_dbfieldpass" type="text" size="30" value="<?php echo $config->auth_dbfieldpass?>" />
2003-09-09 05:37:39 +00:00
<?php if (isset($err["auth_dbfieldpass"])) formerr($err["auth_dbfieldpass"]); ?>
2004-09-12 01:34:24 +00:00
</td>
<td>
2003-09-09 05:37:39 +00:00
<?php print_string("auth_dbfieldpass","auth") ?>
2004-09-12 01:34:24 +00:00
</td>
</tr>
<tr valign="top" class="required">
2005-05-16 19:38:21 +00:00
<td align="right">auth_dbpasstype:</td>
<td>
<?php
$passtype["plaintext"] = get_string("plaintext", "auth");
$passtype["md5"] = get_string("md5", "auth");
$passtype["internal"] = get_string("internal", "auth");
choose_from_menu($passtype, "auth_dbpasstype", $config->auth_dbpasstype, "");
?>
2004-09-12 01:34:24 +00:00
</td>
<td>
2003-09-09 05:37:39 +00:00
<?php print_string("auth_dbpasstype","auth") ?>
2004-09-12 01:34:24 +00:00
</td>
</tr>
<?php print_auth_lock_options($auth, $user_fields, get_string("auth_dbextrafields","auth"), true, false); ?>
2004-09-12 01:34:24 +00:00
<tr valign="top">
2005-05-16 19:38:21 +00:00
<td align="right"><?php print_string("instructions", "auth") ?>:</td>
<td>
2004-09-12 01:34:24 +00:00
<textarea name="auth_instructions" cols="30" rows="10" wrap="virtual"><?php p($config->auth_instructions) ?></textarea>
</td>
<td>
2003-09-09 05:37:39 +00:00
<?php print_string("authinstructions","auth") ?>
<?php helpbutton("text", get_string("helptext")) ?>
2004-09-12 01:34:24 +00:00
</td>
</tr>