Hi, Khách!
![]() | ![]() ![]() ![]() ![]() |
Thêm code này vào đâu tùy ý trong forum/index.php
<?php
//--cung chuyen muc
$req = mysql_query("SELECT * FROM `forum` WHERE `type`='t' AND `refid`='$type1[refid' AND `id`!='$id' ORDER BY `vip` DESC, `time` DESC LIMIT 5");
$total = mysql_num_rows($req);
if($total!=0)
{
echo '<div class="mainblok"><div class="phdr"><b>Cùng chuyên mục</b></div>';
while ($res = mysql_fetch_assoc($req)) {
echo '<div class="list1"><font color="red">» </font>';
echo '<a href="'.$home.'/forum/index.php?id=' . $res['id' .'" title="' . $res['text' . '">' . $res['text' . '</a></div>';
++$i;
}
echo '</div>';
}
?>
Copy code
//--cung chuyen muc
$req = mysql_query("SELECT * FROM `forum` WHERE `type`='t' AND `refid`='$type1[refid' AND `id`!='$id' ORDER BY `vip` DESC, `time` DESC LIMIT 5");
$total = mysql_num_rows($req);
if($total!=0)
{
echo '<div class="mainblok"><div class="phdr"><b>Cùng chuyên mục</b></div>';
while ($res = mysql_fetch_assoc($req)) {
echo '<div class="list1"><font color="red">» </font>';
echo '<a href="'.$home.'/forum/index.php?id=' . $res['id' .'" title="' . $res['text' . '">' . $res['text' . '</a></div>';
++$i;
}
echo '</div>';
}
?>
Copy code
Chỉnh sửa lúc 2016-05-14 07:43 bởi Pham_loi

Trực Tuyến:
Khách: 1