Exemple #1
0
while ($row2 = $result2->fetch_assoc()) {
    $curso_titulo = $row2['titulo'];
    $curso_categoria = $row2['categoria'];
}
$result2->close();
$tema_video = '';
$tema_info = '';
$tema_doc = '';
$tema_github = '';
// Si hay video lo configuramos
if (!empty($video)) {
    $tema_video = "<div id='video'>\r\n\t\t\t\t<iframe width='560' height='315' src='//www.youtube.com/embed/{$video}?rel=0&showinfo=0&theme=light&iv_load_policy=3&color=white' frameborder='0' allowfullscreen></iframe>\r\n\t\t\t</div>";
}
// Verificamos si hay informacion sobre el tema
if (!empty($info)) {
    $tema_info = "<h2>Información:</h2><p>" . $fnc->url_replace($fnc->mostrar_html($info)) . "</p>";
}
// Verificamos si hay informacion sobre el tema
if (!empty($doc)) {
    $tema_doc = "<h2>Documentación:</h2><p>" . $fnc->url_replace($fnc->mostrar_html($doc)) . "</p>";
}
// Verificamos si hay enlace a github
if (!empty($github)) {
    $tema_github = "<h2>Repositorio en github</h2>\r\n\t\t\t<a href='{$github}' id='github_a' target='_blank'>\r\n\t\t\t\t<div id='github' class='icon-github'>\r\n\t\t\t\t\tAccede al repositorio del tema en github\r\n\t\t\t\t</div>\r\n\t\t\t</a>";
}
?>

<div id="informacion" class="parallax">
	<h1><span><?php 
echo strtoupper($titulo);
?>
Exemple #2
0
$index = new PageB();
$db = new Db();
$fnc = new Fnc();
// Obtenemos id del tema
$id_tema = empty($_GET['id_tema']) ? '' : $_GET['id_tema'];
// Obtenemos informacion sobre el tema
$result = $db->mysqli_select("SELECT titulo,doc FROM temas WHERE id_tema='{$id_tema}'");
while ($row = $result->fetch_assoc()) {
    $titulo = $row['titulo'];
    $doc = empty($row['doc']) ? '' : $row['doc'];
}
$result->close();
// Creamos una descripcion para el tema
if (!empty($doc)) {
    // Damos formato al contenido
    $doc = $fnc->mostrar_html($doc);
    $doc = strip_tags($doc);
    // Retira las etiquetas php y html
    $doc = substr($doc, 0, 150);
    $doc .= " ...";
    $doc = ucfirst($doc);
    $doc = $fnc->code($doc);
}
$index->set_site_name($site_name);
// Asignamos el titulo de la pagina
$index->set_title($titulo . ' | ' . $site_name);
// Asignamos un titulo a la pagina (title)
$index->set_description($doc);
// Asignamos una descripcion a la pagina (opcional)
$index->set_page("cursos");
// ID de la pagina, sirve para resaltar en el menu en que seccion se encuentra (opcional)