2 <!-- $Id: login.tmpl,v 1.24 2003-11-25 16:36:53 carstenklapp Exp $ -->
3 <!-- The login form -->
5 <?php if ($fail_message) { ?>
6 <p><strong><?=$fail_message?></strong></p>
7 <hr noshade="noshade" />
9 <?php /* br past the logo */ ?>
10 <br class="clear-floats" />
12 <?php if (ALLOW_BOGO_LOGIN && $require_level <= WIKIAUTH_BOGO) {
13 // This iso-8859-1 sample covers French, Spanish, Italian, German, and probably others
14 $examplechars = htmlentities("ÀñíçéàÖãæôßøü", ENT_QUOTES, 'iso-8859-1');
15 // Japanese login requires utf-8 and ALLOW_NONWIKIWORD_LOGINS
16 /*if ((CHARSET == 'utf-8') && defined('ALLOW_NONWIKIWORD_LOGINS') && ALLOW_NONWIKIWORD_LOGINS) {
17 //sample Japanese login name in unicode
18 $examplechars = $examplechars . "天道あかね";
20 <?php require_once("lib/BlockParser.php");
21 $t = TransformText(_("You may sign in using any [WikiWord|AddingPages] as a user id. (%s etc. may be used too). The user id will be used as a link in RecentChanges to your home page."),
23 printf(asXML($t), $examplechars); ?>
24 <?php if (empty($pass_required)) ?>
25 <p><?= _("New users may use an empty password.") ?></p>
28 <form method="post" action="<?= $request->getPostURL() ?>" accept-charset="<?=CHARSET?>" name="login">
30 <table cellspacing="4">
32 <td align="right"><?= _("UserId:") ?></td>
33 <td><input type="text" name="auth[userid]" size="12" maxlength="256" value="<?=$userid?>" /></td>
36 <td align="right"><?= _("Password:") ?></td>
37 <td><input type="password" name="auth[passwd]" size="12" maxlength="256" /></td>
40 /* Related code for this doesn't seem to function yet.
41 Commented out for now until it is fixed or removed.
42 (I personally don't see the need for this feature. --CarstenKlapp)
43 $dbi = $request->getDbh();
44 $checked = (!empty($userid) and $dbi->isWikiPage($userid)) ? '' : 'checked="checked"';
46 <td align="right"><?= _("Create Homepage:") ?></td>
47 <td><input type="checkbox" name="auth[homepage]"<?php if ($checked) {
48 ?> checked="checked"<?php }?> /></td>
52 <tr><td align="center" colspan="2">
53 <?=Button("submit:", _("Sign In"), 'wikiaction')?>
54 <?php if (!$require_level) { ?>
55 <?=Button("submit:auth[cancel]", _("Cancel"), 'button')?>
60 <input type="hidden" name="auth[require_level]" value="<?=$require_level?>" />
61 <input type="hidden" name="auth[login]" value="1" />
62 <?= HiddenInputs($request->getArgs(), false, array('auth')) ?>
65 <script language="JavaScript" type="text/javascript">
66 <!-- // Really there's got to be a simpler way to do this....
67 function select_input (type) {
68 var elements = document.forms['login'].elements;
69 for (var i = 0; i < elements.length; i++) {
70 if (elements[i].type == type) {
76 select_input('<?= $userid ? "password" : "text" ?>');