require_once('../clases/dbAcciones.php'); //Acciones en la base de datos require_once('../modulos/error.php'); //Tratamiento de errores require('../conf/setup.php'); //$dbConexion->debug = true; $sitio = new TControlSitio(); $smarty = new SmartyWeb; $sqlConfiguracion = "SELECT * FROM configuracion WHERE idSitio=2"; $rsConfiguracion = $dbConexion->Execute($sqlConfiguracion); $smarty->assign('direccion', $rsConfiguracion->fields('direccion')); $smarty->assign('telefonos', $rsConfiguracion->fields('telefonos')); $smarty->assign('email', $rsConfiguracion->fields('email')); $smarty->assign('avisoLegal', $rsConfiguracion->fields('avisoLegal')); $smarty->assign('idPaginaFacebook', $rsConfiguracion->fields('idPaginaFacebook')); $sqlNoticias = "SELECT * FROM noticias WHERE idSitio=2 order by idNoticia desc LIMIT 0,5"; $rsNoticias = $dbConexion->Execute($sqlNoticias); $smarty->assign('rsNoticias', $rsNoticias); $sqlOfertas = "SELECT * FROM ofertas WHERE idSitio=2 order by idOferta desc"; $rsOfertas = $dbConexion->Execute($sqlOfertas); $smarty->assign('rsOfertas', $rsOfertas); $sqlGaleriaImagenes = "SELECT * FROM galeria_imagenes WHERE idSitio=2 order by idGaleria desc"; $rsGaleriaImagenes = $dbConexion->Execute($sqlGaleriaImagenes); $smarty->assign('rsGaleriaImagenes', $rsGaleriaImagenes); $sqlGaleriaVideos = "SELECT * FROM galeria_videos WHERE idSitio=2 order by idGaleria desc "; $rsGaleriaVideos = $dbConexion->Execute($sqlGaleriaVideos); $smarty->assign('rsGaleriaVideos', $rsGaleriaVideos); $smarty->assign('urlBase', $urlBase); $sqlEventos = "SELECT * FROM eventos WHERE idSitio=2 order by idEvento desc"; $rsEventos = $dbConexion->Execute($sqlEventos); $smarty->assign('rsEventos', $rsEventos); $smarty->display('inicio.tpl'); ?>