/** * @todo document this */ function action_commentdelete() { global $member, $manager; $commentid = intRequestVar('commentid'); $member->canAlterComment($commentid) or $this->disallow(); $comment = COMMENT::getComment($commentid); $body = strip_tags($comment['body']); $body = htmlspecialchars(shorten($body, 300, '...')); if ($comment['member']) { $author = $comment['member']; } else { $author = $comment['user']; } $this->pagehead(); ?> <h2><?php echo _DELETE_CONFIRM; ?> </h2> <p><?php echo _CONFIRMTXT_COMMENT; ?> </p> <div class="note"> <b><?php echo _EDITC_WHO; ?> :</b> <?php echo $author; ?> <br /> <b><?php echo _EDITC_TEXT; ?> :</b> <?php echo $body; ?> </div> <form method="post" action="index.php"><div> <input type="hidden" name="action" value="commentdeleteconfirm" /> <?php $manager->addTicketHidden(); ?> <input type="hidden" name="commentid" value="<?php echo $commentid; ?> " /> <input type="submit" tabindex="10" value="<?php echo _DELETE_CONFIRM_BTN; ?> " /> </div></form> <?php $this->pagefoot(); }