mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Auto redirect from confirmation screens.
Finally move comment deletion and category editing into functions and remove pkgedit.php Signed-off-by: Loui Chang <louipc.ist@gmail.com> -Fix indentation -Fix variable naming conflict $id vs $cid
This commit is contained in:
parent
01fc2024cb
commit
57a5cbfd88
6 changed files with 125 additions and 124 deletions
|
@ -3,20 +3,25 @@
|
|||
$uid = uid_from_sid($SID);
|
||||
while (list($indx, $carr) = each($comments)) { ?>
|
||||
<div class="comment-header"><?php
|
||||
if (canDeleteCommentArray($carr, $atype, $uid)) {
|
||||
$durl = '<a href="pkgedit.php?del_Comment=1';
|
||||
$durl.= '&comment_id=' . $carr['ID'] . '&ID=' . $row['ID'];
|
||||
$durl.= '"><img src="images/x.png" border="0"';
|
||||
$durl.= ' alt="' . __("Delete comment") . '"></a> ';
|
||||
|
||||
echo $durl;
|
||||
}
|
||||
|
||||
if ($SID) {
|
||||
$carr['UserName'] = "<a href=\"account.php?Action=AccountInfo&ID={$carr['UsersID']}\">{$carr['UserName']}</a>";
|
||||
}
|
||||
|
||||
echo __('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS']));
|
||||
$commentHeader =__('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS']));
|
||||
|
||||
if (canDeleteCommentArray($carr, $atype, $uid)) {
|
||||
$durl = '<form method="POST" action="packages.php?ID='.$row['ID'].'">';
|
||||
$durl.= '<input type="hidden" name="action" value="do_DeleteComment">';
|
||||
$durl.= '<input type="hidden" name="comment_id" value="'.$carr['ID'].'">';
|
||||
$durl.= '<input type="image" src="images/x.png" border="0" ';
|
||||
$durl.= ' alt="'.__("Delete comment").'" name="submit" value="1" ';
|
||||
$durl.= ' width="19" height="18"> ';
|
||||
|
||||
$commentHeader = $durl.$commentHeader."</form>";
|
||||
}
|
||||
|
||||
echo $commentHeader;
|
||||
?></div>
|
||||
<blockquote class="comment-body">
|
||||
<div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue