Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?
- $latest = $_POST['latest'];
- $articleId = $_POST['article'];
- include 'includes/functions.php';
- $query = "
- SELECT
- fr.nid, fr.title, fr.id, fr.comment, fr.date AS date2,
- u.avatar, u.rank, u.signature, u.username AS author,
- (SELECT COUNT(tfr.id) FROM forum_reply tfr WHERE tfr.user_id = fr.user_id) AS post_count
- FROM
- forum_reply fr
- INNER JOIN account u ON u.id = fr.user_id
- INNER JOIN blog b ON b.id = fr.nid
- WHERE
- fr.nid = $articleId AND fr.id > $latest
- ORDER BY
- fr.date ASC LIMIT 1";
- $result = @mysql_query($query);
- if(mysql_num_rows($result) > 0) {
- $row = mysql_fetch_row($result, MYSQL_ASSOC);
- {
- $html = '<div class="comments">';
- $html .= '<div class="commentsAvatar">';
- $html .= '<div class="overlay_fade">';
- $html .= '<a href="#" onclick="return show_info(\''.$row['author'].'\');"><div class="overlay_zoom zoom_white"></div>';
- $html .= '<img src="\''.$row['avatar'].'\'" /></a>';
- $html .= '</div></div><h4>';
- $html .= '<a href="#" onclick="return show_info(\''.$row['author'].'\');">'.$row['author'].'</a>';
- $html .= '</h4>';
- $html .= '<div style="margin-top: 16px; overflow: hidden;">';
- $html .= '<p style="margin-bottom: 18px;">\''.nl2br(bbcode_format(convert_bbcodes(htmlentities($row['comment'], ENT_COMPAT, 'UTF-8')))).'\'</p>';
- $html .= '<img src="/images/miniIcons2/clock.png" class="iconSmall">';
- $html .= '<abbr class="timeago" style="font-size: 11px; margin-left: -5px;" title="\''.$row['date2'].'\'">\''.$row['date2'].'\'</abbr>';
- $html .= '<div style="float: right;">';
- $html .= '<a href="#" class="buttonSmall"><img src="/images/miniIcons2/pencil.png" class="iconSmall">Reply</a>';
- $html .= '</div><br /><br /></div></div><div style="clear: both; margin-bottom: 15px;"></div>';
- json_encode(Array('comment_id' => $latest, 'html' => $html))
- }}
- ?>
Add Comment
Please, Sign In to add comment