]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/shamino_com/templates/signin.tmpl
Add a minimalistic design by walter rafelsberger
[SourceForge/phpwiki.git] / themes / shamino_com / templates / signin.tmpl
1 <?php // -*-php-*-
2 rcs_id('$Id: signin.tmpl,v 1.1 2004-12-19 17:34:19 rurban Exp $');
3 // signin only implicitly by clicking "Edit"
4 if (empty($FORMNAME))
5     $FORMNAME = 'signin';
6 else
7     $NOFORM = true;
8 ?>
9 <?php if (empty($NOFORM)) { ?>
10   <form method="post" action="<?= $request->getPostURL() ?>" accept-charset="<?=$charset?>" name="<?=$FORMNAME?>">
11   <?= HiddenInputs($request->getArgs(), false, array('auth')) ?>
12 <?php }
13 if ($user->isAuthenticated()) {
14     $Sep = $WikiTheme->getButtonSeparator();
15     $SignOutB = $WikiTheme->makeButton(_("Sign Out"), "javascript:SignOut();", 'wikiaction');
16     $SignOutJS = JavaScript('
17     document.write(\'<input type="hidden" name="auth[logout]" value="0" />\');
18     function SignOut() { 
19       var form = document.forms["'.$FORMNAME.'"];
20       form.elements["auth[logout]"].value = 1;
21       form.submit();
22     }
23     document.write(\''.AsXML($SignOutB).'\');');
24 ?>
25   <span class="signin"><?= fmt("Authenticated as %s", WikiLink($user->getAuthenticatedId(), 'auto')) ?>
26   <?=$Sep?><?=$SignOutJS?></span>
27   <noscript>
28     <span class="signin"><?= Button("submit:auth[logout]", _("Sign Out"), 'wikiaction') ?></span>
29   </noscript>
30 <?php } ?>
31 <?php if (empty($NOFORM)) { ?>
32   </form>
33 <?php } ?>