]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/login.tmpl
Formatting changes: <br> past logo before displaying login
[SourceForge/phpwiki.git] / themes / default / templates / login.tmpl
1 <?php // -*-html-*- ?>
2 <!-- $Id: login.tmpl,v 1.24 2003-11-25 16:36:53 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 <?php /* br past the logo */ ?>
10 <br class="clear-floats" />
11
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 . "&#22825;&#36947;&#12354;&#12363;&#12397;";
19   }*/ ?>
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."),
22                      2.0, true);
23   printf(asXML($t), $examplechars); ?>
24   <?php if (empty($pass_required)) ?>
25   <p><?= _("New users may use an empty password.") ?></p>
26 <?php } ?>
27
28 <form method="post" action="<?= $request->getPostURL() ?>" accept-charset="<?=CHARSET?>" name="login">
29
30 <table cellspacing="4">
31 <tr>
32   <td align="right"><?= _("UserId:") ?></td>
33   <td><input type="text" name="auth[userid]" size="12" maxlength="256" value="<?=$userid?>" /></td>
34 </tr>
35 <tr>
36   <td align="right"><?= _("Password:") ?></td>
37   <td><input type="password" name="auth[passwd]" size="12" maxlength="256" /></td>
38 </tr>
39 <?php
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"';
45 <tr>
46   <td align="right"><?= _("Create Homepage:") ?></td>
47   <td><input type="checkbox" name="auth[homepage]"<?php if ($checked) {
48   ?> checked="checked"<?php }?> /></td>
49 </tr>
50 */
51 ?>
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')?>
56   <?php } ?>
57 </td></tr>
58 </table>
59
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')) ?>
63 </form>
64
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) {
71             elements[i].focus();
72             return;
73         }
74     }
75 }
76 select_input('<?= $userid ? "password" : "text" ?>');
77 //-->
78 </script>