<? global $vis_language; ?>
<div><table cellpadding="0" cellspacing="0" width="100%" class="vis_list_table"><tr><th><? echo $vis_language['TXTAUTHOR']; ?></th><th ><? echo $vis_language['TXTCOMMENTS']; ?></th><th><? echo $vis_language['TXTARTICLE']; ?></th></tr><? if($comments!=-1) for($i=0;$i<count($comments);$i++) { ?><tr><td valign="top"><div align="center"><? if($comments[$i]['poster_image']=='' || $comments[$i]['poster_image']=='default.jpg'){?><div class="l-avatar pull-left"><? if($comments[$i]['poster_name']!=''){ $namearr=explode(' ',$comments[$i]['poster_name']);$fullname='';
if(count($namearr)>1){ $lastname=preg_split('//u', $namearr[1], -1, PREG_SPLIT_NO_EMPTY);$firstname=preg_split('//u', $namearr[0], -1, PREG_SPLIT_NO_EMPTY);$fullname=ucfirst($firstname[0]).ucfirst($lastname[0]);}else{$firstname=preg_split('//u', $namearr[0], -1, PREG_SPLIT_NO_EMPTY);$fullname=ucfirst($firstname[0]);}?><div class="sm"><? echo $fullname;?></div><? }else{ ?><img class="sm" width="36" src="<?= VIS_PATH_PROFILE.'default.jpg';?>"><? }?></div><? }else{ ?><div class="l-avatar pull-left"><img src="<? echo VIS_PATH_PROFILE.$comments[$i]['poster_image']; ?>" class="sm" width="36" /></div><? }?></div><div align="center"><? echo $comments[$i]['poster_name']; ?></div><div align="center"><? echo $comments[$i]['poster_email']; ?></div></td><td width="50%"><div id="vis_selfhelp_commnet_<? echo $comments[$i]['comment_id']; ?>"><? echo nl2br($comments[$i]['content']); ?><br /><br /><span class="vis_details_small"><span class="vis_sub_header_normal" onclick="$('#vis_global_msg_div').visExecution('load_operations', {'vis_module':'selfhelp', 'vis_operation':'toggle_approval', 'vis_comment_id':<? echo $comments[$i]['comment_id']; ?>})"><? echo ($comments[$i]['is_approved']==1)?$vis_language['TXTDISAPPROVE']:$vis_language['TXTAPPROVE']; ?></span> | <span class="vis_sub_header_normal" onclick="$('#vis_global_msg_div').visExecution('load_operations', {'vis_module':'selfhelp', 'vis_operation':'toggle_spam_mark', 'vis_comment_id':<? echo $comments[$i]['comment_id']; ?>})"><? echo ($comments[$i]['is_spam']==1)?$vis_language['TXTREMOVESPAM']:$vis_language['TXTMARKSPAM']; ?></span> | <span class="vis_sub_header_normal" onclick="$('#vis_selfhelp_commnet_<? echo $comments[$i]['comment_id']; ?>').visExecution('load_area', {'vis_module':'selfhelp', 'vis_operation':'edit_comment', 'vis_comment_id':<? echo $comments[$i]['comment_id']; ?>})"><? echo $vis_language['TXTEDIT']; ?></span> | <span class="vis_sub_header_normal" onclick="$('#vis_global_msg_div').visExecution('load_operations', {'vis_module':'selfhelp', 'vis_operation':'delete_comment', 'vis_comment_id':<? echo $comments[$i]['comment_id']; ?>})"><? echo$vis_language['TXTDELETE']; ?></span></span></div></td><td  width="40%" valign="top"><span class="vis-pointer" onclick="$('#vis_selfhelp_details_div').visExecution('load_module', '<? echo addslashes(substr($comments[$i]['article_title'],0,15)); ?>', {'vis_module':'selfhelp', 'vis_operation':'view_article', 'vis_article_id':<? echo $comments[$i]['article_id']; ?>})"><? echo $comments[$i]['article_title']; ?></span></td></tr> <? } ?></table></div>