2004-09-12 01:34:24 +00:00
|
|
|
<?php
|
2007-01-04 04:52:42 +00:00
|
|
|
|
|
|
|
// set to defaults if undefined
|
|
|
|
if (!isset($config->host)) {
|
2007-02-20 17:03:36 +00:00
|
|
|
$config->host = 'localhost';
|
2007-01-04 04:52:42 +00:00
|
|
|
}
|
|
|
|
if (!isset($config->type)) {
|
2007-02-20 17:03:36 +00:00
|
|
|
$config->type = 'mysql';
|
2002-12-31 08:45:37 +00:00
|
|
|
}
|
2007-02-16 10:45:53 +00:00
|
|
|
if (!isset($config->sybasequoting)) {
|
|
|
|
$config->sybasequoting = 0;
|
|
|
|
}
|
2007-01-04 04:52:42 +00:00
|
|
|
if (!isset($config->name)) {
|
2007-02-20 17:03:36 +00:00
|
|
|
$config->name = '';
|
2002-12-31 08:45:37 +00:00
|
|
|
}
|
2007-01-04 04:52:42 +00:00
|
|
|
if (!isset($config->user)) {
|
2007-02-20 17:03:36 +00:00
|
|
|
$config->user = '';
|
2002-12-31 08:45:37 +00:00
|
|
|
}
|
2007-01-04 04:52:42 +00:00
|
|
|
if (!isset($config->pass)) {
|
2007-02-20 17:03:36 +00:00
|
|
|
$config->pass = '';
|
2002-12-31 08:45:37 +00:00
|
|
|
}
|
2007-01-04 04:52:42 +00:00
|
|
|
if (!isset($config->table)) {
|
2007-02-20 17:03:36 +00:00
|
|
|
$config->table = '';
|
2002-12-31 08:45:37 +00:00
|
|
|
}
|
2007-01-04 04:52:42 +00:00
|
|
|
if (!isset($config->fielduser)) {
|
2007-02-20 17:03:36 +00:00
|
|
|
$config->fielduser = '';
|
2002-12-31 08:45:37 +00:00
|
|
|
}
|
2007-01-04 04:52:42 +00:00
|
|
|
if (!isset($config->fieldpass)) {
|
2007-02-20 17:03:36 +00:00
|
|
|
$config->fieldpass = '';
|
2002-12-31 08:45:37 +00:00
|
|
|
}
|
2007-01-04 04:52:42 +00:00
|
|
|
if (!isset($config->passtype)) {
|
2007-02-20 17:03:36 +00:00
|
|
|
$config->passtype = 'plaintext';
|
2002-12-31 08:45:37 +00:00
|
|
|
}
|
2007-01-04 04:52:42 +00:00
|
|
|
if (!isset($config->changepasswordurl)) {
|
|
|
|
$config->changepasswordurl = '';
|
2002-12-31 08:45:37 +00:00
|
|
|
}
|
2007-02-16 10:45:53 +00:00
|
|
|
if (empty($config->extencoding)) {
|
|
|
|
$config->extencoding = 'utf-8';
|
|
|
|
}
|
|
|
|
if (empty($config->debugauthdb)) {
|
|
|
|
$config->debugauthdb = 0;
|
|
|
|
}
|
|
|
|
if (!isset($config->setupsql)) {
|
|
|
|
$config->setupsql = '';
|
|
|
|
}
|
2007-02-20 17:03:36 +00:00
|
|
|
if (!isset($config->removeuser)) {
|
|
|
|
$config->removeuser = 0;
|
|
|
|
}
|
2006-01-16 02:54:16 +00:00
|
|
|
|
2007-02-20 17:03:36 +00:00
|
|
|
$yesno = array( get_string('no'), get_string('yes') );
|
2007-01-04 04:52:42 +00:00
|
|
|
|
2002-12-31 08:45:37 +00:00
|
|
|
?>
|
2007-04-20 07:54:42 +00:00
|
|
|
<table cellspacing="0" cellpadding="5" border="0">
|
2006-01-16 02:54:16 +00:00
|
|
|
|
2005-02-09 12:55:34 +00:00
|
|
|
<tr valign="top" class="required">
|
2007-02-16 10:45:53 +00:00
|
|
|
<td align="right"><label for="host"><?php print_string("auth_dbhost_key", "auth") ?></label></td>
|
2005-05-16 19:38:21 +00:00
|
|
|
<td>
|
2007-02-16 10:45:53 +00:00
|
|
|
<input id="host" name="host" type="text" size="30" value="<?php echo $config->host?>" />
|
2007-01-04 04:52:42 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (isset($err["host"])) {
|
|
|
|
formerr($err["host"]);
|
|
|
|
}
|
2007-02-16 10:45:53 +00:00
|
|
|
|
2007-01-04 04:52:42 +00:00
|
|
|
?>
|
2004-09-12 01:34:24 +00:00
|
|
|
</td>
|
2007-01-04 04:52:42 +00:00
|
|
|
<td><?php print_string("auth_dbhost", "auth") ?></td>
|
2004-09-12 01:34:24 +00:00
|
|
|
</tr>
|
2002-11-19 08:51:33 +00:00
|
|
|
|
2005-02-09 12:55:34 +00:00
|
|
|
<tr valign="top" class="required">
|
2007-02-16 10:45:53 +00:00
|
|
|
<td align="right"><label for="menutype"><?php print_string("auth_dbtype_key", "auth") ?></label></td>
|
2005-05-16 19:38:21 +00:00
|
|
|
<td>
|
2007-02-16 10:45:53 +00:00
|
|
|
<?php $dbtypes = array("access","ado_access", "ado", "ado_mssql", "borland_ibase", "csv", "db2", "fbsql", "firebird", "ibase", "informix72", "informix", "mssql", "mssql_n", "mysql", "mysqli", "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;
|
|
|
|
}
|
2007-01-04 04:52:42 +00:00
|
|
|
choose_from_menu($dboptions, "type", $config->type, "");
|
2002-11-19 08:51:33 +00:00
|
|
|
?>
|
2007-02-16 10:45:53 +00:00
|
|
|
|
2004-09-12 01:34:24 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2007-02-20 17:03:36 +00:00
|
|
|
<?php print_string("auth_dbtype","auth") ?>
|
2004-09-12 01:34:24 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2002-11-19 08:51:33 +00:00
|
|
|
|
2005-02-09 12:55:34 +00:00
|
|
|
<tr valign="top" class="required">
|
2007-02-20 17:03:36 +00:00
|
|
|
<td align="right"><label for="menusybasequoting"><?php print_string("auth_dbsybasequoting", "auth") ?></label></td>
|
2005-05-16 19:38:21 +00:00
|
|
|
<td>
|
2007-02-20 17:03:36 +00:00
|
|
|
<?php choose_from_menu($yesno, 'sybasequoting', $config->sybasequoting, ''); ?>
|
2007-02-16 10:45:53 +00:00
|
|
|
</td>
|
|
|
|
<td><?php print_string("auth_dbsybasequotinghelp", "auth") ?></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top" class="required">
|
|
|
|
<td align="right"><label for="name"><?php print_string("auth_dbname_key", "auth") ?></label></td>
|
|
|
|
<td>
|
|
|
|
<input id="name" name="name" type="text" size="30" value="<?php echo $config->name?>" />
|
2007-01-04 04:52:42 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (isset($err["name"])) {
|
|
|
|
formerr($err["name"]);
|
|
|
|
}
|
2007-02-16 10:45:53 +00:00
|
|
|
|
2007-01-04 04:52:42 +00:00
|
|
|
?>
|
2004-09-12 01:34:24 +00:00
|
|
|
</td>
|
2007-01-04 04:52:42 +00:00
|
|
|
<td><?php print_string("auth_dbname", "auth") ?></td>
|
2004-09-12 01:34:24 +00:00
|
|
|
</tr>
|
2002-11-19 08:51:33 +00:00
|
|
|
|
2005-02-09 12:55:34 +00:00
|
|
|
<tr valign="top" class="required">
|
2007-02-16 10:45:53 +00:00
|
|
|
<td align="right"><label for="user"><?php print_string("auth_dbuser_key", "auth") ?></label></td>
|
2004-09-12 01:34:24 +00:00
|
|
|
<td>
|
2007-02-16 10:45:53 +00:00
|
|
|
<input id="user" name="user" type="text" size="30" value="<?php echo $config->user?>" />
|
2007-01-04 04:52:42 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (isset($err["user"])) {
|
|
|
|
formerr($err["user"]);
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
2004-09-12 01:34:24 +00:00
|
|
|
</td>
|
2007-01-04 04:52:42 +00:00
|
|
|
<td><?php print_string("auth_dbuser", "auth") ?></td>
|
2004-09-12 01:34:24 +00:00
|
|
|
</tr>
|
2002-11-19 08:51:33 +00:00
|
|
|
|
2005-02-09 12:55:34 +00:00
|
|
|
<tr valign="top" class="required">
|
2007-02-16 10:45:53 +00:00
|
|
|
<td align="right"><label for="pass"><?php print_string("auth_dbpass_key", "auth") ?></label></td>
|
2005-05-16 19:38:21 +00:00
|
|
|
<td>
|
2007-02-16 10:45:53 +00:00
|
|
|
<input id="pass" name="pass" type="text" size="30" value="<?php echo $config->pass?>" />
|
2007-01-04 04:52:42 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (isset($err["pass"])) {
|
|
|
|
formerr($err["pass"]);
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
2004-09-12 01:34:24 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
2007-01-04 04:52:42 +00:00
|
|
|
<?php print_string("auth_dbpass", "auth") ?>
|
2004-09-12 01:34:24 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
2002-11-19 08:51:33 +00:00
|
|
|
|
2005-02-09 12:55:34 +00:00
|
|
|
<tr valign="top" class="required">
|
2007-02-16 10:45:53 +00:00
|
|
|
<td align="right"><label for="table"><?php print_string("auth_dbtable_key", "auth") ?></label></td>
|
2004-09-12 01:34:24 +00:00
|
|
|
<td>
|
2007-02-16 10:45:53 +00:00
|
|
|
<input id="table" name="table" type="text" size="30" value="<?php echo $config->table?>" />
|
2007-01-04 04:52:42 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (isset($err["table"])) {
|
|
|
|
formerr($err["table"]);
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
2004-09-12 01:34:24 +00:00
|
|
|
</td>
|
2007-01-04 04:52:42 +00:00
|
|
|
<td><?php print_string("auth_dbtable", "auth") ?></td>
|
2004-09-12 01:34:24 +00:00
|
|
|
</tr>
|
2002-11-19 08:51:33 +00:00
|
|
|
|
2005-02-09 12:55:34 +00:00
|
|
|
<tr valign="top" class="required">
|
2007-02-16 10:45:53 +00:00
|
|
|
<td align="right"><label for="fielduser"><?php print_string("auth_dbfielduser_key", "auth") ?></label></td>
|
2004-09-12 01:34:24 +00:00
|
|
|
<td>
|
2007-02-16 10:45:53 +00:00
|
|
|
<input id="fielduser" name="fielduser" type="text" size="30" value="<?php echo $config->fielduser?>" />
|
2007-01-04 04:52:42 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (isset($err["fielduser"])) {
|
|
|
|
formerr($err["fielduser"]);
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
2004-09-12 01:34:24 +00:00
|
|
|
</td>
|
2007-01-04 04:52:42 +00:00
|
|
|
<td><?php print_string("auth_dbfielduser", "auth") ?></td>
|
2004-09-12 01:34:24 +00:00
|
|
|
</tr>
|
2002-11-19 08:51:33 +00:00
|
|
|
|
2005-02-09 12:55:34 +00:00
|
|
|
<tr valign="top" class="required">
|
2007-02-16 10:45:53 +00:00
|
|
|
<td align="right"><label for="fieldpass"><?php print_string("auth_dbfieldpass_key", "auth") ?></label></td>
|
2005-05-16 19:38:21 +00:00
|
|
|
<td>
|
2007-02-16 10:45:53 +00:00
|
|
|
<input id="fieldpass" name="fieldpass" type="text" size="30" value="<?php echo $config->fieldpass?>" />
|
2007-01-04 04:52:42 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (isset($err["fieldpass"])) {
|
|
|
|
formerr($err["fieldpass"]);
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
2004-09-12 01:34:24 +00:00
|
|
|
</td>
|
2007-01-04 04:52:42 +00:00
|
|
|
<td><?php print_string("auth_dbfieldpass", "auth") ?></td>
|
2004-09-12 01:34:24 +00:00
|
|
|
</tr>
|
2002-11-19 08:51:33 +00:00
|
|
|
|
2005-02-09 12:55:34 +00:00
|
|
|
<tr valign="top" class="required">
|
2007-02-16 10:45:53 +00:00
|
|
|
<td align="right"><label for="menupasstype"><?php print_string("auth_dbpasstype_key", "auth") ?></label></td>
|
2004-09-12 01:34:24 +00:00
|
|
|
<td>
|
2007-02-16 10:45:53 +00:00
|
|
|
<?php
|
2007-02-20 17:03:36 +00:00
|
|
|
$passtype = array();
|
2007-01-04 04:52:42 +00:00
|
|
|
$passtype["plaintext"] = get_string("plaintext", "auth");
|
|
|
|
$passtype["md5"] = get_string("md5", "auth");
|
2007-02-16 10:45:53 +00:00
|
|
|
$passtype["sha1"] = get_string("sha1", "auth");
|
2007-01-04 04:52:42 +00:00
|
|
|
$passtype["internal"] = get_string("internal", "auth");
|
|
|
|
choose_from_menu($passtype, "passtype", $config->passtype, "");
|
|
|
|
|
|
|
|
?>
|
2004-09-12 01:34:24 +00:00
|
|
|
</td>
|
2007-01-04 04:52:42 +00:00
|
|
|
<td><?php print_string("auth_dbpasstype", "auth") ?></td>
|
2004-09-12 01:34:24 +00:00
|
|
|
</tr>
|
2002-12-31 08:45:37 +00:00
|
|
|
|
2007-02-16 10:45:53 +00:00
|
|
|
<tr valign="top" class="required">
|
|
|
|
<td align="right"><label for="extencoding"><?php print_string("auth_dbextencoding", "auth") ?></label></td>
|
|
|
|
<td>
|
|
|
|
<input id="extencoding" name="extencoding" type="text" value="<?php echo $config->extencoding ?>" />
|
|
|
|
<?php
|
|
|
|
|
|
|
|
if (isset($err['extencoding'])) {
|
|
|
|
formerr($err['extencoding']);
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
<td><?php print_string('auth_dbextencodinghelp', 'auth') ?></td>
|
|
|
|
</tr>
|
|
|
|
|
2004-09-12 01:34:24 +00:00
|
|
|
<tr valign="top">
|
2007-02-16 10:45:53 +00:00
|
|
|
<td align="right"><label for="setupsql"><?php print_string("auth_dbsetupsql", "auth") ?></label></td>
|
2004-09-12 01:34:24 +00:00
|
|
|
<td>
|
2007-02-16 10:45:53 +00:00
|
|
|
<input id="setupsql" name="setupsql" type="text" value="<?php echo $config->setupsql ?>" />
|
|
|
|
</td>
|
|
|
|
<td><?php print_string('auth_dbsetupsqlhelp', 'auth') ?></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
2007-02-20 17:03:36 +00:00
|
|
|
<td align="right"><label for="menudebugauthdb"><?php print_string("auth_dbdebugauthdb", "auth") ?></label></td>
|
2007-02-16 10:45:53 +00:00
|
|
|
<td>
|
2007-02-20 17:03:36 +00:00
|
|
|
<?php choose_from_menu($yesno, 'debugauthdb', $config->debugauthdb, ''); ?>
|
2007-02-16 10:45:53 +00:00
|
|
|
</td>
|
|
|
|
<td><?php print_string("auth_dbdebugauthdbhelp", "auth") ?></td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="right"><label for="changepasswordurl"><?php print_string("auth_dbchangepasswordurl_key", "auth") ?></label></td>
|
|
|
|
<td>
|
|
|
|
<input id="changepasswordurl" name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
|
2007-01-04 04:52:42 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (isset($err['changepasswordurl'])) {
|
|
|
|
formerr($err['changepasswordurl']);
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|
2004-09-12 01:34:24 +00:00
|
|
|
</td>
|
2007-01-04 04:52:42 +00:00
|
|
|
<td><?php print_string('changepasswordhelp', 'auth') ?></td>
|
2004-09-12 01:34:24 +00:00
|
|
|
</tr>
|
2007-02-20 17:03:36 +00:00
|
|
|
|
|
|
|
<tr>
|
|
|
|
<td colspan="2">
|
|
|
|
<h4><?php print_string('auth_sync_script', 'auth') ?> </h4>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
|
|
|
<tr valign="top">
|
|
|
|
<td align="right"><label for="menuremoveuser"><?php print_string('auth_remove_user_key','auth') ?></label></td>
|
|
|
|
<td>
|
|
|
|
<?php
|
|
|
|
$deleteopt = array();
|
|
|
|
$deleteopt['0'] = get_string('auth_remove_keep','auth');
|
|
|
|
$deleteopt['1'] = get_string('auth_remove_suspend','auth');
|
|
|
|
$deleteopt['2'] = get_string('auth_remove_delete','auth');
|
|
|
|
choose_from_menu($deleteopt, 'removeuser', $config->removeuser, '');
|
|
|
|
?>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<?php print_string('auth_remove_user','auth') ?>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
|
2007-02-16 10:45:53 +00:00
|
|
|
<?php
|
2007-01-04 04:52:42 +00:00
|
|
|
|
2007-02-20 17:03:36 +00:00
|
|
|
print_auth_lock_options('db', $user_fields, get_string('auth_dbextrafields', 'auth'), true, true);
|
2007-01-04 04:52:42 +00:00
|
|
|
|
|
|
|
?>
|
|
|
|
</table>
|