2 if (isset($row['BaseID'])) {
3 /* On a package details page. */
4 $base_id = $row['BaseID'];
6 /* On a package base details page. */
9 $include_deleted = has_credential(CRED_COMMENT_VIEW_DELETED
);
10 $count = pkgbase_comments_count($base_id, $include_deleted);
14 <a href
="<?= htmlentities(get_pkgbase_uri($pkgbase_name), ENT_QUOTES) . '?' . mkurl('comments=all') ?>" title
="<?= __('View all comments' , $count) ?> (<?= $count ?>)"><?
= __('Latest Comments') ?
></a
>
15 <span
class="arrow"></span
>
18 <?php
while (list($indx, $row) = each($comments)): ?
>
19 <?php
if ($row['UserName'] && $SID):
20 $row['UserName'] = "<a href=\"" . get_user_uri($row['UserName']) . "\">{$row['UserName']}</a>";
22 <h4
<?php
if ($row['DelUsersID']): ?
> class="comment-deleted"<?php
endif; ?
>>
23 <?php
if ($row['UserName']): ?
>
24 <?
= __('%s commented', $row['UserName']) ?
>
26 <?
= __('Anonymous comment') ?
>
28 <?
= __('on %s', gmdate('Y-m-d H:i', $row['CommentTS'])) ?
>
29 <?php
if ($row['DelUsersID']): ?
>
30 (<?
= __('deleted') ?
>)
32 <?php
if (!$row['DelUsersID'] && can_delete_comment_array($row)): ?
>
33 <form
class="delete-comment-form" method
="post" action
="<?= htmlspecialchars(get_pkgbase_uri($pkgbase_name), ENT_QUOTES); ?>">
34 <fieldset style
="display:inline;">
35 <input type
="hidden" name
="action" value
="do_DeleteComment" />
36 <input type
="hidden" name
="comment_id" value
="<?= $row['ID'] ?>" />
37 <input type
="hidden" name
="token" value
="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
38 <input type
="image" class="delete-comment" src
="/images/x.min.svg" width
="11" height
="11" alt
="<?= __('Delete comment') ?>" title
="<?= __('Delete comment') ?>" name
="submit" value
="1" />
43 <div
class="article-content<?php if ($row['DelUsersID']): ?> comment-deleted<?php endif; ?>">
45 <?
= parse_comment($row['Comments']) ?
>
51 <?php
if ($count > 10 && !isset($_GET['comments'])): ?
>
54 <a href
="<?= htmlentities(get_pkgbase_uri($pkgbase_name), ENT_QUOTES) . '?' . mkurl('comments=all') ?>" title
="<?= __('View all comments') ?> (<?= $count ?>)"><?
= __('All comments', $count) ?
></a
>