Location: PHPKode > projects > Portada - DACAD Gestin de academias > index.php
<?
require("clases/class.usuario.php");
session_start();
include("conf.php");

if($_POST["usuario_login"]!='' && $_POST["usuario_clave"]!='' ){
	$sql="SELECT * FROM usuarios WHERE login_usuario='".$_POST["usuario_login"]."' AND clave_usuario='".$_POST["usuario_clave"]."'";
	if($res=mysql_query($sql)){
		if($datos=mysql_fetch_assoc($res)){
			$_SESSION["id_usuario"]=$datos["id_usuario"];
			$_SESSION["usuario_o"]=new usuario($datos["id_usuario"]);
			header("Location: index2.php");
		}
	}else{
		die(mysql_error().$sql);
	}
}

?>
<!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=windows-1252" />
<title><? echo 'DACAD - '.$nombre_academia; ?></title>
<link href="css/estilo.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="250" border="0" align="center" cellpadding="0" cellspacing="2">
  <tr>
    <td colspan="2" align="center"><img src="<? echo $logo_academia; ?>" width="170" height="122" /></td>
  </tr>
  <form id="form1" name="form1" method="post" action="">
  <tr>
    <td align="right" class="texto">&nbsp;</td>
    <td class="texto">&nbsp;</td>
  </tr>
  <tr>
    <td width="61" align="right" class="texto">Usuario</td>
    <td width="183" class="texto">
      <input name="usuario_login" type="text" size="15" />    </td>
  </tr>
  
  <tr>
    <td align="right" class="texto">Clave</td>
    <td class="texto"><input name="usuario_clave" type="password" size="15" /></td>
  </tr>
  <tr>
    <td height="40" colspan="2" align="center"><input type="submit" name="Submit" value="Validar" /></td>
    </tr>
  <tr>
    <td height="40" colspan="2" align="center" valign="bottom" class="texto">Powered by <a href="http://dacad.aplicacionesenweb.es" target="_blank">DACAD</a> v0.2 &copy; 2008 </td>
  </tr>
  </form>
</table>
<br />
<div class="texto" align="center">
<a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/88x31.png" /></a><br /><span xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://purl.org/dc/dcmitype/InteractiveResource" property="dc:title" rel="dc:type">DACAD</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://dacad.aplicacionesenweb.es/wiki/index.php?title=Portada" property="cc:attributionName" rel="cc:attributionURL">Julio Gasc&#243;n Ferrer</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Reconocimiento-Compartir bajo la misma licencia 3.0 Unported License</a>.<br />Based on a work at <a xmlns:dc="http://purl.org/dc/elements/1.1/" href="http://dacad.aplicacionesenweb.es/wiki/index.php?title=Portada" rel="dc:source">dacad.aplicacionesenweb.es</a>.</body>
</div>
</html>
Return current item: Portada - DACAD Gestin de academias