]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/login.tmpl
Commented out html-output referring to not yet functional feature.
[SourceForge/phpwiki.git] / themes / default / templates / login.tmpl
1 <?php // -*-html-*- ?>
2 <!-- $Id: login.tmpl,v 1.22 2003-10-28 21:24:09 carstenklapp Exp $ -->
3 <!-- The login form -->
4
5 <?php if ($fail_message) { ?>
6   <p><strong><?=$fail_message?></strong></p>
7   <hr noshade="noshade" />
8 <?php } ?>
9
10 <?php if (ALLOW_BOGO_LOGIN && $require_level <= WIKIAUTH_BOGO) {
11   // This iso-8859-1 sample covers French, Spanish, Italian, German, and probably others
12   $examplechars = htmlentities("ÀñíçéàÖãæôßøü", ENT_QUOTES, 'iso-8859-1');
13   // Japanese login doesn't work yet
14   /*if ((CHARSET == 'utf-8') && defined('ALLOW_NONWIKIWORD_LOGINS') && ALLOW_NONWIKIWORD_LOGINS) {
15     //sample Japanese loginname in unicode
16     $examplechars = $examplechars . "&#22825;&#36947;&#12354;&#12363;&#12397;";
17   }*/ ?>
18   <p><?= printf(_("You may sign in using any WikiWord as a UserId. (%s etc. may be used too). The UserId will be used as a link in RecentChanges to your UserId page, your HomePage."), $examplechars) ?>
19   <?php if (empty($pass_required)) ?>
20   <?= _("New users may use an empty password.") ?>
21   </p>
22 <?php } ?>
23
24 <form method="post" action="<?= $request->getPostURL() ?>" accept-charset="<?=CHARSET?>" name="login">
25
26 <table cellspacing="4">
27 <tr>
28   <td align="right"><?= _("UserId:") ?></td>
29   <td><input type="text" name="auth[userid]" size="12" maxlength="256" value="<?=$userid?>" /></td>
30 </tr>
31 <tr>
32   <td align="right"><?= _("Password:") ?></td>
33   <td><input type="password" name="auth[passwd]" size="12" maxlength="256" /></td>
34 </tr>
35 <?php
36 /* Related code for this doesn't seem to function yet.
37    Commented out for now until it is fixed or removed.
38    (I personally don't see the need for this feature. --CarstenKlapp)
39   $dbi = $request->getDbh();
40   $checked = (!empty($userid) and $dbi->isWikiPage($userid)) ? '' : 'checked="checked"';
41 <tr>
42   <td align="right"><?= _("Create Homepage:") ?></td>
43   <td><input type="checkbox" name="auth[homepage]" <?=$checked?> /></td>
44 </tr>
45 */
46 ?>
47 <tr><td align="center" colspan="2">
48   <?=Button("submit:", _("Sign In"), 'wikiaction')?>
49   <?php if (!$require_level) { ?>
50     <?=Button("submit:auth[cancel]", _("Cancel"), 'button')?>
51   <?php } ?>
52 </td></tr>
53 </table>
54
55 <input type="hidden" name="auth[require_level]" value="<?=$require_level?>" />
56 <input type="hidden" name="auth[login]" value="1" />
57 <?= HiddenInputs($request->getArgs(), false, array('auth')) ?>
58 </form>
59
60 <script language="JavaScript" type="text/javascript">
61 <!-- // Really there's got to be a simpler way to do this....
62 function select_input (type) {
63     var elements = document.forms['login'].elements;
64     for (var i = 0; i < elements.length; i++) {
65         if (elements[i].type == type) {
66             elements[i].focus();
67             return;
68         }
69     }
70 }
71 select_input('<?= $userid ? "password" : "text" ?>');
72 //-->
73 </script>