53 lines
1.9 KiB
PHP
53 lines
1.9 KiB
PHP
<?PHP
|
|
|
|
if (eregi("comments_show.php", $_SERVER['SCRIPT_NAME'])) {
|
|
Header("Location: index.php"); die();
|
|
}
|
|
|
|
//$sqlComments = "SELECT * FROM gforum_TriathlonsComment WHERE triathlon_id_fk = $row[uid] AND comment_valid = 1 ORDER BY comment_time DESC";
|
|
|
|
//$objComments = mysql_query($sqlComments) OR die(mysql_error());
|
|
|
|
$fb_xid = intval(mysql_escape_string($_GET[uid]));
|
|
|
|
?>
|
|
|
|
<a name="comment"></a>
|
|
<? /*<div class="fb-comments" data-href="<? echo(curPageURL()); ?>" data-num-posts="5" data-width="500"></div>*/ ?>
|
|
<? /**<fb:comments href="<? echo(curPageURL()); ?>" num_posts="5" width="500"></fb:comments>**/ ?>
|
|
<fb:comments href="<? echo(curPageURL()); ?>" num_posts="5" width="622"></fb:comments>
|
|
|
|
<? /**<table border="0" cellspacing="1" cellpadding="1" width="100%">
|
|
<tr>
|
|
<td bgcolor="#cecece">
|
|
<div class="content-title-no"><strong>Comments</strong></div>
|
|
</td></tr>
|
|
<?
|
|
|
|
$x = 0;
|
|
while($arrComments = mysql_fetch_array($objComments)){
|
|
$x++;
|
|
if($x % 2 == 0){ $bg = '#cecece'; }else{ $bg = '#ececec'; }
|
|
|
|
$arrCommenters = mysql_fetch_array(mysql_query("SELECT user_username FROM gforum_User WHERE user_id = ".$arrComments[user_id_fk]." LIMIT 1"));
|
|
|
|
$commenter_user_username = $arrCommenters[user_username];
|
|
|
|
?>
|
|
<tr bgcolor="<? echo "$bg"; ?>"><td><span class="sub-hdr" style="margin-left: 5px;"><strong><? echo $arrComments[comment_subject]; ?></strong></span><div class="indent">Reviewed by: <? echo "<a href=\"http://forum.slowtwitch.com/gforum.cgi?username=".$commenter_user_username.";\" target=\"_blank\">".$commenter_user_username."</a>"; echo " on ".date("F j, Y g:i A", $arrComments[comment_time]); ?></div><div class="indent" style="background-color: #eeeef9; border: 1px solid black; margin: 2px; margin-right: 5px; margin-bottom: 5px; padding: 5px; ">
|
|
<? echo stripslashes(stripslashes($arrComments[comment_message])); ?>
|
|
</div></td></tr>
|
|
|
|
|
|
<?
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<? if ($x == 0) { ?>
|
|
<tr bgcolor="#cecece"><td>No comments</td></tr>
|
|
<? } ?>
|
|
|
|
</table> **/ ?>
|