PHP Classes

File: login.php

Recommend this page to a friend!
  Classes of Marcelo Costa   OOE   login.php   Download  
File: login.php
Role: Example script
Content type: text/plain
Description: exemple login script
Class: OOE
Web development application framework
Author: By
Last change:
Date: 16 years ago
Size: 1,827 bytes
 

Contents

Class file image Download
<?php
include_once ("_autoload.php");
#
$Objeto = new OOE();

if(
$_GET['action']=="login")
{

   
$mensage=$Objeto->registerSession();


}else{
   
extract($Objeto->newServerKey(),EXTR_OVERWRITE);
}
#========================================================================================
?>
<html>
<head>
<title>Login de Usuários</title>
  <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
  <META HTTP-EQUIV="Expires" CONTENT="-1">
  <META HTTP-EQUIV="Cache-control" CONTENT="no-store">
  <META HTTP-EQUIV="content-type" CONTENT="charset=ISO-8859-1">
<link rel="stylesheet" href="css/form.css">
  <script src="js/md5.js" type="text/javascript"></script>
  <script src="js/sha1.js" type="text/javascript"></script>
  <script src="js/base64.js" type="text/javascript"></script>
</head>

<body onload="javascript:document.getElementById('username').focus();" leftmargin="5" topmargin="10" marginwidth="5" marginheight="10">
<form action="login.php?action=login" autocomplete="off" method="post"
      onsubmit="javascript:username.value=encode64(username.value),password.value=encode64(hex_hmac_md5(hex_md5(password.value), salt.value)+'|'+hex_hmac_sha1(hex_sha1(password.value), salt.value ))">
  <table cellpadding="0" cellspacing="0" border="0" width="990" align="center">
   <tr><td>
      <span class="titcampo_form1">Usuário: </span><input id="username" type="text" name="username" size="10" class="caixa_form1">&nbsp;&nbsp;
     <span class="titcampo_form1">Senha: </span><input type="password" name="password" size="10" class="caixa_form1">&nbsp;&nbsp;
     <input type="submit" value="Submit">&nbsp;&nbsp;
     <input type="hidden" name="salt" value="<?=$serverKey?>">
     <input type="hidden" name="id" value="<?=$idKey?>">
   </td></tr>
  </table>
  <?=$mensage?>
</form>
</body>
</html>