]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/signin.tmpl
Combine and refactor editpage.php and savepage.php.
[SourceForge/phpwiki.git] / themes / default / templates / signin.tmpl
1 <?php // -*-html-*- ?>
2 <!-- $Id: signin.tmpl,v 1.12 2002-01-30 01:33:20 dairiki Exp $ -->
3 <?php
4
5      $Sep = $Theme->getButtonSeparator();
6      $SignOutB = $Theme->makeButton(_("Sign Out"), "javascript:SignOut();", 'wikiaction');
7
8      if (empty($FORMNAME))
9          $FORMNAME = 'signin';
10      else
11          $NOFORM = true;
12 ?>
13
14 <?php if (empty($NOFORM)) { ?>
15   <form method="post" action="<?=BASE_URL?>" accept-charset="<?=CHARSET?>" name="<?=$FORMNAME?>">
16   <?= HiddenInputs($request->getArgs()) ?>
17 <?php } ?>
18
19 <?php if ($user->isSignedIn()) {  ?>
20
21   <?= fmt("You are signed in as %s", LinkWikiWord($user->getId())) ?>
22   <?=$Sep?>
23   <script language="JavaScript" type="text/javascript"><!--
24     document.write('<input type="hidden" name="auth[logout]" value="0" />');
25     function SignOut() { 
26       document.forms["<?=$FORMNAME?>"].elements["auth[logout]"].value = 1;
27       document.forms["<?=$FORMNAME?>"].submit();
28     }
29     document.write('<?=$SignOutB?>'); // -->
30   </script>
31   <noscript>
32     <?=$Theme->makeButton(_("Sign Out"), "submit:auth[logout]", "wikiaction")?>
33   </noscript>
34
35 <?php } else { ?>
36
37   <?php $SignInInput = HTML::input(array('type' => 'text',
38                                          'name' => "auth[userid]",
39                                          'size' => 12,
40                                          'onchange' => "this.form.submit();"));
41         $SignInInput->addTooltip(_("Enter your UserId to sign in")) ?>
42
43   <script language="JavaScript" type="text/javascript"><!--
44     document.write("<small><?=_("Sign In")?></small> ");
45   // --></script>
46   <?= $SignInInput ?>
47   <noscript>
48     <?=$Theme->makeButton(_("Sign In"), "submit:auth[login]", "wikiaction")?>
49   </noscript>
50
51 <?php } ?>
52
53 <?php if (empty($NOFORM)) { ?>
54   </form>
55 <?php } ?>