consta de 3 archivos:
index
Código PHP:
Ver original<?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=iso-8859-1" />
<title>::Web::</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="functions.ajax.js"></script>
</head>
<body background="Logo2.jpg">
<table border=0 style="position:absolute;top:40px;left:40px;" width=50%>
<tr>
<td><img src="logo1.png" /></td>
<td>
<div id="logo">
<h2><font color= white>Web de Presupuestos</h2>
<p>Bienvenido! Por favor inicie su sesión...</p>
</div>
</td>
</tr>
</table>
<div id="allContent">
<table cellpadding="0" cellspacing="0" border="0" height="100%" width="100%">
<tr>
<td align="center" valign="middle" height="100%" width="100%">
<div id="alertBoxes"></div>
<span class="loginBlock">
<span class="inner">
<?php
if ( isset($_SESSION['username']) && isset($_SESSION['userid']) && $_SESSION['username'] != '' && $_SESSION['userid'] != '0' ){ echo '<div class="session_on">
Ya iniciaste sesion, Ahora has un <a href="javascript:void(0);" id="sessionKiller">logout</a>.
<span class="timer" id="timer" style="margin-left: 10px;"></span>
</div>';
}
else{
echo '<form method="post" action="">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>Usuario:</td>
<td><input type="text" name="login_username" id="login_username" /></td>
</tr>
<tr>
<td>Contraseña:</td>
<td><input type="password" name="login_userpass" id="login_userpass" /></td>
</tr>
<tr>
<td colspan="2" align="right"><span class="timer" id="timer"></span><button id="login_userbttn">Login</button></td>
</tr>
</table>
</form>';
}
?>
</span>
</span>
</td>
</tr>
</table>
</div>
</body>
</html>