
03/05/2011, 06:17
|
| | Fecha de Ingreso: abril-2011
Mensajes: 12
Antigüedad: 13 años, 10 meses Puntos: 0 | |
Respuesta: problema con div <?php
$i=0;
$o=0;
//con la i lo que hacemos es utilizarla para las consultas
while($i!=500)
{
$slct="select x from puestotrabajo where Puesto=".$i.";";
$vsx=mysql_query($slct);
$miarray=mysql_fetch_array($vsx);
$coordenadas = $miarray[0];
$x=$coordenadas -30;
$slct1="select y from puestotrabajo where Puesto=".$i.";";
$vsy=mysql_query($slct1);
$tuarray=mysql_fetch_array($vsy);
$coordenadas1 = $tuarray[0];
$y=$coordenadas1 +0;
if((isset($x))&&(isset($y)))
{
echo "<SPAN STYLE='position:absolute; top:".$y."; left:".$x."px;'>";
}
$slct2="select LENGTH(PC) from materialtrabajo where Puesto=".$i.";";
$parpc=mysql_query($slct2);
$suarray=mysql_fetch_array($parpc);
$PC = $suarray[0];
$slcts="select PC from materialtrabajo where Puesto=".$i.";";
$parp=mysql_query($slcts);
$suarray=mysql_fetch_array($parp);
$PCs = $suarray[0];
$slct3="select LENGTH(Pantalla) from materialtrabajo where Puesto=".$i.";";
$parpantalla=mysql_query($slct3);
$elarray=mysql_fetch_array($parpantalla);
$Pantalla = $elarray[0];
$slctl="select Pantalla from materialtrabajo where Puesto=".$i.";";
$parpantallas=mysql_query($slctl);
$elarray=mysql_fetch_array($parpantallas);
$Pantallas = $elarray[0];
$slct4="select LENGTH(Portatil) from materialtrabajo where Puesto=".$i.";";
$parportatil=mysql_query($slct4);
$ellarray=mysql_fetch_array($parportatil);
$Portatil = $ellarray[0];
$slctc="select Portatil from materialtrabajo where Puesto=".$i.";";
$parportatils=mysql_query($slctc);
$ellarray=mysql_fetch_array($parportatils);
$Portatils = $ellarray[0];
$slct5="select LENGTH(Foto) from materialtrabajo where Puesto=".$i.";";
$foto=mysql_query($slct5);
$ellarray=mysql_fetch_array($foto);
$Foto = $ellarray[0];
$slct6="select foto from materialtrabajo where Puesto=".$i.";";
$fotos=mysql_query($slct6);
$ellarray=mysql_fetch_array($fotos);
$Fotos = $ellarray[0];
$slct7="select x from puestotrabajo where Puesto=".$i.";";
$coor=mysql_query($slct7);
$ellarray=mysql_fetch_array($coor);
$Coor = $ellarray[0];
$slct8="select y from puestotrabajo where Puesto=".$i.";";
$coory=mysql_query($slct8);
$ellarray=mysql_fetch_array($coory);
$Coory = $ellarray[0];
$slctt="select nombre from puestotrabajo where Puesto=".$i.";"; $parportatils=mysql_query($slctt);
$ellarray=mysql_fetch_array($parportatils);
$nombres = $ellarray[0];
?>
<div id='<?php echo "ee".$o."" ?>' class='aa' style='height:'".$Coor."''style='width='".$Coory." ''>
<head><LINK href='contenedor.css' rel='stylesheet' type='text/css'>
<?php
if ($Foto!=0)
{
echo "<img src='".$Fotos.".jpg' heigth='50' width='50'> ".$nombres."<br>";
}
if ($PC!=0)
{
echo "<img src='Pc.jpg'> ".$PCs."<br>";
}
if ($Pantalla!=0)
{
echo "<img src='pantalla.jpg'> ".$Pantallas."<br>";
}
if ($Portatil!=0)
{
echo "<img src='portatil.png'>".$Portatils."<br>";
}
?>
</div>
<?php
if((isset($x))&&(isset($y)))
{
echo "</SPAN>";
}
$o=$o+1;
$i=$i+1;
}
?>
aqi ta sorry. |