Ver Mensaje Individual
  #4 (permalink)  
Antiguo 11/11/2005, 17:02
Avatar de thunder-ion
thunder-ion
 
Fecha de Ingreso: diciembre-2004
Mensajes: 106
Antigüedad: 19 años, 4 meses
Puntos: 0
Como tenía un poco de tiempo he buscado por mi código fuente, que tengo un sistema de mensajes desarrollado, y he encontrado esto. Si buscas en el código encontrarás lo que buscas. Te he pegado una parte más grande, por si te sirve de algo. Hay funciones aparte, no te pongo el funcionamiento de cada una porque no viene mucho a tema :D

Código PHP:
<table width="100%" cellpadding="0" cellspacing="0">
                <tr class="b">
                    <td width="5"></td>
                    <td width="170">De</td>
                    <td width="215">Asunto</td>
                    <td width="90">Fecha</td>
                    <td width="90">Tama&ntilde;o</td>
                    <td width="40"></td>
                </tr>
                <?php 
                
                $res
=mysql_query("SELECT * FROM mensajes WHERE destinatario='$usua' AND carpeta='$_GET[op]' ORDER BY id DESC");
                if(
mysql_num_rows($res)!=0){
                    while(
$fila=mysql_fetch_array($res)){
                        if(
strlen($fila['asunto'])>21){
                            
$puntos="...";
                        }
                        
$tamano=mysql_fetch_lengths($res);
                        
$tamano=calcular_kilobytes($tamano[7]);
                    
?>
                        <tr class="<?php echo devolver_color_aleatorio(); ?>">
                            <?php
                            
if($fila['prioridad']==1){ ?>
                                <td><img src="img/panel_usuarios/prioridad_alta.gif">&nbsp;</td>
                            <?php } else{ ?>
                                <td><img src="img/panel_usuarios/prioridad_normal.gif">&nbsp;</td>
                            <?php ?>
                            <td><?php echo $fila['remitente']; ?></td>
                            <td><b><a href="panel_usuarios.php?modulo=mensajes&blo=leer&id=<?php echo $fila['id']; ?>"><?php echo $filtro->eliminar_html(substr($fila['asunto'],0,21)).$puntos?></a></b></td>
                            <td><?php echo fecha($GLOBALS['fecha_corta'],$fila['fecha']); ?></td>
                            <td><?php echo number_format($tamano,3,",","."); ?> KB</td>
                            <td <?php if(comprobar_mensaje_nuevo($fila['id'])==0){ echo "class=\"men_nuevo\""; } ?>><?php if(comprobar_mensaje_nuevo($fila['id'])==0){ echo "N"; } ?><input name="id[]" type="checkbox" value="<?php echo $fila['id']; ?>"></td>
                        </tr>
                    <?php
                        $puntos
="";
                    }
                }
                
?>    
            </table>
Haber si te es de utilidad...

Saludos