Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/08/2010, 18:28
Avatar de masterojitos
masterojitos
 
Fecha de Ingreso: julio-2008
Ubicación: Lima Callao Chucuito
Mensajes: 1.931
Antigüedad: 15 años, 9 meses
Puntos: 105
Respuesta: Como hago Galeria en una tabla triple?

podrias pintar una tabla de 3 columnas no ??
ahi manejas los espacios o estilos

Código PHP:
<?php    
$path 
"gal1/";
$i 0;
echo 
"<table cellspacing='0' cellpadding='3' style='text-align:right;'>";
if(
$manager opendir($path)){
    while((
$file readdir($manager)) !== false){
        if(
$file != "." and $file != ".."){
            if(
strtolower(end(explode("."$file))) == "jpg"){
                if(
$i &#37; 3 == 0) echo "<tr>";
                
$foto base64_encode($path.$file);
                echo 
"<td>".($i 1).". <a href='protecfoto.php?foto=$foto' /><img src='$path$file' alt='' width='216' height='134' border='0' /></a></td>";
                if(
$i == 2) echo "</tr>";
                
$i++;
            }
        }
        if(
$i 13) break;
    }
    
closedir($manager);
}
if(
$i <= and $i 0){
    for(
$j $i 3$j <= 2$j++){
        echo 
"<td>&nbsp;</td>";
    }
    echo 
"</tr>";
}
echo 
"</table>";
?>
Nota.. en vez de "& # 3 7 ;" (sin espacios) debe de ser "%".

Suerte
__________________
Atte. MasterOjitos :ojotes:
Todo sobre Programación Web
Las ultimas tendencias en Efectos y Recursos Web: MasterOjitos Blog

Última edición por masterojitos; 03/08/2010 a las 19:09 Razón: Mejora del codigo.