Chianuk,
sam07, Чем понтоваться тут, лучше бы помогли.
sadam, Вот код блока на локалке вроде работает
Скопировать
<?php
# Copyright © 2005 - 2008 SLAED
# Website: http://www.slaed.net
if (!defined("BLOCK_FILE")) {
Header("Location: ../index.php");
exit;}
global $prefix, $db;
#количество комментариев на страницу
$kol = 10;
#длина текста
$dlina = 50;
$result = $db->sql_query("SELECT a.id, a.cid, a.modul,a.date, a.name, a.comment, b.user_name FROM ".$prefix."_comment AS a
LEFT JOIN ".$prefix."_users AS b ON (a.uid=b.user_id) ORDER BY date DESC LIMIT $kol");
if ($db->sql_numrows($result) > 0) {
while (list($id, $cid, $com_modul,$date, $com_name, $com_text, $user_name) = $db->sql_fetchrow($result)) {
$com_name = ($user_name) ? "".user_info($user_name, 1)."" : (($com_name) ? $com_name : $confu['anonym']);
$content .= "<table cellspacing=\"0\" cellpadding=\"1\" border=\"0\"><tr><td>» $date<br><b>$com_name</b>: <a
href=\"".view_article($com_modul, $cid, $id)."\" title=\""._READMORE."\">".substr(text_filter(bb_decode($com_text,
$com_modul)),0,$dlina)."</a></td></tr></table><hr>";}}
?>
На счет ереси:
Код блока сделан из функции
function comm_show() {
global $prefix, $db, $admin_file, $conf, $confu;
head();
comm_navi();
$num = isset($_GET['num']) ? intval($_GET['num']) : "1";
$offset = ($num-1) * $conf['anum'] ;
$result = $db->sql_query("SELECT a.id, a.cid, a.modul, a.name, a.comment, b.user_name FROM ".$prefix."_comment AS a
LEFT JOIN ".$prefix."_users AS b ON (a.uid=b.user_id) ORDER BY date DESC LIMIT ".$offset.", ".$conf['anum']."");
if ($db->sql_numrows($result) > 0) {
open();
echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" class=\"sort\"
id=\"sort_id\"><tr>"
."<th>"._ID."</th><th>"._MODUL."</th><th>"._NICKNAME."</th><th
width=\"60%\">"._COMMENT."</th><th>"._FUNCTIONS."</th></tr>";
while (list($id, $cid, $com_modul, $com_name, $com_text, $user_name) = $db->sql_fetchrow($result)) {
$com_name = ($user_name) ? "".user_info($user_name, 1)."" : (($com_name) ? $com_name :
$confu['anonym']);
echo "<tr class=\"bgcolor1\">"
."<td align=\"center\">$id</td>"
."<td align=\"center\">$com_modul</td>"
."<td align=\"center\">$com_name</td>"
."<td>".bb_decode($com_text, $com_modul)."</td>"
."<td align=\"center\">".ad_edit("".$admin_file.".php?op=comm_edit&id=".$id."")." <a
href=\"".view_article($com_modul, $cid, $id)."\" title=\""._READMORE."\"><img src=\"".img_find("all/about")."\" border=\"0\"
align=\"center\" alt=\""._READMORE."\"></a>
".ad_delete("".$admin_file.".php?op=comm_del&id=$id&cid=$cid&modul=".$com_modul."&refer=1",
cutstr(text_filter(bb_decode($com_text, $com_modul)), 50))."</td></tr>";
}
echo "</table>";
close();
list($numstories) = $db->sql_fetchrow($db->sql_query("SELECT Count(id) FROM ".$prefix."_comment"));
$numpages = ceil($numstories / $conf['anum']);
num_page("", $numstories, $numpages, $conf['anum'], "op=comm_show&");
} else {
warning(""._NO_INFO."", "", "", 2);
}
foot();
}