Descripción: Con este comodín podemos mostrar varios apuntes juntos. Está previsto ser usado para series de apuntes de una misma temática.
A continuación mostramos los apuntes asociados a este extra:
// Agrupando varios apuntes.
/*
[rss]Con este comodín podemos mostrar varios apuntes juntos. Está previsto ser usado para series de apuntes de una misma temática.[/rss]
*/
$codigos = array(
'/\[rss\](.*?)\[\/rss\]/is'
);
$reemplazos = array(
"$1"
);
$mes = array(
"01" => "enero",
"02" => "febrero",
"03" => "marzo",
"04" => "abril",
"05" => "mayo",
"06" => "junio",
"07" => "julio",
"08" => "agosto",
"09" => "septiembre",
"10" => "octubre",
"11" => "noviembre",
"12" => "diciembre"
);
/*
$grupos = array (
"diario" => array("titulo" => "Sobre este diario", "sql" => "titulo like 'Este diario:%'"),
"gerona_2011" => array("titulo" => "Minicon Gerona 2011", "sql" => "titulo like '%Gerona%'"),
"yo_soy_ese" => array("titulo" => "Así me han visto", "sql" => "titulo like 'Así me ha visto:%'"),
"ajax" => array("titulo" => "Programación Ajax", "sql" => "titulo like '%ajax%' or titulo like '%Mitología%'"),
"tutor_comentarios" => array("titulo" => "Sistema de comentarios paso a paso", "sql" => "titulo like 'Sistema de comentarios paso a paso:%'"),
"xml" => array("titulo" => "Ficheros xml", "sql" => "titulo like '%xml%'"),
"svg" => array("titulo" => "Imágenes svg", "sql" => "titulo like '%svg%'"),
"sudokus" => array("titulo" => "Sudokus", "sql" => "titulo like '%sudoku%'")
);
*/
include("ficheros/grupos.txt");
$css =<<< estilos
svg a {
fill: #eeeeee;
}
svg a:hover {
fill: #bbbbbb;
}
estilos;
$ir_al_tope =<<< vayamos
<p style="text-align: right">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="15px" height="15px" viewbox="0 0 15 15" >
<a xlink:href='#' xlink:title='Ir al inicio'>
<polygon stroke="gray" stroke-width="2" points="7,0,15,15,0,15"/>
</a>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="15px" height="15px" viewbox="0 0 15 15" >
<a xlink:href='?extra=grupos' xlink:title='Ir al menú de grupos'>
<rect stroke="gray" stroke-width="2" x="0" y="0" width="15" height="15"/>
<line x1="1" y1="3" x2="14" y2="3" stroke-width="3" stroke="blue" />
<line x1="2" y1="7" x2="13" y2="7" stroke-width="1" stroke="green" />
<line x1="2" y1="9" x2="13" y2="9" stroke-width="1" stroke="magenta" />
<line x1="2" y1="11" x2="13" y2="11" stroke-width="1" stroke="green" />
<line x1="2" y1="13" x2="13" y2="13" stroke-width="1" stroke="aqua" />
</a>
</svg>
</p>
vayamos;
$soy = "grupo";
$hoy = getdate();
$year = $hoy["year"];
$mostrar = "";
$titulo = "";
$titular = "";
$cuerpo = "";
$title = "<title>Apuntes agrupados</title>";
$menu = "";
$cuales = $_GET["grupo"];
if ($cuales != "") {
if (array_key_exists($cuales, $grupos)) {
$buscar = $grupos[$cuales]["sql"];
$titular = $grupos[$cuales]["titulo"];
$sql = "select * from $tabla_apuntes where $buscar order by fecha";
$respuesta = @mysql_query($sql);
$total = mysql_num_rows($respuesta);
if ($total > 0) {
$title = "<title>grupo $titular</title>";
$soy .= ".$cuales";
$cuerpo = "<strong>$titular</strong> ($cuales): Se encontraron $total apuntes:<ol style='margin: auto; width: 50%; border: 1px solid blue; padding: 1em; list-style-type: none'>";
$datos = array();
while ($dato = mysql_fetch_array($respuesta)) {
$titulo = $dato["titulo"];
$id = $dato["id"];
$cuerpo .= "<li><a href='#id_$id'>$titulo</a></li>";
$publicador = "<div class=\"publicado\" > <img src=\"dibujos/emoticon.gif\" alt=\"emoticón de Caricatos\" style=\"float: left; padding: 0 3px\" />";
// $publicados</div>\n";
$fin_publicador = "</div>\n";
$parametros = "?titulo=".urldecode(urlencode($titulo));
list($_f, $_h) = explode(" ", $dato["fecha"]);
list($_anual, $_mensual, $_dial) = explode("-", $_f);
$publicado = " Publicado el día $_dial de ".$mes[$_mensual]." de $_anual";
$_apunte = preg_replace($codigos, $reemplazos, $dato["apunte"]);
$apunte = $publicador.$publicado."<br/>\nid=<a href=\"index.php?id=$id\">$id</a>$fin_publicador";
$apunte.=$_apunte;
$mensaje = "<h2><a name='id_$id' href='index.php$parametros' title='$info'>Titulo: $titulo</a></h2>";
$mensaje .= "<br/>$apunte<br/>$ir_al_tope<br/>";
array_push($datos, $mensaje);
}
$cuerpo .= "</ol>\n";
$mostrar = implode("<br/><hr/><br/>", $datos);
}
else {
$cuerpo = "($sql): No se encontraron coincidencias";
$soy .= "s";
}
}
else {
$cuerpo = "El grupo: $cuales no está registrado.";
$soy .= "s";
}
}
else {
$cuerpo = "Seleccione el grupo desde el menú.";
$soy .= "s";
}
//$ir = ($titular == "") ? "" : '<p>Ir al <a href="?extra=union">Menú de grupos</a>.</p>';
if ($titular == "") {
$titular = "Sin datos.";
$menu = array();
$mostrar = "<div style='padding: 1em;'><h3>Grupos disponibles:</h3><ul style='border: 1px solid black; width: 50%; margin: auto; padding: 1em; list-style-type: none'>";
foreach($grupos as $grupo => $item) {
$g = $item["titulo"];
$este = "<li><a href='?extra=grupos&grupo=$grupo'>$g</a></li>";
array_push($menu, $este);
}
$mostrar .= implode("\n", $menu)."</ul></div>";
}
include($include_referencias);
include($include_contadores);
include($include_comentarios);
ob_start();
include($include_valoraciones);
$valorador = ob_get_clean();
$_SESSION["soy"] = $soy;
$cabeza = "<h1><img src='logo.php?id=$soy' alt='logo' style='margin-right: 1cm'/>Apuntes agrupados: $titular</h1>";
$nota = "<p style='border: 2px ridge blue; background-color: pink; margin: 2em; padding: 1em;'>$cuerpo</p><br/>";
$pie =<<< pie
<div id="pie">
<h6>
<span style="font-weight: bolder">Copyright © 2002-$year <a href="index.php">www.pepemolina.com</a></span>
<br/>
<a href="diario.rss.xml" >RSS</a>
<a href="diario.rss.xml" ><img src="diario.imagen.php?id=22&max=10" alt="rss" title="rss" longdesc="diario.ficha.php?id=22" /></a>
| Ver
<a href="diario.sitemap.html" >
Mapa del sitio
</a>
</h6>
</div><!-- id="copyright" -->
pie;
ob_start();
echo <<< coments
<div id="comentarios" style="border: 1px solid red; margin: 1em; padding: 1em">
<h3 style="text-align: center">
Zona de comentarios
</h3>
<div id="mensajes">$comentarios</div>
</div><!-- id="comentarios" -->
<div id="Valorador" style="border: 1px solid #ffcc00; margin: 1em; padding: 1em">
<h3 style="text-align: center">
Evaluación
</h3>
<p>
Valoración de esta página: ($soy) <img id="valorada" src="diario.estrellas.php?pagina=$soy&fantasma=$fantasma" alt="valor" />
</p>
<div id="valores">$valorador</div>
</div><!-- id="valorador" -->
coments;
$mensajes = ob_get_clean();
$body = "$cabeza <br/> $nota $mostrar $mensajes $pie";
$doctype = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
$links = "<link rel='shortcut icon' href='caricatos.ico' />\n<link rel='stylesheet' type='text/css' href='diario/diario.estilos.css' />";
$links .= "<script type='text/javascript' src='diario.js'></script>\n";
$links .= "<script type='text/javascript' src='diario/editor.js'></script>\n";
Este código ha sido leído en 119 ocasiones.
Esta extra aún no tiene comentarios.
Valoración de esta página: (extra.grupos)
Listados: imágenes, categorías, etiquetas, extras | Anuarios: 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 | Otros enlaces: buscador