Example #1
0
"><?php 
    echo $valor->titulo;
    ?>
</a></h3>
					<p><?php 
    echo $valor->texto;
    ?>
</p>
					<div class="commentbox">Postado por <?php 
    echo $valor->emailUsuario;
    ?>
 | <?php 
    echo formataData($valor->data);
    ?>
 | <?php 
    echo DAOFactory::getComentarioDAO()->getCountComentariosByIdPost($valor->idPost);
    ?>
 comentarios <br> Categoria : <?php 
    echo $valor->nomeCategoria;
    ?>
</div><br clear="left" />                                             	         
			
					<?php 
}
?>
				
			</div>               
        
		</div>
        
        
Example #2
0
	
      <div id="wrapper">
		
        <?php 
require '../includes/menu.php';
?>
    
        
        <div id="content-wrapper">
        
			<div id="content">
				<table style="width:auto">
					<?php 
foreach ($post as $key => $value) {
    //Comentario > lista>
    $comentario = DAOFactory::getComentarioDAO()->getComentariosByIdPost($value->idPost);
    if (!empty($comentario)) {
        ?>

								<tr><td><h4><a href="post.php?id_post=<?php 
        echo $value->idPost;
        ?>
"> <?php 
        echo $value->titulo;
        ?>
 </a></h4></tr></td>
									<?php 
        foreach ($comentario as $chave => $valor) {
            ?>
						
										<tr>
Example #3
0
<?php

require_once '..\\config.php';
session_start();
$id = $_POST['id_post'];
$texto = $_POST['texto'];
$nome = $_POST['nome'];
$site = $_POST['site'];
$email = $_POST['email'];
$comet = new Comentario();
$comet->idPost = $id;
$comet->texto = $texto;
if ($nome != "") {
    $comet->nome = $nome;
} else {
    $comet->nome = "Anônimo";
}
$comet->email = $email;
$comet->site = $site;
DAOFactory::getComentarioDAO()->insert($comet);
header('location:' . $_SERVER['HTTP_REFERER']);
Example #4
0
// Helpers
require 'helpers/formataData.php';
// Sess�o Login
session_start();
// Head
require 'includes/head.php';
// Post
// Parametros
$id_post = $_GET['id_post'];
// Lista
$post = DAOFactory::getPostDAO()->getPosts(null, $id_post);
// Comentarios
// Lista
$comentario = DAOFactory::getComentarioDAO()->getComentariosByIdPost($id_post);
// Quantidade (Count)
$totalComentarios = DAOFactory::getComentarioDAO()->getCountComentariosByIdPost($id_post);
// Categoria > Lista
$categoria = DAOFactory::getCategoriaDAO()->queryAllOrderBy('nome');
?>

<body>

   <div id="container">

      <?php 
require 'includes/topo.php';
?>
          
	
      <div id="wrapper">
		
Example #5
0
<?php

require_once '..\\config.php';
$id_comentario = $_GET['id_comentario'];
$id_post = $_GET['id_post'];
DAOFactory::getComentarioDAO()->delete($id_comentario, $id_post);
header('location: ../admin/comentario.php');