]> CyberLeo.Net >> Repos - SourceForge/phpwiki.git/blob - themes/default/templates/signin.tmpl
Big Template cleanup and refactor.
[SourceForge/phpwiki.git] / themes / default / templates / signin.tmpl
1 <?php // -*-html-*- ?>
2 <!-- $Id: signin.tmpl,v 1.10 2002-01-24 00:45:28 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
17   <?php foreach ($request->getArgs() as $key => $val) { ?>
18     <input type="hidden" name="<?=$key?>" value="<?=$val?>" />
19   <?php } ?>
20 <?php } ?>
21
22 <?php if ($user->isSignedIn()) {  ?>
23
24   <?= fmt("You are signed in as %s", LinkWikiWord($user->getId())) ?>
25   <?=$Sep?>
26   <script language="JavaScript" type="text/javascript"><!--
27     document.write('<input type="hidden" name="auth[logout]" value="0" />');
28     function SignOut() { 
29       document.forms["<?=$FORMNAME?>"].elements["auth[logout]"].value = 1;
30       document.forms["<?=$FORMNAME?>"].submit();
31     }
32     document.write('<?=$SignOutB?>'); // -->
33   </script>
34   <noscript>
35     <?=$Theme->makeButton(_("Sign Out"), "submit:auth[logout]", "wikiaction")?>
36   </noscript>
37
38 <?php } else { ?>
39
40   <?php $SignInInput = HTML::input(array('type' => 'text',
41                                          'name' => "auth[userid]",
42                                          'size' => 12,
43                                          'onchange' => "this.form.submit();"));
44         $SignInInput->addTooltip(_("Sign In")) ?>
45
46   <script language="JavaScript" type="text/javascript"><!--
47     document.write("<small><?=_("Sign In")?></small> ");
48   // --></script>
49   <?= $SignInInput ?>
50   <noscript>
51     <?=$Theme->makeButton(_("Sign In"), "submit:auth[login]", "wikiaction")?>
52   </noscript>
53
54 <?php } ?>
55
56 <?php if (empty($NOFORM)) { ?>
57   </form>
58 <?php } ?>