Chèn vào dưới tab <% NAVIGATION %> code sau:
QUOTE
Quote
<div id="tablethree_15t6"></div>
<script>
threeForum=[];
threeForum[0]=[14,"Mẹo vặt trong IBF"];
threeForum[1]=[15,"Tổng hợp Code hay cho IBF"];
threeForum[2]=[16,"Code IBF sưu tầm"];
threeForum[3]=[17,"Hỏi & Đáp về IBF"];
function tao_table_last_post()
{
h="<div class=tableborder>";
h+="<div class=maintitle>Thống kê những bài viết của Box thiết kế Web trên IBF đáng chú ý:</div>";
h+="<center><table width=100% ><tr>"
h+="<td valign=top width=25% class=tablepad style='color:red' ><center><img src='http://209.85.62.23/style_images/1/f_pinned.gif' /><b>"+threeForum[0][1]+"</b></center><br><div id=forum"+ threeForum[0][0] +">Đang tải...</div></td>";
h+="<td valign=top width=25% class=tablepad style='color:blue' ><center><img src='http://209.85.62.23/style_images/1/f_pinned.gif' /><b>"+threeForum[1][1]+"</b></center><br><div id=forum"+ threeForum[1][0] +">Đang tải...</div></td>";
h+="<td valign=top width=25% class=tablepad style='color:orange' ><center><img src='http://209.85.62.23/style_images/1/f_pinned.gif' /><b>"+threeForum[2][1]+"</b></center><br><div id=forum"+ threeForum[2][0] +">Đang tải...</div></td>";
h+="<td valign=top width=25% class=tablepad style='color:9900FF' ><center><img src='http://209.85.62.23/style_images/1/f_pinned.gif' /><b>"+threeForum[3][1]+"</b></center><br><div id=forum"+ threeForum[3][0] +">Đang tải...</div></td>";
h+="</tr></table>";
h+="</center></div>";
document.getElementById("tablethree_15t6").innerHTML=h;
eval(last_post(threeForum[0][0]));
eval(last_post(threeForum[1][0]));
eval(last_post(threeForum[2][0]));
eval(last_post(threeForum[3][0]));
}
function showLast(txt,id)
{
urltopic="http://"+location.hostname+location.pathname+"?view=getlastpost&showtopic=";
T=txt.split("<"+"!-- Begin Topic Entry");
var regLast=new RegExp("<td class='row4'>\n.*a href=.*showtopic=(.*)\" title=\"This topic was started: (.*)\">(.*)<\/a>.*?\n.*<\/td>\n.*td align='center' class='row2'>(.*)<\/td>\n.*td align='center' class='row4'>.*<a .*>(.*)<\/a><\/td>\n.*td align='center' class='row2'>(.*)<\/td>\n.*td class='row2'><span .*>.*<br \/><a .*>.*<\/a> <b>(.*)<\/b><\/span><\/td>","i");
htm="";
for(i=0;i<T.length&&i<11;i++)if(T[i].match(regLast)){
title="Ngày gửi: "+ RegExp.$2+"\n";
if(RegExp.$4.indexOf('<')!=-1&&RegExp.$4.indexOf('>')!=-1){
npost=RegExp.$4.split('>')[1].split('<')[0];
}else{
npost=RegExp.$4;
}
if(RegExp.$7.indexOf('<')!=-1&&RegExp.$7.indexOf('>')!=-1){
nreply=RegExp.$7.split('>')[1].split('<')[0];
}else{
nreply=RegExp.$7;
}
title+="Trả lời: "+RegExp.$5+ " | Đã xem: "+RegExp.$6 +"\n";
title+="Người gửi: "+npost+ "\nTrả lời gần đây: "+nreply;
htm+="<a href='"+urltopic+RegExp.$1+"' title='"+title+"'><img src='http://209.85.48.10/12775/35/emo/p420143.gif' /> "+RegExp.$3.split("<")[0]+"</a><br>"
}
document.getElementById(id).innerHTML=htm;
}
function last_post(id)
{
w="function bai_viet_cuoi_cua_forum"+id+"(){";
w+="if(window.XMLHttpRequest||window.ActiveXObject){";
w+="forumpage"+id+"=(window.XMLHttpRequest) ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');";
w+="forumpage"+id+".onreadystatechange=function (){if(forumpage"+id+".readyState == 4)if(forumpage"+id+".status == 200){text=forumpage"+id+".responseText;showLast(text,'forum"+id+"');}};";
w+="forumpage"+id+".open('GET','http://'+location.hostname+location.pathname+'?showforum="+id+"',true);";
w+="forumpage"+id+".send('unicode');";
w+="}}";
w+="bai_viet_cuoi_cua_forum"+id+"();";
return w;
}
tao_table_last_post();
</script>