Ver Mensaje Individual
  #2 (permalink)  
Antiguo 24/06/2004, 10:12
concric
 
Fecha de Ingreso: noviembre-2003
Ubicación: Málaga
Mensajes: 293
Antigüedad: 22 años, 10 meses
Puntos: 1
sin base de datos

Código PHP:
$path="gallery/smoll";
$pgran="gallery/big/";
$ruta="gallery.php"; 
$gran="index.php?home=5gran"; 
$smoll="index.php?home=5";
$img="img/01.gif";
$directorio = dir($path); 
$directorio->read(); 
$directorio->read(); 
/*****************************************/ 
echo"<br><br><br><table border=\"0\" align=\"center\" cellpadding=\"4\">\n";
while(
$entrada = $directorio->read()){ 
    
    
$a++; 
    
$imagen[$a] = $entrada; 



}
$directorio->close(); 
/******************************************/ 
$paginas = ceil($a/16); 
/******************************************/ 

if(!isset($page)){ 
    
$page = "1"; 
} 
/******************************************/ 
$o = 16*($page-1); 
/******************************************/ 
for ($i=1; $i<=4; $i++){ 
    echo 
"<tr align=\"center\">\n"; 
    for (
$e=1; $e<=4; $e++){ 
        
$o++; 
        
$token = strtok ($imagen[$o],".");
        
$dotpos = strrpos($imagen[$o], ".");
        
$filetype = substr($imagen[$o],$dotpos+1);
        switch ( 
$filetype){
    case 
"jpg":
echo 
"<td valign=\"top\"><a href=\"$gran&img=$pgran$imagen[$o]\"><img id=\"alfa\" alt=\"$tokena\" onMouseOver=\"aclara(this)\" onMouseOut=\"oscurece(this)\" src=$path/$imagen[$o] class=\"filete\"  border=\"0\"></a><br></td>\n";
    break;
    case 
"gif":
echo 
"gif no";
    break;
    case 
"":
echo 
"";
    break;
/*    case "php":
echo "<td valign=\"top\"><img src=espacio.gif></td>\n";
    break;*/
default:
echo 
"<td valign=\"top\"><img src=$img></td>\n";
}
         
    } 
    echo 
"</tr>"; 
} 
echo 
"</table>"; 
/******************************************/ 
for ($u=1; $u<=$paginas; $u++){ 
    echo 
"<a href=\"$smoll&page=$u&seccion=$seccion\" class=\"num\">$u</a>\n"; 
} 
__________________

diseño web