require("MySQLConn.inc.php"); require("config.inc.php"); include_once("ueztd.class.php"); include("phihierarchy.class.php"); $tncols = 1; $tncolwidth = floor(100 / $tncols); $thumbstable = ""; $psql = "SELECT id, categoria, imgname FROM categorias WHERE parent=0 OR ISNULL(parent) ORDER BY categoria ASC"; $pres = mysql_query($psql); $pcnt = mysql_num_rows($pres); if ($pcnt > 0) { $thumbstable .= "
Imágenes bajo la categoría actual | "; while($prow = mysql_fetch_array($pres)) { $thumbstable .= "|
---|---|
"; if (count($prow) > 0) { $catimg = $DIR_BASE . $DIR_CATS . utf8_decode($prow['imgname']); $tpl = new templated_doc(); $tpl->loadfile("catindextable.tpl"); $tpl->replace_var("CATID", $prow['id']); $tpl->replace_var("CATIMG", $catimg ); $tpl->replace_var("CAPTION", $prow['categoria'] ); $thumbstable .= $tpl->doc; unset($tpl); } else $thumbstable .= " "; $thumbstable .= " | "; $ccol++; } while ($ccol < $tncols && $prow = mysql_fetch_array($pres)); while ($ccol < $tncols) { $thumbstable .= ""; $ccol++; } $thumbstable .= " |