Código PHP:
<?php
if(!defined('INCLUDE_CHECK')) die('');
function showComment($arr)
{
echo '
<div class="waveComment com-'.$arr['id'].'">
<div class="comment">
<div class="waveTime">'.waveTime($arr['dt']).'</div>
<div class="commentAvatar">
<img src="user/'.strtolower($arr['foto_firma']).'" width="30" height="30" alt="'.$arr['usr'].'" />
</div>
<div class="commentText">
<span class="name">'.$arr['usr'].':</span> '.$arr['comment'].'
</div>
<div class="replyLink">
<a href="javascript:void(0);" onClick="addComment(this,'.$arr['id'].','.$arr['user_id'].');return false;">Responder</a>
</div>
<div class="clear"></div>
</div>';
// Output the comment, and its replies, if any
if(isset($arr['replies']))
{
foreach($arr['replies'] as $r)
showComment($r);
}
echo '</div>';
}
function waveTime($t)
{
$t = strtotime($t);
if(date('d')==date('d',$t)) return date('h:i A',$t);
return date('F jS Y h:i A',$t);
}
?>
Código PHP:
<a href="javascript:void(0);" onClick="addComment(this,'.$arr['id'].','.$arr['user_id'].');return false;">Responder</a>
Código PHP:
<a href="javascript:void(0);" onClick="addComment(this,'.$arr['id'].','.$arr['foto_firma'].');return false;">Responder</a>
Código PHP:
<a href="javascript:void(0);" onClick="addComment(this,'.$arr['id'].','.$arr['user_id'].');return false;">Responder</a>