Ver Mensaje Individual
  #3 (permalink)  
Antiguo 21/10/2003, 13:30
carauz
 
Fecha de Ingreso: octubre-2003
Mensajes: 7
Antigüedad: 20 años, 6 meses
Puntos: 0
aqui esta el codigo...

<?
header("Expires: " . gmdate("D, d M Y H:i:s")-1 . " GMT"); // Datum aus Vergangenheit
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // immer geändert
header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0

require('configuracion.php');

$strSigPagina="general.php"; //Pagina que se envia informacion
$strActPagina="execLogin.php"; //Pagina actual
$strAntPagina="index.htm"; //Pagina anterior
$bolAutentificacion = false; //Autentifica la Página

if(isset($HTTP_POST_VARS))
{
if (isset($HTTP_POST_VARS["txtUsuario"]))
{
$idUsu =$HTTP_POST_VARS["txtUsuario"];
$claveUsu =$HTTP_POST_VARS["txtClave"];
}
else
{
$idUsu ="empty";
$claveUsu ="empty";

}

//Conectar a la BDD
$gconBDD = mysql_connect($garrConexion[0], $garrConexion[1], $garrConexion[2]);
mysql_select_db($garrConexion[3], $gconBDD);

$gstrQuery ="select idUsu, nombreUsu, telefonoUsu, claveUsu, estadoUsu, fCreacionUsu";
$gstrQuery.=" from usuario";
$gstrQuery.=" where idUsu='$idUsu'";
$gstrQuery.=" and claveUsu='$claveUsu'";
$gstrQuery.=" and estadoUsu=1";
$grecDatos = mysql_query($gstrQuery, $gconBDD);

if(mysql_num_rows($grecDatos)>0)
{
$garrRegistro = mysql_fetch_assoc($grecDatos);
$bolAutentificacion = true;
}else{
$bolAutentificacion = false;
}
}
?>

<?
if($bolAutentificacion == true)
{?>
<script language=javascript>
window.location.href='<? echo($strSigPagina)?>';
</script>
<?
}else{
?>
<script language=javascript>
window.location.href='<? echo($strAntPagina)?>';
</script>
<?
}
?>