Ver Mensaje Individual
  #5 (permalink)  
Antiguo 23/05/2008, 09:45
Avatar de T4ke0veR
T4ke0veR
 
Fecha de Ingreso: agosto-2007
Ubicación: Quito - Ecuador
Mensajes: 1.720
Antigüedad: 16 años, 8 meses
Puntos: 28
Respuesta: Contador de clicks

este es mi archivos de el listado...

Código PHP:
<?php
if (!function_exists("GetSQLValueString")) {
function 
GetSQLValueString($theValue$theType$theDefinedValue ""$theNotDefinedValue ""
{
  
$theValue get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;

  
$theValue function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch (
$theType) {
    case 
"text":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;    
    case 
"long":
    case 
"int":
      
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case 
"double":
      
$theValue = ($theValue != "") ? "'" doubleval($theValue) . "'" "NULL";
      break;
    case 
"date":
      
$theValue = ($theValue != "") ? "'" $theValue "'" "NULL";
      break;
    case 
"defined":
      
$theValue = ($theValue != "") ? $theDefinedValue $theNotDefinedValue;
      break;
  }
  return 
$theValue;
}
}

$maxRows_Recordset1 30;
$pageNum_Recordset1 0;
if (isset(
$_GET['pageNum_Recordset1'])) {
  
$pageNum_Recordset1 $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 $pageNum_Recordset1 $maxRows_Recordset1;

$colname_Recordset1 "-1";
if (isset(
$_GET['id'])) {
  
$colname_Recordset1 $_GET['id'];
}
mysql_select_db($database_multisillas$multisillas);
$query_Recordset1 sprintf("SELECT * FROM categoria WHERE id = %s"GetSQLValueString($colname_Recordset1"int"));
$query_limit_Recordset1 sprintf("%s LIMIT %d, %d"$query_Recordset1$startRow_Recordset1$maxRows_Recordset1);
$Recordset1 mysql_query($query_limit_Recordset1$multisillas) or die(mysql_error());
$row_Recordset1 mysql_fetch_assoc($Recordset1);

if (isset(
$_GET['totalRows_Recordset1'])) {
  
$totalRows_Recordset1 $_GET['totalRows_Recordset1'];
} else {
  
$all_Recordset1 mysql_query($query_Recordset1);
  
$totalRows_Recordset1 mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;

mysql_select_db($database_multisillas$multisillas);
$query_Recordset2 "SELECT * FROM productos WHERE id_cat =".$row_Recordset1['id'];
$Recordset2 mysql_query($query_Recordset2$multisillas) or die(mysql_error());
$row_Recordset2 mysql_fetch_assoc($Recordset2);
$totalRows_Recordset2 mysql_num_rows($Recordset2);



?>
<link href="css/estilo.css" rel="stylesheet" type="text/css" />
<?php do { ?>
<table width="330" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center" bgcolor="#CCCCCC"><table width="300" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td width="180" valign="top"><p align="left"><a href="esp_prod.php?id=<?php echo $row_Recordset2['id']; ?>"><span class="textoINDEX"><span class="textoMulti3"><br />
          <?php echo $row_Recordset2['nombre']; ?></span></span><br />
                  <br />
          </a><span class="textoINDEX"><span class="textotitResNot">C&oacute;digo:</span> <span class="textoMulti1"><?php echo $row_Recordset2['codigo']; ?></span></span></p>
<p align="left"><span class="textoINDEX"><a href="ficha_prod.php?id=<?php echo $row_Recordset2['id']; ?>"><br />
                    <img src="imgs/boton_pro.jpg" width="112" height="22" border="0" /></a></span></p></td>
        <td width="19">&nbsp;</td>
        <td width="100" valign="middle"><p align="justify" class="textoINDEX"><a href="esp_prod.php?id=<?php echo $row_Recordset2['id']; ?>"><img src="imgprod/<?php echo $row_Recordset2['imagen']; ?>" width="100" height="100" border="0" class="bordeimg" /></a></p></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td align="center">&nbsp;</td>
  </tr>
</table>
<?php } while ($row_Recordset2 mysql_fetch_assoc($Recordset2)); ?>
  
  <?php
mysql_free_result
($Recordset1);

mysql_free_result($Recordset2);
?>
como veran esta hecho por DW no soy muy diestro en programacion... y ando de voladas con este tema :S
__________________
Diseño gráfico, Web, imagen corporativa, publicidad ...