Foros del Web » Programando para Internet » PHP »

porque se me deforman las tablas?

Estas en el tema de porque se me deforman las tablas? en el foro de PHP en Foros del Web. hola mirad me baje un script para hacer una galeria de imagenes y una vez ya e conseguido que me la la BD etc.....estoy con ...
  #1 (permalink)  
Antiguo 26/05/2004, 01:50
 
Fecha de Ingreso: mayo-2004
Mensajes: 571
Antigüedad: 19 años, 11 meses
Puntos: 0
Pregunta porque se me deforman las tablas?

hola mirad me baje un script para hacer una galeria de imagenes y una vez ya e conseguido que me la la BD etc.....estoy con el diseño,lo malo?que al final de la galeria cuando quedan tan solo 3/4/7 imagenes las que sean(siempre que no llegue a 10)la tabla se me deforma haciendo que quede muy feo este es el codigo veis algun error?gracias:D

Código PHP:
<?php

error_reporting
(E_ERROR E_WARNING E_PARSE);
set_magic_quotes_runtime(0);

$host "localhost"
$user "mysql"
$pass "";
$dbname "galeria";
 
$conecta mysql_connect($host,$user,$pass); 
mysql_select_db($dbname,$conecta); 
$query "select * from tabla WHERE ID='".$_GET[id]."'";
$resp mysql_query($query);

$datos mysql_fetch_array($resp);

$numrows mysql_num_rows($resp);

if (
$numrows == 0) {
  die (
"Especifica una galería");
 }
 else {

$dire "c:\appserv\www\galeria\\".$datos[Letra]."\\".$datos[Direccion]."";

include(
'settings.inc');

$num;
@
$handle opendir(''.$dire.'');
$index $datos[Direccion];
$images;
$last_updated;
while (@
$file readdir($handle)) 
{

    if(
$file != './' && $file != '../')
    {
        
$myfile  explode ("."$file); 
        if(
$gif) {
            if(
$myfile[1] == 'gif' || $myfile[1] == 'GIF'
            {
            
$images[$index] = $file
            
$index ++;
            }
        }
        if(
$jpg) {
            if(
$myfile[1] == 'jpg' || $myfile[1] == 'JPG'
            {
            
$images[$index] = $file
            
$index ++;
            }
        }
        if(
$png) {
            if(
$myfile[1] == 'png' || $myfile[1] == 'PNG'
            {
            
$images[$index] = $file
            
$index ++;
            }
        }
    }    
}
if(
$images) {
sort ($images); 
reset ($images); 
} else {
    print 
"<font class='copyright'><B>Cuidado</b><br><br>Ha ocurrido un error con el proceso de ésta galería, por favor, comuníqueselo al webmaster siguiendo el link de abajo.<br><br>Mucha Gracias.-</font>";
    exit;
}


$total count($images);
if(
$numperpage $total)
    
$numperpage $total;
    
    print 
"<div align='center'><font class='misc'>Mostrando Galería de:</font><br><font class='titulo'><b>".$datos[Nombre]."</b><br><br></font></div>";
    print 
"<div align='center'>";
if(
$numperpage == $total) {
    for(
$k=0$k $numperpage$k++) {
        
$counter $k+1;
        
$size_1 "http://localhost/galeria/".$datos[Letra]."/".rawurlencode($datos[Direccion])."/".rawurlencode($images[$k])."";
        @
$size GetImageSize(''.$size_1.'');
        print 
"<a href=\"javascript:popup('$datos[Letra]/".rawurlencode($datos[Direccion])."/".rawurlencode($images[$k])."','".($size[0] + 50)."','".($size[1] + 70)."')\" class='copyright'><img class='borderimage' onMouseover=\"borderit(this,'#00CC00')\" onMouseout=\"borderit(this,'black')\" width='150' height='100' src=$datos[Letra]/".rawurlencode($datos[Direccion])."/".rawurlencode($images[$k])."></a>&nbsp;";
    } 
} elseif(
$num $numperpage) {
    for(
$k=0$k $numperpage$k++) {
        
$counter $k+1;
        
$size_1 "http://localhost/galeria/".$datos[Letra]."/".rawurlencode($datos[Direccion])."/".rawurlencode($images[$k])."";
        
$size GetImageSize(''.$size_1.'');
        print 
"<a href=\"javascript:popup('$datos[Letra]/".rawurlencode($datos[Direccion])."/".rawurlencode($images[$k])."','".($size[0] + 50)."','".($size[1] + 70)."')\" class='copyright'><img class='borderimage' onMouseover=\"borderit(this,'#00CC00')\" onMouseout=\"borderit(this,'black')\" width='150' height='100' src=$datos[Letra]/".rawurlencode($datos[Direccion])."/".rawurlencode($images[$k])."></a>&nbsp;";
    }
    
    
$next $k++;
    
$next1 $k $numperpage;
    if(
$next1 >= $total) {
    
$last $total $numperpage;
    } else {
    print 
"";
    }

} elseif(
$num >= ($total $numperpage)) {

    
$prev $num $numperpage;
    
    for(
$k=$num$k $total$k++) {
        
$counter $k 1;
        
$size_1 "http://localhost/galeria/".$datos[Letra]."/".rawurlencode($datos[Direccion])."/".rawurlencode($images[$k])."";
        @
$size GetImageSize(''.$size_1.'');
        print 
"<a href=\"javascript:popup('$datos[Letra]/".rawurlencode($datos[Direccion])."/".rawurlencode($images[$k])."','".($size[0] + 50)."','".($size[1] + 70)."')\" class='copyright'><img class='borderimage' onMouseover=\"borderit(this,'#00CC00')\" onMouseout=\"borderit(this,'black')\" width='150' height='100' src=$datos[Letra]/".rawurlencode($datos[Direccion])."/".rawurlencode($images[$k])."></a>&nbsp;";
    }

} elseif(
$num < ($total $numperpage)) {

    
$prev $num $numperpage;
    
    
$check $num $numperpage;
    for(
$k=$num$k $check$k++) {
        
$counter $k 1;
        
$size_1 "http://localhost/galeria/".$datos[Letra]."/".rawurlencode($datos[Direccion])."/".rawurlencode($images[$k])."";
        @
$size GetImageSize(''.$size_1.'');
        print 
"<a href=\"javascript:popup('$datos[Letra]/".rawurlencode($datos[Direccion])."/".rawurlencode($images[$k])."','".($size[0] + 50)."','".($size[1] + 70)."')\" class='copyright'><img class='borderimage' onMouseover=\"borderit(this,'#00CC00')\" onMouseout=\"borderit(this,'black')\" width='150' height='100' src=$datos[Letra]/".rawurlencode($datos[Direccion])."/".rawurlencode($images[$k])."></a>&nbsp;";
    }
    
    
$next $k++;
    
$next1 $k $numperpage;
    if(
$next1 >= $total) {
    
$last $total $check;
    } else {
    print 
"";
    }
} else {
    print 
"";
}

    print 
"";
    print 
"";
    
    
if(
$num $numperpage) {
    for(
$k=0$k $numperpage$k++) {
        
$counter $k+1;
    }
    
    
$next $k++;
    
$next1 $k $numperpage;
    if(
$next1 >= $total) {
    
$last $total $numperpage;
    print 
"<br>|<a href=\"$PHP_SELF?id=$id&num=$next\" class='copyright'>Siguientes <b>$last</b> >></a>";
    } else {
    print 
"<br>|<a href=\"$PHP_SELF?id=$id&num=$next\" class='copyright'>Siguientes <b>$numperpage</b> >></a>";
    }

} elseif(
$num >= ($total $numperpage)) {

    
$prev $num $numperpage;
    print 
"<br><a href=\"$PHP_SELF?id=$id&num=$prev\" class='copyright'><< Anteriores $numperpage </a>|";

    for(
$k=$num$k $total$k++) {
        
$counter $k 1;
    }

} elseif(
$num < ($total $numperpage)) {

    
$prev $num $numperpage;
    print 
"<br><a href=\"$PHP_SELF?id=$id&num=$prev\" class='copyright'><< Anteriores <b>$numperpage</b> </a>|";

    
$check $num $numperpage;
    for(
$k=$num$k $check$k++) {
        
$counter $k 1;
    }
    
    
$next $k++;
    
$next1 $k $numperpage;
    if(
$next1 >= $total) {
    
$last $total $check;
    print 
"|<a href=\"$PHP_SELF?id=$id&num=$next\" class='copyright'> Siguientes <b>$last</b> >></a>";
    } else {
    print 
"|<a href=\"$PHP_SELF?id=$id&num=$next\" class='copyright'> Siguientes <b>$numperpage</b> >></a>";
    }
    
} else {
echo 
"";
}

    if (!isset(
$next)) {
    
    print 
"<br><br><br><font class='copyright3'>Hay <b>$total</b> fotos en total</font><br><font class='copyright3'>Estás viendo desde la <b>".($num 1)."</b> hasta la <b>".($num + ($total $num))."</b></font>";
   
   } elseif (!isset(
$num)) {

    print 
"<br><br><br><font class='copyright3'>Hay <b>$total</b> fotos en total</font><br><font class='copyright3'>Estás viendo desde la <b>1</b> hasta la <b>".$next."</b></font></td></tr></table></td></tr></table>";
    
    }
    else {

    print 
"<br><br><br><font class='copyright3'>Hay <b>$total</b> fotos en total</font><br><font class='copyright3'>Estás viendo desde la <b>".($num 1)."</b> hasta la <b>".$next."</b></font></td></tr></table></td></tr></table>";
    
    }
    
    print 
"</td></tr></table></div><br><br><font class='copyright'></center>";
        
    print 
"<script language='JavaScript' type='text/javascript'>
            function popup(foto,ancho,alto) {
            window.open('popup.php?foto='+foto+'', 'Información', 'menubar=no,scrollbars=yes,resizeable=yes,width='+ancho+',height='+alto+',toolbar=no');
            }
            </script>"
;

closedir($handle); 

}
?>
gracias sino alguien puede decirme como hacerlo para que el dreamwaver no permita que se modifique la tabla?gracias :D
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 15:47.