Example #1
0
File: post.php Project: AbreuLF/OLP
<?php

require "helper/cabecalho.php";
$url = explode("/post/", $_SERVER['REQUEST_URI']);
$post = new PostController();
$postModel = $post->getPostBySeo($url[1]);
?>
	
	<div class="container">
		<div class="row">
			
			<div class="col-sm-9 post" id="conteudo-pagina">
				
				<input type="hidden" id="id-post" value="<?php 
echo $postModel->Id;
?>
">
				
				<h1 class="titulo"><?php 
echo $postModel->Titulo;
?>
</h1>
				<h2 class="categoria">
					<?php 
$i = 0;
foreach ($postModel->Categorias as $categoria) {
    if ($i > 0) {
        echo " / ";
    }
    echo "\t<a href='categoria/" . $categoria->Seo . "'>" . $categoria->Nome . "</a>";
    $i++;