<?php
include('lib/class.TemplatePower.inc.php'); include('connect_bueno.php'); include('funciones.php');$tpl = new TemplatePower("plantillas/index.html", T_BYFILE);$tpl->prepare();
$biblios = listar_local(1);
$i=0;
$servidor=$_SERVER['SERVER_NAME'];
$tpl->assign(servidor, $servidor);
foreach ($biblios as $biblio) {
$tpl->newBlock("bibliotecas");
$tpl->assign(lat, $biblios[$i]['lat']);
$tpl->assign(lon, $biblios[$i]['lon']);
$tpl->newBlock("bibliotecas_id");
$tpl->assign(biblio_id, $biblios[$i]['id']);$i++;
}
$clubes = listar_local(2);
$i=0;foreach ($clubes as $club) {$tpl->newBlock("clubes");$tpl->assign(lat, $clubes[$i]['lat']);$tpl->assign(lon, $clubes[$i]['lon']);$tpl->newBlock("clubes_id");$tpl->assign(club_id, $clubes[$i]['id']);$i++;} $museos = listar_local(3);$i=0;foreach ($museos as $museo) {$tpl->newBlock("museos");$tpl->assign(lat, $museos[$i]['lat']);$tpl->assign(lon, $museos[$i]['lon']);$tpl->newBlock("museos_id");$tpl->assign(museo_id, $museos[$i]['id']);$i++;} $librerias = listar_local(4);$i=0;foreach ($librerias as $libreria) {$tpl->newBlock("librerias");$tpl->assign(lat, $librerias[$i]['lat']);$tpl->assign(lon, $librerias[$i]['lon']);$tpl->newBlock("librerias_id");$tpl->assign(libreria_id, $librerias[$i]['id']);$i++;}$tpl->printToScreen();
?>