|
27.02.2006, 04:39
найдите:
PHP код:
$sql = "SELECT tid, sid, date, name, email, url, host_name, subject, comment, score FROM ".$prefix."_comments WHERE sid='$sid' ORDER BY date DESC LIMIT $offset, $storynum"; $result = $db->sql_query($sql); while (list($tid, $c_sid, $date, $sender_name, $sender_email, $sender_page, $sender_host, $com_title, $comment, $score, $row) = $db->sql_fetchrow($result)) { $com_text = smiles(stripslashes($comment)); $sid = intval($c_sid); if ($sender_email != "") { $sender_email = "<a href=\"mailto:$sender_email\"><img border=\"0\" src=\"images/blocks/Feedback.gif\" width=\"16\" height=\"16\"></a>"; } else { $sender_email = "<img border=\"0\" src=\"images/blocks/Feedback.gif\" width=\"16\" height=\"16\" title=\""._NOEMAIL."\">"; } if ($sender_page != "") { $sender_page = "<a href=\"$sender_page\" target=\"_blank\"><img border=\"0\" src=\"images/blocks/Home.gif\" width=\"16\" height=\"16\"></a>"; } else { $sender_page = "<img border=\"0\" src=\"images/blocks/Home.gif\" width=\"16\" height=\"16\" title=\""._NOURL."\">"; } echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"100%\" bgcolor=\"$bgcolor4\">\n" ."<tr><td bgcolor=\"$bgcolor1\">$a</td><td bgcolor=\"$bgcolor1\">$sender_email</td>\n" ."<td bgcolor=\"#FFFFFF\">$sender_page</td><td width=\"70%\" bgcolor=\"$bgcolor1\"><a href=\"modules.php?name=Your_Account&op=userinfo&username=$sender_name\"><b>$sender_name</b></a></td>\n" ."<td width=\"30%\" bgcolor=\"$bgcolor1\" align=\"center\">$date</td>\n" ."</tr><tr><td width=\"100%\" bgcolor=\"$bgcolor1\" colspan=\"5\"><b>$com_title</b><br>$com_text</td></tr>\n";
замените на:
PHP код:
$sql = "SELECT c.tid, c.sid, c.date, c.name, c.email, c.url, c.host_name, c.subject, c.comment, c.score, s.user_icq FROM ".$prefix."_comments AS c LEFT JOIN ".$prefix."_users AS s ON(s.username=c.name and s.user_email=c.email) WHERE c.sid='$sid' ORDER BY c.date DESC LIMIT $offset, $storynum"; $result = $db->sql_query($sql); while (list($tid, $c_sid, $date, $sender_name, $sender_email, $sender_page, $sender_host, $com_title, $comment, $score, $row, $user_icq) = $db->sql_fetchrow($result)) { $com_text = smiles(stripslashes($comment)); $sid = intval($c_sid); if ($sender_email != "") { $sender_email = "<a href=\"mailto:$sender_email\"><img border=\"0\" src=\"images/blocks/Feedback.gif\" width=\"16\" height=\"16\"></a>"; } else { $sender_email = "<img border=\"0\" src=\"images/blocks/Feedback.gif\" width=\"16\" height=\"16\" title=\""._NOEMAIL."\">"; } if ($sender_page != "") { $sender_page = "<a href=\"$sender_page\" target=\"_blank\"><img border=\"0\" src=\"images/blocks/Home.gif\" width=\"16\" height=\"16\"></a>"; } else { $sender_page = "<img border=\"0\" src=\"images/blocks/Home.gif\" width=\"16\" height=\"16\" title=\""._NOURL."\">"; } if ($user_icq !=""){ $sender_icq = "<a href=\"http://www.icq.com/whitepages/wwp.php?to=$user_icq\" target=\"_blank\"><img border=\"0\" src=\"images/blocks/ICQ.gif\" width=\"16\" height=\"16\"></a>"; } else { $sender_icq = "<img border=\"0\" src=\"images/blocks/ICQ.gif\" width=\"16\" height=\"16\" title=\"ICQ не указано\">"; } echo "<table border=\"0\" cellpadding=\"3\" cellspacing=\"1\" width=\"100%\" bgcolor=\"$bgcolor4\">\n" ."<tr><td bgcolor=\"$bgcolor1\">$a</td><td bgcolor=\"$bgcolor1\">$sender_email</td>\n" ."<td bgcolor=\"$bgcolor1\">$sender_page</td><td bgcolor=\"$bgcolor1\">$sender_icq</td><td width=\"70%\" bgcolor=\"$bgcolor1\"><a href=\"modules.php?name=Your_Account&op=userinfo&username=$sender_name\"><b>$sender_name</b></a></td>\n" ."<td width=\"30%\" bgcolor=\"$bgcolor1\" align=\"center\">$date</td>\n" ."</tr><tr><td width=\"100%\" bgcolor=\"$bgcolor1\" colspan=\"5\"><b>$com_title</b><br>$com_text</td></tr>\n";
должно работать, соответственно надо добавить еще картинку.
|
|