include('../../../bd/bd.php'); include('../funciones.php'); $dia = $_REQUEST['dia']; if(!$dia) $dia = 0; $conexion = new CONEXION(); if($dia != 0) $condicion =" categoria = ".$dia." AND "; else $condicion =" "; $resultado_cont = $conexion->recupera_datos("SELECT SQL_CACHE id FROM archivos_sevilla WHERE ".$condicion." mostrar=1" , "semana_santa_2014"); $limit = 20; $adjacents = 2; if($resultado_cont != 0) $total_pages = mysql_num_rows($resultado_cont); else $total_pages = 0; /* Setup vars for query. */ $page = $_REQUEST["page"]; if($page) $start = ($page - 1) * $limit; //first item to display on this page else $start = 0; //if no page var is given, set start to 0 $resultado = $conexion->recupera_datos("SELECT SQL_CACHE * FROM archivos_sevilla WHERE ".$condicion." mostrar=1 order BY id ASC limit " . $start . "," . $limit , "semana_santa_2014"); ?>