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

El archivo al que me lleva si inicia sesion bien (index_login_nn2.php):

Código PHP:
<?php require_once('Connections/uf.php'); ?><?php
if (!isset($_SESSION)) {
  
session_start();
}
$MM_authorizedUsers "";
$MM_donotCheckaccess "true";

// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers$strGroups$UserName$UserGroup) { 
  
// For security, start by assuming the visitor is NOT authorized. 
  
$isValid False


  if (!empty(
$UserName)) { 

    
$arrUsers Explode(","$strUsers); 
    
$arrGroups Explode(","$strGroups); 
    if (
in_array($UserName$arrUsers)) { 
      
$isValid true
    } 
    
// Or, you may restrict access to only certain users based on their username. 
    
if (in_array($UserGroup$arrGroups)) { 
      
$isValid true
    } 
    if ((
$strUsers == "") && true) { 
      
$isValid true
    } 
  } 
  return 
$isValid
}

$MM_restrictGoTo "index_login2.php";
if (!((isset(
$_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers$_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  
$MM_qsChar "?";
  
$MM_referrer $_SERVER['PHP_SELF'];
  if (
strpos($MM_restrictGoTo"?")) $MM_qsChar "&";
  if (isset(
$QUERY_STRING) && strlen($QUERY_STRING) > 0
  
$MM_referrer .= "?" $QUERY_STRING;
  
$MM_restrictGoTo $MM_restrictGoTo$MM_qsChar "accesscheck=" urlencode($MM_referrer);
  
header("Location: "$MM_restrictGoTo); 
  exit;
}
?>
<?php
$colname_usuario 
"-1";
if (isset(
$_SESSION['MM_Username'])) {
  
$colname_usuario = (get_magic_quotes_gpc()) ? $_SESSION['MM_Username'] : addslashes($_SESSION['MM_Username']);
}
mysql_select_db($database_uf$uf);
$query_usuario sprintf("SELECT * FROM usuarios WHERE usuario = '%s'"$colname_usuario);
$usuario mysql_query($query_usuario$uf) or die(mysql_error());
$row_usuario mysql_fetch_assoc($usuario);
$totalRows_usuario mysql_num_rows($usuario);
?>
<!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: #0000FF;
}
a:visited {
    text-decoration: none;
    color: #0000FF;
}
a:hover {
    text-decoration: none;
    color: #0000FF;
}
a:active {
    text-decoration: none;
    color: #0000FF;
}
.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;
}
.Estilo5 {font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: #0000FF; }
body,td,th {
    color: #000000;
}
.Estilo6 {
    font-size: 12px;
    font-weight: bold;
}
.Estilo11 {
    font-size: 12px;
    font-family: Arial, Helvetica, sans-serif;
    color: #0000FF;
}
.Estilo13 {font-size: 10px}
.Estilo15 {font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #0000FF; }
-->
</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="nuevanoticia2.php"></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" align="left" valign="top"><br>
          <table width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td width="1" rowspan="3">&nbsp;</td>
                <td><div align="center" class="letra">Ud. est&aacute; en el sistema como: <span class="Estilo6"><br>
                  </span></div></td>
              </tr>
              <tr>
                <td height="2" align="center"><img src="imagenes/spacer.gif" width="1" height="1"></td>
              </tr>
              <tr>
                <td align="center" class="Estilo6"><span class="Estilo15"><?php echo $row_usuario['nombre']; ?><?php echo $row_usuario['apellido']; ?></span></td>
              </tr>
            </table>
            <br>
            <table width="100%" cellspacing="0" cellpadding="0">
              <tr>
                <td width="53%" align="right"><a href="<? session_destroy(); echo 'index_login2.php';?>"><u><img src="imagenes/logout.gif" width="12" height="12" border="0"></u></a></td>
                <td width="47%" align="right"> <span class="Estilo11"><span class="Estilo13">Cerrar Sesi&oacute;n </span></span></td>
              </tr>
            </table>            
            <p class="Estilo5"><a href="<? session_destroy(); echo 'index_login.php';?>"></a></p>          </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
($usuario);
?>