<?
include_once("../fnc.php");
enlinea_c();
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>e-Ducativo - Bienvenido</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../estilo1.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#333333">
  <tr align="center" valign="middle" bgcolor="#FFFFCC">
    <td height="20" background="../images/tema/bg_contenido.png" class="titulo_pagina"><div align="center" class="titulo_pagina">
      <div align="left"><strong>&nbsp;&nbsp;&nbsp;Administraci&oacute;n de mensajes </strong>internos</div>
    </div></td>
  </tr>
  <?
  if($msg){
  ?>
  <tr>
    <td align="left" valign="top" background="../images/tema/bg_contenido.png" bgcolor="#FFFFCC" class="lbl_roja"><?=$msg;?></td>
  </tr>
  <?}?>
  <tr>
    <td align="left" valign="top" background="../images/tema/bg_contenido.png" bgcolor="#FFFFCC"><div align="left" class="parrafo">
      <table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#333333">
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%"  border="0" cellspacing="0" cellpadding="1">
            <tr bgcolor="#ECF2F9">
              <td width="24%" background="../images/tema/bg_frm_campos.png"><div align="center"><strong><img src="../images/cuad_1.png" width="9" height="9" border="0"><a href="index2.php?op=mensajes_write" class="link_parrafo"onmouseover="javascript:window.status='D&eacute; clic para escribir un mensaje nuevo';return true;" onmouseout="window.status=''; return true;">Escribir nuevo mensaje </a></strong></div></td>
              <td width="24%" background="../images/tema/bg_frm_campos.png"><div align="center"></div></td>
              <td width="52%" background="../images/tema/bg_frm_campos.png"><div align="center"></div></td>
            </tr>
          </table>
                <hr size="1">
                <table width="100%"  border="0" cellspacing="1" cellpadding="1">
                  <tr bgcolor="#CFDFEF">
                    <td width="3%" background="../images/tema/bg_frm_campos.png">&nbsp;</td>
                    <td width="37%" background="../images/tema/bg_frm_campos.png" class="parrafo"><div align="center"><strong>Mensaje escrito por </strong></div></td>
                    <td width="42%" background="../images/tema/bg_frm_campos.png" class="parrafo"><div align="center"><strong>Asunto</strong></div></td>
                    <td width="18%" background="../images/tema/bg_frm_campos.png" class="parrafo"><div align="center"><strong>Fecha</strong></div></td>
                  </tr>
                  <?
                             $qmsg=runsql("select * from msg_mensajes where para_usuario='$uuser' and leido='N' and eliminado = 0
                                           union
                                           select * from msg_mensajes where para_usuario='$uuser' and leido='S' and eliminado = 0
                                           order by fecha desc ");
                        while($imsg=mysql_fetch_array($qmsg)){
                        $bgcolor="#C0FFC0";
                        $new="no";
                        $bf="<strong>";
                        $ef="</strong>";
                        if($imsg[leido]=="S"){
                         $bgcolor="#EEEEEE";
                         $new="";
                         $bf=$ef="";
                        }
                        ?>
                  <tr bgcolor="<?=$bgcolor;?>">
                    <td><img src="../images/<?=$new;?>mail.png" width="22" height="22" border="0"></td>
                    <td bgcolor="<?=$bgcolor;?>"><a href="index2.php?op=mensajes_read&m=<?=enc($imsg[id]);?>" class="link_parrafo" onmouseover="javascript:window.status='D&eacute; clic para leer el mensaje';return true;" onmouseout="window.status=''; return true;"><?=$bf.nombre_usuario($imsg[de]).$ef;?></a></td>
                    <td><?=$imsg[asunto];?></td>
                    <td><div align="center"><?=fechalarga($imsg[fecha]);?></div></td>
                  </tr>
                  <?}?>
                </table>
            <br></td>
        </tr>
      </table>
    </div></td>
  </tr>
</table>
</body>
</html>
