当前位置: 首页>>代码示例>>PHP>>正文


PHP DAOFactory::getComentarioDAO方法代码示例

本文整理汇总了PHP中DAOFactory::getComentarioDAO方法的典型用法代码示例。如果您正苦于以下问题:PHP DAOFactory::getComentarioDAO方法的具体用法?PHP DAOFactory::getComentarioDAO怎么用?PHP DAOFactory::getComentarioDAO使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DAOFactory的用法示例。


在下文中一共展示了DAOFactory::getComentarioDAO方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: formataData

"><?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>
        
        
开发者ID:diogoca,项目名称:blogifpb,代码行数:29,代码来源:categoria.php

示例2: foreach

	
      <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>
开发者ID:diogoca,项目名称:blogifpb,代码行数:30,代码来源:comentario.php

示例3: session_start

<?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']);
开发者ID:diogoca,项目名称:blogifpb,代码行数:21,代码来源:post_comentario.php

示例4: session_start

// 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">
		
开发者ID:diogoca,项目名称:blogifpb,代码行数:30,代码来源:post.php

示例5:

<?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');
开发者ID:diogoca,项目名称:blogifpb,代码行数:7,代码来源:comentario_excluir.php


注:本文中的DAOFactory::getComentarioDAO方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。