Exemplo n.º 1
0
    <div class="post_body">
        <?php 
echo $post_body;
?>
    </div>  
    <span class="post_views"><font>Views :<?php 
echo $post_views;
?>
</font></span>
    <a class='btn' href='#add_reply_form'>Add Reply</a>
</div>
<div><ul class="comments_ul">
<?php 
$comments_type = "comments_{$post_type}";
//    $sql=  select($comments_type, array("id","name","writer","body","date","post_id"), array("post_id",$post_id));
$sql = $posts->view_comments($comments_type, $post_id, false, array("date", "ASC"));
while ($rows_comments = mysqli_fetch_array($sql)) {
    echo "<li class='comments'>\n            <div class='profile'>\n                <image class='profile_pic' src='images/profile-icon.PNG'/>\n                <font><a href='?user="******"'>" . $rows_comments['writer'] . "</a></font>\n            </div>\n        <div class='comments_form'>\n            <div class='sub'>\n                <h4>" . $rows_comments['name'] . "</h4>\n                    <div class='post_info'><font>" . $rows_comments['date'] . "</font></div>\n            </div>\n        \n            <div class='comments_body'>" . nl2br($rows_comments['body']) . "</div>\n        </div>\n    </li>";
}
?>
    </ul></div>
<div class='add_reply'>
    <div class='sub'>
        <font>Add Reply</font>
    </div>
    <form action="" method="post" id='add_reply_form'>
        <input type="text" class="text" name="addreply_name_edit" placeholder="Title"/><br>
        <?php 
if (!isset($_SESSION['userlogin'])) {
    echo '<input type="text" class="text" name="addreply_writer_edit" placeholder="Writer"/><br>';
}