function retornaHtmlArtigo()
{
    $post = retornaPosts();
    $html = '';
    for ($i = 0; $i < count($post); $i++) {
        $link = setHome() . "paginas/post.php?id=" . $post[$i]['id_post'] . "&titulo=" . $post[$i]['titulo_post'];
        $html = $html . '<article>
						<div class="titulo_artigo"><a href=' . $link . '><h1>' . $post[$i]['titulo_post'] . '</h1></a></div>
						<div class="subtitulo_artigo">' . $post[$i]['subtitulo_post'] . '</div>
						<div class="data_artigo">' . $post[$i]['data_post'] . '</div>
						<div class="conteudo_artigo"><p>' . $post[$i]['resumo_post'] . '</p></div>
						<div class="video_artigo"><iframe width="654" height="480" src=' . $post[$i]['link_video'] . ' frameborder="0" allowfullscreen></iframe></div>
						<div class="autor_artigo">Postado por: <a href="#">' . $post[$i]['autor_post'] . '</a></div>
						<hr>
					</article><!--article-->';
    }
    return $html;
}
示例#2
0
文件: artigo.php 项目: CivalCs/ProPHP
echo $autor['nome'];
?>
" alt="Avatar de <?php 
echo $autor['nome'];
?>
">
            <span class="autor">Por: <strong><?php 
echo $autor['nome'];
?>
</strong></span>
            <span class="data">dia: <strong><?php 
echo date('d/m/Y H:i:s', strtotime($art['data']));
?>
</strong></span>
            <span class="cat">em: <a href="<?php 
setHome();
?>
/categoria/<?php 
echo getCat($art['categoria'], 'url');
?>
"><?php 
echo getCat($art['categoria'], 'nome');
?>
</a></span>
            <span class="tags"><?php 
echo $art['tags'];
?>
</span>
            <span class="views"><?php 
echo $art['visitas'];
?>