Ver Mensaje Individual
  #6 (permalink)  
Antiguo 30/04/2008, 14:18
MadKat
 
Fecha de Ingreso: marzo-2008
Mensajes: 171
Antigüedad: 16 años, 2 meses
Puntos: 0
Re: Iframe y Sesion

Sigo sin hacerlo funcionar, dejo los codigos de cada archivo:

El archivo con el formulario de LOGIN (index_login2.php):

Código PHP:
<?php require_once('Connections/uf.php'); ?>
<?php
mysql_select_db
($database_uf$uf);
$query_users "SELECT * FROM usuarios";
$users mysql_query($query_users$uf) or die(mysql_error());
$row_users mysql_fetch_assoc($users);
$totalRows_users mysql_num_rows($users);
?><?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
  
session_start();
  
}

$loginFormAction $_SERVER['PHP_SELF'];
if (isset(
$_GET['accesscheck'])) {
  
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
}

if (isset(
$_POST['user'])) {
  
$loginUsername=$_POST['user'];
  
$password=$_POST['pass'];
  
$MM_fldUserAuthorization "";
  
$MM_redirectLoginSuccess "index_login_nn2.php";
  
$MM_redirectLoginFailed "index_login2.php";
  
$MM_redirecttoReferrer false;
  
mysql_select_db($database_uf$uf);
  
  
$LoginRS__query=sprintf("SELECT usuario, contraseña FROM usuarios WHERE usuario='%s' AND contraseña='%s'",
    
get_magic_quotes_gpc() ? $loginUsername addslashes($loginUsername), get_magic_quotes_gpc() ? $password addslashes($password)); 
   
  
$LoginRS mysql_query($LoginRS__query$uf) or die(mysql_error());
  
$loginFoundUser mysql_num_rows($LoginRS);
  if (
$loginFoundUser) {
     
$loginStrGroup "";
    
    
//declare two session variables and assign them
    
$_SESSION['MM_Username'] = $loginUsername;
    
$_SESSION['MM_UserGroup'] = $loginStrGroup;          

    if (isset(
$_SESSION['PrevUrl']) && false) {
      
$MM_redirectLoginSuccess $_SESSION['PrevUrl'];    
    }
    
header("Location: " $MM_redirectLoginSuccess );
  }
  else {
    
header("Location: "$MM_redirectLoginFailed );
  }
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<style type="text/css">
<!--
body
{
    scrollbar-base-color: #FFFFFF;
    scrollbar-arrow-color: #FFFFFF;
    scrollbar-darkshadow-color: #FFFFFF;
    scrollbar-face-color: #FFFFFF;
    scrollbar-highlight-color: #FFFFFF;
    scrollbar-shadow-color: #FFFFFF;
    scrollbar-3dlight-color: #FFFFFF;
    margin-left: 0px;
    margin-top: -1px;
    margin-right: 0px;
    margin-bottom: 0px;
}
-->
</style>


<script language="javascript">

    window.defaultStatus = " ";
    document.title = "Universidad Favaloro";

</script>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
a:link {
    text-decoration: none;
    color: #ECE9D8;
}
a:visited {
    text-decoration: none;
    color: #ECE9D8;
}
a:hover {
    text-decoration: none;
    color: #FFFFFF;
}
a:active {
    text-decoration: none;
    color: #FFFFFF;
}
.letra {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
}
.campo {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 10px;
    background-color: #E8F2FC;
    border-top-width: 0px;
    border-right-width: 0px;
    border-bottom-width: 0px;
    border-left-width: 0px;
    border-top-style: none;
    border-right-style: none;
    border-bottom-style: none;
    border-left-style: none;
    border-top-color: #FFFFFF;
    border-right-color: #FFFFFF;
    border-bottom-color: #FFFFFF;
    border-left-color: #FFFFFF;
}
.Estilo2 {
    font-size: 10px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    color: #409BF7;
}
-->
</style>
</head>

<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="100%" align="center" valign="middle"><table border="0" cellpadding="0" cellspacing="0" width="995">
      <!-- fwtable fwsrc="sitio_bien_maxok_alto.png" fwbase="index.jpg" fwstyle="Dreamweaver" fwdocid = "1757951751" fwnested="0" -->
      <tr>
        <td><img src="imagenes/spacer.gif" width="255" height="1" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="520" height="1" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="43" height="1" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="4" height="1" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="2" height="1" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="140" height="1" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="2" height="1" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="22" height="1" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="7" height="1" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="1" height="1" border="0" alt=""></td>
      </tr>
      <tr>
        <td colspan="9"><img name="index_r1_c1" src="imagenes/index_r1_c12b.jpg" width="995" height="86" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="1" height="86" border="0" alt=""></td>
      </tr>
      <tr>
        <td rowspan="2" colspan="3"><img name="index_r2_c1" src="imagenes/index_r2_c1.jpg" width="818" height="56" border="0" alt=""></td>
        <td height="18" colspan="5" background="imagenes/index_r2_c4.jpg"><div align="center"><img src="file:///E|/Sitios Web/Favaloro/portada/imagenes/blank.gif" width="1" height="1"><span class="letra">
          <?php

    $dias 
= array("Domingo","Lunes","Martes","Mi&eacute;rcoles","Jueves","Viernes","S&aacute;bado");
    
$meses = array("Diciembre","Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre");
    echo 
$dias[date('w')];
    echo 
Date(" j");
    echo 
" de ";
    echo 
$meses[date('n')];
    echo 
" de ";
    echo 
Date("Y");
        
     
?>
        </span></div></td>
        <td rowspan="7"><img name="index_r2_c9" src="imagenes/index_r2_c9.jpg" width="7" height="511" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="1" height="18" border="0" alt=""></td>
      </tr>
      <tr>
        <td rowspan="2" colspan="5"><img name="index_r3_c4" src="imagenes/index_r3_c4.jpg" width="170" height="58" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="1" height="38" border="0" alt=""></td>
      </tr>
      <tr>
        <td rowspan="5"><img name="index_r4_c1" src="imagenes/index_r4_c1.jpg" width="255" height="455" border="0" alt=""></td>
        <td rowspan="4" align="center" valign="middle"><iframe align="right" width="512" height="415" id="cont" name="cont" frameborder="0" scrolling="Yes" src="contenido.html"></iframe></td>
        <td rowspan="5"><img name="index_r4_c3" src="imagenes/index_r4_c3.jpg" width="43" height="455" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="1" height="20" border="0" alt=""></td>
      </tr>
      <tr>
        <td rowspan="4"><img name="index_r5_c4" src="imagenes/index_r5_c4.jpg" width="4" height="435" border="0" alt=""></td>
        <td colspan="3" valign="top"><img src="imagenes/calendario.png" width="144" height="125"></td>
        <td rowspan="4"><img name="index_r5_c8" src="imagenes/index_r5_c8.jpg" width="22" height="435" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="1" height="125" border="0" alt=""></td>
      </tr>
      <tr>
        <td colspan="3" valign="top"><br>
          <img src="imagenes/acc.gif" width="75" height="13"><br>
          <table width="100%" cellspacing="0" cellpadding="0">
            <tr>
              <td width="93%" align="left" valign="bottom"><form action="<?php echo $loginFormAction?>" method="POST" name="acceso2" id="acceso2">
                  <input name="user" type="Text" class="campo" id="user" maxlength="50">
                  <input name="pass" type="password" class="campo" id="pass" maxlength="50">
                  <input type="image" name="imageField22" src="imagenes/enviar.gif">
                  <br>
              </form></td>
            </tr>
          </table></td>
        <td><img src="imagenes/spacer.gif" width="1" height="198" border="0" alt=""></td>
      </tr>
      <tr>
        <td rowspan="2"><img name="index_r7_c5" src="imagenes/index_r7_c5.jpg" width="2" height="112" border="0" alt=""></td>
        <td valign="bottom">&nbsp;</td>
        <td rowspan="2"><img name="index_r7_c7" src="imagenes/index_r7_c7.jpg" width="2" height="112" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="1" height="77" border="0" alt=""></td>
      </tr>
      <tr>
        <td><img name="index_r8_c2" src="imagenes/index_r8_c2.jpg" width="520" height="35" border="0" alt=""></td>
        <td><img name="index_r8_c6" src="imagenes/index_r8_c6.jpg" width="140" height="35" border="0" alt=""></td>
        <td><img src="imagenes/spacer.gif" width="1" height="35" border="0" alt=""></td>
      </tr>
    </table></td>
  </tr>
</table>

</body>
</html>
<?php
mysql_free_result
($users);
?>