<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
          "http://www.w3.org/TR/html4/loose.dtd">
{*<!-- BEGIN {$smarty.template} -->*}
<html>
  <head>
    <title>{$smarty.const.PHPAGA_SITENAME|wash|default:"phpaga"}</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="robots" content="noarchive,nofollow,noindex" />

    <link type="text/css" href="js/jquery/ui/css/custom-theme/jquery-ui-1.8.4.custom.css" rel="stylesheet" />	
    <script type="text/javascript" src="js/jquery/jquery.js"></script>
    <script type="text/javascript" src="js/jquery/ui/jquery-ui-1.8.4.custom.min.js"></script>
    <link rel="stylesheet" type="text/css" title="phpaga" media="screen, projection" href="styles/{$smarty.const.PHPAGA_DEFAULT_SKIN}.css" />
    <!--[if IE]>
    <link rel="stylesheet" type="text/css" title="IE extras" media="screen, projection" href="styles/extra/ie.css" />
    <![endif]-->

  </head>
  <body id="b1">
    {literal}
      <script type="text/javascript">
        $(document).ready(function() { 

        function submitLoginForm() {
            $.ajax({
                url: 'service.php',
                type: 'POST',
                data: 'saction={/literal}{$smarty.const.ACTION_SERVICE_LOGIN}{literal}&'+$('#flogin').serialize(),
                dataType: 'json',
                cache: false,
                success: function(result) {
                    data = result.data;
                    if (result.status != 0) {
                        $('#lmsg').html(result.message);
                        if ($('#login').val())
                            $('#password').select();
                        else
                            $('#login').focus();

                    } else {
                        location.reload();
                    }
              }
              });
            return false;
        }
  
        loginDialog = $('<div id="loginarea"> \
              <form method="post" id="flogin"> \
                  <fieldset> \
                      <label for="login">{/literal}{t}Login{/t}{literal}:<\/label> \
                      <input type="text" class="tinput" name="login" id="login" value="" size="10" maxlength="20" /> \
                      <br> \
                      <label for="password">{/literal}{t}Password{/t}{literal}:<\/label> \
                      <input type="password" class="tinput" name="passwd" id="password" size="10" maxlength="50" /> \
                      <br> \
                      <p id="lmsg"> <\/p> \
                      <p class="a"><a href="http://phpaga.net/">phpaga.net<\/a><\/p> \
                  <\/fieldset> \
              <\/form> \
          <\/div> ').dialog({ 
                    autoOpen: true, 
                    modal: true,
                    closeOnEscape: false,
                    beforeClose: function() { return false; },
                    open: function() {
                          $("#login").focus();
                          var lform = $(this); 
                          $(this).keyup(function(e) {
                              if (e.keyCode == 13) {
                                     submitLoginForm(lform); 
                                     return false;
                                  }
                              });
                          },
                    close: function() { $('#olgwrap').show(); },
                    title: '{/literal}{$smarty.const.PHPAGA_SITENAME|wash|default:"phpaga"} - {t}Sign in{/t}{literal}', 
                    width: 400, 
                    height: 'auto',
                    buttons: { 
                        "Login": function() { submitLoginForm($(this)); return false; } 
                        }
          });

        });
      </script>
  {/literal}
      <noscript>
          <div id="nojs">
              <h1>phpaga</h1>
              <h3>JavaScript not available</h3>
              <p>
              {t}This application requires a JavaScript-enabled browser.{/t} <br />
              {t}Your browser does not support JavaScript or has JavaScript disabled.{/t} <br />
              {t}If you use a Firefox extension like NoScript make sure you allow this host to execute scripts.{/t}
              </p>
              <p><a href="http://phpaga.net/">phpaga.net</a></p>
          </div>
      </noscript>
  </body>
</html>

<!-- END {$smarty.template} -->
