2 <!-- $Id: login.tmpl,v 1.25 2004-02-03 09:45:39 rurban 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");
22 printf(asXML(TransformText(" DEBUG: ALLOW_ANON_EDIT = %s, ALLOW_BOGO_LOGIN = %s, ALLOW_USER_PASSWORDS = %s")),
23 ALLOW_ANON_EDIT ? "true" : "false",
24 ALLOW_BOGO_LOGIN ? "true" : "false",
25 ALLOW_USER_PASSWORDS ? "true" : "false");
26 if (ALLOW_USER_PASSWORDS) {
27 printf(asXML(TransformText(" USER_AUTH_ORDER: %s")),join(" / ",$GLOBALS['USER_AUTH_ORDER']));
28 printf(asXML(TransformText(" USER_AUTH_POLICY: %s")),USER_AUTH_POLICY);
32 $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."),
34 printf(asXML($t), $examplechars);
35 /* On disabled DbPrefs (PagePrefs only) note the user to create his PersonalPage. */
36 if (!(!empty($GLOBALS['DBAuthParams']['pref_update']) and $GLOBALS['DBParams']['dbtype'] == 'SQL')) {
37 printf(TransformText(_("Note: If you create your personal HomePage with same the pagename as your UserId, you will be able to store your UserPreferences also. Otherwise not.")));
40 <?php if (empty($pass_required)) ?>
41 <p><?= _("New users may use an empty password.") ?></p>
44 <form method="post" action="<?= $request->getPostURL() ?>" accept-charset="<?=CHARSET?>" name="login">
46 <table cellspacing="4">
48 <td align="right"><?= _("UserId:") ?></td>
49 <td><input type="text" name="auth[userid]" size="12" maxlength="256" value="<?=$userid?>" /></td>
52 <td align="right"><?= _("Password:") ?></td>
53 <td><input type="password" name="auth[passwd]" size="12" maxlength="256" /></td>
56 /* Related code for this doesn't seem to work yet.
57 Commented out for now until it is fixed or removed.
58 (I personally don't see the need for this feature. --CarstenKlapp)
59 $dbi = $request->getDbh();
60 $checked = (!empty($userid) and $dbi->isWikiPage($userid)) ? '' : 'checked="checked"';
62 <td align="right"><?= _("Create Homepage:") ?></td>
63 <td><input type="checkbox" name="auth[homepage]"<?php if ($checked) {
64 ?> checked="checked"<?php }?> /></td>
68 <tr><td align="center" colspan="2">
69 <?=Button("submit:", _("Sign In"), 'wikiaction')?>
70 <?php if (!$require_level) { ?>
71 <?=Button("submit:auth[cancel]", _("Cancel"), 'button')?>
76 <input type="hidden" name="auth[require_level]" value="<?=$require_level?>" />
77 <input type="hidden" name="auth[login]" value="1" />
78 <?= HiddenInputs($request->getArgs(), false, array('auth')) ?>
81 <script language="JavaScript" type="text/javascript">
82 <!-- // Really there's got to be a simpler way to do this....
83 function select_input (type) {
84 var elements = document.forms['login'].elements;
85 for (var i = 0; i < elements.length; i++) {
86 if (elements[i].type == type) {
92 select_input('<?= $userid ? "password" : "text" ?>');