• Admin [FOUNDER] ♥ PRO |
(12.12.2015 / 14:38) | TOP |
PHP 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>';
$req = mysql_query("SELECT * FROM `forum` WHERE `type` = 't' and kedit='0' AND `close`!='1' ORDER BY `time` DESC LIMIT 5");
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>';
}
$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>';
$req = mysql_query("SELECT * FROM `forum` WHERE `type` = 't' and kedit='0' AND `close`!='1' ORDER BY `time` DESC LIMIT 5");
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>';
}