Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Kur gaut panelę

Parašė minimukas· 2009 Rugs. 20 19:09:16
#4

opentable("Komentarai");
$limit = 5;
$result = dbquery("SELECT * FROM ".$db_prefix."comments LEFT JOIN ".$db_prefix."users ON comment_name = user_id ORDER BY comment_datestamp DESC LIMIT 0,$limit");
if (dbrows($result)) {
while ($data = dbarray($result)) {
if ($data['comment_type'] == "U") {
$place = BASEDIR."profile.php?lookup=".$data['comment_item_id'];
} elseif ($data['comment_type'] == "N") {
$place = BASEDIR."news.php?readmore=".$data['comment_item_id'];
} elseif ($data['comment_type'] == "A") {
$place = BASEDIR."readarticle.php?article_id=".$data['comment_item_id'];
} elseif ($data['comment_type'] == "P") {
$place = BASEDIR."photogallery.php?photo_id=".$data['comment_item_id'];
}
echo "<table style='border:1px solid #000;' width='100%'>
<tr>
<td><img src='".THEME."images/bullet.gif'> <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a> ".(iADMIN && eregi("C",$userdata['user_rights']) ? " <b>IP:</b> ".$data['comment_ip'] : "")."</td>
</tr>
<tr>
<td>".($data['comment_smileys'] == "1" ? parseubb(parsesmileys(nl2br($data['comment_message']))) : parseubb(nl2br($data['comment_message'])))."</td>
</tr>
<tr>
<td>".(iADMIN && eregi("C",$userdata['user_rights']) ? "<a href='".ADMIN."comments.php$aidlink&step=delete&comment_id=".$data['comment_id']."&ctype=".$data['comment_type']."&cid=".$data['comment_item_id']."'>Trinti</a> - <a href='".ADMIN."comments.php$aidlink&step=edit&comment_id=".$data['comment_id']."&ctype=".$data['comment_type']."&cid=".$data['comment_item_id']."'>Taisyti</a> - " : "")."<a href='$place'>Skaityti</a></td>
</tr>
</table><br>\n";
}
} else {
echo "<center>Komentarų nėra</center>\n";
}
closetable();




opentable("Paskutiniai komentarai");
$i = 0;
$result = dbquery(
"SELECT * FROM fusion_romguard_comments LEFT JOIN fusion_romguard_users
ON fusion_romguard_comments.comment_name=fusion_romguard_users.user_id
ORDER BY comment_datestamp DESC LIMIT 05"
);
if (dbrows($result)) {
echo "<table width='100%' align='center' cellpadding='0' cellspacing='1' 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']) {
echo "<a href='".BASEDIR."profile.php?lookup=".$data['comment_name']."' class='slink'>".$data['user_name']."</a>";
} else {
echo $data['comment_name'];
}
$comment_message = nl2br(parseubb($data['comment_message']));
$comment_item_id = $data['comment_item_id'];
$comment_type = $data['comment_type'];
if ($data['comment_smileys'] == "1") $comment_message = parsesmileys($comment_message);
echo "</span>
<span class='small'>".$locale['041'].showdate("longdate", $data['comment_datestamp'])."</span><br>
".$comment_message."<br>";

if ($data['comment_type'] == "N") {
echo "<a href='".BASEDIR."news.php?readmore=".$data['comment_item_id']."'>Naujienos komentaras</a><br>";
}
else if ($data['comment_type'] == "A") {
echo "<a href='".BASEDIR."readarticle.php?article_id=".$data['comment_item_id']."'>Straipsnio komentaras</a><br>";
}
else if ($data['comment_type'] == "P") {
echo "<a href='".BASEDIR."photogallery.php?photo=".$data['comment_item_id']."'>Galerijos komentaras</a><br>";
}
else if ($data['comment_type'] == "C") {
echo "<a href='".BASEDIR."viewpage.php?page_id=".$data['comment_item_id']."'>Nuorodos į saitus komentaras</a><br>";
}
else {
echo "Nuorodos į saitus nėra.";
}

echo "</td>\n</tr>\n";
$i++;
}
echo "</table>\n";
} else {
echo "<center><br>Komentarų nėra.<br><br></center>\n";
}
closetable();




opentable("Paskutiniai Komentarai");
$limit = 7;
$result = dbquery("SELECT * FROM ".$db_prefix."comments LEFT JOIN ".$db_prefix."users ON comment_name = user_id ORDER BY comment_datestamp DESC LIMIT 0,$limit");
if (dbrows($result)) {
while ($data = dbarray($result)) {
if ($data['comment_type'] == "U") {
$place = BASEDIR."profile.php?lookup=".$data['comment_item_id'];
} elseif ($data['comment_type'] == "N") {
$place = BASEDIR."news.php?readmore=".$data['comment_item_id'];
} elseif ($data['comment_type'] == "A") {
$place = BASEDIR."readarticle.php?article_id=".$data['comment_item_id'];
} elseif ($data['comment_type'] == "P") {
$place = BASEDIR."photogallery.php?photo_id=".$data['comment_item_id'];
} elseif ($data['comment_type'] == "C") {
$place = BASEDIR."viewpage.php?page_id=".$data['comment_item_id'];
}
echo "<table style='border:1px solid #000;' width='100%'>
<tr>
<td><img src='http://img59.imageshack.us/img59/6703/komentaraspo7.gif'> <a href='".BASEDIR."profile.php?lookup=".$data['user_id']."'>".$data['user_name']."</a> ".(iADMIN && eregi("C",$userdata['user_rights']) ? " <b>IP:</b> ".$data['comment_ip'] : "")."</td>
</tr>
<tr>
<td>".($data['comment_smileys'] == "1" ? parseubb(parsesmileys(nl2br($data['comment_message']))) : parseubb(nl2br($data['comment_message'])))."</td>
</tr>
<tr>
<td>".(iADMIN && eregi("C",$userdata['user_rights']) ? "<a href='".ADMIN."comments.php$aidlink&step=delete&comment_id=".$data['comment_id']."&ctype=".$data['comment_type']."&cid=".$data['comment_item_id']."'>Trinti</a> - <a href='".ADMIN."comments.php$aidlink&step=edit&comment_id=".$data['comment_id']."&ctype=".$data['comment_type']."&cid=".$data['comment_item_id']."'>Keisti</a> - " : "")."<a href='$place'>Ziuret</a></td>
</tr>
</table><br>\n";
}
} else {
echo "<center>Komentarų nėra</center>\n";
}
closetable();





nznw 3 radau imk karta nori cia is modusaito :D:p