0) { $thumbstable .= ""; //$thumbstable .= ""; while($prow = mysql_fetch_array($pres)) { $thumbstable .= ""; $ccol = 0; do { $thumbstable .= ""; $ccol++; } while ($ccol < $tncols && $prow = mysql_fetch_array($pres)); while ($ccol < $tncols) { $thumbstable .= ""; $ccol++; } $thumbstable .= ""; } $thumbstable .= "
Imágenes bajo la categoría actual
"; 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 .= " 
"; } $template = new templated_doc(); $template->loadfile("catindex.tpl"); $template->replace_var("TREELAYERS", $thumbstable); echo $template->doc; unset($template); mysql_close(); ?>