Ver Mensaje Individual
  #2 (permalink)  
Antiguo 27/07/2008, 00:03
netserver
 
Fecha de Ingreso: mayo-2006
Mensajes: 288
Antigüedad: 18 años
Puntos: 4
Respuesta: Visor de Imagenes (me ta volviendo loco)

umm yo tengo un c´digo que te podria servir ;).

Código PHP:
<table class="adminlist" cellSpacing="0" cellPadding="0" width="100%" border="0" id="table8">
        <tr class="row0">
    <?
    $l
=1;
    
$dir "../album"// Este es el directorio donde se encuentran las fotos.
    
$dh  opendir($dir);
    while (
false !== ($nombre_archivo readdir($dh))) {
        
$archivos[] = $nombre_archivo;
    }
    
$cnt sizeof($archivos);
    
$lim 0;
    for(
$i=0;$i<$cnt;$i++){
    
$explode explode("_",$archivos[$i]);
     if(
$explode[0] == $key){
        if(
stristr($archivos[$i],"jpg") || stristr($archivos[$i],"gif") || stristr($archivos[$i],"png") || stristr($archivos[$i],"bmp")){
        
$lim++;
        list(
$ancho$altura$tipo$atr) = getimagesize($dir."/$archivos[$i]");
            if(
$ancho 110 || $altura 110){
                if(
$ancho $altura){
                    
$x $altura/$ancho;
                    
$ancho 110;
                    
$altura $x*110;
                }
                if(
$altura $ancho){
                    
$x $ancho/$altura;
                    
$altura 110;
                    
$ancho $x*110;
                }
            }
        
?>
        <td align="center"><a href="<?=$dir?>/<?=$archivos[$i]?>" target="vista"><img border="0" src="<?=$dir?>/<?=$archivos[$i]?>" width="<?=$ancho?>" height="<?=$altura?>" alt="<?=$archivos[$i]?>"></a>
            <td>
        <?    if($lim%== ){
                
$zip $l%2;
                
$l++;
                echo 
"</tr>";
                echo 
"<tr class='row$zip'>";
            }
        }
     }
    }
    
?> 
        </tr>
    </table>
Lo peculiar de este listador es que te lista las fotos en unas tablas de 4 columnas.