$prev_link
$next_link
{$lang_reviewcom_php['n_comm_disp']}
|
EOT;
$result = db_query("SELECT msg_id, msg_author, msg_body, UNIX_TIMESTAMP(msg_date) AS msg_date, author_id, {$CONFIG['TABLE_COMMENTS']}.pid as pid, aid, filepath, filename, url_prefix, pwidth, pheight FROM {$CONFIG['TABLE_COMMENTS']}, {$CONFIG['TABLE_PICTURES']} WHERE {$CONFIG['TABLE_COMMENTS']}.pid = {$CONFIG['TABLE_PICTURES']}.pid ORDER BY msg_id DESC LIMIT $start, $count");
while ($row = mysql_fetch_array($result)) {
$thumb_url = get_pic_url($row, 'thumb');
if (!is_image($row['filename'])) {
$image_info = getimagesize($thumb_url);
$row['pwidth'] = $image_info[0];
$row['pheight'] = $image_info[1];
}
$image_size = compute_img_size($row['pwidth'], $row['pheight'], $CONFIG['alb_list_thumb_size']);
$thumb_link = 'displayimage.php?pos=' . - $row['pid'];
$msg_date = localised_date($row['msg_date'], $comment_date_fmt);
echo <<
|
{$row['msg_body']}
|

|
EOT;
flush();
}
mysql_free_result($result);
echo <<
|
EOT;
endtable();
pagefooter();
ob_end_flush();
?>