Tema: sesiones
Ver Mensaje Individual
  #3 (permalink)  
Antiguo 29/06/2005, 10:08
niltza
 
Fecha de Ingreso: agosto-2004
Mensajes: 440
Antigüedad: 19 años, 7 meses
Puntos: 2
la segunda autentificacion se debe hacer en administracion.php mi pregunta es q entonces deberia poner tambien seguridad2.php en administracion teniendo en cuenta q en esa administracion como puedes ver en administracion.php esta
es decir que quedaria administracion asi.

administracion.php
Código:
<? include ("seguridad1.php"); 
include ("seguridad2.php"); 
?>
<html>
<head>
<title>Adminitrador</title>
<style type="text/css">
<!--
body {
	background-color: #FFCC00;
}
.Estilo1 {
	font-size: 18px;
	color: #000000;
	font-weight: bold;
}
-->
</style></head>

<body>
<span class="Estilo1"> ADMINISTRACION
</span>
<form name="acceso" method="post" action="../evalsede.php">
   <br>
   <br>
   <br>
   <br>
   <table width="31%" height="270"  border="1" align="center" bordercolor="#006699" bgcolor="#CCCCCC">
  <tr>
    <td>
	<table width="209" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC" class="tabla">
          <tr bgcolor="#CCCCCC">
		  	<td colspan="3" align="left"
						  
			  <? if ($_GET["erroradministracion"]=="si"){ ?>><b>Error Digite de nuevo su Login y Contraseña</b>
			<? }else{ ?> 
			    <strong><br>
		      Digite su Login y Contrase&ntilde;a</strong>			    <?php
				} 
				?>
            <br>
            <br></td>
		  </tr>
		  <tr>
            <td width="111"><div align="justify">Login</div></td>
            <td width="98"><input name="nick" type="text" id="nick" size="17" maxlength="20"></td>
		  </tr>
          <tr>
            <td><div align="justify">Contrase&ntilde;a</div></td>
            <td><input name="contra" type="password" id="contra" size="17" maxlength="20"></td>
          </tr>
          <tr>
            <td height="26" colspan=2 align="center"><br>
              <input type="submit" name="Submit" value="Acceso"></td></tr>
     </table>
	</td>
  </tr>
</table>

</form>
</body>
</html>
y seguridad2.php
Código:
<? 
//Inicio la sesión 
session_start(); 
session_destroy(); 


//COMPRUEBA QUE EL adminitrador ESTA AUTENTIFICADO 
if ($_SESSION["autentificado2"] != "SI") { 
    //si no existe, envio a la página de autentificacion 
    header("Location: ../administracion/administracion.php"); 
    //ademas salgo de este script 
    exit(); 
} 

?>

seria asi???? pero si lo hgo asi me sale
Warning: main(seguridad2.php): failed to open stream: No such file or directory in c:\appserv\www\pruebasautentificacion\autenticar\a dministracion\administracion.php on line 2

Warning: main(): Failed opening 'seguridad2.php' for inclusion (include_path='.;c:\php4\pear') in c:\appserv\www\pruebasautentificacion\autenticar\a dministracion\administracion.php on line 2

y fuera de eso si ngresomal los datos igual me lleva al index en vez de quedarse ahi quedebo hacer entonces
__________________
paty :adios: