adding some strings
[moodle-linuxchix.git] / auth / db / config.html
blobe4ccbe3bf920697facca8fae2781b9d93d40c17b
1 <?php
3 // set to defaults if undefined
4 if (!isset($config->host)) {
5 $config->host = 'localhost';
7 if (!isset($config->type)) {
8 $config->type = 'mysql';
10 if (!isset($config->sybasequoting)) {
11 $config->sybasequoting = 0;
13 if (!isset($config->name)) {
14 $config->name = '';
16 if (!isset($config->user)) {
17 $config->user = '';
19 if (!isset($config->pass)) {
20 $config->pass = '';
22 if (!isset($config->table)) {
23 $config->table = '';
25 if (!isset($config->fielduser)) {
26 $config->fielduser = '';
28 if (!isset($config->fieldpass)) {
29 $config->fieldpass = '';
31 if (!isset($config->passtype)) {
32 $config->passtype = 'plaintext';
34 if (!isset($config->changepasswordurl)) {
35 $config->changepasswordurl = '';
37 if (empty($config->extencoding)) {
38 $config->extencoding = 'utf-8';
40 if (empty($config->debugauthdb)) {
41 $config->debugauthdb = 0;
43 if (!isset($config->setupsql)) {
44 $config->setupsql = '';
46 if (!isset($config->removeuser)) {
47 $config->removeuser = 0;
50 $yesno = array( get_string('no'), get_string('yes') );
53 <table cellspacing="0" cellpadding="5" border="0">
55 <tr valign="top" class="required">
56 <td align="right"><label for="host"><?php print_string("auth_dbhost_key", "auth") ?></label></td>
57 <td>
58 <input id="host" name="host" type="text" size="30" value="<?php echo $config->host?>" />
59 <?php
61 if (isset($err["host"])) {
62 formerr($err["host"]);
66 </td>
67 <td><?php print_string("auth_dbhost", "auth") ?></td>
68 </tr>
70 <tr valign="top" class="required">
71 <td align="right"><label for="menutype"><?php print_string("auth_dbtype_key", "auth") ?></label></td>
72 <td>
73 <?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");
74 foreach ($dbtypes as $dbtype) {
75 $dboptions[$dbtype] = $dbtype;
77 choose_from_menu($dboptions, "type", $config->type, "");
80 </td>
81 <td>
82 <?php print_string("auth_dbtype","auth") ?>
83 </td>
84 </tr>
86 <tr valign="top" class="required">
87 <td align="right"><label for="menusybasequoting"><?php print_string("auth_dbsybasequoting", "auth") ?></label></td>
88 <td>
89 <?php choose_from_menu($yesno, 'sybasequoting', $config->sybasequoting, ''); ?>
90 </td>
91 <td><?php print_string("auth_dbsybasequotinghelp", "auth") ?></td>
92 </tr>
94 <tr valign="top" class="required">
95 <td align="right"><label for="name"><?php print_string("auth_dbname_key", "auth") ?></label></td>
96 <td>
97 <input id="name" name="name" type="text" size="30" value="<?php echo $config->name?>" />
98 <?php
100 if (isset($err["name"])) {
101 formerr($err["name"]);
105 </td>
106 <td><?php print_string("auth_dbname", "auth") ?></td>
107 </tr>
109 <tr valign="top" class="required">
110 <td align="right"><label for="user"><?php print_string("auth_dbuser_key", "auth") ?></label></td>
111 <td>
112 <input id="user" name="user" type="text" size="30" value="<?php echo $config->user?>" />
113 <?php
115 if (isset($err["user"])) {
116 formerr($err["user"]);
120 </td>
121 <td><?php print_string("auth_dbuser", "auth") ?></td>
122 </tr>
124 <tr valign="top" class="required">
125 <td align="right"><label for="pass"><?php print_string("auth_dbpass_key", "auth") ?></label></td>
126 <td>
127 <input id="pass" name="pass" type="text" size="30" value="<?php echo $config->pass?>" />
128 <?php
130 if (isset($err["pass"])) {
131 formerr($err["pass"]);
135 </td>
136 <td>
137 <?php print_string("auth_dbpass", "auth") ?>
138 </td>
139 </tr>
141 <tr valign="top" class="required">
142 <td align="right"><label for="table"><?php print_string("auth_dbtable_key", "auth") ?></label></td>
143 <td>
144 <input id="table" name="table" type="text" size="30" value="<?php echo $config->table?>" />
145 <?php
147 if (isset($err["table"])) {
148 formerr($err["table"]);
152 </td>
153 <td><?php print_string("auth_dbtable", "auth") ?></td>
154 </tr>
156 <tr valign="top" class="required">
157 <td align="right"><label for="fielduser"><?php print_string("auth_dbfielduser_key", "auth") ?></label></td>
158 <td>
159 <input id="fielduser" name="fielduser" type="text" size="30" value="<?php echo $config->fielduser?>" />
160 <?php
162 if (isset($err["fielduser"])) {
163 formerr($err["fielduser"]);
167 </td>
168 <td><?php print_string("auth_dbfielduser", "auth") ?></td>
169 </tr>
171 <tr valign="top" class="required">
172 <td align="right"><label for="fieldpass"><?php print_string("auth_dbfieldpass_key", "auth") ?></label></td>
173 <td>
174 <input id="fieldpass" name="fieldpass" type="text" size="30" value="<?php echo $config->fieldpass?>" />
175 <?php
177 if (isset($err["fieldpass"])) {
178 formerr($err["fieldpass"]);
182 </td>
183 <td><?php print_string("auth_dbfieldpass", "auth") ?></td>
184 </tr>
186 <tr valign="top" class="required">
187 <td align="right"><label for="menupasstype"><?php print_string("auth_dbpasstype_key", "auth") ?></label></td>
188 <td>
189 <?php
190 $passtype = array();
191 $passtype["plaintext"] = get_string("plaintext", "auth");
192 $passtype["md5"] = get_string("md5", "auth");
193 $passtype["sha1"] = get_string("sha1", "auth");
194 $passtype["internal"] = get_string("internal", "auth");
195 choose_from_menu($passtype, "passtype", $config->passtype, "");
198 </td>
199 <td><?php print_string("auth_dbpasstype", "auth") ?></td>
200 </tr>
202 <tr valign="top" class="required">
203 <td align="right"><label for="extencoding"><?php print_string("auth_dbextencoding", "auth") ?></label></td>
204 <td>
205 <input id="extencoding" name="extencoding" type="text" value="<?php echo $config->extencoding ?>" />
206 <?php
208 if (isset($err['extencoding'])) {
209 formerr($err['extencoding']);
213 </td>
214 <td><?php print_string('auth_dbextencodinghelp', 'auth') ?></td>
215 </tr>
217 <tr valign="top">
218 <td align="right"><label for="setupsql"><?php print_string("auth_dbsetupsql", "auth") ?></label></td>
219 <td>
220 <input id="setupsql" name="setupsql" type="text" value="<?php echo $config->setupsql ?>" />
221 </td>
222 <td><?php print_string('auth_dbsetupsqlhelp', 'auth') ?></td>
223 </tr>
225 <tr valign="top">
226 <td align="right"><label for="menudebugauthdb"><?php print_string("auth_dbdebugauthdb", "auth") ?></label></td>
227 <td>
228 <?php choose_from_menu($yesno, 'debugauthdb', $config->debugauthdb, ''); ?>
229 </td>
230 <td><?php print_string("auth_dbdebugauthdbhelp", "auth") ?></td>
231 </tr>
233 <tr valign="top">
234 <td align="right"><label for="changepasswordurl"><?php print_string("auth_dbchangepasswordurl_key", "auth") ?></label></td>
235 <td>
236 <input id="changepasswordurl" name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
237 <?php
239 if (isset($err['changepasswordurl'])) {
240 formerr($err['changepasswordurl']);
244 </td>
245 <td><?php print_string('changepasswordhelp', 'auth') ?></td>
246 </tr>
248 <tr>
249 <td colspan="2">
250 <h4><?php print_string('auth_sync_script', 'auth') ?> </h4>
251 </td>
252 </tr>
254 <tr valign="top">
255 <td align="right"><label for="menuremoveuser"><?php print_string('auth_remove_user_key','auth') ?></label></td>
256 <td>
257 <?php
258 $deleteopt = array();
259 $deleteopt['0'] = get_string('auth_remove_keep','auth');
260 $deleteopt['1'] = get_string('auth_remove_suspend','auth');
261 $deleteopt['2'] = get_string('auth_remove_delete','auth');
262 choose_from_menu($deleteopt, 'removeuser', $config->removeuser, '');
264 </td>
265 <td>
266 <?php print_string('auth_remove_user','auth') ?>
267 </td>
268 </tr>
270 <?php
272 print_auth_lock_options('db', $user_fields, get_string('auth_dbextrafields', 'auth'), true, true);
275 </table>