Location: PHPKode > projects > SolBT > SolBT-1.3.0.11/login.php
<?php
  include("../sol/sessao.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>SolBT - <?=$sitenome?></title>
    <link rel="StyleSheet" type="text/css" href="../sol/includes/estilos.css" id="estilo" />
    <script language='JavaScript' src='../sol/includes/FuncoesTela.js' type="text/javascript"></script>
    
    <script language='JavaScript' type="text/javascript">
      <!--
      String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };
      
      function ValidarEntrada()
      {
        ValidarDigitacaoUsuario();
        
        if (document.forms[0].edtUsuario.value.length == 0)
        {
          alert('Informe o username.');
          document.forms[0].edtUsuario.focus();
          return;
        }
        
        if (document.forms[0].edtSenha.value.length == 0)
        {
          alert('Informe a senha.');
          document.forms[0].edtSenha.focus();
          return;
        }
        
        document.forms[0].btnOK.disabled = 'disabled';
        document.forms[0].btnOK.value = 'Autenticando...';
        
        ajax =  InstanciaAJAX();
       
        if(ajax)
        {
          var valor = document.forms[0].edtUsuario.value;
         
          ajax.open('POST', 'usuarios.xml.php', true);
          ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
         
          ajax.onreadystatechange = function()
          {
            if(ajax.readyState == 1)
            {
              document.forms[0].btnOK.value = 'Autenticando...';
            }
           
            if(ajax.readyState == 4)
            {
              if(ajax.responseXML)
              {
                processXML(ajax.responseXML);
              }
              else
              {
                alert('Username ou senha incorretos.');
                document.forms[0].edtUsuario.focus();
              }
            }
          }
         
          //Passa o codigo do estado escolhido como parametro pro POST e envia
          var params = 'username=' + valor + '&senha=' + document.forms[0].edtSenha.value;
          ajax.send(params);
        }
        
        document.forms[0].btnOK.disabled = '';
        document.forms[0].btnOK.value = 'Entrar';
      }
      
      function processXML(obj)
      {
        var dataArray = obj.getElementsByTagName('usuario');
        
        if(dataArray.length > 0)
        {
          window.open('index.php', '_self');
        }
        else
        {
          alert('Username ou senha invalidos.');
          document.forms[0].edtUsuario.focus();
        }
      }
      
      function ValidarDigitacaoUsuario()
      {
        document.forms[0].edtUsuario.value = document.forms[0].edtUsuario.value.trim();
        document.forms[0].edtUsuario.value = document.forms[0].edtUsuario.value.toUpperCase();
      }
      
      if(window.top == window.self) window.open('/sol/', '_parent');
      
      -->
    </script>
  </head>
  
  <body onload="document.forms[0].edtUsuario.focus();">
    
    <table width="100%">
      <tr>
        <td>
          <table width="100%" cellpadding="5" cellspacing="0" align="left">
            <tr style="background-color:#666666; color:#FFFFFF;">
              <td style="font-weight:bold;">&nbsp;SolBT - <?=$sitenome?></td>
              <td align="right">Hoje &eacute; <?=date("d/m/Y")?>&nbsp;</td> 
            </tr>
          </table>
        </td>
      </tr>
    
      <!-- CONTEUDO DA PAGINA -->
      <tr>
        <td id="Conteudo">
          <!--[if lt IE 7]>
            <br /><font color="red"><strong><em>Voc&ecirc; est&aacute; usando uma vers&atilde;o muito antiga do navegador Microsoft Windows Intertnet Explorer.<br />
            Por favor, utilize uma versão mais atualizada para garantir o bom funcionamento desta ferramenta.</em></strong></font><br />
          <![endif]-->
          <br /><strong>Requisitos m&iacute;nimos para uso deste sistema</strong><br /><br />
          Navegador Firefox 3.5, Internet Explorer 7.0, Google Chrome 3.0, Opera 10.0, Safari 4.0<br />
          ou superiores, JavaScript ativado e resolu&ccedil;&atilde;o de tela de no m&iacute;nimo 1024 x 768 px.<br /><br /><br />
          
          <form name="frmLogin" action="login.php">
            <table id="tblLogin" align="center" bgcolor="#CCCCCC" cellpadding="3" cellspacing="3">
              <tr><td height="30" valign="middle">&nbsp;<strong>Login</strong></td><td height="30" valign="middle"><em>Acessar o sistema</em></td></tr>
              <tr><td>&nbsp;Username:</td>
              <td><input type="text" name="edtUsuario" value="" maxlength="20" onblur="ValidarDigitacaoUsuario();" style="width:150px;" />&nbsp;</td></tr>
              <tr><td>&nbsp;Senha:</td><td><input type="password" name="edtSenha" value="" maxlength="8" style="width:150px;" />&nbsp;</td></tr>
              <tr><td height="40">&nbsp;</td><td height="40" valign="top"><input type="button" name="btnOK" value="Entrar" onclick="ValidarEntrada();" /></td></tr>
            </table>
            <br />&nbsp;
          </form>
          
        </td>
      </tr>
      <!-- FIM DE CONTEUDO DA PAGINA -->
      
      <?php
        include("../sol/includes/rp.php");
      ?>
    </table>
  </body>
</html>
<?php
  @mysql_close();
?>
Return current item: SolBT