+
+ private function display_comment_link() {
+ $url = $this->url . 'comments/';
+ echo "<a id=\"comment_link\" href=\"$url\">comments</a>";
+ }
+
+ private function display_comments() {
+ echo "<div id=\"comments\">";
+ $sql= "SELECT date_posted, author, email, text
+ FROM comments WHERE note = ?";
+ $result = $this->query($sql, "d", $this->id);
+ foreach ($result as $row => $entry) {
+ $date_posted = $entry['date_posted'];
+ $author = $entry['author'];
+ $email = $entry['email'];
+ $text = htmlspecialchars($entry['text']);
+ echo <<<END_OF_COMMENT
+ <h3><a href="mailto:$email">$author</a></h3>
+ $text
+ <br>
+ <br>
+END_OF_COMMENT;
+ }
+ echo "</div>";
+ }
+
+ private function display_comment_form() {
+ // Trailing slash is necessary for reloads to work
+ $url = $this->url . "verify/";
+ echo "<form id=\"comment\" method=\"post\" action=\"$url\">";
+ require_once('includes/recaptchalib.php');
+ echo recaptcha_get_html($this->recaptcha_publickey);
+ echo "<input type=\"submit\">";
+ echo "</form>";
+ }