{% else-1 %}
(19 апр 2013, 13:45) (0/0) [0]
S.W.A.T, Пост 7? *
(18 апр 2013, 22:55) (0/0) [0]
[code]$req = mysql_query(\"SELECT * FROM `forum` WHERE `type` = \'t\' AND `close`!=\'1\' ORDER BY `time` DESC LIMIT 3\"*;
while ($arr = mysql_fetch_array($req)) {
$q3 = mysql_query(\"select `id`, `refid`, `text` from `forum` where type=\'r\' and id=\'\" . $arr[\'refid\'] . \"\'\"*;
$razd = mysql_fetch_array($q3);
$q4 = mysql_query(\"select `id`, `refid`, `text` from `forum` where type=\'f\' and id=\'\" . $razd[\'refid\'] . \"\'\"*;
$frm = mysql_fetch_array($q4);
$nikuser = mysql_query(\"SELECT `from`, `time` FROM `forum` WHERE `type` = \'m\' AND `close` != \'1\' AND `refid` = \'\" . $arr[\'id\'] . \"\'ORDER BY time DESC\"*;
$colmes1 = mysql_num_rows($nikuser);
$cpg = ceil($colmes1 / $kmess);
$nam = mysql_fetch_array($nikuser);
echo is_integer($i / 2) ? \'<div class=\"list1\">\' : \'<div class=\"list2\">\';
echo \'<img src=\"../images/\' . ($arr[\'edit\'] == 1 ? \'tz\' : \'np\') . \'.gif\" alt=\"\"/>\';
if ($arr[\'realid\'] == 1)
echo \'&nbsp;<img src=\"../images/rate.gif\" alt=\"\"/>\';
echo \'&nbsp;<a href=\"/forum/index.php?id=\' . $arr[\'id\'] . ($cpg > 1 && $_SESSION[\'uppost\'] ? \'&amp;clip&amp;page=\' . $cpg : \'\') . \'\">\' . $arr[\'text\'] . \'</a>&nbsp;[\' . $colmes1 . \']\';
if ($cpg > 1)
echo \'&nbsp;<a href=\"/forum/index.php?id=\' . $arr[\'id\'] . ($_SESSION[\'uppost\'] ? \'\' : \'&amp;clip&amp;page=\' . $cpg) . \'\">&gt;&gt;</a>\';
echo \'<br/><div class=\"sub\"><a href=\"/forum/index.php?id=\' . $razd[\'id\'] . \'\">\' . $frm[\'text\'] . \'&nbsp;/&nbsp;\' . $razd[\'text\'] . \'</a><br />\';
echo $arr[\'from\'];
if (!empty ($nam[\'from\'])) {
echo \'&nbsp;/&nbsp;\' . $nam[\'from\'];
}
echo \' <font color=\"#777777\">\' . date(\"d.m.y / H:i\", $nam[\'time\']) . \'</font>\';
echo \'</div></div>\';
$i++;
}[/code]
  • 1 из 1