include_once("conf/configuracion.inc.php"); $oBD = BaseDatos::getConexion(); if(isset($_GET['n']) && $_GET['n'] != ""){ $n = $_GET['n']; }else{ $n = 0; } $clase1 = ""; $clase2 = ""; $clase3 = ""; $clase4 = ""; $clase5 = ""; if(isset($_GET['tp']) && $_GET['tp'] != ""){ if($_GET['tp'] == 1){ $tipoPlato = "and tipo_plato = 'Sopa' "; $textoTit = "Sopas"; $clase1 = "bts_selec"; }elseif($_GET['tp'] == 2){ $tipoPlato = "and tipo_plato = 'Plato principal' "; $textoTit = "Platos Principales"; $clase2 = "bts_selec"; }elseif($_GET['tp'] == 3){ $tipoPlato = "and tipo_plato = 'Entrada' "; $textoTit = "Entradas"; $clase3 = "bts_selec"; }elseif($_GET['tp'] == 4){ $tipoPlato = "and tipo_plato = 'Postre' "; $textoTit = "Postres"; $clase4 = "bts_selec"; }else{ $tipoPlato = ""; $textoTit = "Recetas"; $clase5 = "bts_selec"; } $tp = $_GET['tp']; }else{ $tp = 0; $textoTit = "Recetas"; $clase5 = "bts_selec"; } $sqlNumRecetas = "select count(*) as num from saborec_receta2 where (estado = 1 or estado = 2) ".$tipoPlato.""; $aNumRecetas = $oBD->GetAll($sqlNumRecetas); $total_records = $aNumRecetas[0]['num']; $pages = intval($total_records / 10); $inicial = $n * 10; $sqlRecetas = "select * from saborec_receta2 where (estado = 1 or estado = 2) ".$tipoPlato." order by plato asc limit ".$inicial.",10"; $aRecetas = $oBD->GetAll($sqlRecetas); ?>