Parašė Enzo· 2008 Sau. 21 14:01:11
#4
Tas pats kas su kisphiumi buvo tik kokios nors paneles uzsinori taip ir tema jau forume
@openside("Paskutiniai komentarai");
$i = 0;
$result = dbquery(
"SELECT * FROM fusion_comments LEFT JOIN fusion_users
ON fusion_comments.comment_name=fusion_users.user_id
ORDER BY comment_datestamp DESC LIMIT 8"
);
if (dbrows($result)) {
echo "<table width='100%' align='center' cellpadding='0' cellspacing='0' class='tbl-border'>\n";
while ($data = dbarray($result)) {
echo "<tr>\n<td class='".($i% 2==0?"tbl1":"tbl2")."'><span class='comment-name'>";
if ($data['user_name']) {
$name = $data['user_name'];
} else {
$name = $data['comment_name'];
}
echo "<a href='' class='slink'></a>";
$comment_message = nl2br(parseubb($data['comment_message']));
if ($data['comment_smileys'] == "1") $comment_message = parsesmileys($comment_message);
if ($data['comment_type'] == "N") {
echo "<a href='".BASEDIR."news.php?readmore=".$data['comment_item_id']."'>".$name."</a><br>";
}
else if ($data['comment_type'] == "A") {
echo "<a href='".BASEDIR."readarticle.php?article_id=".$data['comment_item_id']."'>".$name."</a><br>";
}
else if ($data['comment_type'] == "P") {
echo "<a href='".BASEDIR."photogallery.php?photo_id=".$data['comment_item_id']."'>".$name."</a><br>";
}
else if ($data['comment_type'] == "C") {
echo "<a href='".BASEDIR."viewpage.php?page_id=".$data['comment_item_id']."'>".$name."</a><br>";
}
else {
echo "No link.";
}
echo "</td>\n</tr>\n";
$i++;
}
echo "</table>\n";
} else {
echo "<center><br>There are no comments.<br><br></center>\n";
}
@closeside();
Redagavo Enzo· 2008 Sau. 21 15:01:57