Foros del Web » Programando para Internet » Javascript »

al pasar determinado tiempo la session de cierra y me carga doble iframe

Estas en el tema de al pasar determinado tiempo la session de cierra y me carga doble iframe en el foro de Javascript en Foros del Web. hola fanaticos del foro .. tengo el siguiente problemilla tengo esta session abierta .. al pasar un lapso de tiempo la sesion se cierra hasta ...
  #1 (permalink)  
Antiguo 06/11/2009, 15:30
Avatar de Superlinux  
Fecha de Ingreso: octubre-2005
Ubicación: Colombia
Mensajes: 662
Antigüedad: 18 años, 6 meses
Puntos: 1
Pregunta al pasar determinado tiempo la session de cierra y me carga doble iframe

hola fanaticos del foro .. tengo el siguiente problemilla

tengo esta session abierta .. al pasar un lapso de tiempo la sesion se cierra hasta y ningun problema ... al no encontrar sesion abierta este pasa a ejecutar

print "<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=cerrar_session.php\">";

el problema esta que como el la sesion trabajo con un iframe ... al cerrar la sesion y cargar error2.php ... la pagina se visualiza con un contenido de la sesion en la parte de arriba y error2.php cargandoce donde esta el iframe ...

lo que busco es que se cierre la sesion y solo cargue error2.php


Código PHP:
<?php
//Por medio de esta función inicializo la sesion
session_start();

//Por medio de esta función destruir la sesion
session_destroy();

setcookie ("usuario"$_POST['usuario'], time()-3600);

//Visualiza mensaje    
?>
<script>
    alert ("Cerrando sesion GuiaVital...");  
    document.location="error2.php";
    close();
</script>

Código PHP:
<?php 
// ______________CREACION DE LA SESION POR PRIMERA VEZ ___________________________________________

//Por medio de esta función inicializo la sesion
session_start();

//Archivo de conexion
require("../connect.php");

//Validamos que no se pueda ingresar de otra forma que no sea por medio de login
if(!$_SESSION[usuario])
{
    print 
"<META HTTP-EQUIV=\"Refresh\" CONTENT=\"0;URL=cerrar_session.php\">";
}else{
    
// objeto de visualización de Mensajes, recibe 0 si es Admin, y el ID si es reseller
    
$regusuario $sql->seleccionar("regusuario""*""usuario ='".$_SESSION[usuario]."'"); 
?>

<html>
<head>
<title>Prueba</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
<!--
body {
    background-color:#708CA4;
}
-->
</style>

<script src="../scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body>
<div align="center">
<table width="940" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" valign="middle" background="../admin/img/barrasup_index.png">
    <table width="920" height="53" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr height="53" id="tablist">
          <!--  INICIO BARRA DE BOTONES TAB -->
          <td width="130"><div align="left"><img src="../img/Vineta.png" width="23" height="22"></div></td>
          <td width="660" style="padding-top:5px;"><div align="center"><strong><?php echo $regusuario[dr?> </strong></div></td>
          <!-- td vac&iacute;o OBLIGATORIO -->
          <td width="130"><div align="center"></div></td>
          <!--  FIN BARRA DE BOTONES TAB -->
        </tr>
      </table></td>
  </tr>
  <tr>
    <td align="center" valign="middle" background="../admin/img/fondobarra_menu.png">
    <table width="910" height="30" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr height="30">
        <!--  INICIO BARRA DE BOTONES TAB -->
        <td width="130" align="center" valign="middle">&nbsp;</td>
        <td width="130" align="center" valign="middle">&nbsp;</td>
        <td width="130" align="center" valign="middle">&nbsp;</td>
        <td width="130" align="center" valign="middle">&nbsp;</td>
        <td width="130" align="center" valign="middle">&nbsp;</td>
        <td width="130" align="center" valign="middle">&nbsp;</td>
        <td width="145">&nbsp;</td>
        <!-- td vac&iacute;o OBLIGATORIO -->
        <!--  FIN BARRA DE BOTONES TAB -->
      </tr>
    </table></td>
  </tr>
</table>
<table width="940" height="860" border="0" cellpadding="0" cellspacing="0" background="../admin/img/fondoinf_index.png" style="background-repeat:no-repeat;">
  <tr valign="top">
    <td align="center">
    <!-- INICIO FRAME DE CONTENIDOS -->
    <iframe name="contenido" src="chat.php" width="920" height="860" scrolling="auto" marginwidth="0" marginheight="0" frameborder="0"> Su navegador no soporta iframes</iframe>
<!-- FIN FRAME DE CONTENIDOS -->
    </td>
  </tr>
</table>
</div>
</body>
</html>
<?php
}//Fin del if
?>
gracias por la ayuda ...
__________________
"La vida sigue su curso, tú toma parte de ella."
  #2 (permalink)  
Antiguo 07/11/2009, 00:25
Avatar de Triby
Mod on free time
 
Fecha de Ingreso: agosto-2008
Ubicación: $MX->Gto['León'];
Mensajes: 10.106
Antigüedad: 15 años, 8 meses
Puntos: 2237
Respuesta: al pasar determinado tiempo la session de cierra y me carga doble iframe

Intenta con top.location.href='error2.php' en vez de document.location...
__________________
- León, Guanajuato
- GV-Foto
  #3 (permalink)  
Antiguo 07/11/2009, 15:24
Avatar de Superlinux  
Fecha de Ingreso: octubre-2005
Ubicación: Colombia
Mensajes: 662
Antigüedad: 18 años, 6 meses
Puntos: 1
Respuesta: al pasar determinado tiempo la session de cierra y me carga doble iframe

oye genial .. muchas gracias ...



Gracias foros del web ..
__________________
"La vida sigue su curso, tú toma parte de ella."
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 09:30.