<?
include "Recordset.php";
$db_connection = odbc_connect("fordDSN", "sa", "collective");
$sql = "SELECT * FROM catalogo";
$rs = new Recordset($db_connection, $sql);
$rs->Elems(8);
if(!isset($page))
$page = 1;
$results = $rs->Split($page);
echo "<table border=\"0\">\r";
echo "<tr bgcolor=\"#000000\">";
echo "<td align=\"center\"><FONT FACE=\"Verdana, Arial\" SIZE=\"2\" COLOR=\"#FFFFFF\">Código</FONT></td>";
echo "<td align=\"center\"><FONT FACE=\"Verdana, Arial\" SIZE=\"2\" COLOR=\"#FFFFFF\">Nombre</FONT></td>";
echo "<td align=\"center\"><FONT FACE=\"Verdana, Arial\" SIZE=\"2\" COLOR=\"#FFFFFF\">Descripción</FONT></td>";
echo "</tr>\r";
for($i = 0; $i < count($results); $i++)
{
if( $i % 2 == 0)
$color = "#0099CC";
else
$color = "#CCFFFF";
echo "<tr bgcolor = \"$color\">";
echo "<td>" . $results[$i]["cod_catalogo"] . "</td>";
echo "<td>" . $results[$i]["nombre_catalogo"] . "</td>";
echo "<td>" . $results[$i]["desc_catalogo"] . "</td>";
echo "</tr>\r";
}
echo "</table>\r";
$rs->DisplayGuide("example.php", $page);
?> |