Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/10/2006, 14:59
T_O_N_N_Y
 
Fecha de Ingreso: octubre-2006
Ubicación: Quart de Poblet, Valencia
Mensajes: 767
Antigüedad: 20 años
Puntos: 8
Problema con Descargas

Buenas noches.
Tengo un pequeño problema, estoy modificando unas cosas en un módulo de descargas y tengo una duda:
[IMG]tonnyspain.com/tabla.gif[/IMG]
¿Cómo puedo hacer para que las descargas aparezcan a izquierda y a derecha, porque o las pongo en filas o en columnas :(

Tenía pensado que a la izquierda fueran los ID impares, y a la derecha los ID pares, y que de esta forma podría ser, sino, no sé.
Qué opináis?
Espero vuestra respuesta.

Código PHP:
<?php 
?>
<table bgcolor='#EEEEEE' width='100%' border='1' cellspacing='3' cellpadding='0' align='center'>
<?php
$cat_sql 
= mysql_query("SELECT * FROM ".$_SESSION['dbprefix']."category WHERE cParent = '0' ORDER by cOrder ASC");
if(
mysql_num_rows($cat_sql) != 0)
{
while(
$r=mysql_fetch_array($cat_sql))
{
$totalcats='0';
$cID=$r["cID"];
$cName=stripslashes($r["cName"]);
$cDesc=stripslashes($r["cDesc"]);
?>
<tr>
<td width='50%' class='header'><a title='<?php echo $cDesc; ?>' href='descargas/index.php?action=category&id=<?php echo $cID; ?>'><?php echo $cName; ?></a></td>
<td width='50%' class='header'>Reformas</tD>
</tr>

<tr>
<td width='50%'><?php echo $cDesc; ?>
<br>
<?php echo SUB_CAT; ?>:<?php
$cate_sql 
= mysql_query("SELECT * FROM ".$_SESSION['dbprefix']."category WHERE cParent = '".$cID."'");
    if(
mysql_num_rows($cate_sql) != '0')
    {
while(
$sc=mysql_fetch_array($cate_sql))
{
$totalcats += 1 + countSub($sc["cID"]);
}
}
echo 
$totalcats;
?>
<br>
<?php echo TOT_FILES; ?>:<?php
$totaldowns 
= '0';
    
$down_sql = mysql_query("SELECT * FROM ".$_SESSION['dbprefix']."downloads WHERE cID = '".$cID."' && approved = '1'");
   if(
mysql_num_rows($down_sql) != '0')
    {
$totaldowns = mysql_num_rows($down_sql);
}
$cate_sql = mysql_query("SELECT * FROM ".$_SESSION['dbprefix']."category WHERE cParent = '".$cID."'");
if(
mysql_num_rows($cate_sql) != '0')
    {
while(
$sc=mysql_fetch_array($cate_sql))
        {
            
$totaldowns += countDown($sc["cID"]);
    }
    }
echo 
$totaldowns;
?></td>
<td width='50%'>Reformas</tD>
</tr>
<?php
}
}

if(
$allfiles == '1')
{
?>
<tr>
<td width='50%' class='header'><a title='<?php echo ALL_FILES_DESC; ?>' href='descargas/index.php?action=allfiles'><?php echo ALL_FILES_TITLE; ?></a></td>
<td width='50%' class='header'>Reformas</tD>
</tr>
<tr>
<td width='50%'><?php echo ALL_FILES_DESC; ?>
<br>
<?php echo TOT_FILES; ?>:
<?php
$all_sql 
= mysql_query("SELECT * FROM ".$_SESSION['dbprefix']."downloads WHERE approved = '1' ORDER BY dID ASC");
if(
mysql_num_rows($all_sql) == 0)
{
echo 
'0';
} else {
echo 
mysql_num_rows($all_sql);
}
?>
</td>
<td width='50%'>Reformas
</tD>
</tr>
<?php } ?>
</table>