$PAGINACION) { $total = $arrNot[$dia_ver]; $numPaginas = ceil($total/$PAGINACION); if($pag > $numPaginas) $pag = $numPaginas; if(!$pag || $pag <= 0) $pag = 1; $inicio = $PAGINACION*($pag - 1); $fin = $inicio + $PAGINACION; if($numPaginas > 0) { if($pag > 1) { $paginacion = '
« ANTERIOR
'; } else { $paginacion = '
'; } $paginacion .= '
'; for($i=1; $i<=$numPaginas; $i++) { if($i != $pag) $paginacion .= '
  • ' . $i . '
  • '; else $paginacion .= '
  • ' . $i . '
  • '; } $paginacion .= '
    '; if($pag < $numPaginas) { $paginacion .= '
    SIGUIENTE »
    '; } } } if(!$inicio) $inicio = 0; if($arrNot[$dia_ver] > 0) { // Saco las noticias del dia seleccionado $xh = xslt_create(); xslt_set_encoding($xh,"iso-8859-1"); $xsl = '/expert/htwebs/especiales-sarenet/especiales/elecciones-2008/actualidad.xsl'; $contFicheroXSL = implode('', file($xsl)); if($periodico == 'abc' || $periodico == 'abcdesevilla') { $sql = "SELECT noticiaid, xml, titulo from noticias where fecha like '" . $annio . '-' . $mes . '-' . $dia . "' AND (periodico like '" . $periodico . "' OR periodico like 'RC') AND (destino='' or destino IS NULL or destino='elecciones generales-autonomicas' or destino='elecciones generales') order by periodico desc, fechapublicacion desc limit $inicio, $PAGINACION"; } else { $sql = "SELECT noticiaid, xml, titulo from noticias where fecha like '" . $annio . '-' . $mes . '-' . $dia . "' AND (periodico like '" . $periodico . "' OR periodico like 'RC') AND (destino='' or destino IS NULL or destino='elecciones generales-autonomicas' or destino='elecciones generales') order by fechapublicacion desc,edicion desc limit $inicio, $PAGINACION"; } //echo $sql . "
    "; $arrNoticias = Array(); $res = mysql_query($sql); while($fila = mysql_fetch_row($res)) { $noticiaid = $fila[0]; //$xmlCont = utf8_encode($fila[1]); $xmlCont = $fila[1]; $titulo = $fila[2]; if(in_array($titulo, $arrNoticias)) { continue; } $arrNoticias[] = $titulo; $arguments = array('/_xml' => $xmlCont, '/_xsl' => $contFicheroXSL); $parameters = array ('urlnoticia' => '/elecciones-2008/actualidad/' . $fecha . '/' . $noticiaid . '/' . tratarURL($titulo) . '.htm'); xslt_set_encoding($xh,'utf-8'); $salida .= xslt_process($xh, 'arg:/_xml', 'arg:/_xsl', NULL, $arguments, $parameters); } } ?>

    Actualidad elecciones

    Elecciones generales 2008 _Redacción

    = 5) { ob_start(); include $_SERVER['SCRIPT_URI']; $contenido = ob_get_contents(); ob_end_clean(); $g = fopen($pag, 'w'); fwrite($g, $contenido); fclose($g); }* ?>