// Check if can edit news if ($data->userCan($_SESSION['privilegeid'], "editNews") or isset($_SESSION['user']['id']) and $_SESSION['user']['id'] == $author['id']) { echo "<span class=\"editarticlel\"><a href=\"editarticle.php?id=" . $news['id'] . "\">Edit Article</a></span> <span class=\"deletearticlel\" onclick=\"deleteArticle(this," . $news['id'] . ")\">Delete</span>"; } echo "<div class=\"entry\"> " . $news['content'] . "</div>"; $tags = $data->getNewsTags($news['id']); echo "<div class=\"alltags\">"; foreach ($tags as $tag) { echo "<span class=\"tagbox\">" . $tag . "</span> "; } // Check if can edit tags if ($data->userCan($_SESSION['privilegeid'], "editAllTags") or isset($_SESSION['user']['id']) and $_SESSION['user']['id'] == $author['id']) { echo "<button type=\"button\" onclick=\"editTags(this," . $news['id'] . ")\">Edit Tags</button>"; } echo "</div>"; printComments($news['id']); ?> </div> </div> <div class="sidebar"> <?php include_once 'userbox.php'; ?> <?php include_once 'commentsbox.php'; ?> </div> </div>
<div id="" style="overflow-y:scroll; height:500px;"> <?php printComments($_POST['prodId']); ?> </div> <?php if (isset($_SESSION['userId'])) { include 'commentAdd.php'; }